Skip to content

Commit

Permalink
Merge pull request #620 from rgknox/rgknox-hist-elem-zerofix
Browse files Browse the repository at this point in the history
Zeroing a litter diagnostic that was not being zerod
  • Loading branch information
glemieux authored Mar 16, 2020
2 parents f55eb83 + 26de3bb commit ab1647a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main/FatesHistoryInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2679,13 +2679,13 @@ subroutine update_history_dyn(this,nc,nsites,sites)

hio_cwd_elcwd(io_si,:) = 0._r8


do el = 1, num_elements

flux_diags => sites(s)%flux_diags(el)

! Sum up all input litter fluxes (above below, fines, cwd)
hio_litter_in_elem(io_si, el) = hio_litter_in_elem(io_si, el) + &
hio_litter_in_elem(io_si, el) = &
sum(flux_diags%cwd_ag_input(:)) + &
sum(flux_diags%cwd_bg_input(:)) + &
sum(flux_diags%leaf_litter_input(:)) + &
Expand All @@ -2701,6 +2701,7 @@ subroutine update_history_dyn(this,nc,nsites,sites)
hio_seed_decay_elem(io_si,el) = 0._r8
hio_seeds_in_local_elem(io_si,el) = 0._r8
hio_seed_in_extern_elem(io_si,el) = 0._r8
hio_litter_out_elem(io_si,el) = 0._r8

cpatch => sites(s)%oldest_patch
do while(associated(cpatch))
Expand All @@ -2715,7 +2716,7 @@ subroutine update_history_dyn(this,nc,nsites,sites)
sum(litt%root_fines_frag(:,:)) + &
sum(litt%ag_cwd_frag(:)) + &
sum(litt%bg_cwd_frag(:,:))) * area_frac

hio_seed_bank_elem(io_si,el) = hio_seed_bank_elem(io_si,el) + &
sum(litt%seed(:)) * area_frac

Expand Down

0 comments on commit ab1647a

Please sign in to comment.