Skip to content

Commit

Permalink
Merge pull request #764 from rgknox/efflux-restfix
Browse files Browse the repository at this point in the history
restart fix for efflux variables
  • Loading branch information
rgknox authored Oct 10, 2021
2 parents b5f5041 + b225db8 commit 2edc895
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 32 deletions.
36 changes: 10 additions & 26 deletions biogeochem/FatesSoilBGCFluxMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1022,35 +1022,19 @@ subroutine FluxIntoLitterPools(csite, bc_in, bc_out)

end select


! If there is any efflux (from stores overflowing)
! than pass that to the labile litter pool

do id = 1,nlev_eff_decomp
flux_lab_si(id) = flux_lab_si(id) + &
sum(csite%flux_diags(el)%nutrient_efflux_scpf(:)) * &
area_inv * surface_prof(id)
end do

currentPatch => csite%oldest_patch
do while (associated(currentPatch))

! If there is any efflux (from stores overflowing)
! than pass that to the labile litter pool

currentCohort => currentPatch%tallest
do while(associated(currentCohort))
if(.not.currentCohort%isnew)then
if(element_list(el).eq.carbon12_element) then
efflux_ptr => currentCohort%daily_c_efflux
elseif(element_list(el).eq.nitrogen_element) then
efflux_ptr => currentCohort%daily_n_efflux
elseif(element_list(el).eq.phosphorus_element) then
efflux_ptr => currentCohort%daily_p_efflux
end if

! Unit conversion
! kg/plant/day * plant/ha * ha/m2 -> kg/m2/day

do id = 1,nlev_eff_decomp
flux_lab_si(id) = flux_lab_si(id) + &
efflux_ptr * currentCohort%n* AREA_INV * surface_prof(id)
end do
end if
currentCohort => currentCohort%shorter
end do


! Set a pointer to the litter object
! for the current element on the current
! patch
Expand Down
6 changes: 0 additions & 6 deletions main/FatesHistoryInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3377,12 +3377,6 @@ subroutine update_history_dyn(this,nc,nsites,sites)

end do

! and reset the disturbance-related field buffers

do el = 1, num_elements
call sites(s)%flux_diags(el)%ZeroFluxDiags()
end do

enddo ! site loop

end associate
Expand Down

0 comments on commit 2edc895

Please sign in to comment.