Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
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." );
}
# 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.
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