Skip to content

Commit

Permalink
Merge pull request #1255 from glemieux/api36.1.0-merge
Browse files Browse the repository at this point in the history
API 36.1.0 merge
  • Loading branch information
glemieux authored Oct 4, 2024
2 parents e06e0df + 646b68b commit 825579d
Show file tree
Hide file tree
Showing 12 changed files with 2,534 additions and 327 deletions.
15 changes: 13 additions & 2 deletions biogeochem/EDPhysiologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ subroutine trim_canopy( currentSite )
real(r8) :: target_c_area

real(r8) :: pft_leaf_lifespan ! Leaf lifespan of each PFT [years]
real(r8) :: leaf_long ! temporary leaf lifespan before accounting for deciduousness
!----------------------------------------------------------------------

ipatch = 1 ! Start counting patches
Expand Down Expand Up @@ -740,6 +741,14 @@ subroutine trim_canopy( currentSite )
! Identify current canopy layer (cl)
cl = currentCohort%canopy_layer

! Get leaf lifespan- depends on canopy layer
if (cl .eq. 1 ) then
leaf_long = sum(prt_params%leaf_long(ipft,:))
else
leaf_long = sum(prt_params%leaf_long_ustory(ipft,:))
end if


! PFT-level maximum SLA value, even if under a thick canopy (same units as slatop)
sla_max = prt_params%slamax(ipft)

Expand Down Expand Up @@ -788,10 +797,10 @@ subroutine trim_canopy( currentSite )
! Drought-decidous costs. Assume time-span to be the least between
! 1 year and the life span provided by the parameter file.
pft_leaf_lifespan = &
min(decid_leaf_long_max,sum(prt_params%leaf_long(ipft,:)))
min(decid_leaf_long_max,leaf_long)

else !evergreen costs
pft_leaf_lifespan = sum(prt_params%leaf_long(ipft,:))
pft_leaf_lifespan = leaf_long
end if

! Leaf cost at leaf level z (kgC m-2 year-1) accounting for sla profile
Expand Down Expand Up @@ -1270,6 +1279,8 @@ subroutine phenology( currentSite, bc_in )
! (defined as a PFT parameter) and the maximum canopy leaf life span allowed
! for drought deciduous (local parameter). The sum term accounts for the
! total leaf life span of this cohort.
! Note we only use canopy leaf lifespan here and assume that understory cohorts
! would behave the same as canopy cohorts with regards to phenology.
ndays_pft_leaf_lifespan = &
nint(ndays_per_year*min(decid_leaf_long_max,sum(prt_params%leaf_long(ipft,:))))

Expand Down
4 changes: 2 additions & 2 deletions main/EDMainMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -532,15 +532,15 @@ subroutine ed_integrate_state_variables(currentSite, bc_in, bc_out )
is_drought = .true.
end if

call PRTMaintTurnover(currentCohort%prt,ft,is_drought)
call PRTMaintTurnover(currentCohort%prt,ft, currentCohort%canopy_layer,is_drought)

! -----------------------------------------------------------------------------------
! Call the routine that advances leaves in age.
! This will move a portion of the leaf mass in each
! age bin, to the next bin. This will not handle movement
! of mass from the oldest bin into the litter pool, that is something else.
! -----------------------------------------------------------------------------------
call currentCohort%prt%AgeLeaves(ft,sec_per_day)
call currentCohort%prt%AgeLeaves(ft,currentCohort%canopy_layer, sec_per_day)

! Plants can acquire N from 3 sources (excluding re-absorption),
! the source doesn't affect how its allocated (yet), so they
Expand Down
1,803 changes: 1,803 additions & 0 deletions parameter_files/archive/api36.1.0_100224_params_default.cdl

Large diffs are not rendered by default.

133 changes: 133 additions & 0 deletions parameter_files/archive/api36.1.0_100224_pr1255-1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
<?xml version="1.0"?>
<all>
<!-- This parameter patch file updates the parameter file with the changes
brought in by Xiulin Gao, Jessie Needham, Jennifer Holm and Ryan Knox.
This includes grass specific allometry parameters, canopy versus
understory leaf turnover specifications, and changing default behavior of
nutrient uptake to be fully coupled. -->

<!-- This is the first of two patch files necessary to update from API 36 to API 36.1. The two files
require different patch update tools which requires that they be run sequentially. After running
the command as noted below, make sure to review the instructions in api36.1.0_100224_patch_params-2.xml. -->

