Skip to content

Commit

Permalink
Merge remote-tracking branch 'thorntonpe/thorntonpe/lnd/IM4' (PR E3SM…
Browse files Browse the repository at this point in the history
…-Project#6433)

Introduce a new optional format for PFT physiology files (paramfile) that
allows user to specify a flexible number of PFTs, including additional
natural vegetation types and different numbers of crops. Backwards compatible
(BFB) with older style files.

New variables added in new format file:

climatezone (options are: 0 {nonspecific}, 1 {tropical}, 2 {temperate}, 3 {boreal}, 4 {arctic})
needleleaf (options are: 0, 1)
nfixer (options are: 0, 1)
nonvascular (options are: 0 {vascular}, 1 {moss}, 2 {lichen})
graminoid (options are: 0 {non-grass}, 1 {grass})
iscft (options are: 0 {natural PFT}, 1 {prognostic crop functional type})
Variables with expanded options in new format file:

woody (options are: 0{non-woody}, 1 {tree}, 2 {shrub})
Add 2 new tests for the user pft.
ERS.ELM_USRDAT.I1850CNPRDCTCBC.elm-usrpft_default_I1850CNPRDCTCBC
ERS.ELM_USRDAT.I1850CNPRDCTCBC.elm-usrpft_codetest_I1850CNPRDCTCBC

Thanks-to: Fengming Yuan (yuanf@ornl.gov), Ben Sulman (sulmanbn@ornl.gov)
[BFB]
  • Loading branch information
bishtgautam committed Sep 3, 2024
2 parents f50d263 + 0f841e6 commit 5559a57
Show file tree
Hide file tree
Showing 57 changed files with 870 additions and 420 deletions.
3 changes: 2 additions & 1 deletion cime_config/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
)
},


