@@ -98,7 +98,6 @@ module EDPhysiologyMod
9898 use EDParamsMod , only : q10_mr
9999 use EDParamsMod , only : q10_froz
100100 use EDParamsMod , only : logging_export_frac
101- use EDParamsMod , only : regeneration_model
102101 use EDParamsMod , only : sdlng_mort_par_timescale
103102 use FatesPlantHydraulicsMod , only : AccumulateMortalityWaterStorage
104103 use FatesConstantsMod , only : itrue,ifalse
@@ -143,7 +142,8 @@ module EDPhysiologyMod
143142 use FatesParameterDerivedMod, only : param_derived
144143 use FatesPlantHydraulicsMod, only : InitHydrCohort
145144 use PRTInitParamsFatesMod, only : NewRecruitTotalStoichiometry
146- use FatesInterfaceTypesMod , only : hlm_use_luh
145+ use FatesInterfaceTypesMod, only : hlm_use_luh
146+ use FatesInterfaceTypesMod, only : hlm_regeneration_model
147147
148148 implicit none
149149 private
@@ -2157,7 +2157,7 @@ subroutine SeedUpdate( currentSite )
21572157 litt% seed_in_local(pft) = litt% seed_in_local(pft) + site_seed_rain(pft)* (1.0_r8 - site_disp_frac(pft))/ area ! [kg/m2/day]
21582158
21592159 ! If we are using the Tree Recruitment Scheme (TRS) with or w/o seedling dynamics
2160- if ( any (regeneration_model == [TRS_regeneration, TRS_no_seedling_dyn]) .and. &
2160+ if ( any (hlm_regeneration_model == [TRS_regeneration, TRS_no_seedling_dyn]) .and. &
21612161 prt_params% allom_dbh_maxheight(pft) > min_max_dbh_for_trees) then
21622162
21632163 ! Send a fraction of reproductive carbon to litter to account for
@@ -2215,7 +2215,7 @@ subroutine SeedDecay( litt , currentPatch, bc_in )
22152215 !
22162216 ! !DESCRIPTION:
22172217 ! 1. Flux from seed pool into leaf litter pool
2218- ! 2. If the TRS with seedling dynamics is on (regeneration_model = 3)
2218+ ! 2. If the TRS with seedling dynamics is on (hlm_regeneration_model = 3)
22192219 ! then we calculate seedling mortality here (i.e. flux from seedling pool
22202220 ! (into leaf litter pool)
22212221 !
@@ -2249,7 +2249,7 @@ subroutine SeedDecay( litt , currentPatch, bc_in )
22492249
22502250 ! If the TRS is switched off or the pft can't get big enough to be considered a tree
22512251 ! then use FATES default regeneration.
2252- if ( regeneration_model == default_regeneration .or. &
2252+ if ( hlm_regeneration_model == default_regeneration .or. &
22532253 prt_params% allom_dbh_maxheight(pft) < min_max_dbh_for_trees ) then
22542254
22552255 ! Default seed decay (TRS is off)
@@ -2261,7 +2261,7 @@ subroutine SeedDecay( litt , currentPatch, bc_in )
22612261 ! If the TRS is switched on and the pft is a tree then add non-seed reproductive biomass
22622262 ! to the seed decay flux. This was added to litt%seed_decay in the previously called SeedIn
22632263 ! subroutine
2264- if ( any (regeneration_model == [TRS_regeneration, TRS_no_seedling_dyn]) .and. &
2264+ if ( any (hlm_regeneration_model == [TRS_regeneration, TRS_no_seedling_dyn]) .and. &
22652265 prt_params% allom_dbh_maxheight(pft) > min_max_dbh_for_trees ) then
22662266
22672267 litt% seed_decay(pft) = litt% seed_decay(pft) + &! From non-seed reproductive biomass (added in
@@ -2271,9 +2271,9 @@ subroutine SeedDecay( litt , currentPatch, bc_in )
22712271 end if
22722272
22732273
2274- ! If the TRS is switched on with seedling dynamics (regeneration_model = 2)
2274+ ! If the TRS is switched on with seedling dynamics (hlm_regeneration_model = 2)
22752275 ! then calculate seedling mortality.
2276- if_trs_germ_decay: if ( regeneration_model == TRS_regeneration .and. &
2276+ if_trs_germ_decay: if ( hlm_regeneration_model == TRS_regeneration .and. &
22772277 prt_params% allom_dbh_maxheight(pft) > min_max_dbh_for_trees ) then
22782278
22792279 !- ---------------------------------------------------------------------
@@ -2379,16 +2379,16 @@ subroutine SeedGermination( litt, cold_stat, drought_stat, bc_in, currentPatch )
23792379
23802380 ! If the TRS's seedling dynamics is switched off, then we use FATES's default approach
23812381 ! to germination
2382- if_tfs_or_def: if ( regeneration_model == default_regeneration .or. &
2383- regeneration_model == TRS_no_seedling_dyn .or. &
2382+ if_tfs_or_def: if ( hlm_regeneration_model == default_regeneration .or. &
2383+ hlm_regeneration_model == TRS_no_seedling_dyn .or. &
23842384 prt_params% allom_dbh_maxheight(pft) < min_max_dbh_for_trees ) then
23852385
23862386 litt% seed_germ_in(pft) = min (litt% seed(pft) * EDPftvarcon_inst% germination_rate(pft), &
23872387 max_germination)* years_per_day
23882388
23892389 ! If TRS seedling dynamics is switched on we calculate seedling emergence (i.e. germination)
23902390 ! as a pft-specific function of understory light and soil moisture.
2391- else if ( regeneration_model == TRS_regeneration .and. &
2391+ else if ( hlm_regeneration_model == TRS_regeneration .and. &
23922392 prt_params% allom_dbh_maxheight(pft) > min_max_dbh_for_trees ) then
23932393
23942394 ! Step 1. Calculate how germination rate is modified by understory light
@@ -2634,15 +2634,15 @@ subroutine recruitment(currentSite, currentPatch, bc_in)
26342634
26352635 ! If TRS seedling dynamics is switched off then the available mass to make new recruits
26362636 ! is everything in the seed_germ pool.
2637- if (regeneration_model == default_regeneration .or. &
2638- regeneration_model == TRS_no_seedling_dyn .or. &
2637+ if (hlm_regeneration_model == default_regeneration .or. &
2638+ hlm_regeneration_model == TRS_no_seedling_dyn .or. &
26392639 prt_params% allom_dbh_maxheight(ft) < min_max_dbh_for_trees) then
26402640
26412641 mass_avail = currentPatch% area * currentPatch% litter(el)% seed_germ(ft)
26422642
26432643 ! If TRS seedling dynamics is on then calculate the available mass to make new recruits
26442644 ! as a pft-specific function of light and soil moisture in the seedling layer.
2645- else if (regeneration_model == TRS_regeneration .and. &
2645+ else if (hlm_regeneration_model == TRS_regeneration .and. &
26462646 prt_params% allom_dbh_maxheight(ft) > min_max_dbh_for_trees) then
26472647
26482648 sdlng2sap_par = currentPatch% sdlng2sap_par% GetMean()* &
@@ -2799,7 +2799,9 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in)
27992799 ! and turnover in dying trees.
28002800 !
28012801 ! !USES:
2802-
2802+ use EDParamsMod , only : landuse_grazing_carbon_use_eff
2803+ use EDParamsMod , only : landuse_grazing_nitrogen_use_eff
2804+ use EDParamsMod , only : landuse_grazing_phosphorus_use_eff
28032805 !
28042806 ! !ARGUMENTS
28052807 type (ed_site_type), intent (inout ), target :: currentSite
@@ -2846,6 +2848,8 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in)
28462848 integer :: numlevsoil ! Actual number of soil layers
28472849
28482850 real (r8 ) :: SF_val_CWD_frac_adj(4 ) ! SF_val_CWD_frac adjusted based on cohort dbh
2851+ real (r8 ) :: leaf_herbivory ! leaf that is eaten by grazers [kg]
2852+ real (r8 ) :: herbivory_element_use_efficiency ! fraction of grazed biomass that is returned to litter pool versus atmosphere
28492853 !- ---------------------------------------------------------------------
28502854
28512855 ! -----------------------------------------------------------------------------------
@@ -2856,6 +2860,15 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in)
28562860
28572861 element_id = litt% element_id
28582862
2863+ select case (element_id)
2864+ case (carbon12_element)
2865+ herbivory_element_use_efficiency = landuse_grazing_carbon_use_eff
2866+ case (nitrogen_element)
2867+ herbivory_element_use_efficiency = landuse_grazing_nitrogen_use_eff
2868+ case (phosphorus_element)
2869+ herbivory_element_use_efficiency = landuse_grazing_phosphorus_use_eff
2870+ end select
2871+
28592872 ! Object tracking flux diagnostics for each element
28602873 elflux_diags = > currentSite% flux_diags% elem(element_pos(element_id))
28612874
@@ -2881,6 +2894,8 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in)
28812894 fnrt_m = currentCohort% prt% GetState(fnrt_organ,element_id)
28822895 repro_m = currentCohort% prt% GetState(repro_organ,element_id)
28832896
2897+ leaf_herbivory = currentCohort% prt% GetHerbivory(leaf_organ, element_id)
2898+
28842899 if (prt_params% woody(currentCohort% pft) == itrue) then
28852900 ! Assumption: for woody plants fluxes from deadwood and sapwood go together in CWD pool
28862901 leaf_m_turnover = currentCohort% prt% GetTurnover(leaf_organ,element_id)
@@ -2925,7 +2940,9 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in)
29252940 do dcmpy= 1 ,ndcmpy
29262941 dcmpy_frac = GetDecompyFrac(pft,leaf_organ,dcmpy)
29272942 litt% leaf_fines_in(dcmpy) = litt% leaf_fines_in(dcmpy) + &
2928- (leaf_m_turnover+ repro_m_turnover) * plant_dens * dcmpy_frac
2943+ (leaf_m_turnover+ repro_m_turnover + &
2944+ leaf_herbivory * herbivory_element_use_efficiency) * &
2945+ plant_dens * dcmpy_frac
29292946
29302947 dcmpy_frac = GetDecompyFrac(pft,fnrt_organ,dcmpy)
29312948 do ilyr = 1 , numlevsoil
@@ -2938,6 +2955,11 @@ subroutine CWDInput( currentSite, currentPatch, litt, bc_in)
29382955 elflux_diags% root_litter_input(pft) + &
29392956 (fnrt_m_turnover + store_m_turnover ) * currentCohort% n
29402957
2958+ ! send the part of the herbivory flux that doesn't go to litter to the atmosphere
2959+
2960+ site_mass% herbivory_flux_out = &
2961+ site_mass% herbivory_flux_out + &
2962+ leaf_herbivory * (1._r8 - herbivory_element_use_efficiency) * currentCohort% n
29412963
29422964 ! Assumption: turnover from deadwood and sapwood are lumped together in CWD pool
29432965
0 commit comments