diff --git a/.gitmodules b/.gitmodules index 93bd975139..541855a840 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,7 +28,7 @@ [submodule "fates"] path = src/fates url = https://github.com/NGEET/fates -fxtag = sci.1.92.4_api.45.0.0 +fxtag = sci.1.92.5_api.46.0.0 fxrequired = AlwaysRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NGEET/fates diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 083ce3b667..b7b183be3e 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -816,7 +816,7 @@ sub setup_cmdl_fates_mode { } else { # dis-allow fates specific namelist items with non-fates runs my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", - "use_fates_cohort_age_tracking","use_fates_inventory_init","use_fates_fixed_biogeog", + "use_fates_cohort_age_tracking","use_fates_inventory_init","use_fates_dbh_init","use_fates_fixed_biogeog", "use_fates_nocomp","use_fates_sp","fates_inventory_ctrl_filename","fates_harvest_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", @@ -4896,7 +4896,7 @@ sub setup_logic_fates { if (&value_is_true( $nl_flags->{'use_fates'}) ) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fates_paramfile', 'phys'=>$nl_flags->{'phys'}); my @list = ( "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", - "use_fates_inventory_init","fates_seeddisp_cadence","fates_history_dimlevel", + "use_fates_inventory_init","use_fates_dbh_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", "fates_photosynth_acclimation", "fates_stomatal_model", "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model", @@ -4961,6 +4961,10 @@ sub setup_logic_fates { } } } + my $var = "use_fates_dbh_init"; + if ( &value_is_true($nl->get_value($var)) && ( !&value_is_true($nl->get_value("use_fates_nocomp")))) { + $log->fatal_error("$var can only be .true. use_fates_nocomp is .true." ); + } # make sure that fates landuse x pft mode has the necessary run mode configurations my $var = "use_fates_lupft"; if ( defined($nl->get_value($var)) ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index ef5e6919db..9bd99600db 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2715,6 +2715,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.4.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 .false. .false. .false. +.false. .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 179704e518..75a96a6c5f 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -881,6 +881,14 @@ Full pathname to the inventory initialization control file. (Only relevant if FATES is on). + + +Initialize cohorts at coldstart with diameter at breast height instead of density +(Applies only if use_fates_nocomp=.true.) +(Only relevant if FATES is on). + + Setting for what types of FATES history to be allocate and diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index f4648c5c4d..90f6ca000b 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -4104,6 +4104,14 @@ + + + + + + + + diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/include_user_mods new file mode 100644 index 0000000000..ea160c525f --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/include_user_mods @@ -0,0 +1 @@ +../FatesColdNoComp \ No newline at end of file diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/shell_commands new file mode 100644 index 0000000000..438b95731f --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/shell_commands @@ -0,0 +1,10 @@ +SRCDIR=`./xmlquery SRCROOT --value` +CASEDIR=`./xmlquery CASEROOT --value` +FATESDIR=$SRCDIR/src/fates/ +FATESPARAMFILE=$CASEDIR/fates_params_init_dbh.json + +cp $FATESDIR/parameter_files/fates_params_default.json $FATESPARAMFILE + +$FATESDIR/tools/modify_fates_paramfile.py --overwrite --fin $FATESPARAMFILE --param fates_recruit_init_seed --values 0.01 --indices all + +echo "fates_paramfile = '$FATESPARAMFILE'" >> $CASEDIR/user_nl_clm \ No newline at end of file diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/user_nl_clm new file mode 100644 index 0000000000..9450396fc4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/user_nl_clm @@ -0,0 +1 @@ +use_fates_dbh_init = .true. \ No newline at end of file diff --git a/doc/ChangeLog b/doc/ChangeLog index 9b06393243..833c44b1a8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,74 @@ =============================================================== +Tag name: ctsm5.4.039 +Originator(s): mvdebolskiy (Matvey Debolskiy, University of Oslo, matvey.debolskiy@geo.uio.no) +Date: Mon May 11 04:00:00 PR MDT 2026 +One-line Summary: Add FATES namelist option to initialize cohorts with diameter at breast height (DBH) + +Purpose and description of changes +---------------------------------- + +FATES allows for the ability to initialize seedling by density or DBH. Prior to this change, +the user would update the `fates_recruit_init_density` parameter to use a negative value to +initalize by DBH. This pull request removes this global switch behavior and creates a namelist +option for the user. The FATES parameter file and behavior has been updated to include a new +parameter for users to set the initial DBH by plant functional type. + +Notes of particular relevance for users +--------------------------------------- + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + New namelist option to control FATES: + use_fates_dbh_init + +Changes made to namelist defaults (e.g., changed parameter values): + Sets the default for use_fates_dbh_init to false + +Changes to the parameter file (output of tools/param_utils/compare_paramfiles): + Adds fates_recruit_init_dbh to the FATES parameter file + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + - Note that this option currently is only applicable with use_fates_nocomp + +Changes to tests or testing: + Added test module FatesColdNoCompInitDbh + +Testing summary: +---------------- + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- TBD + izumi ------- OK + + fates tests: (baseline comparison against fates-sci.1.92.4_api.45.0.0-ctsm5.4.037) + derecho ----- OK + izumi ------- OK + +Answer changes +-------------- + +Changes answers relative to baseline: No + +Other details +------------- + +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): + fates: sci.1.92.4_api.45.0.0 -> sci.1.92.5_api.46.0.0 + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) +https://github.com/ESCOMP/CTSM/pull/3910 +https://github.com/NGEET/fates/pull/1550 + +=============================================================== +=============================================================== Tag name: ctsm5.4.038 Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) Date: Thu May 7 03:29:26 PM MDT 2026 @@ -10249,7 +10319,7 @@ Answer changes -------------- Changes answers relative to baseline: - + sb Summarize any changes to answers, i.e., - what code configurations: FATES mode - what platforms/compilers: ALL diff --git a/doc/ChangeSum b/doc/ChangeSum index 525bc0dc37..49f7ed9ebd 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.4.039 glemieux 05/11/2026 Add FATES namelist option to initialize cohorts with diameter at breast height (DBH) ctsm5.4.038 slevis 05/07/2026 Merge b4b-dev to master ctsm5.4.037 multiple 05/04/2026 Fix for FATES year-boundary restart issue ctsm5.4.036 multiple 04/27/2026 Complete the FATES-CLM nitrogen coupling diff --git a/src/fates b/src/fates index b17b0bdff2..37c28ce7e9 160000 --- a/src/fates +++ b/src/fates @@ -1 +1 @@ -Subproject commit b17b0bdff243c6782414e191736fb0d15935a5c7 +Subproject commit 37c28ce7e94751905542cb29c096c74cc250d7eb diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 4c36cb21d1..9e42c3ff21 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -357,6 +357,7 @@ module clm_varctl logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure logical, public :: use_fates_ed_prescribed_phys = .false. ! true => prescribed physiology logical, public :: use_fates_inventory_init = .false. ! true => initialize fates from inventory + logical, public :: use_fates_dbh_init = .false. ! true => initialize cohorts with dbh instead of density (nocomp only) logical, public :: use_fates_fixed_biogeog = .false. ! true => use fixed biogeography mode logical, public :: use_fates_nocomp = .false. ! true => use no comopetition mode logical, public :: use_fates_daylength_factor = .false. ! true => enable fates to use host land model daylength factor diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index fc8036e75f..70cf132dc7 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -239,6 +239,7 @@ subroutine control_init(dtime) use_fates_cohort_age_tracking, & use_fates_ed_prescribed_phys, & use_fates_inventory_init, & + use_fates_dbh_init, & use_fates_fixed_biogeog, & use_fates_nocomp, & use_fates_sp, & @@ -845,6 +846,7 @@ subroutine control_spmd() call mpi_bcast (use_fates_ed_st3, 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_dbh_init, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_fixed_biogeog, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_nocomp, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_sp, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1266,6 +1268,7 @@ subroutine control_print () write(iulog, *) ' use_fates_ed_st3 = ',use_fates_ed_st3 write(iulog, *) ' use_fates_ed_prescribed_phys = ',use_fates_ed_prescribed_phys write(iulog, *) ' use_fates_inventory_init = ',use_fates_inventory_init + write(iulog, *) ' use_fates_dbh_init = ',use_fates_dbh_init write(iulog, *) ' use_fates_fixed_biogeog = ', use_fates_fixed_biogeog write(iulog, *) ' use_fates_nocomp = ', use_fates_nocomp write(iulog, *) ' use_fates_sp = ', use_fates_sp diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 5584ff1705..ae2a409f7c 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -68,6 +68,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : fates_radiation_model use clm_varctl , only : fates_electron_transport_model use clm_varctl , only : use_fates_inventory_init + use clm_varctl , only : use_fates_dbh_init use clm_varctl , only : use_fates_fixed_biogeog use clm_varctl , only : use_fates_nocomp use clm_varctl , only : use_fates_sp @@ -430,6 +431,7 @@ subroutine CLMFatesGlobals2() integer :: pass_ed_prescribed_phys integer :: pass_planthydro integer :: pass_inventory_init + integer :: pass_dbh_init integer :: pass_is_restart integer :: pass_cohort_age_tracking integer :: pass_tree_damage @@ -674,6 +676,12 @@ subroutine CLMFatesGlobals2() call set_fates_ctrlparms('inventory_ctrl_file',cval=fates_inventory_ctrl_filename) + if(use_fates_dbh_init) then + pass_dbh_init = 1 + else + pass_dbh_init = 0 + end if + call set_fates_ctrlparms('use_dbh_init',ival=pass_dbh_init) ! Check through FATES parameters to see if all have been set call set_fates_ctrlparms('check_allset')