"e3sm_land_developer" : {
"share" : True,
"time" : "0:45:00",
Expand All @@ -95,6 +94,8 @@
"SMS.r05_r05.IELM.elm-topounit",
"ERS.ELM_USRDAT.I1850ELM.elm-usrdat",
"ERS.r05_r05.IELM.elm-lnd_rof_2way",
"ERS.ELM_USRDAT.I1850CNPRDCTCBC.elm-usrpft_default_I1850CNPRDCTCBC",
"ERS.ELM_USRDAT.I1850CNPRDCTCBC.elm-usrpft_codetest_I1850CNPRDCTCBC",
"ERS.r05_r05.IELM.elm-V2_ELM_MOSART_features",
"ERS.ELM_USRDAT.IELM.elm-surface_water_dynamics"
)
Expand Down
20 changes: 13 additions & 7 deletions components/elm/bld/ELMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1552,13 +1552,19 @@ sub setup_cmdl_maxpft {
$nl_flags->{'maxpft'} = $val;

if ( ($nl_flags->{'bgc_mode'} ne "sp") && ($nl_flags->{'maxpft'} != $maxpatchpft{$nl_flags->{'use_crop'}}) ) {
fatal_error("** For CN or BGC mode you MUST set max patch PFT's to $maxpatchpft{$nl_flags->{'use_crop'}}\n" .
"**\n" .
"** When the crop model is on then it must be set to $maxpatchpft{'crop'} otherwise to $maxpatchpft{'nocrop'}\n" .
"** Set the bgc mode, crop and maxpft by the following means from highest to lowest precedence:\n" .
"** * by the command-line options -bgc, -crop and -maxpft\n" .
"** * by a default configuration file, specified by -defaults\n" .
"**\n");
if ($opts->{$var} eq "default") {
fatal_error("** For CN or BGC mode you MUST set max patch PFT $val to $maxpatchpft{$nl_flags->{'use_crop'}}\n" .
"**\n" .
"** When the crop model is on then it must be set to $maxpatchpft{'crop'} otherwise to $maxpatchpft{'nocrop'}\n" .
"** Set the bgc mode, crop and maxpft by the following means from highest to lowest precedence:\n" .
"** * by the command-line options -bgc, -crop and -maxpft\n" .
"** * by a default configuration file, specified by -defaults\n" .
"**\n");
} else {
message("running with maxpft NOT equal to $maxpatchpft{$nl_flags->{'use_crop'}} is " .
"NOT validated / scientifically supported.\n");

}
}
if ( $nl_flags->{'maxpft'} > $maxpatchpft{$nl_flags->{'use_crop'}} ) {
fatal_error("** Max patch PFT's can NOT exceed $maxpatchpft{$nl_flags->{'use_crop'}}\n" .
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
./xmlchange LND_DOMAIN_FILE=domain.lnd.6x1pt_kougarok-NGEE_TransA_navy.nc
./xmlchange ATM_DOMAIN_FILE=domain.lnd.6x1pt_kougarok-NGEE_TransA_navy.nc
./xmlchange LND_DOMAIN_PATH="$DIN_LOC_ROOT/share/domains/domain.clm"
./xmlchange ATM_DOMAIN_PATH="$DIN_LOC_ROOT/share/domains/domain.clm"
./xmlchange ELM_USRDAT_NAME=6x1pt_kougarok-NGEE_TransA
./xmlchange ELM_BLDNML_OPTS=" -maxpft 12 -bgc bgc -nutrient cnp -nutrient_comp_pathway rd -soil_decomp ctc -methane "
./xmlchange DATM_MODE=CLMGSWP3v1
./xmlchange DATM_CLMNCEP_YR_START=1901
./xmlchange DATM_CLMNCEP_YR_END=1920
./xmlchange NTASKS=1
./xmlchange NTHRDS=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_map/surfdata_6x1pt_kougarok-NGEE_TransA_simyr1850_c20201008-sub12.nc'
! below is user-pft file example, developed by B. Sulman et al. (2021)
! 12(+2) arctic PFTs: not_vegetated, arctic_lichen, arctic_bryophyte, (arctic_needleleaf_tree, arctic_broadleaf_tree,)
! arctic_evergreen_shrub_dwarf, arctic_evergreen_shrub_tall,
! arctic_deciduous_shrub_dwarf, arctic_deciduous_shrub_low, arctic_deciduous_shrub_tall, arctic_decidous_shrub_alder,
! arctic_forb, arctic_dry_graminoid, arctic_wet_graminoid
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm_params_c180524-sub12_updated20240201.nc'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
./xmlchange LND_DOMAIN_FILE=domain_42_FLUXNETSITES_simyr1850_c170912.nc
./xmlchange ATM_DOMAIN_FILE=domain_42_FLUXNETSITES_simyr1850_c170912.nc
./xmlchange LND_DOMAIN_PATH="\$DIN_LOC_ROOT/share/domains/domain.clm"
./xmlchange ATM_DOMAIN_PATH="\$DIN_LOC_ROOT/share/domains/domain.clm"
./xmlchange DATM_MODE=CLM1PT
./xmlchange DATM_CLMNCEP_YR_START=2000
./xmlchange DATM_CLMNCEP_YR_END=2000
./xmlchange ELM_USRDAT_NAME=42_FLUXNETSITES
./xmlchange NTASKS=1
./xmlchange NTHRDS=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_map/surfdata_42_FLUXNETSITES_simyr1850_c170912.nc'
! paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm_params_c211124.nc'
!
! When 'user-pft' codes ready, comment out the above line while let the following in.
!
! below is user-pft file example, by editing default one as following
! woody=1 for tree, or =2 for shrub, and defined other pft flags:
! climatezone(0-4), nonvascular(0/1), graminoid(0/1), generic_crop(0/1), nfixer(0/1), needleleaf(0/1)
! for not going by default, changing one PFT name by appending '_unexpected'.
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm_params_c211124vpft.nc'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
./xmlchange LND_DOMAIN_FILE=domain_42_FLUXNETSITES_simyr1850_c170912.nc
./xmlchange ATM_DOMAIN_FILE=domain_42_FLUXNETSITES_simyr1850_c170912.nc
./xmlchange LND_DOMAIN_PATH="\$DIN_LOC_ROOT/share/domains/domain.clm"
./xmlchange ATM_DOMAIN_PATH="\$DIN_LOC_ROOT/share/domains/domain.clm"
./xmlchange DATM_MODE=CLM1PT
./xmlchange DATM_CLMNCEP_YR_START=2000
./xmlchange DATM_CLMNCEP_YR_END=2000
./xmlchange ELM_USRDAT_NAME=42_FLUXNETSITES
./xmlchange NTASKS=1
./xmlchange NTHRDS=1

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fsurdat = '$DIN_LOC_ROOT/lnd/clm2/surfdata_map/surfdata_42_FLUXNETSITES_simyr1850_c170912.nc'
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/clm_params_c211124.nc'
Loading

0 comments on commit 5559a57

Please sign in to comment.