Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nutrient Enabled Aquisition (parteh pt 3) #598

Merged
merged 103 commits into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
3559856
parteh: adding in CNP module.
rgknox Jun 18, 2019
fdd6a53
parteh unit testing updates.
rgknox Jun 19, 2019
99226d6
parteh unit tests updates
rgknox Jun 19, 2019
5135231
Updating CDL parser, making it handle multi-dimension arrays.
rgknox Jun 19, 2019
3aa6523
parteh unit tests, created generic function to read CDL files.
rgknox Jun 20, 2019
a061352
parteh unit testing development
rgknox Jun 21, 2019
930e72d
Added F90ParamParse.py
rgknox Jun 21, 2019
a1e5c0e
parteh FUTs, incremental progress on the auto-generating code for EDPFTs
rgknox Jun 24, 2019
559c57e
parteh unit testing: enabling detection of multiple parameters per line
rgknox Jun 25, 2019
44444bf
parteh unit testing
rgknox Jun 25, 2019
ca84096
func unit testing parteh
rgknox Jun 25, 2019
2ca58ae
funcitonal unit testing for parteh
rgknox Jun 25, 2019
a66caaf
parteh functional unit test updates
rgknox Jun 25, 2019
28d20ea
parteh functional unit testing
rgknox Jun 28, 2019
6aeb7fb
Filled in some defaults for a nutrient enabled fates
rgknox Jul 13, 2019
2793823
parteh unit testing, updating driver script.
rgknox Jul 13, 2019
d8d146d
parteh unit tests, streamlining parameter boundary specifications
rgknox Jul 13, 2019
0371a87
parteh unit tests, minor modifications to driver code
rgknox Jul 13, 2019
d37f0c6
Merge branch 'parteh-acnp-withlive' of github.com:rgknox/fates into p…
rgknox Jul 13, 2019
eddd81b
parteh unit test framework
rgknox Aug 2, 2019
09d2e31
Merge branch 'master' into parteh-acnp-withlive
rgknox Oct 13, 2019
2132abd
Working on nutrient acquistion boundary conditions.
rgknox Oct 31, 2019
7df58cd
Making bc arrays for nutrient aquisition allocatable pointers, which …
rgknox Nov 6, 2019
139ac01
nutrients, work on parameter definitions and boundary conditions, RD …
rgknox Nov 6, 2019
85c29e0
More nutrient coupling stuff, mostly ptase, nfix and prepping for N/P…
rgknox Nov 8, 2019
91ddc4a
inremental progress towards nutrient coupling
rgknox Nov 11, 2019
902dd6b
Created new type for constant parameter bc out, reworked ptase parame…
rgknox Nov 11, 2019
0cf4874
nutrient coupling stuff
rgknox Nov 12, 2019
a20424c
fixed bc_in type definition, nutrient coupling
rgknox Nov 12, 2019
a14d519
nutrient interface, debuggging
rgknox Nov 13, 2019
677fa9a
multi-nutrient stuff, history diagnostics and boundary conditions wit…
rgknox Nov 26, 2019
a0dfae9
nutrients, bug fixes and python 3 compatibility
rgknox Nov 27, 2019
973aeb3
temporarily tracking a testing parameter file for nutrients
rgknox Nov 27, 2019
6649dd5
First pass at synthetic input nutrient uptake fluxes.
rgknox Dec 2, 2019
f9c4790
Nutrient uptake and phenology fixes.
rgknox Dec 3, 2019
46a538d
nutrient coupling, general debugging, changed specification flags for…
rgknox Dec 4, 2019
c0bc4a6
nutrient coupling: temporarily disabling dynamic controls of N on lea…
rgknox Dec 4, 2019
10776d5
Updating history variables related to nutrients
rgknox Dec 13, 2019
9c3a9fa
Bug fix in ECA plant demand parameter. Update interface
rgknox Feb 28, 2020
57d4f71
Bug fix in plant nutrient demand calculations
rgknox Mar 10, 2020
3e52e1c
Migrated many parameters to parteh to increase modularity
rgknox Mar 23, 2020
4dfa1bb
Updating parteh subjective unit function testing
rgknox Mar 24, 2020
28d83e4
Minor changes to the parteh functional unit test
rgknox Mar 25, 2020
b106f51
Added the new parameter module in PARTEH, and its FATES specific init…
rgknox Mar 26, 2020
b73ba70
Updated nutrient need calculations
rgknox Mar 29, 2020
f28a42a
Reverted parameter types to be allocatables rather than allocable poi…
rgknox Mar 30, 2020
0d328aa
Large refactor of parteh that includes: 1) parteh relevant parameters…
rgknox Apr 10, 2020
1971347
Incremental progress towards fates-elm with nutrient coupling, workin…
rgknox Apr 22, 2020
ad5e047
Fixed a very very very insidious effort of self destruction on my par…
rgknox Apr 23, 2020
4c97684
Parteh CNP refactors
rgknox Apr 29, 2020
ae94ae4
Updates to CNPAllometric allocation model
rgknox May 1, 2020
e74106d
Resolved significant conflicts between parteh pt 3 and master. Confli…
rgknox Jun 22, 2020
b14ec84
nutrient dynamics merge fixes and resolutions
rgknox Jun 26, 2020
962a4d3
nutrient dynamics - fixes to parameter reads
rgknox Jul 29, 2020
5220804
Simple merge resolution between nutrient dynamics branch and main.
rgknox Jul 29, 2020
8e140ec
merge resolutions, mostly between LU and nutrient branches
rgknox Aug 5, 2020
ffe32fb
Merge resolution fixes with api 13 and nutrients
rgknox Aug 5, 2020
82949ab
nutrient allocation fixes related to assessing nutrient needs
rgknox Aug 7, 2020
055d7b8
Combined hi-freq NEP with productivity history updates. Need to move …
rgknox Aug 12, 2020
0abb59a
Removed tissue based growth respiration tax for parteh_mode=2.
rgknox Aug 21, 2020
37fedc5
Breaking SoilBGCFluxes into its own module. Adding a persistent and s…
rgknox Aug 21, 2020
2bc8fa4
Moved BGC flux routines to a dedicated module
rgknox Aug 26, 2020
c05cd83
Updated CNP allocation hypothesis 1. Storage now gives back to N and …
rgknox Aug 28, 2020
244f6f0
Updated some history variables and units for FATES CNP
rgknox Aug 31, 2020
883ad7d
Slight modification to initialization of unlimited nutrient availabil…
rgknox Sep 3, 2020
267152b
Removed unused code, added some descriptive text to defining boundary…
rgknox Sep 4, 2020
cd5425b
Update biogeochem/FatesSoilBGCFluxMod.F90
rgknox Sep 4, 2020
31b095f
Updated descriptive text in FatesSoilBGCFluxMod. Fixed root fraction …
rgknox Sep 4, 2020
b14127c
Merge branch 'parteh-acnp-withlive' of github.com:rgknox/fates into p…
rgknox Sep 4, 2020
c5c886e
Updated default file to use prescribed NP uptake
rgknox Sep 8, 2020
363bb7e
Initialization fix for nutrient demand in new cohorts, added loop ide…
rgknox Sep 11, 2020
8fceb0b
Update parteh/PRTParamsFATESMod.F90
rgknox Sep 12, 2020
ae6d281
CNP fixes and updates. Added some testing flags to enable matching re…
rgknox Sep 17, 2020
d4838a5
Merge branch 'parteh-acnp-withlive' of github.com:rgknox/fates into p…
rgknox Sep 17, 2020
9f0d86e
CNP code cleaning
rgknox Sep 17, 2020
6883f46
CNP code cleaning
rgknox Sep 17, 2020
7cc7c67
Reducing carbon reabsorption back to 0
rgknox Sep 20, 2020
329a225
Merge branch 'master' into parteh-acnp-withlive
rgknox Sep 21, 2020
96775a5
Added restarts for efflux and uptake site level diagnostics
rgknox Sep 22, 2020
a445237
Merge branch 'master' into parteh-acnp-withlive-restartfixes
rgknox Sep 22, 2020
c15cf37
Added n and p need to restart
rgknox Sep 23, 2020
3ecc9fd
Add a fix that prevents div0 in calculation of leaf respiration
rgknox Sep 23, 2020
8ae50e4
Merge branch 'parteh-acnp-withlive-restartfixes' of github.com:rgknox…
rgknox Sep 23, 2020
7aeb8c5
Fixed logic in the boundary condition to soil bgc prep, and removes a…
rgknox Sep 23, 2020
3d66222
Added loop labels to long loops in PrepNutrientAquisition Bcs
rgknox Sep 23, 2020
78a0ebf
Merge branch 'parteh-acnp-withlive-restartfixes' of github.com:rgknox…
rgknox Sep 23, 2020
01203fe
Re-instituted calculation of demand, which had been removed in previo…
rgknox Sep 23, 2020
243d0ad
Merge branch 'parteh-acnp-withlive-restartfixes' of github.com:rgknox…
rgknox Sep 23, 2020
6ac33e2
typo fixed in restart definition of nutr need
rgknox Sep 23, 2020
b160f8b
Merge branch 'parteh-acnp-withlive-restartfixes' into parteh-acnp-wit…
rgknox Sep 23, 2020
230d56f
Reshuffled loops during nutrient uptake code to move if statements ou…
rgknox Sep 23, 2020
4f1a7d4
Code cleaning per comments by ckoven
rgknox Sep 23, 2020
f255e5c
Update biogeochem/FatesSoilBGCFluxMod.F90
rgknox Sep 23, 2020
465859c
Response to ckoven comments on explaining the cn_scalar functions in …
rgknox Sep 23, 2020
193b3aa
Merge branch 'parteh-acnp-withlive' of github.com:rgknox/fates into p…
rgknox Sep 23, 2020
a757d23
Update biogeochem/FatesSoilBGCFluxMod.F90
rgknox Sep 23, 2020
d619973
Update fire/SFMainMod.F90
rgknox Sep 23, 2020
65102c0
Changed bc_out%n_plant_comps to bc_out%num_plant_comps
rgknox Sep 23, 2020
c4b3a2e
Merge branch 'parteh-acnp-withlive' of github.com:rgknox/fates into p…
rgknox Sep 23, 2020
39364ef
Updated %p to %ptr in PRTAllometricCNPMod
rgknox Sep 23, 2020
692fc6d
Updated some named constants (real and int flags)
rgknox Sep 23, 2020
5e3e670
Refactored nutrient out boundary conditions, particularly the cn_scalar.
rgknox Sep 24, 2020
2250857
added if flags to history registry, which is needed for filtering wit…
rgknox Sep 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions biogeochem/EDCanopyStructureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module EDCanopyStructureMod
use FatesConstantsMod , only : rsnbl_math_prec
use FatesGlobals , only : fates_log
use EDPftvarcon , only : EDPftvarcon_inst
use PRTParametersMod , only : prt_params
use FatesAllometryMod , only : carea_allom
use EDCohortDynamicsMod , only : copy_cohort, terminate_cohorts, fuse_cohorts
use EDCohortDynamicsMod , only : InitPRTObject
Expand Down Expand Up @@ -280,12 +281,12 @@ subroutine canopy_structure( currentSite , bc_in )
write(fates_log(),*) 'coh n:',currentCohort%n
write(fates_log(),*) 'coh carea:',currentCohort%c_area
ipft=currentCohort%pft
write(fates_log(),*) 'maxh:',EDPftvarcon_inst%allom_dbh_maxheight(ipft)
write(fates_log(),*) 'lmode: ',EDPftvarcon_inst%allom_lmode(ipft)
write(fates_log(),*) 'd2bl2: ',EDPftvarcon_inst%allom_d2bl2(ipft)
write(fates_log(),*) 'd2bl_ediff: ',EDPftvarcon_inst%allom_blca_expnt_diff(ipft)
write(fates_log(),*) 'd2ca_min: ',EDPftvarcon_inst%allom_d2ca_coefficient_min(ipft)
write(fates_log(),*) 'd2ca_max: ',EDPftvarcon_inst%allom_d2ca_coefficient_max(ipft)
write(fates_log(),*) 'maxh:',prt_params%allom_dbh_maxheight(ipft)
write(fates_log(),*) 'lmode: ',prt_params%allom_lmode(ipft)
write(fates_log(),*) 'd2bl2: ',prt_params%allom_d2bl2(ipft)
write(fates_log(),*) 'd2bl_ediff: ',prt_params%allom_blca_expnt_diff(ipft)
write(fates_log(),*) 'd2ca_min: ',prt_params%allom_d2ca_coefficient_min(ipft)
write(fates_log(),*) 'd2ca_max: ',prt_params%allom_d2ca_coefficient_max(ipft)
currentCohort => currentCohort%shorter
enddo
call endrun(msg=errMsg(sourcefile, __LINE__))
Expand Down Expand Up @@ -1223,7 +1224,7 @@ subroutine canopy_spread( currentSite )
do while (associated(currentCohort))
call carea_allom(currentCohort%dbh,currentCohort%n, &
currentSite%spread,currentCohort%pft,currentCohort%c_area)
if( (EDPftvarcon_inst%woody(currentCohort%pft) .eq. 1 ) .and. &
if( ( int(prt_params%woody(currentCohort%pft)) .eq. itrue ) .and. &
(currentCohort%canopy_layer .eq. 1 ) ) then
sitelevel_canopyarea = sitelevel_canopyarea + currentCohort%c_area
endif
Expand Down Expand Up @@ -1262,9 +1263,8 @@ subroutine canopy_summarization( nsites, sites, bc_in )
use FatesSizeAgeTypeIndicesMod, only : sizetype_class_index
use FatesSizeAgeTypeIndicesMod, only : coagetype_class_index
use EDtypesMod , only : area
use EDPftvarcon , only : EDPftvarcon_inst
use FatesConstantsMod , only : itrue

! !ARGUMENTS
integer , intent(in) :: nsites
type(ed_site_type) , intent(inout), target :: sites(nsites)
Expand Down Expand Up @@ -1342,7 +1342,7 @@ subroutine canopy_summarization( nsites, sites, bc_in )

if(currentCohort%canopy_layer==1)then
currentPatch%total_canopy_area = currentPatch%total_canopy_area + currentCohort%c_area
if(EDPftvarcon_inst%woody(ft)==1)then
if( int(prt_params%woody(ft))==itrue)then
currentPatch%total_tree_area = currentPatch%total_tree_area + currentCohort%c_area
endif
endif
Expand Down Expand Up @@ -1875,8 +1875,6 @@ subroutine update_hlm_dynamics(nsites,sites,fcolumn,bc_out)
use EDTypesMod , only : ed_patch_type, ed_cohort_type, &
ed_site_type, AREA
use FatesInterfaceTypesMod , only : bc_out_type
use EDPftvarcon , only : EDPftvarcon_inst


!
! !ARGUMENTS
Expand Down
174 changes: 143 additions & 31 deletions biogeochem/EDCohortDynamicsMod.F90

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions biogeochem/EDLoggingMortalityMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ module EDLoggingMortalityMod
use EDTypesMod , only : dtype_ifire
use EDPftvarcon , only : EDPftvarcon_inst
use EDPftvarcon , only : GetDecompyFrac
use EDTypesMod , only : num_elements
use EDTypesMod , only : element_list
use PRTParametersMod , only : prt_params
use PRTGenericMod , only : num_elements
use PRTGenericMod , only : element_list
use EDParamsMod , only : logging_export_frac
use EDParamsMod , only : logging_event_code
use EDParamsMod , only : logging_dbhmin
Expand Down Expand Up @@ -220,6 +221,7 @@ subroutine LoggingMortality_frac( pft_i, dbh, canopy_layer, lmort_direct, &
! todo: implement harvested carbon inputs

if (logging_time) then

! Pass logging rates to cohort level

if (hlm_use_lu_harvest == ifalse) then
Expand Down Expand Up @@ -255,7 +257,7 @@ subroutine LoggingMortality_frac( pft_i, dbh, canopy_layer, lmort_direct, &

! transfer of area to secondary land is based on overall area affected, not just logged crown area
! l_degrad accounts for the affected area between logged crowns
if(EDPftvarcon_inst%woody(pft_i) == 1)then ! only set logging rates for trees
if(int(prt_params%woody(pft_i)) == 1)then ! only set logging rates for trees

! direct logging rates, based on dbh min and max criteria
if (dbh >= logging_dbhmin .and. .not. &
Expand Down Expand Up @@ -534,7 +536,7 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site
! plants that were impacted. Thus, no direct dead can occur
! here, and indirect are impacts.

if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
if(int(prt_params%woody(pft)) == itrue) then
direct_dead = 0.0_r8
indirect_dead = logging_coll_under_frac * &
(1._r8-currentPatch%fract_ldist_not_harvested) * currentCohort%n * &
Expand Down Expand Up @@ -565,9 +567,9 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site
call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil)

ag_wood = (direct_dead+indirect_dead) * (struct_m + sapw_m ) * &
EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)
prt_params%allom_agb_frac(currentCohort%pft)
bg_wood = (direct_dead+indirect_dead) * (struct_m + sapw_m ) * &
(1._r8 - EDPftvarcon_inst%allom_agb_frac(currentCohort%pft))
(1._r8 - prt_params%allom_agb_frac(currentCohort%pft))

do c = 1,ncwd-1

Expand Down Expand Up @@ -608,9 +610,9 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site
! ----------------------------------------------------------------------------------------

ag_wood = indirect_dead * (struct_m + sapw_m ) * &
EDPftvarcon_inst%allom_agb_frac(currentCohort%pft)
prt_params%allom_agb_frac(currentCohort%pft)
bg_wood = indirect_dead * (struct_m + sapw_m ) * &
(1._r8 - EDPftvarcon_inst%allom_agb_frac(currentCohort%pft))
(1._r8 - prt_params%allom_agb_frac(currentCohort%pft))

new_litt%ag_cwd(ncwd) = new_litt%ag_cwd(ncwd) + ag_wood * &
SF_val_CWD_frac(ncwd) * donate_frac/newPatch%area
Expand Down Expand Up @@ -646,7 +648,7 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site
! ----------------------------------------------------------------------------------------

bg_wood = direct_dead * (struct_m + sapw_m ) * SF_val_CWD_frac(ncwd) * &
(1._r8 - EDPftvarcon_inst%allom_agb_frac(currentCohort%pft))
(1._r8 - prt_params%allom_agb_frac(currentCohort%pft))

do ilyr = 1,nlevsoil
new_litt%bg_cwd(ncwd,ilyr) = new_litt%bg_cwd(ncwd,ilyr) + &
Expand All @@ -671,7 +673,7 @@ subroutine logging_litter_fluxes(currentSite, currentPatch, newPatch, patch_site
! ----------------------------------------------------------------------------------------

ag_wood = direct_dead * (struct_m + sapw_m ) * &
EDPftvarcon_inst%allom_agb_frac(currentCohort%pft) * &
prt_params%allom_agb_frac(currentCohort%pft) * &
SF_val_CWD_frac(ncwd)

trunk_product_site = trunk_product_site + &
Expand Down
26 changes: 13 additions & 13 deletions biogeochem/EDPatchDynamicsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module EDPatchDynamicsMod
use FatesInterfaceTypesMod , only : hlm_freq_day
use EDPftvarcon , only : EDPftvarcon_inst
use EDPftvarcon , only : GetDecompyFrac
use PRTParametersMod , only : prt_params
use EDCohortDynamicsMod , only : fuse_cohorts, sort_cohorts, insert_cohort
use EDCohortDynamicsMod , only : DeallocateCohort
use EDTypesMod , only : area_site => area
Expand All @@ -30,9 +31,8 @@ module EDPatchDynamicsMod
use EDTypesMod , only : dtype_ilog
use EDTypesMod , only : dtype_ifire
use EDTypesMod , only : ican_upper
use EDTypesMod , only : num_elements
use EDTypesMod , only : element_list
use EDTypesMod , only : element_pos
use PRTGenericMod , only : num_elements
use PRTGenericMod , only : element_list
use EDTypesMod , only : lg_sf
use EDTypesMod , only : dl_sf
use EDTypesMod , only : dump_patch
Expand Down Expand Up @@ -231,7 +231,7 @@ subroutine disturbance_rates( site_in, bc_in)
currentCohort%lmort_direct * currentCohort%n * &
( currentCohort%prt%GetState(sapw_organ, all_carbon_elements) + &
currentCohort%prt%GetState(struct_organ, all_carbon_elements)) * &
EDPftvarcon_inst%allom_agb_frac(currentCohort%pft) * &
prt_params%allom_agb_frac(currentCohort%pft) * &
SF_val_CWD_frac(ncwd) * logging_export_frac
endif

Expand Down Expand Up @@ -733,7 +733,7 @@ subroutine spawn_patches( currentSite, bc_in)

else
! small trees
if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
if( int(prt_params%woody(currentCohort%pft)) == itrue)then


! Survivorship of undestory woody plants. Two step process.
Expand Down Expand Up @@ -873,7 +873,7 @@ subroutine spawn_patches( currentSite, bc_in)
! burned off. Here, we remove that mass, and
! tally it in the flux we sent to the atmosphere

if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
if(int(prt_params%woody(currentCohort%pft)) == itrue)then
leaf_burn_frac = currentCohort%fraction_crown_burned
else

Expand All @@ -890,7 +890,7 @@ subroutine spawn_patches( currentSite, bc_in)
(currentCohort%fire_mort < 0._r8) .or. &
(currentCohort%fire_mort > 1._r8)) then
write(fates_log(),*) 'unexpected fire fractions'
write(fates_log(),*) EDPftvarcon_inst%woody(currentCohort%pft)
write(fates_log(),*) prt_params%woody(currentCohort%pft)
write(fates_log(),*) leaf_burn_frac
write(fates_log(),*) currentCohort%fire_mort
call endrun(msg=errMsg(sourcefile, __LINE__))
Expand Down Expand Up @@ -951,7 +951,7 @@ subroutine spawn_patches( currentSite, bc_in)
! WHat to do with cohorts in the understory of a logging generated
! disturbance patch?

if(EDPftvarcon_inst%woody(currentCohort%pft) == 1)then
if(int(prt_params%woody(currentCohort%pft)) == itrue)then


! Survivorship of undestory woody plants. Two step process.
Expand Down Expand Up @@ -1682,7 +1682,7 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, newPatch, patch_site_ar
(fnrt_m + store_m) * num_dead_trees

! coarse root biomass per tree
bcroot = (sapw_m + struct_m) * (1.0_r8 - EDPftvarcon_inst%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
Expand All @@ -1703,7 +1703,7 @@ subroutine fire_litter_fluxes(currentSite, currentPatch, newPatch, patch_site_ar
end do

! stem biomass per tree
bstem = (sapw_m + struct_m) * EDPftvarcon_inst%allom_agb_frac(pft)
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
Expand Down Expand Up @@ -1829,7 +1829,7 @@ subroutine mortality_litter_fluxes(currentSite, currentPatch, newPatch, patch_si
num_dead = currentCohort%n * min(1.0_r8,currentCohort%dmort * &
hlm_freq_day * fates_mortality_disturbance_fraction)

elseif(EDPftvarcon_inst%woody(pft) == itrue) then
elseif(int(prt_params%woody(pft)) == itrue) then

! Understorey trees. The total dead is based on their survivorship
! function, and the total area of disturbance.
Expand Down Expand Up @@ -1864,8 +1864,8 @@ subroutine mortality_litter_fluxes(currentSite, currentPatch, newPatch, patch_si
end do

! Pre-calculate Structural and sapwood, below and above ground, total mass [kg]
ag_wood = num_dead * (struct_m + sapw_m) * EDPftvarcon_inst%allom_agb_frac(pft)
bg_wood = num_dead * (struct_m + sapw_m) * (1.0_r8-EDPftvarcon_inst%allom_agb_frac(pft))
ag_wood = num_dead * (struct_m + sapw_m) * prt_params%allom_agb_frac(pft)
bg_wood = num_dead * (struct_m + sapw_m) * (1.0_r8-prt_params%allom_agb_frac(pft))

call set_root_fraction(currentSite%rootfrac_scr, pft, currentSite%zi_soil)

Expand Down
Loading