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

FATES Land use V2 API update #6353

Merged
merged 30 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4156260
add logic to avoid rho and tau calculation when fates is on
glemieux Mar 21, 2023
8771e50
Add fates landuse x pft API code
glemieux Sep 19, 2023
d6ce037
update fates submodule
glemieux Jul 8, 2024
e1f94eb
remove out-of-date comment
glemieux Jul 9, 2024
b17beff
change fates_harvest_mode option name
glemieux Jul 9, 2024
5dd6c46
add clarifying language to FATES namelist options
glemieux Jul 9, 2024
4b8c230
rename clmlanduse to hlmlanduse
glemieux Jul 9, 2024
c1bf030
add new fates luh2 tests and update existing
glemieux Jul 9, 2024
4420c0d
change logging test to use replacement fates harvest mode
glemieux Jul 9, 2024
8bd0372
add new fates test mods to test list
glemieux Jul 9, 2024
512c499
add trim to the write statement output
glemieux Jul 9, 2024
6c1cb2e
minor change in call to GetLandusePFTData
glemieux Jul 9, 2024
27003a0
update fates parameter file
glemieux Jul 9, 2024
7b3f8fa
refactor fates build namelist options
glemieux Jul 9, 2024
f636d9b
correct how fates sp mode value is passed to add_default for building…
glemieux Jul 10, 2024
342e6f5
update fates build namelist add_default calls for modes that depend o…
glemieux Jul 10, 2024
df1901d
add graceful failures to the fates build namelist for land use
glemieux Jul 10, 2024
4bb13ed
correct add default call for use_fates_luh option
glemieux Jul 10, 2024
e43b554
correct graceful failure write statement
glemieux Jul 10, 2024
52f1bd1
fix use_fates_potentialveg call in build namelist
glemieux Jul 10, 2024
1414a18
add namelist check allowing empty string for fluh_timeseries
glemieux Jul 11, 2024
0c94275
do not add default for fates landuse files prior to checks
glemieux Jul 11, 2024
348dc46
whitespace fixes in elm build namelist
glemieux Jul 11, 2024
229fb93
add constant simyear range until transient compset working for fates
glemieux Jul 11, 2024
ebf6dd8
correct flandusepftdat default location name
glemieux Jul 11, 2024
09d0bf3
correct fates harvest mode namelist check
glemieux Jul 11, 2024
e565c34
remove old comment from elmfates_interfaceMod
glemieux Jul 11, 2024
1b0772c
correct how harvest mode setting is passed to add_default for fates l…
glemieux Jul 13, 2024
6d21ce5
reinstate default settings for various fates modes
glemieux Jul 13, 2024
ee9cd55
update fates to sci.1.77.1_api.36.0.0
glemieux Jul 17, 2024
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
15 changes: 12 additions & 3 deletions cime_config/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,21 +435,30 @@
},