<!-- To use this patch file run the following command: -->
<!-- Run `python ../tools/UpdateParamAPI.py -/-f archive/api36.1.0_100224_patch_params-1.xml` -->

<!-- General xml file usage notes: -->
<!-- Special mod types "variable_add": creates a new variable
"dimension_add": creates a new dimension
"variable_del": removes a variable, must include attribute "name"
"variable_change": change values in the parameter, possibly including the name, and
this must also come with a name attribute as well -->
<!-- To change a dimension. The easiest way to script this, is to delete the variables
that use it, delete the dimension. Re-add it with the new size, and then re-add
the variables -->
<!-- -->

<base_file>archive/api36.1.0_100224_params_default.cdl</base_file>
<new_file>fates_params_default.cdl</new_file>
<pft_list> 1,2,3,4,5,6,7,8,9,10,11,12 </pft_list>
<mods>
<mod type="variable_change" name="fates_allom_agb1">
<val> 0.0673, 0.1364012, 0.0393057, 0.2653695, 0.0673, 0.0728698, 0.06896, 0.06896, 0.06896, 0.001, 0.001, 0.003 </val>
</mod>
<mod type="variable_change" name="fates_allom_agb2">
<val> 0.976, 0.9449041, 1.087335, 0.8321321, 0.976, 1.0373211, 0.572, 0.572, 0.572, 1.6592, 1.6592, 1.3456 </val>
</mod>
<mod type="variable_change" name="fates_allom_agb3">
<val> 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.94, 1.248, 1.248, 1.869 </val>
</mod>
<mod type="variable_change" name="fates_allom_agb4">
<val> 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, 0.931, -999.9, -999.9, -999.9 </val>
</mod>
<mod type="variable_change" name="fates_allom_agb_frac">
<val> 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 1, 1, 1 </val>
</mod>
<mod type="variable_change" name="fates_allom_amode">
<val> 3, 3, 3, 3, 3, 3, 1, 1, 1, 5, 5, 5 </val>
</mod>
<mod type="variable_change" name="fates_allom_blca_expnt_diff">
<val> -0.12, -0.34, -0.32, -0.22, -0.12, -0.35, 0, 0, 0, -0.487, -0.487, -0.259 </val>
</mod>
<mod type="variable_change" name="fates_allom_d2bl1">
<val> 0.04, 0.07, 0.07, 0.01, 0.04, 0.07, 0.07, 0.07, 0.07, 0.0004, 0.0004, 0.0012 </val>
</mod>
<mod type="variable_change" name="fates_allom_d2bl2">
<val>1.6019679, 1.5234373, 1.3051237, 1.9621397, 1.6019679, 1.3998939, 1.3, 1.3, 1.3, 1.7092, 1.7092, 1.5879 </val>
</mod>
<mod type="variable_change" name="fates_allom_d2bl3">
<val>0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.3417, 0.3417, 0.9948 </val>
</mod>
<mod type="variable_change" name="fates_allom_d2ca_coefficient_max">
<val>0.2715891, 0.3693718, 1.0787259, 0.0579297, 0.2715891, 1.1553612, 0.6568464, 0.6568464, 0.6568464, 0.0408, 0.0408, 0.0862 </val>
</mod>
<mod type="variable_change" name="fates_allom_d2ca_coefficient_min">
<val>0.2715891, 0.3693718, 1.0787259, 0.0579297, 0.2715891, 1.1553612, 0.6568464, 0.6568464, 0.6568464, 0.0408, 0.0408, 0.0862 </val>
</mod>
<mod type="variable_change" name="fates_allom_d2h1">
<val>78.4087704, 306.842667, 106.8745821, 104.3586841, 78.4087704, 31.4557047, 0.64, 0.64, 0.64, 0.1812, 0.1812, 0.3353 </val>
</mod>
<mod type="variable_change" name="fates_allom_d2h2">
<val>0.8124383, 0.752377, 0.9471302, 1.1146973, 0.8124383, 0.9734088, 0.37, 0.37, 0.37, 0.6384, 0.6384, 0.4235 </val>
</mod>
<mod type="variable_change" name="fates_allom_dbh_maxheight">
<val>1000, 1000, 1000, 1000, 1000, 1000, 3, 3, 2, 20, 20, 30 </val>
</mod>
<mod type="variable_change" name="fates_allom_hmode">
<val> 5, 5, 5, 5, 5, 5, 1, 1, 1, 3, 3, 3 </val>
</mod>
<mod type="variable_change" name="fates_allom_l2fr">
<val> 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.67, 0.67, 1.41 </val>
</mod>
<mod type="variable_change" name="fates_allom_lmode">
<val>2, 2, 2, 2, 2, 2, 1, 1, 1, 5, 5, 5 </val>
</mod>
<mod type="variable_change" name="fates_allom_smode">
<val>1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2 </val>
</mod>
<mod type="variable_change" name="fates_leaf_slamax">
<val>0.0954, 0.0954, 0.0954, 0.0954, 0.0954, 0.0954, 0.012, 0.03, 0.03, 0.05, 0.05, 0.05 </val>
</mod>
<mod type="variable_change" name="fates_leaf_slatop">
<val>0.012, 0.005, 0.024, 0.009, 0.03, 0.03, 0.012, 0.03, 0.03, 0.05, 0.05, 0.05 </val>
</mod>
<mod type="variable_change" name="fates_recruit_height_min">
<val>1.3, 1.3, 1.3, 1.3, 1.3, 1.3, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2 </val>
</mod>
<mod type="variable_change" name="fates_recruit_seed_alloc">
<val>0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0, 0, 0 </val>
</mod>
<mod type="variable_change" name="fates_recruit_seed_alloc_mature">
<val>0, 0, 0, 0, 0, 0, 0.9, 0.9, 0.9, 0.25, 0.25, 0.2 </val>
</mod>
<mod type="variable_change" name="fates_recruit_seed_dbh_repro_threshold">
<val>90, 80, 80, 80, 90, 80, 3, 3, 2, 3, 3, 3 </val>
</mod>
<mod type="variable_change" name="fates_cnp_prescribed_nuptake">
<val> 0,0,0,0,0,0,0,0,0,0,0,0 </val>
</mod>
<mod type="variable_change" name="fates_cnp_prescribed_puptake">
<val> 0,0,0,0,0,0,0,0,0,0,0,0 </val>
</mod>
<mod type="variable_del">
<na>fates_turnover_leaf</na>
</mod>
<mod type="variable_add">
<na> fates_turnover_leaf_canopy</na>
<di> fates_leafage_class, fates_pft </di>
<un> yr </un>
<ln> Leaf longevity (ie turnover timescale) of canopy plants. For drought-deciduous PFTs, this also indicates the maximum length of the growing (i.e., leaves on) season. </ln>
<val> 1.5, 4, 1, 1.5, 1, 1, 1.5, 1, 1, 1, 1, 1 </val>
</mod>
<mod type="variable_add">
<na> fates_turnover_leaf_ustory</na>
<di> fates_leafage_class, fates_pft </di>
<un> yr </un>
<ln> Leaf longevity (ie turnover timescale) of understory plants. </ln>
<val> 1.5, 4, 1, 1.5, 1, 1, 1.5, 1, 1, 1, 1, 1 </val>
</mod>

