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
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 @@ -4882,7 +4882,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 @@ -4954,6 +4954,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 @@ -2716,6 +2716,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 @@ -880,6 +880,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
1 change: 1 addition & 0 deletions src/main/clm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,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 @@ -236,6 +236,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 @@ -833,6 +834,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 @@ -1253,6 +1255,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 @@ -67,6 +67,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 @@ -411,6 +412,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 @@ -654,6 +656,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