From da0a557fc33612d2021125e560f8b1d29c830c03 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Fri, 3 Apr 2026 13:02:59 -0600 Subject: [PATCH 01/12] add new fates namelist switch for dbh init when nocomp is on --- bld/CLMBuildNamelist.pm | 8 ++++++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 8 ++++++++ src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 8 ++++++++ 6 files changed, 27 insertions(+), 2 deletions(-) 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/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') From 137fb39825b990cdbe4aef032f7c859318a2064b Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Mon, 4 May 2026 12:59:25 -0600 Subject: [PATCH 02/12] add test for init_dbh --- cime_config/testdefs/testlist_clm.xml | 8 ++++++++ .../clm/FatesColdNoCompInitDbh/include_user_mods | 1 + .../clm/FatesColdNoCompInitDbh/shell_commands | 10 ++++++++++ .../clm/FatesColdNoCompInitDbh/user_nl_clm | 1 + 4 files changed, 20 insertions(+) create mode 100644 cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/include_user_mods create mode 100644 cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/shell_commands create mode 100644 cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/user_nl_clm 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 From b16c75328493409662f9f88e829af3fd3401507a Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 11 May 2026 10:33:56 -0600 Subject: [PATCH 03/12] update fates tag --- .gitmodules | 2 +- src/fates | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/src/fates b/src/fates index b17b0bdff2..37c28ce7e9 160000 --- a/src/fates +++ b/src/fates @@ -1 +1 @@ -Subproject commit b17b0bdff243c6782414e191736fb0d15935a5c7 +Subproject commit 37c28ce7e94751905542cb29c096c74cc250d7eb From 57935a982f8a34d9007014b4007a778fb2ce3a5d Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 11 May 2026 16:33:41 -0700 Subject: [PATCH 04/12] update changelog for ctsm5.4.039 --- doc/ChangeLog | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++- doc/ChangeSum | 1 + 2 files changed, 72 insertions(+), 1 deletion(-) 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 From 4ec34fd4ffa3c665a3174961c04428df65db4b6a Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 14 May 2026 09:59:58 -0600 Subject: [PATCH 05/12] add bld namelist unit test for new option --- bld/unit_testers/build-namelist_test.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index 8dc7076296..b77dc9670a 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -165,7 +165,7 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3406; +my $ntests = 3407; if ( defined($opts{'compare'}) ) { $ntests += 2061; @@ -1239,6 +1239,10 @@ sub cat_and_create_namelistinfile { namelst=>"use_fates_sp=T,use_fates_nocomp=F", phys=>"clm5_0", }, + "useFATESDBHInitWONoComp" =>{ options=>"-bgc fates -envxml_dir . -no-megan", + namelst=>"use_fates_dbh_init=T,use_fates_nocomp=F", + phys=>"clm6_0", + }, "useFATESSPwithLUH" =>{ options=>"-bgc fates -envxml_dir . -no-megan", namelst=>"use_fates_sp=T,use_fates_luh=T", phys=>"clm5_0", From 70118d0f11ef9c8d97d0e78062b3de0b91e3ba55 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Thu, 14 May 2026 10:04:49 -0600 Subject: [PATCH 06/12] update changelog with test results --- doc/ChangeLog | 6 +++--- doc/ChangeSum | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 833c44b1a8..67558b1ed3 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ =============================================================== 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 +Date: Mon May 14 04:00:00 PM MDT 2026 One-line Summary: Add FATES namelist option to initialize cohorts with diameter at breast height (DBH) Purpose and description of changes @@ -40,11 +40,11 @@ Testing summary: build-namelist tests (if CLMBuildNamelist.pm has changed): - derecho - + derecho - PASS regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - derecho ----- TBD + derecho ----- OK izumi ------- OK fates tests: (baseline comparison against fates-sci.1.92.4_api.45.0.0-ctsm5.4.037) diff --git a/doc/ChangeSum b/doc/ChangeSum index 49f7ed9ebd..582e2fcd57 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +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.039 multiple 05/14/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 From 8b0a8d37d804f77a0111ab98a0f28fcdcc95768e Mon Sep 17 00:00:00 2001 From: Samuel Levis Date: Thu, 14 May 2026 13:10:37 -0600 Subject: [PATCH 07/12] Small ChangeLog corrections --- doc/ChangeLog | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 67558b1ed3..1037cd7e19 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,7 +1,7 @@ -=============================================================== +============================================================== Tag name: ctsm5.4.039 Originator(s): mvdebolskiy (Matvey Debolskiy, University of Oslo, matvey.debolskiy@geo.uio.no) -Date: Mon May 14 04:00:00 PM MDT 2026 +Date: Thu May 14 01:07:45 PM MDT 2026 One-line Summary: Add FATES namelist option to initialize cohorts with diameter at breast height (DBH) Purpose and description of changes @@ -40,7 +40,7 @@ Testing summary: build-namelist tests (if CLMBuildNamelist.pm has changed): - derecho - PASS + derecho - OK (2 expected fails) regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): @@ -10319,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 From 2da7d05ca1dc748a2f3d1d21c510d02f49077feb Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Fri, 15 May 2026 07:23:40 -0600 Subject: [PATCH 08/12] fix srcroot, remove parabuild include --- .../testmods_dirs/clm/FatesColdNoCompInitDbh/shell_commands | 2 +- .../testmods_dirs/clm/FatesColdPRT2/include_user_mods | 1 - .../testdefs/testmods_dirs/clm/FatesColdPRT2/shell_commands | 2 +- .../testmods_dirs/clm/FatesColdPRT2_synthN/include_user_mods | 1 - .../testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands | 2 +- .../testdefs/testmods_dirs/clm/FatesColdSeedDisp/README | 4 ++-- .../testmods_dirs/clm/FatesColdSeedDisp/include_user_mods | 1 - .../testmods_dirs/clm/FatesColdSeedDisp/shell_commands | 2 +- .../testdefs/testmods_dirs/clm/FatesColdTwoStream/README | 4 ++-- .../testmods_dirs/clm/FatesSetupParamBuild/shell_commands | 4 ++-- 10 files changed, 10 insertions(+), 13 deletions(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/shell_commands index 438b95731f..cb6de531b5 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdNoCompInitDbh/shell_commands @@ -1,4 +1,4 @@ -SRCDIR=`./xmlquery SRCROOT --value` +SRCDIR=`./xmlquery COMP_ROOT_DIR_LND --value` CASEDIR=`./xmlquery CASEROOT --value` FATESDIR=$SRCDIR/src/fates/ FATESPARAMFILE=$CASEDIR/fates_params_init_dbh.json diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods index e781a89ea2..e73d79a391 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods @@ -1,3 +1,2 @@ ../Fates ../FatesCold -../FatesSetupParamBuild/ diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/shell_commands index 139be432dd..da24cb79a5 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/shell_commands @@ -1,4 +1,4 @@ -SRCDIR=`./xmlquery SRCROOT --value` +SRCDIR=`./xmlquery COMP_ROOT_DIR_LND --value` CASEDIR=`./xmlquery CASEROOT --value` FATESDIR=$SRCDIR/src/fates/ FATESPARAMFILE=$CASEDIR/fates_params_prt2_prescribed_p.json diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/include_user_mods index e781a89ea2..e73d79a391 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/include_user_mods @@ -1,3 +1,2 @@ ../Fates ../FatesCold -../FatesSetupParamBuild/ diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands index 2ebf250b2d..5af10d86d0 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands @@ -1,4 +1,4 @@ -SRCDIR=`./xmlquery SRCROOT --value` +SRCDIR=`./xmlquery COMP_ROOT_DIR_LND --value` CASEDIR=`./xmlquery CASEROOT --value` FATESDIR=$SRCDIR/src/fates/ FATESPARAMFILE=$CASEDIR/fates_params_prt2_prescribed_np.json diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/README b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/README index 484fa67db9..ee8c58d6d3 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/README +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/README @@ -11,8 +11,8 @@ Given that the default fates parameter file has the above variables as unset, a custom fates parameter file must be supplied to appropriately test this mode. This testmod itself addresses CTSM issue 2151: https://github.com/ESCOMP/CTSM/issues/2151 Note that to avoid exceeding the filename string length maximu, the parameter -file generated on the fly is placed in the $SRCROOT/src/fates/parameter_files -directory. This may still run into problems is the $SRCROOT string is too long. +file generated on the fly is placed in the $COMP_ROOT_DIR_LND/src/fates/parameter_files +directory. This may still run into problems is the $COMP_ROOT_DIR_LND string is too long. The max_dist value will impact the size of the 'neighborhood' of gridcells that fates will attempt to distribute seeds to. To limit the neighborhood to diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods index 5ad8824b70..e73d79a391 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods @@ -1,3 +1,2 @@ ../Fates ../FatesCold -../FatesSetupParamBuild diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/shell_commands index 585a6d65cb..40f10e24c2 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/shell_commands @@ -1,4 +1,4 @@ -SRCDIR=`./xmlquery SRCROOT --value` +SRCDIR=`./xmlquery COMP_ROOT_DIR_LND --value` CASEDIR=`./xmlquery CASEROOT --value` FATESDIR=$SRCDIR/src/fates/ diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/README b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/README index 295f8125f3..5c7384bae2 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/README +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/README @@ -5,8 +5,8 @@ parameter from 1 to 2. This is all that is needed, both radiation schemes fates_rad_model Note that to avoid exceeding the filename string length maximum, the parameter -file generated on the fly is placed in the $SRCROOT/src/fates/parameter_files -directory. This may still run into problems is the $SRCROOT string is too long. +file generated on the fly is placed in the $COMP_ROOT_DIR_LND/src/fates/parameter_files +directory. This may still run into problems is the $COMP_ROOT_DIR_LND string is too long. Like the test with seed dispersal activation, the main downside of this method is that this file will require a custom update for every fates parameter file API update. diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands index f8a0069c6f..1a4ad27be8 100755 --- a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -68,8 +68,8 @@ check_if_runable () { main() { # If under a casedirectory get a few variables for later use if [ -f xmlquery ]; then - SRCDIR=$(./xmlquery SRCROOT --value || echo "null") - check_error $? "Trouble getting SRCROOT from case" + SRCDIR=$(./xmlquery COMP_ROOT_DIR_LND --value || echo "null") + check_error $? "Trouble getting COMP_ROOT_DIR_LND from case" DEBUG=0 # otherwise if this is being run in the testmod directory for debugging else From 0daf650104865d87edaf886c795bbf907ef06b49 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Fri, 15 May 2026 07:43:03 -0600 Subject: [PATCH 09/12] remove double line --- .../testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands | 1 - 1 file changed, 1 deletion(-) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands index 5af10d86d0..145f277784 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands @@ -6,6 +6,5 @@ FATESPARAMFILE=$CASEDIR/fates_params_prt2_prescribed_np.json cp $FATESDIR/parameter_files/fates_params_default.json $FATESPARAMFILE $FATESDIR/tools/modify_fates_paramfile.py --overwrite --fin $FATESPARAMFILE --param fates_cnp_prescribed_puptake --values 10.0 --indices all -$FATESDIR/tools/modify_fates_paramfile.py --overwrite --fin $FATESPARAMFILE --param fates_cnp_prescribed_nuptake --values 10.0 --indices all echo "fates_paramfile = '$FATESPARAMFILE'" >> $CASEDIR/user_nl_clm From ce3b42c673762dc3738e9fb29c3c1da3b4f1d040 Mon Sep 17 00:00:00 2001 From: mvdebolskiy <80036033+mvdebolskiy@users.noreply.github.com> Date: Fri, 22 May 2026 22:10:49 +0200 Subject: [PATCH 10/12] fix changelog somehow --- doc/ChangeLog | 69 --------------------------------------------------- 1 file changed, 69 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index c7f8c919a7..87157c6e40 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,72 +1,3 @@ -============================================================== -Tag name: ctsm5.4.039 -Originator(s): mvdebolskiy (Matvey Debolskiy, University of Oslo, matvey.debolskiy@geo.uio.no) -Date: Thu May 14 01:07:45 PM 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 - OK (2 expected fails) - - regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - - derecho ----- OK - 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.041 From c4cec77046787ed3f0343fef783fcd15e33f0efb Mon Sep 17 00:00:00 2001 From: mvdebolskiy <80036033+mvdebolskiy@users.noreply.github.com> Date: Fri, 22 May 2026 22:11:47 +0200 Subject: [PATCH 11/12] remove extra= --- doc/ChangeLog | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 87157c6e40..a76eaa9582 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,5 +1,4 @@ =============================================================== -=============================================================== Tag name: ctsm5.4.041 Originator(s): samrabin (Sam Rabin, UCAR/TSS) Date: Thu May 21 14:33:36 MDT 2026 From efd2fa094a35ab26ae809926906b19f5389879f3 Mon Sep 17 00:00:00 2001 From: mvdebolskiy Date: Sun, 24 May 2026 05:25:14 -0600 Subject: [PATCH 12/12] revert removed line, it wass not a dupplication --- .../testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands | 1 + 1 file changed, 1 insertion(+) diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands index 145f277784..5af10d86d0 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2_synthN/shell_commands @@ -6,5 +6,6 @@ FATESPARAMFILE=$CASEDIR/fates_params_prt2_prescribed_np.json cp $FATESDIR/parameter_files/fates_params_default.json $FATESPARAMFILE $FATESDIR/tools/modify_fates_paramfile.py --overwrite --fin $FATESPARAMFILE --param fates_cnp_prescribed_puptake --values 10.0 --indices all +$FATESDIR/tools/modify_fates_paramfile.py --overwrite --fin $FATESPARAMFILE --param fates_cnp_prescribed_nuptake --values 10.0 --indices all echo "fates_paramfile = '$FATESPARAMFILE'" >> $CASEDIR/user_nl_clm