Skip to content

Commit 019da9d

Browse files
committed
add FATES radiation model switch to the namelist
This commit facilitates moving this switch from the FATES parameter file to the namelist
1 parent f945cfc commit 019da9d

File tree

6 files changed

+23
-2
lines changed

6 files changed

+23
-2
lines changed

components/elm/bld/ELMBuildNamelist.pm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,8 @@ sub setup_cmdl_fates_mode {
838838
"fates_leafresp_model",
839839
"fates_cstarvation_model",
840840
"fates_regeneration_model",
841-
"fates_hydro_solver");
841+
"fates_hydro_solver",
842+
"fates_radiation_model");
842843

843844
foreach my $var ( @list ) {
844845
if ( defined($nl->get_value($var)) ) {
@@ -3446,7 +3447,8 @@ sub setup_logic_fates {
34463447
"fates_leafresp_model",
34473448
"fates_cstarvation_model",
34483449
"fates_regeneration_model",
3449-
"fates_hydro_solver");
3450+
"fates_hydro_solver",
3451+
"fates_radiation_model");
34503452

34513453
foreach my $var (@list) {
34523454
add_default($test_files, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var,'use_fates'=>$nl_flags->{'use_fates'});

components/elm/bld/namelist_files/namelist_defaults.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,6 +2234,7 @@ this mask will have smb calculated over the entire global land surface
22342234
<fates_cstarvation_model use_fates=".true.">linear</fates_cstarvation_model>
22352235
<fates_regeneration_model use_fates=".true.">default</fates_regeneration_model>
22362236
<fates_hydro_solver use_fates=".true.">1D_Taylor</fates_hydro_solver>
2237+
<fates_radiation_model use_fates=".true.">norman</fates_radiation_model>
22372238
<use_fates_luh use_fates=".true." fates_harvest_mode="luhdata_area" >.true.</use_fates_luh>
22382239
<use_fates_luh use_fates=".true." fates_harvest_mode="luhdata_mass" >.true.</use_fates_luh>
22392240
<use_fates_luh use_fates=".true." use_fates_lupft=".true.">.true.</use_fates_luh>

components/elm/bld/namelist_files/namelist_definition.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,11 @@ Toggle to turn on FATES no competition mode (only relevant if FATES is being use
359359
Toggle to turn on FATES satellite phenology mode (only relevant if FATES is being used).
360360
</entry>
361361

362+
<entry id="fates_radiation_model" type="char*256" category="physics"
363+
group="elm_inparm" valid_values="norman, twostream" value="norman">
364+
Set the FATES radiation model
365+
</entry>
366+
362367
<entry id="fates_hydro_solver" type="char*256" category="physics"
363368
group="elm_inparm" valid_values="1D_Taylor, 2D_Picard, 2D_Newton" value="1D_Taylor">
364369
Set the FATES hydro solver method

components/elm/src/main/controlMod.F90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ subroutine control_init( )
280280
fates_cstarvation_model, &
281281
fates_regeneration_model, &
282282
fates_hydro_solver, &
283+
fates_radiation_model, &
283284
fates_history_dimlevel
284285

285286
namelist /elm_inparm / use_betr
@@ -845,6 +846,7 @@ subroutine control_spmd()
845846
call mpi_bcast (fates_cstarvation_model, len(fates_cstarvation_model) , MPI_CHARACTER, 0, mpicom, ier)
846847
call mpi_bcast (fates_regeneration_model, len(fates_regeneration_model) , MPI_CHARACTER, 0, mpicom, ier)
847848
call mpi_bcast (fates_hydro_solver, len(fates_hydro_solver) , MPI_CHARACTER, 0, mpicom, ier)
849+
call mpi_bcast (fates_radiation_model, len(fates_radiation_model) , MPI_CHARACTER, 0, mpicom, ier)
848850
call mpi_bcast (fates_inventory_ctrl_filename, len(fates_inventory_ctrl_filename), &
849851
MPI_CHARACTER, 0, mpicom, ier)
850852
call mpi_bcast (fates_parteh_mode, 1, MPI_INTEGER, 0, mpicom, ier)
@@ -1275,6 +1277,7 @@ subroutine control_print ()
12751277
write(iulog, *) ' fates_cstarvation_model = ', fates_cstarvation_model
12761278
write(iulog, *) ' fates_regeneration_model = ', fates_regeneration_model
12771279
write(iulog, *) ' fates_hydro_solver = ', fates_hydro_solver
1280+
write(iulog, *) ' fates_radiation_model = ', fates_radiation_model
12781281
write(iulog, *) ' fates_inventory_ctrl_filename = ',fates_inventory_ctrl_filename
12791282
write(iulog, *) ' fates_seeddisp_cadence = ', fates_seeddisp_cadence
12801283
write(iulog, *) ' fates_seeddisp_cadence: 0, 1, 2, 3 => off, daily, monthly, or yearly dispersal'

components/elm/src/main/elm_varctl.F90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ module elm_varctl
229229
character(len=256), public :: fates_cstarvation_model = '' ! linear or exponential function
230230
character(len=256), public :: fates_regeneration_model = '' ! default, TRS, or TRS without seed dynamics
231231
character(len=256), public :: fates_hydro_solver = '' ! 1D Taylor, 2D Picard, 2D Newton
232+
character(len=256), public :: fates_radiation_model = '' ! Norman or two-stream radiation model
232233
logical, public :: use_fates_fixed_biogeog = .false. ! true => use fixed biogeography mode
233234
logical, public :: use_fates_planthydro = .false. ! true => turn on fates hydro
234235
logical, public :: use_fates_cohort_age_tracking = .false. ! true => turn on cohort age tracking

components/elm/src/main/elmfates_interfaceMod.F90

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ module ELMFatesInterfaceMod
6666
use elm_varctl , only : fates_cstarvation_model
6767
use elm_varctl , only : fates_regeneration_model
6868
use elm_varctl , only : fates_hydro_solver
69+
use elm_varctl , only : fates_radiation_model
6970
use elm_varctl , only : flandusepftdat
7071
use elm_varctl , only : use_fates_tree_damage
7172
use elm_varctl , only : nsrest, nsrBranch
@@ -426,6 +427,7 @@ subroutine ELMFatesGlobals2()
426427
integer :: pass_cstarvation_model
427428
integer :: pass_regeneration_model
428429
integer :: pass_hydro_solver
430+
integer :: pass_radiation_model
429431

430432
! ----------------------------------------------------------------------------------
431433
! FATES lightning definitions
@@ -611,6 +613,13 @@ subroutine ELMFatesGlobals2()
611613
end if
612614
call set_fates_ctrlparms('use_cohort_age_tracking',ival=pass_cohort_age_tracking)
613615

616+
if (trim(fates_radiation_model) == 'norman') then
617+
pass_radiation_model = 1
618+
else if (trim(fates_hydro_solver) == 'twostream') then
619+
pass_radiation_model = 2
620+
end if
621+
call set_fates_ctrlparms('radiation_model',ival=pass_radiation_model)
622+
614623
if (trim(fates_hydro_solver) == '1D_Taylor') then
615624
pass_hydro_solver = 1
616625
else if (trim(fates_hydro_solver) == '2D_Picard') then

0 commit comments

Comments
 (0)