</mods>


</all>
172 changes: 172 additions & 0 deletions parameter_files/archive/api36.1.0_100224_pr1255-2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
<?xml version="1.0"?>
<all>
<!-- This parameter patch file updates the parameter file with the changes -->
<!-- Introduces two new arctic shrub PFTs, first by duplicating the default -->
<!-- #7 broadleaf_avergreen_extratrop_shrub, and the -->
<!-- #9 broadleaf_colddecid_extratrop_shrub, then updating the parameters -->
<!-- based on Yanlan Liu's 2024 publication in Earth's Future. -->

<!-- ORGINIAL PFT KEY -->
<!-- 1 broadleaf_evergreen_tropical_tree -->
<!-- 2 needleleaf_evergreen_extratrop_tree -->
<!-- 3 needleleaf_colddecid_extratrop_tree -->
<!-- 4 broadleaf_evergreen_extratrop_tree -->
<!-- 5 broadleaf_hydrodecid_tropical_tree -->
<!-- 6 broadleaf_colddecid_extratrop_tree -->
<!-- 7 broadleaf_evergreen_extratrop_shrub -->
<!-- 8 broadleaf_hydrodecid_extratrop_shrub -->
<!-- 9 broadleaf_colddecid_extratrop_shrub -->
<!-- 10 arctic_c3_grass -->
<!-- 11 cool_c3_grass -->
<!-- 12 c4_grass -->


