Skip to content

Commit adf7d56

Browse files
committed
add FATES hydro solver selection switch to namelist
This commit facilitates moving this switch from the FATES parameter file to the namelist
1 parent 3f2ed72 commit adf7d56

6 files changed

+23
-2
lines changed

bld/CLMBuildNamelist.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ sub setup_cmdl_fates_mode {
811811
"flandusepftdat","use_fates_potentialveg","use_fates_lupft","fates_history_dimlevel",
812812
"use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model",
813813
"fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model",
814-
"fates_regeneration_model"
814+
"fates_regeneration_model", "fates_hydro_solver"
815815
);
816816

817817
# dis-allow fates specific namelist items with non-fates runs
@@ -4709,7 +4709,7 @@ sub setup_logic_fates {
47094709
"fates_harvest_mode","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage",
47104710
"use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model",
47114711
"fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model",
4712-
"fates_regeneration_model"
4712+
"fates_regeneration_model", "fates_hydro_solver"
47134713
);
47144714

47154715
foreach my $var ( @list ) {

bld/namelist_files/namelist_defaults_ctsm.xml

+1
Original file line numberDiff line numberDiff line change
@@ -2394,6 +2394,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2
23942394
<fates_leafresp_model use_fates=".true.">ryan1991</fates_leafresp_model>
23952395
<fates_cstarvation_model use_fates=".true.">linear</fates_cstarvation_model>
23962396
<fates_regeneration_model use_fates=".true.">default</fates_regeneration_model>
2397+
<fates_hydro_solver use_fates=".true.">1D_Taylor</fates_hydro_solver>
23972398
<use_fates_planthydro use_fates=".true.">.false.</use_fates_planthydro>
23982399
<use_fates_tree_damage use_fates=".true.">.false.</use_fates_tree_damage>
23992400
<use_fates_cohort_age_tracking use_fates=".true.">.false.</use_fates_cohort_age_tracking>

bld/namelist_files/namelist_definition_ctsm.xml

+5
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,11 @@ Allowed values are:
775775
This option is older than the luhdata options and may be depricated at some point in the future.
776776
</entry>
777777

778+
<entry id="fates_hydro_solver" type="char*256" category="physics"
779+
group="clm_inparm" valid_values="1D_Taylor, 2D_Picard, 2D_Newton" value="1D_Taylor">
780+
Set the FATES hydro solver method
781+
</entry>
782+
778783
<entry id="fates_regeneration_model" type="char*256" category="physics"
779784
group="clm_inparm" valid_values="default, trs, trs_no_seed_dyn" value="default">
780785
Set the FATES seed regeneration model

src/main/clm_varctl.F90

+1
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ module clm_varctl
336336
character(len=256), public :: fates_leafresp_model = '' ! Leaf maintenance respiration model, Ryan or Atkin
337337
character(len=256), public :: fates_cstarvation_model = '' ! linear or exponential function
338338
character(len=256), public :: fates_regeneration_model = '' ! default, TRS, or TRS without seed dynamics
339+
character(len=256), public :: fates_hydro_solver = '' ! 1D Taylor, 2D Picard, 2D Newton
339340
logical, public :: use_fates_planthydro = .false. ! true => turn on fates hydro
340341
logical, public :: use_fates_cohort_age_tracking = .false. ! true => turn on cohort age tracking
341342
logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure

src/main/controlMod.F90

+3
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ subroutine control_init(dtime)
247247
fates_leafresp_model, &
248248
fates_cstarvation_model, &
249249
fates_regeneration_model, &
250+
fates_hydro_solver, &
250251
fates_parteh_mode, &
251252
fates_seeddisp_cadence, &
252253
use_fates_tree_damage, &
@@ -811,6 +812,7 @@ subroutine control_spmd()
811812
call mpi_bcast (fates_leafresp_model, len(fates_leafresp_model) , MPI_CHARACTER, 0, mpicom, ier)
812813
call mpi_bcast (fates_cstarvation_model, len(fates_cstarvation_model) , MPI_CHARACTER, 0, mpicom, ier)
813814
call mpi_bcast (fates_regeneration_model, len(fates_regeneration_model) , MPI_CHARACTER, 0, mpicom, ier)
815+
call mpi_bcast (fates_hydro_solver, len(fates_hydro_solver) , MPI_CHARACTER, 0, mpicom, ier)
814816
call mpi_bcast (use_fates_planthydro, 1, MPI_LOGICAL, 0, mpicom, ier)
815817
call mpi_bcast (use_fates_tree_damage, 1, MPI_LOGICAL, 0, mpicom, ier)
816818
call mpi_bcast (use_fates_cohort_age_tracking, 1, MPI_LOGICAL, 0, mpicom, ier)
@@ -1219,6 +1221,7 @@ subroutine control_print ()
12191221
write(iulog, *) ' fates_leafresp_model = ', fates_leafresp_model
12201222
write(iulog, *) ' fates_cstarvation_model = ', fates_cstarvation_model
12211223
write(iulog, *) ' fates_regeneration_model = ', fates_regeneration_model
1224+
write(iulog, *) ' fates_hydro_solver = ', fates_hydro_solver
12221225
write(iulog, *) ' fates_paramfile = ', fates_paramfile
12231226
write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode
12241227
write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro

src/utils/clmfates_interfaceMod.F90

+11
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ module CLMFatesInterfaceMod
6262
use clm_varctl , only : fates_leafresp_model
6363
use clm_varctl , only : fates_cstarvation_model
6464
use clm_varctl , only : fates_regeneration_model
65+
use clm_varctl , only : fates_hydro_solver
6566
use clm_varctl , only : use_fates_inventory_init
6667
use clm_varctl , only : use_fates_fixed_biogeog
6768
use clm_varctl , only : use_fates_nocomp
@@ -413,6 +414,7 @@ subroutine CLMFatesGlobals2()
413414
integer :: pass_leafresp_model
414415
integer :: pass_cstarvation_model
415416
integer :: pass_regeneration_model
417+
integer :: pass_hydro_solver
416418

417419
call t_startf('fates_globals2')
418420

@@ -580,6 +582,15 @@ subroutine CLMFatesGlobals2()
580582
end if
581583
call set_fates_ctrlparms('regeneration_model',ival=pass_regeneration_model)
582584

585+
if (trim(fates_hydro_solver) == '1D_Taylor') then
586+
pass_hydro_solver = 1
587+
else if (trim(fates_hydro_solver) == '2D_Picard') then
588+
pass_hydro_solver = 2
589+
else if (trim(fates_hydro_solver) == '2D_Taylor') then
590+
pass_hydro_solver = 3
591+
end if
592+
call set_fates_ctrlparms('hydr_solver',ival=pass_hydro_solver)
593+
583594
! FATES logging and harvest modes
584595
pass_logging = 0
585596
pass_lu_harvest = 0

0 commit comments

Comments
 (0)