Skip to content
Open
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
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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." );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should add a failure test for this in the build-namelist tester.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've got this updated and tested on derecho; I'll push it once it's back online.

}
# 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)) ) {
Expand Down
1 change: 1 addition & 0 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2715,6 +2715,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.4.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2
<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_inventory_init use_fates=".true.">.false.</use_fates_inventory_init>
<use_fates_dbh_init use_fates=".true.">.false.</use_fates_dbh_init>
<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>
Expand Down
8 changes: 8 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,14 @@ Full pathname to the inventory initialization control file.
(Only relevant if FATES is on).
</entry>


<entry id="use_fates_dbh_init" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
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).
</entry>

<entry id="fates_history_dimlevel" type="integer(2)" category="physics"
group="clm_inparm" valid_values="0,1,2" >
Setting for what types of FATES history to be allocate and
Expand Down
8 changes: 8 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4104,6 +4104,14 @@
<option name="wallclock">00:40:00</option>
</options>
</test>
<test name="ERS_D_Ld10" grid="f45_f45_mg37" compset="I2000Clm50FatesCruRsGs" testmods="clm/FatesColdNoCompInitDbh">
<machines>
<machine name="derecho" compiler="intel" category="fates"/>
</machines>
<options>
<option name="wallclock">00:40:00</option>
</options>
</test>
<test name="SMS_D" grid="1x1_brazil" compset="I2000Clm60FatesSpCruRsGs" testmods="clm/FatesColdSatPhen">
<machines>
<machine name="derecho" compiler="intel" category="ctsm_sci"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../FatesColdNoComp
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use_fates_dbh_init = .true.
72 changes: 71 additions & 1 deletion doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -10249,7 +10319,7 @@ Answer changes
--------------

Changes answers relative to baseline:

sb
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks like an accidental add?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch, yep that's accidental

Summarize any changes to answers, i.e.,
- what code configurations: FATES mode
- what platforms/compilers: ALL
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/main/clm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/main/controlMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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, &
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down
Loading