<!-- NEW PFT KEY -->
<!-- 1 broadleaf_evergreen_tropical_tree -->
<!-- 2 needleleaf_evergreen_extratrop_tree -->
<!-- 3 needleleaf_colddecid_extratrop_tree -->
<!-- 4 broadleaf_evergreen_extratrop_tree -->
<!-- 5 broadleaf_hydrodecid_tropical_tree -->
<!-- 6 broadleaf_colddecid_extratrop_tree -->
<!-- 7 broadleaf_evergreen_extratrop_shrub -->
<!-- 8 broadleaf_hydrodecid_extratrop_shrub -->
<!-- 9 broadleaf_colddecid_extratrop_shrub -->
<!-- 10 broadleaf_evergreen_arctic_shrub -->
<!-- 11 broadleaf_colddecid_arctic_shrub -->
<!-- 12 arctic_c3_grass -->
<!-- 13 cool_c3_grass -->
<!-- 14 c4_grass -->


<!-- This is the second of two patch files necessary to update from API 36 to API 36.1. The two files
require different patch update tools which requires that they be run sequentially. If you have not
done so already, make sure to review the instructions in api36.1.0_100224_patch_params-1.xml before
proceeding. -->

<!-- To use this patch file run the following command: -->
<!-- Run `python ../tools/BatchPatchParams.py -/-f archive/api36.1.0_100224_patch_params-2.xml` -->

<base_file>fates_params_default.cdl</base_file>
<new_file>fates_params_default.cdl</new_file>
<pft_trim_list>1,2,3,4,5,6,7,8,9,7,9,10,11,12</pft_trim_list>
<parameters>

<!-- Naming conventions: date stamp and the last tag it was valid through -->
<!-- api36.0.0_051724 -->

<!-- Override values for the new evergreen arctic PFT, this is now PFT 10 -->
<!-- which duplicated the orginial 7th PFT -->
<pft_group ids="10">
<fates_pftname> broadleaf_evergreen_arctic_shrub </fates_pftname>
<fates_allom_d2bl1> 0.0481934 </fates_allom_d2bl1>
<fates_allom_d2bl2> 1.0600586 </fates_allom_d2bl2>
<fates_allom_agb2> 0.5289883 </fates_allom_agb2>
<fates_allom_agb3> 2.1010352 </fates_allom_agb3>
<fates_allom_d2h1> 0.8165625 </fates_allom_d2h1>
<fates_allom_d2h2> 0.2316113 </fates_allom_d2h2>
<fates_recruit_height_min> 0.8 </fates_recruit_height_min>
<fates_allom_dbh_maxheight> 2.4 </fates_allom_dbh_maxheight>
<fates_recruit_seed_dbh_repro_threshold> 2.4 </fates_recruit_seed_dbh_repro_threshold>
<fates_allom_d2ca_coefficient_min> 0.4363427 </fates_allom_d2ca_coefficient_min>
<fates_allom_d2ca_coefficient_max> 0.4363427 </fates_allom_d2ca_coefficient_max>
<fates_alloc_store_priority_frac> 0.7 </fates_alloc_store_priority_frac>
<fates_alloc_storage_cushion> 1.5 </fates_alloc_storage_cushion>
<fates_leaf_slatop> 0.010 </fates_leaf_slatop>
<fates_leaf_vcmax25top> 38 </fates_leaf_vcmax25top>
<fates_grperc> 0.12 </fates_grperc>
<fates_mort_bmort> 0.016 </fates_mort_bmort>
<fates_mort_freezetol> -71 </fates_mort_freezetol>
<fates_frag_seed_decay_rate> 0.74 </fates_frag_seed_decay_rate>
<fates_recruit_seed_alloc> 0.07 </fates_recruit_seed_alloc>
<fates_recruit_seed_germination_rate> 0.40 </fates_recruit_seed_germination_rate>
<fates_recruit_init_density> 0.16 </fates_recruit_init_density>
</pft_group>


