From 89536812f4d9c8c1b6510497dc3fb6d39a1f41c9 Mon Sep 17 00:00:00 2001 From: ZacharyRobbins Date: Tue, 16 Aug 2022 11:24:11 -0600 Subject: [PATCH] Updated to comments by JK Revised commit to issue on PR #891. Adjusted so fine roots are retained within that pool. Fixed the spacing on EDPatchDynamics.F90 --- biogeochem/EDCohortDynamicsMod.F90 | 3 +- biogeochem/EDPatchDynamicsMod.F90 | 89 ++++++++++++++---------------- biogeochem/EDPhysiologyMod.F90 | 7 +-- 3 files changed, 46 insertions(+), 53 deletions(-) diff --git a/biogeochem/EDCohortDynamicsMod.F90 b/biogeochem/EDCohortDynamicsMod.F90 index 957c3847ae..e283dfb006 100644 --- a/biogeochem/EDCohortDynamicsMod.F90 +++ b/biogeochem/EDCohortDynamicsMod.F90 @@ -978,12 +978,11 @@ subroutine SendCohortToLitter(csite,cpatch,ccohort,nplant,bc_in) leaf_m = ccohort%prt%GetState(leaf_organ, element_list(el))+ & ccohort%prt%GetState(store_organ, element_list(el))+ & ccohort%prt%GetState(sapw_organ, element_list(el))+ & - ccohort%prt%GetState(fnrt_organ, element_list(el))+ & ccohort%prt%GetState(struct_organ, element_list(el))+ & ccohort%prt%GetState(repro_organ, element_list(el)) store_m = 0_r8 sapw_m = 0_r8 - fnrt_m = 0_r8 + fnrt_m = ccohort%prt%GetState(fnrt_organ, element_list(el)) struct_m = 0_r8 repro_m = 0_r8 end if diff --git a/biogeochem/EDPatchDynamicsMod.F90 b/biogeochem/EDPatchDynamicsMod.F90 index dc4ef3d989..2ee60936e0 100644 --- a/biogeochem/EDPatchDynamicsMod.F90 +++ b/biogeochem/EDPatchDynamicsMod.F90 @@ -1646,89 +1646,84 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, & fnrt_m = currentCohort%prt%GetState(fnrt_organ, element_list(el)) struct_m = currentCohort%prt%GetState(struct_organ, element_list(el)) repro_m = currentCohort%prt%GetState(repro_organ, element_list(el)) - - - ! Absolute number of dead trees being transfered in with the donated area - num_dead_trees = (currentCohort%fire_mort*currentCohort%n * & + ! Absolute number of dead trees being transfered in with the donated area + num_dead_trees = (currentCohort%fire_mort*currentCohort%n * & patch_site_areadis/currentPatch%area) - - ! Contribution of dead trees to leaf litter - donatable_mass = num_dead_trees * (leaf_m+repro_m) * & + + ! Contribution of dead trees to leaf litter + donatable_mass = num_dead_trees * (leaf_m+repro_m) * & (1.0_r8-currentCohort%fraction_crown_burned) - ! Contribution of dead trees to leaf burn-flux - burned_mass = num_dead_trees * (leaf_m+repro_m) * currentCohort%fraction_crown_burned + ! Contribution of dead trees to leaf burn-flux + burned_mass = num_dead_trees * (leaf_m+repro_m) * currentCohort%fraction_crown_burned - do dcmpy=1,ndcmpy - dcmpy_frac = GetDecompyFrac(pft,leaf_organ,dcmpy) - new_litt%leaf_fines(dcmpy) = new_litt%leaf_fines(dcmpy) + & - donatable_mass*donate_m2*dcmpy_frac - curr_litt%leaf_fines(dcmpy) = curr_litt%leaf_fines(dcmpy) + & + do dcmpy=1,ndcmpy + dcmpy_frac = GetDecompyFrac(pft,leaf_organ,dcmpy) + new_litt%leaf_fines(dcmpy) = new_litt%leaf_fines(dcmpy) + & + donatable_mass*donate_m2*dcmpy_frac + curr_litt%leaf_fines(dcmpy) = curr_litt%leaf_fines(dcmpy) + & donatable_mass*retain_m2*dcmpy_frac - end do + end do - site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass + site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass - call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, & + call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil, & bc_in%max_rooting_depth_index_col) - do dcmpy=1,ndcmpy - dcmpy_frac = GetDecompyFrac(pft,fnrt_organ,dcmpy) - do sl = 1,currentSite%nlevsoil + do dcmpy=1,ndcmpy + dcmpy_frac = GetDecompyFrac(pft,fnrt_organ,dcmpy) + do sl = 1,currentSite%nlevsoil donatable_mass = num_dead_trees * (fnrt_m+store_m) * currentSite%rootfrac_scr(sl) new_litt%root_fines(dcmpy,sl) = new_litt%root_fines(dcmpy,sl) + & donatable_mass*donate_m2*dcmpy_frac curr_litt%root_fines(dcmpy,sl) = curr_litt%root_fines(dcmpy,sl) + & donatable_mass*retain_m2*dcmpy_frac - end do - end do - - ! Track as diagnostic fluxes - flux_diags%leaf_litter_input(pft) = & + end do + end do + ! Track as diagnostic fluxes + flux_diags%leaf_litter_input(pft) = & flux_diags%leaf_litter_input(pft) + & num_dead_trees * (leaf_m+repro_m) * (1.0_r8-currentCohort%fraction_crown_burned) - flux_diags%root_litter_input(pft) = & - flux_diags%root_litter_input(pft) + & - (fnrt_m + store_m) * num_dead_trees + flux_diags%root_litter_input(pft) = & + flux_diags%root_litter_input(pft) + & + (fnrt_m + store_m) * num_dead_trees ! coarse root biomass per tree - bcroot = (sapw_m + struct_m) * (1.0_r8 - prt_params%allom_agb_frac(pft) ) + bcroot = (sapw_m + struct_m) * (1.0_r8 - prt_params%allom_agb_frac(pft) ) ! below ground coarse woody debris from burned trees - do c = 1,ncwd - do sl = 1,currentSite%nlevsoil - donatable_mass = num_dead_trees * SF_val_CWD_frac(c) * & + do c = 1,ncwd + do sl = 1,currentSite%nlevsoil + donatable_mass = num_dead_trees * SF_val_CWD_frac(c) * & bcroot * currentSite%rootfrac_scr(sl) - - new_litt%bg_cwd(c,sl) = new_litt%bg_cwd(c,sl) + & + new_litt%bg_cwd(c,sl) = new_litt%bg_cwd(c,sl) + & donatable_mass * donate_m2 - curr_litt%bg_cwd(c,sl) = curr_litt%bg_cwd(c,sl) + & + curr_litt%bg_cwd(c,sl) = curr_litt%bg_cwd(c,sl) + & donatable_mass * retain_m2 ! track diagnostics - flux_diags%cwd_bg_input(c) = & + flux_diags%cwd_bg_input(c) = & flux_diags%cwd_bg_input(c) + & donatable_mass - enddo - end do - + enddo + end do ! stem biomass per tree bstem = (sapw_m + struct_m) * prt_params%allom_agb_frac(pft) ! Above ground coarse woody debris from twigs and small branches ! a portion of this pool may burn - do c = 1,ncwd - donatable_mass = num_dead_trees * SF_val_CWD_frac(c) * bstem - if (c == 1 .or. c == 2) then + do c = 1,ncwd + donatable_mass = num_dead_trees * SF_val_CWD_frac(c) * bstem + if (c == 1 .or. c == 2) then donatable_mass = donatable_mass * (1.0_r8-currentCohort%fraction_crown_burned) burned_mass = num_dead_trees * SF_val_CWD_frac(c) * bstem * & currentCohort%fraction_crown_burned site_mass%burn_flux_to_atm = site_mass%burn_flux_to_atm + burned_mass - endif - new_litt%ag_cwd(c) = new_litt%ag_cwd(c) + donatable_mass * donate_m2 - curr_litt%ag_cwd(c) = curr_litt%ag_cwd(c) + donatable_mass * retain_m2 - flux_diags%cwd_ag_input(c) = flux_diags%cwd_ag_input(c) + donatable_mass - enddo + endif + new_litt%ag_cwd(c) = new_litt%ag_cwd(c) + donatable_mass * donate_m2 + curr_litt%ag_cwd(c) = curr_litt%ag_cwd(c) + donatable_mass * retain_m2 + flux_diags%cwd_ag_input(c) = flux_diags%cwd_ag_input(c) + donatable_mass + enddo endif diff --git a/biogeochem/EDPhysiologyMod.F90 b/biogeochem/EDPhysiologyMod.F90 index 71c483b2df..884d8d8288 100644 --- a/biogeochem/EDPhysiologyMod.F90 +++ b/biogeochem/EDPhysiologyMod.F90 @@ -2213,23 +2213,22 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in) leaf_m_turnover = currentCohort%prt%GetTurnover(leaf_organ, element_id)+ & currentCohort%prt%GetTurnover(store_organ, element_id)+ & currentCohort%prt%GetTurnover(sapw_organ, element_id)+ & - currentCohort%prt%GetTurnover(fnrt_organ, element_id)+ & + currentCohort%prt%GetTurnover(struct_organ, element_id)+ & currentCohort%prt%GetTurnover(repro_organ, element_id) store_m_turnover = 0_r8 sapw_m_turnover = 0_r8 - fnrt_m_turnover = 0_r8 + fnrt_m_turnover = currentCohort%prt%GetTurnover(fnrt_organ, element_id) struct_m_turnover = 0_r8 repro_m_turnover = 0_r8 leaf_m = currentCohort%prt%GetState(leaf_organ, element_id)+ & currentCohort%prt%GetState(store_organ, element_id)+ & currentCohort%prt%GetState(sapw_organ, element_id)+ & - currentCohort%prt%GetState(fnrt_organ, element_id)+ & currentCohort%prt%GetState(struct_organ, element_id)+ & currentCohort%prt%GetState(repro_organ, element_id) store_m = 0_r8 sapw_m = 0_r8 - fnrt_m = 0_r8 + fnrt_m = currentCohort%prt%GetState(fnrt_organ, element_id) struct_m = 0_r8 repro_m = 0_r8 end if