From a11994c43744eaa4bc5f6598416fa7a75d6bb9a8 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Tue, 10 Dec 2024 14:46:19 -0800 Subject: [PATCH] add FATES seed regeneration model switch to namelist This commit facilitates moving this switch from the FATES parameter file to the namelist --- bld/CLMBuildNamelist.pm | 4 ++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 9 +++++++++ src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 9 +++++++++ 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 4594e79f17..43dbda3a3a 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -810,7 +810,7 @@ sub setup_cmdl_fates_mode { "fates_parteh_mode","use_fates_tree_damage","fates_seeddisp_cadence","use_fates_luh","fluh_timeseries", "flandusepftdat","use_fates_potentialveg","use_fates_lupft","fates_history_dimlevel", "use_fates_daylength_factor", "use_fates_photosynth_acclimation","fates_stomatal_assimilation", - "fates_cstarvation_model" + "fates_cstarvation_model", "fates_regeneration_model" ); # dis-allow fates specific namelist items with non-fates runs @@ -4707,7 +4707,7 @@ sub setup_logic_fates { "use_fates_inventory_init","fates_seeddisp_cadence","fates_history_dimlevel", "fates_harvest_mode","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage", "use_fates_daylength_factor", "use_fates_photosynth_acclimation","fates_stomatal_assimilation", - "fates_cstarvation_model" + "fates_cstarvation_model", "fates_regeneration_model" ); foreach my $var ( @list ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index c1c42d2daa..1bd53e9a86 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2391,6 +2391,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 no_harvest net linear +default .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 78fa40bcfe..08ee5c18c8 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -775,6 +775,15 @@ Allowed values are: This option is older than the luhdata options and may be depricated at some point in the future. + +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 + + Set the FATES carbon starvation model diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 43370d2c1b..d2efdd476d 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -333,6 +333,7 @@ module clm_varctl character(len=256), public :: fates_harvest_mode = '' ! five different harvest modes; see namelist definition character(len=256), public :: fates_stomatal_assimilation = '' ! net or gross assimilation modes 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 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 logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index 643420bea5..fca17abff3 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -244,6 +244,7 @@ subroutine control_init(dtime) fates_inventory_ctrl_filename, & fates_stomatal_assimilation, & fates_cstarvation_model, & + fates_regeneration_model, & fates_parteh_mode, & fates_seeddisp_cadence, & use_fates_tree_damage, & @@ -805,6 +806,7 @@ subroutine control_spmd() call mpi_bcast (fates_harvest_mode, len(fates_harvest_mode) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_stomatal_assimilation, len(fates_stomatal_assimilation) , 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 (use_fates_planthydro, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_tree_damage, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_cohort_age_tracking, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1210,6 +1212,7 @@ subroutine control_print () write(iulog, *) ' fates_harvest_mode = ', fates_harvest_mode write(iulog, *) ' fates_stomatal_assimilation = ', fates_stomatal_assimilation write(iulog, *) ' fates_cstarvation_model = ', fates_cstarvation_model + write(iulog, *) ' fates_regeneration_model = ', fates_regeneration_model write(iulog, *) ' fates_paramfile = ', fates_paramfile write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index a0145e72e6..e11ca917a6 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -560,6 +560,15 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('mort_cstarvation_model',ival=pass_cstarvation_model) + if (trim(fates_regeneration_model) == 'default') then + pass_regeneration_model = 1 + else if (trim(fates_regeneration_model) == 'trs') then + pass_regeneration_model = 2 + else if (trim(fates_regeneration_model) == 'trs_no_seed_dyn') then + pass_regeneration_model = 3 + end if + call set_fates_ctrlparms('regeneration_model',ival=pass_regeneration_model) + ! FATES logging and harvest modes pass_logging = 0 pass_lu_harvest = 0