#fates testmod coverage
"fates_landuse" : {
"time" : "00:40:00",
"tests" : (
"ERS_Ld60.f45_g37.IELMFATES.elm-fates_cold_logging",
"ERS_D_Ld30.f45_g37.IELMFATES.elm-fates_cold_landuse",
"ERS_D_Ld30.f45_g37.IELMFATES.elm-fates_cold_luh2",
"ERS_D_Ld30.f45_g37.IELMFATES.elm-fates_cold_luh2harvestarea",
"ERS_D_Ld30.f45_g37.IELMFATES.elm-fates_cold_luh2harvestmass",
)
},
#fates testmod coverage
"fates" : {
"inherit" : ("fates_long_tests", "fates_elm_developer"),
"inherit" : ("fates_long_tests", "fates_elm_developer", "fates_landuse"),
"tests" : (
"ERP_Ld15.ne4pg2_ne4pg2.IELMFATES.elm-fates_cold_allvars",
"ERP_Ld3.f09_g16.IELMFATES.elm-fates_cold",
"ERP_D_Ld3.f19_g16.IELMFATES.elm-fates_cold",
"ERS_D_Ld3_PS.f09_g16.IELMFATES.elm-fates_cold",
"ERS_D_Ld5.f45_g37.IELMFATES.elm-fates_cold",
"ERS_D_Ld30.f45_g37.IELMFATES.elm-fates_cold_landuse",
"ERS_Ld30.f45_g37.IELMFATES.elm-fates_satphen",
"ERS_Ld30.f45_g37.IELMFATES.elm-fates_cold_fixedbiogeo",
"ERS_Ld30.f45_g37.IELMFATES.elm-fates_cold_nocomp",
"ERS_Ld30.f45_g37.IELMFATES.elm-fates_cold_nocomp_fixedbiogeo",
"ERS_Ld60.f45_g37.IELMFATES.elm-fates",
"ERS_Ld60.f45_g37.IELMFATES.elm-fates_cold_logging",
"ERS_Ld60.f45_g37.IELMFATES.elm-fates_cold_nofire",
"ERS_Ld60.f45_g37.IELMFATES.elm-fates_cold_st3",
"ERS_Ld60.f45_g37.IELMFATES.elm-fates_cold_pphys",
Expand Down
197 changes: 161 additions & 36 deletions components/elm/bld/ELMBuildNamelist.pm

Large diffs are not rendered by default.

31 changes: 21 additions & 10 deletions components/elm/bld/namelist_files/namelist_defaults.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- ================================================================== -->
<!-- FATES default parameter file -->
<!-- ================================================================== -->
<fates_paramfile >lnd/clm2/paramdata/fates_params_api.35.0.0_12pft_c240326.nc</fates_paramfile>
<fates_paramfile >lnd/clm2/paramdata/fates_params_api.36.0.0_12pft_c240517.nc</fates_paramfile>

<!-- soil order related parameters (relative to {csmdata}) -->
<fsoilordercon >lnd/clm2/paramdata/CNP_parameters_c131108.nc</fsoilordercon>
Expand Down Expand Up @@ -587,10 +587,15 @@ lnd/clm2/surfdata_map/surfdata_conusx4v1_simyr2000_c160503.nc</fsurdat>
<flanduse_timeseries hgrid="ne30np4" rcp="2.6" sim_year_range="1850-2100"
use_crop=".false." >lnd/clm2/surfdata_map/surfdata.pftdyn_ne30np4_rcp2.6_simyr1850-2100_c130524.nc</flanduse_timeseries>

<!-- Land Use Harmonization unified data sets for dynamic FATES land use change -->
<!-- Land Use Harmonization unified timeseries data sets for dynamic FATES land use change -->
<fluh_timeseries hgrid="4x5" sim_year_range="1850-2015" use_fates=".true."
>lnd/clm2/surfdata_map/fates-sci.1.68.3_api.31.0.0_tools.1.0.1/LUH2_states_transitions_management.timeseries_4x5_hist_simyr1850-2015_c231101.nc</fluh_timeseries>

<fluh_timeseries hgrid="4x5" sim_year_range="constant" use_fates=".true."
>lnd/clm2/surfdata_map/fates-sci.1.68.3_api.31.0.0_tools.1.0.1/LUH2_states_transitions_management.timeseries_4x5_hist_simyr1850-2015_c231101.nc</fluh_timeseries>

<!-- Land Use Harmonization static landuse x pft mapping data sets for FATES land use change -->
<flandusepftdat hgrid="4x5" use_fates=".true." >lnd/clm2/surfdata_map/fates-sci.1.77.0_api.36.0.0/fates_landuse_pft_map_4x5_240206.nc</flandusepftdat>

<!-- GLC mask datasets (relative to {csmdata}) -->
<!-- Currently glc_grid is not being read from anywhere, so these rules are broken. -->
Expand Down Expand Up @@ -2177,25 +2182,31 @@ this mask will have smb calculated over the entire global land surface
<!-- Defaults for FATES interface -->
<!-- ========================================= -->
<fates_spitfire_mode use_fates=".true.">0</fates_spitfire_mode>
<use_fates_fixed_biogeog use_fates=".true.">.false.</use_fates_fixed_biogeog>
<use_fates_nocomp use_fates=".true.">.false.</use_fates_nocomp>
<fates_harvest_mode use_fates=".true.">no_harvest</fates_harvest_mode>
<fates_history_dimlevel use_fates=".true.">2,2</fates_history_dimlevel>
<fates_inventory_ctrl_filename use_fates=".true."> "/dev/null" </fates_inventory_ctrl_filename>
<fates_parteh_mode use_fates=".true.">1</fates_parteh_mode>
<fates_seeddisp_cadence use_fates=".true.">0</fates_seeddisp_cadence>
<use_fates_planthydro use_fates=".true.">.false.</use_fates_planthydro>
<use_fates_tree_damage use_fates=".true.">.false.</use_fates_tree_damage>
<use_fates_ed_st3 use_fates=".true.">.false.</use_fates_ed_st3>
<use_fates_ed_prescribed_phys use_fates=".true.">.false.</use_fates_ed_prescribed_phys>
<use_fates_logging use_fates=".true.">.false.</use_fates_logging>
<use_fates_cohort_age_tracking use_fates=".true.">.false.</use_fates_cohort_age_tracking>
<use_fates_sp use_fates=".true.">.false.</use_fates_sp>
<use_fates_luh use_fates=".true.">.false.</use_fates_luh>
<fates_parteh_mode use_fates=".true.">1</fates_parteh_mode>
<fates_seeddisp_cadence use_fates=".true.">0</fates_seeddisp_cadence>
<use_fates_lupft use_fates=".true.">.false.</use_fates_lupft>
<use_fates_potentialveg use_fates=".true.">.false.</use_fates_potentialveg>
<use_fates_luh use_fates=".true." fates_harvest_mode="luhdata_area" >.true.</use_fates_luh>
<use_fates_luh use_fates=".true." fates_harvest_mode="luhdata_mass" >.true.</use_fates_luh>
<use_fates_luh use_fates=".true." use_fates_lupft=".true.">.true.</use_fates_luh>
<use_fates_luh use_fates=".true." use_fates_potentialveg=".true.">.true.</use_fates_luh>
<use_fates_luh use_fates=".true." >.false.</use_fates_luh>
<use_fates_inventory_init use_fates=".true.">.false.</use_fates_inventory_init>
<fates_inventory_ctrl_filename use_fates=".true."> "/dev/null" </fates_inventory_ctrl_filename>
<use_fates_nocomp use_fates=".true." use_fates_sp=".true.">.true.</use_fates_nocomp>
<use_fates_nocomp use_fates=".true." use_fates_lupft=".true.">.true.</use_fates_nocomp>
<use_fates_nocomp use_fates=".true." >.false.</use_fates_nocomp>
<use_fates_fixed_biogeog use_fates=".true." use_fates_sp=".true.">.true.</use_fates_fixed_biogeog>
<use_fates_fixed_biogeog use_fates=".true." use_fates_lupft=".true.">.true.</use_fates_fixed_biogeog>
<use_fates_fixed_biogeog use_fates=".true." >.false.</use_fates_fixed_biogeog>
<fates_history_dimlevel use_fates=".true.">2,2</fates_history_dimlevel>
<use_vertsoilc bgc_mode="fates" >.true.</use_vertsoilc>
<use_century_decomp bgc_mode="fates" >.true.</use_century_decomp>
<use_lch4 bgc_mode="fates" >.false.</use_lch4>
Expand Down
52 changes: 45 additions & 7 deletions components/elm/bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,20 @@ Allowed values are:
5 : use gross domestic production and population datasets to simulate anthropogenic fire supression
</entry>

<entry id="fates_harvest_mode" type="char*18" category="physics"
group="elm_inparm"
valid_values="no_harvest,event_code,landuse_timeseries,luhdata_area,luhdata_mass" >
Set FATES harvesting mode by setting fates_harvest_mode
Allowed values are:
no_harvest : no fates harvesting of any kind
event_code : fates logging via fates logging event codes only (via fates parameter file)
landuse_timeseries: fates harvest driven by HLM landuse timeseries data (dynHarvestMod)
luhdata_area : fates harvest driven by LUH2 raw harvest data, area-based (dynFATESLandUseChangeMod)
luhdata_mass : fates harvest driven by LUH2 raw harvest data, mass-based (dynFATESLandUseChangeMod)
Note that the landuse_timeseries option is not the same as the FATES fluh_timeseries data file.
This option is older than the luhdata options and may be depricated at some point in the future.
</entry>

<entry id="fates_parteh_mode" type="integer" category="physics"
group="elm_inparm" valid_values="1,2">
Switch deciding which nutrient model to use in FATES.
Expand Down Expand Up @@ -339,11 +353,6 @@ Toggle to turn on FATES no competition mode (only relevant if FATES is being use
Toggle to turn on FATES satellite phenology mode (only relevant if FATES is being used).
</entry>

<entry id="use_fates_logging" type="logical" category="physics"
group="elm_inparm" valid_values="" value=".false.">
Toggle to turn on the logging module (only relevant if FATES is being used).
</entry>

<entry id="use_fates_planthydro" type="logical" category="physics"
group="elm_inparm" valid_values="" value=".false.">
Toggle to turn on plant hydraulics (only relevant if FATES is on).
Expand Down Expand Up @@ -382,12 +391,29 @@ Full pathname to the inventory initialization control file.

<!-- This may eventually migrate to the dynamic_subgrid group-->
<entry id="use_fates_luh" type="logical" category="physics"
group="elm_inparm" valid_values="" >
group="elm_inparm" valid_values="" value=".false.">
If TRUE, enable use of land use state and transition data from luh_timeseries file.
(Only valid for fates land use change runs, where there is a luh_timeseries file.)
This is enabled by default if fates_harvest_mode is set to use the raw LUH2 harvest data
(Also, only valid for use_fates = true and is incompatible with transient runs currently.)
</entry>

<entry id="use_fates_lupft" type="logical" category="physics"
group="elm_inparm" valid_values="" value=".false.">
If TRUE, enable use of fates land use x pft mapping data file. This mode
requires the use of the land use x pft association static data map file. See the
flandusepftdat definition entry in this file for more information.
(Only valid for use_fates = true and is incompatible with transient runs currently.)
</entry>

<entry id="use_fates_potentialveg" type="logical" category="physics"
group="elm_inparm" valid_values="" value=".false.">
If TRUE, ignore the land-use state vector and transitions, and assert that all lands
are primary, and that there is no harvest. This mode is only relevant for FATES
spin-up workflows that are intending to use the spin-up restart output to start a
FATES land use transient case using the use_fates_lupft namelist option. The option
should be set to true for the spin-up case and false for the transient case.
</entry>

<!-- This could eventually be included in the "dynamic_subgrid" -->
<entry id="fluh_timeseries" type="char*256" category="datasets"
input_pathname="abs" group="elm_inparm" valid_values="" >
Expand All @@ -408,6 +434,18 @@ output level is not enabled.
(Only relevant if FATES is on)
</entry>

<entry id="flandusepftdat" type="char*256" category="datasets"
input_pathname="abs" group="elm_inparm" valid_values="" >
Full pathname of fates landuse x pft data map.
The file associates land use types with pfts across a static global map.
This file is necessary for running FATES with use_fates_luh,
use_fates_nocomp, and use_fates_fixedbiogeo engaged (note that use_fates_lupft
is provided as a namelist option to engage all necessary options). The file is output
by the FATES land use data tool (https://github.com/NGEET/tools-fates-landusedata)
which processes the raw land use data from the THEMIS tool data sets
(https://doi.org/10.5065/29s7-7b41)
</entry>

<entry id="use_hydrstress" type="logical" category="physics"
group="elm_inparm" valid_values="" value=".false.">
Toggle to turn on if Kennedy et al plant hydraulics model is used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC',
'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND',
'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR',
'FATES_HARVEST_CARBON_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_HARVEST_WOODPROD_C_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_DISTURBANCE_RATE_LOGGING', 'FATES_DISTURBANCE_RATE_TREEFALL',
'FATES_STOMATAL_COND', 'FATES_LBLAYER_COND', 'FATES_NPP', 'FATES_GPP',
'FATES_AUTORESP', 'FATES_GROWTH_RESP', 'FATES_MAINT_RESP', 'FATES_GPP_CANOPY',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
flanduse_timeseries = '$DIN_LOC_ROOT/lnd/clm2/surfdata_map/landuse.timeseries_4x5_hist_simyr1850-2015_200311.nc'
do_harvest = .true.
fates_harvest_mode = 'landuse_timeseries'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
use_fates_logging= .true.
fates_harvest_mode = 'event_code'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Currently the FATES LUH2 category of test mods currently only supports
4x5 grid resolutions.
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
use_fates_luh = .true.
use_fates_nocomp = .true.
use_fates_fixed_biogeog = .true.
use_fates_sp = .false.
use_fates_potentialveg = .false.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../fates_cold_luh2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fates_harvest_mode = 'luhdata_area'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../fates_cold_luh2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fates_harvest_mode = 'luhdata_mass'
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC',
'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND',
'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR',
'FATES_HARVEST_CARBON_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_HARVEST_WOODPROD_C_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_DISTURBANCE_RATE_LOGGING', 'FATES_DISTURBANCE_RATE_TREEFALL',
'FATES_STOMATAL_COND', 'FATES_LBLAYER_COND', 'FATES_NPP', 'FATES_GPP',
'FATES_AUTORESP', 'FATES_GROWTH_RESP', 'FATES_MAINT_RESP', 'FATES_GPP_CANOPY',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC',
'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND',
'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR',
'FATES_HARVEST_CARBON_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_HARVEST_WOODPROD_C_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_DISTURBANCE_RATE_LOGGING', 'FATES_DISTURBANCE_RATE_TREEFALL',
'FATES_STOMATAL_COND', 'FATES_LBLAYER_COND', 'FATES_NPP', 'FATES_GPP',
'FATES_AUTORESP', 'FATES_GROWTH_RESP', 'FATES_MAINT_RESP', 'FATES_GPP_CANOPY',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ hist_fincl1 = 'FATES_NCOHORTS', 'FATES_TRIMMING', 'FATES_AREA_PLANTS',
'FATES_SAPWOODC', 'FATES_LEAFC', 'FATES_FROOTC', 'FATES_REPROC',
'FATES_STRUCTC', 'FATES_NONSTRUCTC', 'FATES_VEGC_ABOVEGROUND',
'FATES_CANOPY_VEGC', 'FATES_USTORY_VEGC', 'FATES_PRIMARY_PATCHFUSION_ERR',
'FATES_HARVEST_CARBON_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_HARVEST_WOODPROD_C_FLUX', 'FATES_DISTURBANCE_RATE_FIRE',
'FATES_DISTURBANCE_RATE_LOGGING', 'FATES_DISTURBANCE_RATE_TREEFALL',
'FATES_STOMATAL_COND', 'FATES_LBLAYER_COND', 'FATES_NPP', 'FATES_GPP',
'FATES_AUTORESP', 'FATES_GROWTH_RESP', 'FATES_MAINT_RESP', 'FATES_GPP_CANOPY',
Expand Down
Loading