Skip to content

Commit

Permalink
Merge pull request #955 from rgknox/hydro-simple-fixes
Browse files Browse the repository at this point in the history
hydro fix and simple fixes
  • Loading branch information
glemieux authored Dec 1, 2022
2 parents 2f90901 + 257e26c commit 474fa84
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions biogeophys/FatesPlantHydraulicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2750,6 +2750,7 @@ subroutine hydraulics_bc ( nsites, sites, bc_in, bc_out, dtime)
ccohort=>cpatch%tallest
do while(associated(ccohort))

ccohort_hydr => ccohort%co_hydr
sum_l_aroot = sum(ccohort_hydr%l_aroot_layer(:))
ft = ccohort%pft

Expand Down
2 changes: 0 additions & 2 deletions main/EDTypesMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,6 @@ module EDTypesMod
real(r8), parameter, public :: min_n_safemath = 1.0E-12_r8 ! in some cases, we want to immediately remove super small
! number densities of cohorts to prevent FPEs

character*4 yearchar

! special mode to cause PFTs to create seed mass of all currently-existing PFTs
logical, parameter, public :: homogenize_seed_pfts = .false.

Expand Down
14 changes: 7 additions & 7 deletions main/FatesHistoryInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2209,6 +2209,8 @@ subroutine update_history_dyn(this,nc,nsites,sites)

io_si = sites(s)%h_gid

flux_diags_c => sites(s)%flux_diags(element_pos(carbon12_element))

! set the fates fraction to one, since it is zero on non-fates columns, &
! the average is the total gridcell fates fraction
hio_fates_fraction_si(io_si) = 1._r8
Expand Down Expand Up @@ -3216,7 +3218,7 @@ subroutine update_history_dyn(this,nc,nsites,sites)
! Update Litter Flux Variables

litt_c => cpatch%litter(element_pos(carbon12_element))
flux_diags_c => sites(s)%flux_diags(element_pos(carbon12_element))


do i_cwd = 1, ncwd

Expand Down Expand Up @@ -3462,12 +3464,10 @@ subroutine update_history_dyn(this,nc,nsites,sites)
! Some carbon only litter diagnostics (legacy)
! ------------------------------------------------------------------------------

flux_diags => sites(s)%flux_diags(element_pos(carbon12_element))

hio_litter_in_si(io_si) = (sum(flux_diags%cwd_ag_input(:)) + &
sum(flux_diags%cwd_bg_input(:)) + &
sum(flux_diags%leaf_litter_input(:)) + &
sum(flux_diags%root_litter_input(:))) * &
hio_litter_in_si(io_si) = (sum(flux_diags_c%cwd_ag_input(:)) + &
sum(flux_diags_c%cwd_bg_input(:)) + &
sum(flux_diags_c%leaf_litter_input(:)) + &
sum(flux_diags_c%root_litter_input(:))) * &
AREA_INV * days_per_sec

hio_litter_out_si(io_si) = 0._r8
Expand Down

0 comments on commit 474fa84

Please sign in to comment.