Skip to content

Commit

Permalink
add FATES radiation model switch to the namelist
Browse files Browse the repository at this point in the history
This commit facilitates moving this switch from the FATES parameter file
to the namelist
  • Loading branch information
glemieux committed Dec 11, 2024
1 parent d8b0fee commit 63076c8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ sub setup_cmdl_fates_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",
"use_fates_daylength_factor", "use_fates_photosynth_acclimation","fates_stomatal_assimilation",
"fates_cstarvation_model", "fates_regeneration_model", "fates_hydro_solver"
"fates_cstarvation_model", "fates_regeneration_model", "fates_hydro_solver", "fates_radiation_model"
);

# dis-allow fates specific namelist items with non-fates runs
Expand Down Expand Up @@ -4707,7 +4707,7 @@ sub setup_logic_fates {
"use_fates_inventory_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", "use_fates_photosynth_acclimation","fates_stomatal_assimilation",
"fates_cstarvation_model", "fates_regeneration_model", "fates_hydro_solver"
"fates_cstarvation_model", "fates_regeneration_model", "fates_hydro_solver", "fates_radiation_model"
);

foreach my $var ( @list ) {
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 @@ -2392,6 +2392,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2
<fates_stomatal_assimilation use_fates=".true.">net</fates_stomatal_assimilation>
<fates_cstarvation_model use_fates=".true.">linear</fates_cstarvation_model>
<fates_regeneration_model use_fates=".true.">default</fates_regeneration_model>
<fates_radiation_model use_fates=".true.">norman</fates_radiation_model>
<fates_hydro_solver use_fates=".true.">1D_Taylor</fates_hydro_solver>
<use_fates_planthydro use_fates=".true.">.false.</use_fates_planthydro>
<use_fates_tree_damage use_fates=".true.">.false.</use_fates_tree_damage>
Expand Down
5 changes: 5 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,11 @@ Allowed values are:
This option is older than the luhdata options and may be depricated at some point in the future.
</entry>

<entry id="fates_radiation_model" type="char*256" category="physics"
group="clm_inparm" valid_values="norman, twostream" value="norman">
Set the FATES radiation model
</entry>

<entry id="fates_hydro_solver" type="char*256" category="physics"
group="clm_inparm" valid_values="1D_Taylor, 2D_Picard, 2D_Newton" value="1D_Taylor">
Set the FATES hydro solver method
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 @@ -334,6 +334,7 @@ module clm_varctl
character(len=256), public :: fates_stomatal_assimilation = '' ! net or gross assimilation modes
character(len=256), public :: fates_cstarvation_model = '' ! linear or exponential function
character(len=256), public :: fates_regeneration_model = '' ! default, TRS, or TRS without seed dynamics
character(len=256), public :: fates_radiation_model = '' ! Norman or two-stream radiation model
character(len=256), public :: fates_hydro_solver = '' ! 1D Taylor, 2D Picard, 2D Newton
logical, public :: use_fates_planthydro = .false. ! true => turn on fates hydro
logical, public :: use_fates_cohort_age_tracking = .false. ! true => turn on cohort age tracking
Expand Down
3 changes: 3 additions & 0 deletions src/main/controlMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ subroutine control_init(dtime)
fates_stomatal_assimilation, &
fates_cstarvation_model, &
fates_regeneration_model, &
fates_radiation_model, &
fates_hydro_solver, &
fates_parteh_mode, &
fates_seeddisp_cadence, &
Expand Down Expand Up @@ -808,6 +809,7 @@ subroutine control_spmd()
call mpi_bcast (fates_stomatal_assimilation, len(fates_stomatal_assimilation) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_cstarvation_model, len(fates_cstarvation_model) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_regeneration_model, len(fates_regeneration_model) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_radiation_model, len(fates_radiation_model) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (fates_hydro_solver, len(fates_hydro_solver) , MPI_CHARACTER, 0, mpicom, ier)
call mpi_bcast (use_fates_planthydro, 1, MPI_LOGICAL, 0, mpicom, ier)
call mpi_bcast (use_fates_tree_damage, 1, MPI_LOGICAL, 0, mpicom, ier)
Expand Down Expand Up @@ -1215,6 +1217,7 @@ subroutine control_print ()
write(iulog, *) ' fates_stomatal_assimilation = ', fates_stomatal_assimilation
write(iulog, *) ' fates_cstarvation_model = ', fates_cstarvation_model
write(iulog, *) ' fates_regeneration_model = ', fates_regeneration_model
write(iulog, *) ' fates_radiation_model = ', fates_radiation_model
write(iulog, *) ' fates_hydro_solver = ', fates_hydro_solver
write(iulog, *) ' fates_paramfile = ', fates_paramfile
write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode
Expand Down
7 changes: 7 additions & 0 deletions src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,13 @@ subroutine CLMFatesGlobals2()
end if
call set_fates_ctrlparms('hydr_solver',ival=pass_hydro_solver)

if (trim(fates_radiation_model) == 'norman') then
pass_radiation_model = 1
else if (trim(fates_hydro_solver) == 'twostream') then
pass_radiation_model = 2
end if
call set_fates_ctrlparms('radiation_model',ival=pass_radiation_model)

! FATES logging and harvest modes
pass_logging = 0
pass_lu_harvest = 0
Expand Down

0 comments on commit 63076c8

Please sign in to comment.