<!-- Override values for the new colddecid arctic PFT, this is now PFT 11 -->
<!-- which duplicated the orginial 9th PFT -->
<pft_group ids="11">
<fates_pftname> broadleaf_colddecid_arctic_shrub </fates_pftname>
<fates_allom_d2bl1> 0.0481934 </fates_allom_d2bl1>
<fates_allom_d2bl2> 1.7176758 </fates_allom_d2bl2>
<fates_allom_agb2> 0.6853945 </fates_allom_agb2>
<fates_allom_agb3> 1.7628613 </fates_allom_agb3>
<fates_allom_d2h1> 0.7781250 </fates_allom_d2h1>
<fates_allom_d2h2> 0.4027002 </fates_allom_d2h2>
<fates_recruit_height_min> 0.8 </fates_recruit_height_min>
<fates_allom_dbh_maxheight> 1.9 </fates_allom_dbh_maxheight>
<fates_recruit_seed_dbh_repro_threshold> 1.9 </fates_recruit_seed_dbh_repro_threshold>
<fates_allom_d2ca_coefficient_min> 0.3166497 </fates_allom_d2ca_coefficient_min>
<fates_allom_d2ca_coefficient_max> 0.3166497 </fates_allom_d2ca_coefficient_max>
<fates_alloc_store_priority_frac> 0.6 </fates_alloc_store_priority_frac>
<fates_alloc_storage_cushion> 1.4 </fates_alloc_storage_cushion>
<fates_leaf_slatop> 0.032 </fates_leaf_slatop>
<fates_leaf_slamax> 0.032 </fates_leaf_slamax>
<fates_leaf_vcmax25top> 54 </fates_leaf_vcmax25top>
<fates_mort_scalar_hydrfailure> 0.8 </fates_mort_scalar_hydrfailure>
<fates_mort_scalar_cstarvation> 0.57 </fates_mort_scalar_cstarvation>
<fates_mort_scalar_coldstress> 3.5 </fates_mort_scalar_coldstress>
<fates_mort_bmort> 0.010 </fates_mort_bmort>
<fates_mort_freezetol> -95 </fates_mort_freezetol>
<fates_frag_seed_decay_rate> 0.46 </fates_frag_seed_decay_rate>
<fates_recruit_seed_germination_rate> 0.49 </fates_recruit_seed_germination_rate>
</pft_group>

<!-- Updating parameters for c3_arctic grass based on Yanlan's work. Now PFT 12 -->
<pft_group ids="12">
<fates_recruit_height_min> 0.11 </fates_recruit_height_min>
<fates_alloc_store_priority_frac> 0.6 </fates_alloc_store_priority_frac>
<fates_leaf_slatop> 0.027 </fates_leaf_slatop>
<fates_leaf_vcmax25top> 86 </fates_leaf_vcmax25top>
<fates_grperc> 0.16 </fates_grperc>
<fates_mort_scalar_coldstress> 2.3 </fates_mort_scalar_coldstress>
<fates_mort_freezetol> -89 </fates_mort_freezetol>
<fates_frag_seed_decay_rate> 0.35 </fates_frag_seed_decay_rate>
<fates_recruit_seed_germination_rate> 0.29 </fates_recruit_seed_germination_rate>
</pft_group>

<!-- Update the HLM-PFT map since PFTs 9, 10, 11 now share area -->
<!-- Splits the HLM deciduous boreal shrub (which must sum to 1.0) -->
<!-- into 0.1 for the evergreen arctic, and 0.8 for cold-decid arctic -->
<!-- and leaves 0.1 in the orginial non-arctic extratrop cold-decid shrub -->
<pft_group ids="9" >
<fates_hlm_pft_map> 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0, 0.1, 0, 0, 0 </fates_hlm_pft_map>
</pft_group>

<pft_group ids="10">
<fates_hlm_pft_map> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0, 0.1, 0, 0, 0 </fates_hlm_pft_map>
</pft_group>

<pft_group ids="11">
<fates_hlm_pft_map> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0, 0.8, 0.0, 0, 0 </fates_hlm_pft_map>
</pft_group>
<non_pft_group></non_pft_group>


<!-- Creates a new 10th and 11th column, for the two new arctic shrub PFTs -->
<!-- then splits the HLM deciduous boreal shrub (which must sum to 1.0) -->
<!-- into 0.1 for the evergreen arctic, and 0.8 for cold-decid arctic -->
<!-- and leaves 0.1 in the orginial non-arctic extratrop cold-decid shrub -->
<!--<mods>
<mod type="variable_change" name="fates_hlm_pft_map">
<di> fates_hlm_pftno, fates_pft </di>
<val> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.8, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ;
</val>
</mod>
</mods> -->

</parameters>
</all>
Loading

0 comments on commit 825579d

Please sign in to comment.