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

Migrate FATES parameter file switches to the namelist #6918

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 23 additions & 2 deletions components/elm/bld/ELMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,18 @@ sub setup_cmdl_fates_mode {
"use_fates_tree_damage",
"use_century_decomp",
"use_snicar_ad",
"use_vertsoilc");
"use_vertsoilc",
"use_fates_daylength_factor",
"fates_photosynth_acclimation",
"fates_stomatal_model",
"fates_stomatal_assimilation",
"fates_leafresp_model",
"fates_cstarvation_model",
"fates_regeneration_model",
"fates_hydro_solver",
"fates_radiation_model",
"fates_electron_transport_model");

foreach my $var ( @list ) {
if ( defined($nl->get_value($var)) ) {
$nl_flags->{$var} = $nl->get_value($var);
Expand Down Expand Up @@ -3429,7 +3440,17 @@ sub setup_logic_fates {
"use_fates_planthydro",
"use_fates_potentialveg",
"use_fates_sp",
"use_fates_tree_damage");
"use_fates_tree_damage",
"use_fates_daylength_factor",
"fates_photosynth_acclimation",
"fates_stomatal_model",
"fates_stomatal_assimilation",
"fates_leafresp_model",
"fates_cstarvation_model",
"fates_regeneration_model",
"fates_hydro_solver",
"fates_radiation_model",
"fates_electron_transport_model");

foreach my $var (@list) {
add_default($test_files, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var,'use_fates'=>$nl_flags->{'use_fates'});
Expand Down
68 changes: 39 additions & 29 deletions components/elm/bld/namelist_files/namelist_defaults.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2212,35 +2212,45 @@ 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>
<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_cohort_age_tracking use_fates=".true.">.false.</use_fates_cohort_age_tracking>
<use_fates_sp use_fates=".true.">.false.</use_fates_sp>
<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>
<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>
<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>
<fates_spitfire_mode use_fates=".true.">0</fates_spitfire_mode>
<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_cohort_age_tracking use_fates=".true.">.false.</use_fates_cohort_age_tracking>
<use_fates_sp use_fates=".true.">.false.</use_fates_sp>
<use_fates_lupft use_fates=".true.">.false.</use_fates_lupft>
<use_fates_potentialveg use_fates=".true.">.false.</use_fates_potentialveg>
<use_fates_daylength_factor use_fates=".true.">.true.</use_fates_daylength_factor>
<fates_photosynth_acclimation use_fates=".true.">nonacclimating</fates_photosynth_acclimation>
<fates_stomatal_model use_fates=".true.">ballberry1987</fates_stomatal_model>
<fates_stomatal_assimilation use_fates=".true.">net</fates_stomatal_assimilation>
<fates_leafresp_model use_fates=".true.">ryan1991</fates_leafresp_model>
<fates_cstarvation_model use_fates=".true.">linear</fates_cstarvation_model>
<fates_regeneration_model use_fates=".true.">default</fates_regeneration_model>
<fates_hydro_solver use_fates=".true.">1D_Taylor</fates_hydro_solver>
<fates_radiation_model use_fates=".true.">norman</fates_radiation_model>
<fates_electron_transport_model use_fates=".true.">FvCB1980</fates_electron_transport_model>
<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>
<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>
<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>

<!-- flow of agricultural nitrogen (fan) model -->
<use_fan use_cn=".true.">.false.</use_fan>
Expand Down
56 changes: 56 additions & 0 deletions components/elm/bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,62 @@ 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="fates_radiation_model" type="char*256" category="physics"
group="elm_inparm" valid_values="norman, twostream" value="norman">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can't be any spaces between the valid values - e.g. this should be "norman,twostream"

Set the FATES radiation model
</entry>

<entry id="fates_electron_transport_model" type="char*256" category="physics"
group="elm_inparm" valid_values="FvCB1980, JohnsonBerry2021" value="FvCB1980">
Set the FATES electron transport model
</entry>

<entry id="fates_hydro_solver" type="char*256" category="physics"
group="elm_inparm" valid_values="1D_Taylor, 2D_Picard, 2D_Newton" value="1D_Taylor">
Set the FATES hydro solver method
</entry>

<entry id="fates_regeneration_model" type="char*256" category="physics"
group="elm_inparm" valid_values="default, trs, trs_no_seed_dyn" value="default">
Set the FATES seed regeneration model
Valid values:
default: default scheme
trs: Tree Recruitment Scheme (Hanbury-Brown et al., 2022)
trs_no_seed_dyn: Tree Recruitment Scheme (Hanbury-Brown et al., 2022) without seed dynamics
</entry>

<entry id="fates_cstarvation_model" type="char*256" category="physics"
group="elm_inparm" valid_values="linear, exponential" value="linear">
Set the FATES carbon starvation model
</entry>

<entry id="fates_leafresp_model" type="char*256" category="physics"
group="elm_inparm" valid_values="ryan1991, atkin2017" value="ryan1991">
Set the FATES leaf maintenance respiration model
</entry>

<entry id="fates_stomatal_assimilation" type="char*256" category="physics"
group="elm_inparm" valid_values="net, gross" value="net">
Set net or gross asslimiation for the FATES stomatal model
</entry>

<entry id="fates_stomatal_model" type="char*256" category="physics"
group="elm_inparm" valid_values="ballberry1987, medlyn2011" value="ballberry1987">
Set the FATES stomatal conductance model
</entry>

<entry id="fates_photosynth_acclimation" type="char*256" category="physics"
group="elm_inparm" valid_values="nonacclimating, kumarathunge2019" value="nonacclimating">
Set the FATES photosynthesis temperature acclimation model.
(Only relevant if FATES is on)
</entry>

<entry id="use_fates_daylength_factor" type="logical" category="physics"
group="elm_inparm" valid_values="" value=".true.">
If TRUE, enable FATES to utilize the day length factor from the host land model.
(Only relevant if FATES is on)
</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
30 changes: 30 additions & 0 deletions components/elm/src/main/controlMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,16 @@ subroutine control_init( )
fates_parteh_mode, &
fates_seeddisp_cadence, &
use_fates_tree_damage, &
use_fates_daylength_factor, &
fates_photosynth_acclimation, &
fates_stomatal_model, &
fates_stomatal_assimilation, &
fates_leafresp_model, &
fates_cstarvation_model, &
fates_regeneration_model, &
fates_hydro_solver, &
fates_radiation_model, &
fates_electron_transport_model, &
fates_history_dimlevel

namelist /elm_inparm / use_betr
Expand Down Expand Up @@ -829,6 +839,16 @@ subroutine control_spmd()
call mpi_bcast (use_fates_potentialveg, 1, MPI_LOGICAL, 0, mpicom, ier)
call mpi_bcast (use_fates_ed_prescribed_phys, 1, MPI_LOGICAL, 0, mpicom, ier)
call mpi_bcast (use_fates_inventory_init, 1, MPI_LOGICAL, 0, mpicom, ier)
call mpi_bcast (use_fates_daylength_factor, 1, MPI_LOGICAL, 0, mpicom, ier)
call mpi_bcast (fates_photosynth_acclimation, len(fates_photosynth_acclimation), MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_stomatal_model, len(fates_stomatal_model) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_stomatal_assimilation, len(fates_stomatal_assimilation) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_leafresp_model, len(fates_leafresp_model) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_cstarvation_model, len(fates_cstarvation_model) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_regeneration_model, len(fates_regeneration_model) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_hydro_solver, len(fates_hydro_solver) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_radiation_model, len(fates_radiation_model) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_electron_transport_model, len(fates_electron_transport_model) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_inventory_ctrl_filename, len(fates_inventory_ctrl_filename), &
MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_parteh_mode, 1, MPI_INTEGER, 0, mpicom, ier)
Expand Down Expand Up @@ -1251,6 +1271,16 @@ subroutine control_print ()
write(iulog, *) ' use_fates_luh = ', use_fates_luh
write(iulog, *) ' use_fates_lupft = ', use_fates_lupft
write(iulog, *) ' use_fates_potentialveg = ', use_fates_potentialveg
write(iulog, *) ' use_fates_daylength_factor = ', use_fates_daylength_factor
write(iulog, *) ' fates_photosynth_acclimation = ', trim(fates_photosynth_acclimation)
write(iulog, *) ' fates_stomatal_model = ', fates_stomatal_model
write(iulog, *) ' fates_stomatal_assimilation = ', fates_stomatal_assimilation
write(iulog, *) ' fates_leafresp_model = ', fates_leafresp_model
write(iulog, *) ' fates_cstarvation_model = ', fates_cstarvation_model
write(iulog, *) ' fates_regeneration_model = ', fates_regeneration_model
write(iulog, *) ' fates_hydro_solver = ', fates_hydro_solver
write(iulog, *) ' fates_radiation_model = ', fates_radiation_model
write(iulog, *) ' fates_electron_transport_model = ', fates_electron_transport_model
write(iulog, *) ' fates_inventory_ctrl_filename = ',fates_inventory_ctrl_filename
write(iulog, *) ' fates_seeddisp_cadence = ', fates_seeddisp_cadence
write(iulog, *) ' fates_seeddisp_cadence: 0, 1, 2, 3 => off, daily, monthly, or yearly dispersal'
Expand Down
10 changes: 10 additions & 0 deletions components/elm/src/main/elm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,15 @@ module elm_varctl
logical, public :: use_fates = .false. ! true => use ED
integer, public :: fates_spitfire_mode = 0 ! 0 for no fire; 1 for constant ignitions
character(len=256), public :: fates_harvest_mode = '' ! five different harvest modes; see namelist_definitions
character(len=256), public :: fates_photosynth_acclimation = '' ! nonacclimating, kumarathunge2019
character(len=256), public :: fates_stomatal_model = '' ! stomatal conductance model, Ball-berry or Medlyn
character(len=256), public :: fates_stomatal_assimilation = '' ! net or gross assimilation modes
character(len=256), public :: fates_leafresp_model = '' ! Leaf maintenance respiration model, Ryan or Atkin
character(len=256), public :: fates_cstarvation_model = '' ! linear or exponential function
character(len=256), public :: fates_regeneration_model = '' ! default, TRS, or TRS without seed dynamics
character(len=256), public :: fates_hydro_solver = '' ! 1D Taylor, 2D Picard, 2D Newton
character(len=256), public :: fates_radiation_model = '' ! Norman or two-stream radiation model
character(len=256), public :: fates_electron_transport_model = '' ! FvCB or JB electron transport model
logical, public :: use_fates_fixed_biogeog = .false. ! true => use fixed biogeography mode
logical, public :: use_fates_planthydro = .false. ! true => turn on fates hydro
logical, public :: use_fates_cohort_age_tracking = .false. ! true => turn on cohort age tracking
Expand All @@ -234,6 +243,7 @@ module elm_varctl
logical, public :: use_fates_luh = .false. ! true => FATES land use transitions mode
logical, public :: use_fates_lupft = .false. ! true => FATES land use x pft mode
logical, public :: use_fates_potentialveg = .false. ! true => FATES potential veg only
logical, public :: use_fates_daylength_factor = .false. ! true => enable fates to use host land model daylength factor
character(len=256), public :: fluh_timeseries = '' ! filename for land use harmonization data
character(len=256), public :: flandusepftdat = '' ! filename for fates landuse x pft data
character(len=256), public :: fates_inventory_ctrl_filename = '' ! filename for inventory control
Expand Down
Loading
Loading