From 922a317445ba1d43ccc4c6344dceac9d812d1dcd Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 9 Dec 2024 16:32:51 -0800 Subject: [PATCH 01/12] add fates daylength factor switch This commit facilitates moving this switch from the fates parameter file to the API. Note that the actual daylength factor value is always passed through the API. This just adds the switch to tell FATES to use it. --- bld/CLMBuildNamelist.pm | 6 ++++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 6 ++++++ src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 9 +++++++++ 6 files changed, 24 insertions(+), 2 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 07e78952f9..f5ef6dc305 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -808,7 +808,8 @@ sub setup_cmdl_fates_mode { "use_fates_cohort_age_tracking","use_fates_inventory_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" ); + "flandusepftdat","use_fates_potentialveg","use_fates_lupft","fates_history_dimlevel", + "use_fates_daylength_factor"); # dis-allow fates specific namelist items with non-fates runs foreach my $var ( @list ) { @@ -4702,7 +4703,8 @@ sub setup_logic_fates { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fates_paramfile', 'phys'=>$nl_flags->{'phys'}); my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", "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" ); + "fates_harvest_mode","fates_parteh_mode", "use_fates_cohort_age_tracking","use_fates_tree_damage", + "use_fates_daylength_factor"); foreach my $var ( @list ) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, 'use_fates'=>$nl_flags->{'use_fates'}, diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 7c75b471a6..afe897df0e 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2391,6 +2391,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 .false. .false. .false. +.true. .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 2d5ab0e4c7..e143d875bd 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -775,6 +775,12 @@ Allowed values are: This option is older than the luhdata options and may be depricated at some point in the future. + +If TRUE, enable FATES to utilize the day length factor from the host land model. +(Only relevant if FATES is on) + + Toggle to turn on plant hydraulics diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 9539060200..bc28b72e0c 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -338,6 +338,7 @@ module clm_varctl logical, public :: use_fates_inventory_init = .false. ! true => initialize fates from inventory 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 ! FATES history dimension level ! fates can produce history at either the daily timescale (dynamics) diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index 3f5c58ac0e..c940e083e6 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -245,6 +245,7 @@ subroutine control_init(dtime) fates_parteh_mode, & fates_seeddisp_cadence, & use_fates_tree_damage, & + use_fates_daylength_factor, & fates_history_dimlevel ! Ozone vegetation stress method @@ -812,6 +813,7 @@ subroutine control_spmd() call mpi_bcast (use_fates_lupft, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_potentialveg, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_bgc, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (use_fates_daylength_factor, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (fates_inventory_ctrl_filename, len(fates_inventory_ctrl_filename), MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_paramfile, len(fates_paramfile) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fluh_timeseries, len(fluh_timeseries) , MPI_CHARACTER, 0, mpicom, ier) @@ -1205,6 +1207,7 @@ subroutine control_print () write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro write(iulog, *) ' use_fates_tree_damage = ', use_fates_tree_damage write(iulog, *) ' use_fates_cohort_age_tracking = ', use_fates_cohort_age_tracking + write(iulog, *) ' use_fates_daylength_factor = ', use_fates_daylength_factor 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 diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 269189d1b7..daea58dc96 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -52,6 +52,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : use_fates_tree_damage use clm_varctl , only : use_fates_planthydro use clm_varctl , only : use_fates_cohort_age_tracking + use clm_varctl , only : use_fates_daylength_factor use clm_varctl , only : use_fates_ed_st3 use clm_varctl , only : use_fates_ed_prescribed_phys use clm_varctl , only : fates_harvest_mode @@ -399,6 +400,7 @@ subroutine CLMFatesGlobals2() integer :: pass_use_potentialveg integer :: pass_num_luh_states integer :: pass_num_luh_transitions + integer :: pass_daylength_factor_switch call t_startf('fates_globals2') @@ -515,6 +517,13 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('use_cohort_age_tracking',ival=pass_cohort_age_tracking) + if(use_fates_daylength_factor) then + pass_daylength_factor_switch = 1 + else + pass_daylength_factor_switch = 0 + end if + call set_fates_ctrlparms('use_daylength_factor_switch',ival=pass_daylength_factor_switch) + ! FATES logging and harvest modes pass_logging = 0 pass_lu_harvest = 0 From 949c6684b8471cfeedd0b638b4275d73e087e0b3 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Mon, 9 Dec 2024 17:00:58 -0800 Subject: [PATCH 02/12] add FATES switch to enable photosynthetic temp acclimation This commit facilitates moving this switch from the FATES parameter file to the namelist --- bld/CLMBuildNamelist.pm | 4 ++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 6 ++++++ src/main/clm_varctl.F90 | 2 ++ src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 9 +++++++++ 6 files changed, 23 insertions(+), 2 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index f5ef6dc305..2ff891aef6 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -809,7 +809,7 @@ sub setup_cmdl_fates_mode { "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", - "use_fates_daylength_factor"); + "use_fates_daylength_factor", "use_fates_photosynth_acclimation"); # dis-allow fates specific namelist items with non-fates runs foreach my $var ( @list ) { @@ -4704,7 +4704,7 @@ sub setup_logic_fates { my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", "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_daylength_factor", "use_fates_photosynth_acclimation"); foreach my $var ( @list ) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, 'use_fates'=>$nl_flags->{'use_fates'}, diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index afe897df0e..a24b49ca27 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2386,6 +2386,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 .true. +.false. 0 no_harvest .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index e143d875bd..68b2b8858e 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -775,6 +775,12 @@ Allowed values are: This option is older than the luhdata options and may be depricated at some point in the future. + +If TRUE, enable FATES to use a photosynthesis temperature acclimation model. +(Only relevant if FATES is on) + + If TRUE, enable FATES to utilize the day length factor from the host land model. diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index bc28b72e0c..6d62f6450f 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -340,6 +340,8 @@ module clm_varctl 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 + logical, public :: use_fates_photosynth_acclimation = .false. ! true => enable fates to use photosynthetic temperature acclimation + ! FATES history dimension level ! fates can produce history at either the daily timescale (dynamics) ! and the model step timescale. It can also generate output on the extra dimension diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index c940e083e6..27952e28f7 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -246,6 +246,7 @@ subroutine control_init(dtime) fates_seeddisp_cadence, & use_fates_tree_damage, & use_fates_daylength_factor, & + use_fates_photosynth_acclimation, & fates_history_dimlevel ! Ozone vegetation stress method @@ -814,6 +815,7 @@ subroutine control_spmd() call mpi_bcast (use_fates_potentialveg, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_bgc, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_daylength_factor, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (use_fates_photosynth_acclimation, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (fates_inventory_ctrl_filename, len(fates_inventory_ctrl_filename), MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_paramfile, len(fates_paramfile) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fluh_timeseries, len(fluh_timeseries) , MPI_CHARACTER, 0, mpicom, ier) @@ -1208,6 +1210,7 @@ subroutine control_print () write(iulog, *) ' use_fates_tree_damage = ', use_fates_tree_damage write(iulog, *) ' use_fates_cohort_age_tracking = ', use_fates_cohort_age_tracking write(iulog, *) ' use_fates_daylength_factor = ', use_fates_daylength_factor + write(iulog, *) ' use_fates_photosynth_acclimation = ', use_fates_photosynth_acclimation 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 diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index daea58dc96..65310b2a26 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -53,6 +53,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : use_fates_planthydro use clm_varctl , only : use_fates_cohort_age_tracking use clm_varctl , only : use_fates_daylength_factor + use clm_varctl , only : use_fates_photosynth_acclimation use clm_varctl , only : use_fates_ed_st3 use clm_varctl , only : use_fates_ed_prescribed_phys use clm_varctl , only : fates_harvest_mode @@ -400,6 +401,7 @@ subroutine CLMFatesGlobals2() integer :: pass_use_potentialveg integer :: pass_num_luh_states integer :: pass_num_luh_transitions + integer :: pass_photosynth_acclimation_switch integer :: pass_daylength_factor_switch call t_startf('fates_globals2') @@ -517,6 +519,13 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('use_cohort_age_tracking',ival=pass_cohort_age_tracking) + if(use_fates_photosynth_acclimation) then + pass_photosynth_acclimation_switch = 1 + else + pass_photosynth_acclimation_switch = 0 + end if + call set_fates_ctrlparms('use_photosynth_acclimation',ival=pass_photosynth_acclimation_switch) + if(use_fates_daylength_factor) then pass_daylength_factor_switch = 1 else From 59fef8c0a1632f33322ddad2fbb22195638074ca Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Tue, 10 Dec 2024 12:00:59 -0800 Subject: [PATCH 03/12] add FATES namelist switch for stomatal conductance This commit facilitates moving this switch from the FATES parameter file to the namelist --- bld/CLMBuildNamelist.pm | 6 ++++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 5 +++++ src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 9 +++++++++ 6 files changed, 23 insertions(+), 2 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 2ff891aef6..9e3a95655f 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -809,7 +809,8 @@ sub setup_cmdl_fates_mode { "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", - "use_fates_daylength_factor", "use_fates_photosynth_acclimation"); + "use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model" + ); # dis-allow fates specific namelist items with non-fates runs foreach my $var ( @list ) { @@ -4704,7 +4705,8 @@ sub setup_logic_fates { my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", "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"); + "use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model" + ); foreach my $var ( @list ) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, 'use_fates'=>$nl_flags->{'use_fates'}, diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index a24b49ca27..19183cd27f 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2389,6 +2389,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 .false. 0 no_harvest +ballberry .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 68b2b8858e..24b2b6e9a8 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -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. + +Set the FATES stomatal conductance model + + If TRUE, enable FATES to use a photosynthesis temperature acclimation model. diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 6d62f6450f..af484c65fa 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -331,6 +331,7 @@ module clm_varctl ! see bld/namelist_files/namelist_definition_clm4_5.xml for details logical, public :: use_fates_tree_damage = .false. ! true => turn on tree damage module character(len=256), public :: fates_harvest_mode = '' ! five different harvest modes; see namelist definition + character(len=256), public :: fates_stomatal_model = '' ! stomatal conductance model, Ball-berry or Medlyn 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 logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index 27952e28f7..f75c9fd440 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -242,6 +242,7 @@ subroutine control_init(dtime) fluh_timeseries, & flandusepftdat, & fates_inventory_ctrl_filename, & + fates_stomatal_model, & fates_parteh_mode, & fates_seeddisp_cadence, & use_fates_tree_damage, & @@ -801,6 +802,7 @@ subroutine control_spmd() call mpi_bcast (fates_spitfire_mode, 1, MPI_INTEGER, 0, mpicom, ier) call mpi_bcast (fates_harvest_mode, len(fates_harvest_mode) , MPI_CHARACTER, 0, mpicom, ier) + call mpi_bcast (fates_stomatal_model, len(fates_stomatal_model) , 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) call mpi_bcast (use_fates_cohort_age_tracking, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1204,6 +1206,7 @@ subroutine control_print () if (use_fates) then write(iulog, *) ' fates_spitfire_mode = ', fates_spitfire_mode write(iulog, *) ' fates_harvest_mode = ', fates_harvest_mode + write(iulog, *) ' fates_stomatal_model = ', fates_stomatal_model write(iulog, *) ' fates_paramfile = ', fates_paramfile write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 65310b2a26..31c076e901 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -57,6 +57,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : use_fates_ed_st3 use clm_varctl , only : use_fates_ed_prescribed_phys use clm_varctl , only : fates_harvest_mode + use clm_varctl , only : fates_stomatal_model use clm_varctl , only : use_fates_inventory_init use clm_varctl , only : use_fates_fixed_biogeog use clm_varctl , only : use_fates_nocomp @@ -403,6 +404,7 @@ subroutine CLMFatesGlobals2() integer :: pass_num_luh_transitions integer :: pass_photosynth_acclimation_switch integer :: pass_daylength_factor_switch + integer :: pass_stomatal_model call t_startf('fates_globals2') @@ -533,6 +535,13 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('use_daylength_factor_switch',ival=pass_daylength_factor_switch) + if (trim(fates_stomatal_model) == 'ballberry') then + pass_stomatal_model = 1 + else if (trim(fates_stomatal_model) == 'medlyn') then + pass_stomatal_model = 2 + end if + call set_fates_ctrlparms('stomatal_model',ival=pass_stomatal_model) + ! FATES logging and harvest modes pass_logging = 0 pass_lu_harvest = 0 From 9edf742d8c829ed680c22760135894c96f90e7e3 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Tue, 10 Dec 2024 12:16:28 -0800 Subject: [PATCH 04/12] add FATES namelist switch for stomatal assimilation This commit facilitates moving this switch from the FATES parameter file to the namelist --- bld/CLMBuildNamelist.pm | 8 +++++--- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 5 +++++ src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 9 +++++++++ 6 files changed, 24 insertions(+), 3 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 9e3a95655f..40e259d015 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -809,8 +809,9 @@ sub setup_cmdl_fates_mode { "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", - "use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model" - ); + "use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model", + "fates_stomatal_assimilation" + ); # dis-allow fates specific namelist items with non-fates runs foreach my $var ( @list ) { @@ -4705,7 +4706,8 @@ sub setup_logic_fates { my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", "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_model" + "use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model", + "fates_stomatal_assimilation" ); foreach my $var ( @list ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 19183cd27f..5015ec5ab1 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2390,6 +2390,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 0 no_harvest ballberry +net .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 24b2b6e9a8..eb98708d18 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -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. + +Set net or gross asslimiation for the FATES stomatal model + + Set the FATES stomatal conductance model diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index af484c65fa..3abb12714f 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -332,6 +332,7 @@ module clm_varctl logical, public :: use_fates_tree_damage = .false. ! true => turn on tree damage module character(len=256), public :: fates_harvest_mode = '' ! five different harvest modes; see namelist definition character(len=256), public :: fates_stomatal_model = '' ! stomatal conductance model, Ball-berry or Medlyn + character(len=256), public :: fates_stomatal_assimilation = '' ! net or gross assimilation modes 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 logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index f75c9fd440..a3bd36e860 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -243,6 +243,7 @@ subroutine control_init(dtime) flandusepftdat, & fates_inventory_ctrl_filename, & fates_stomatal_model, & + fates_stomatal_assimilation, & fates_parteh_mode, & fates_seeddisp_cadence, & use_fates_tree_damage, & @@ -803,6 +804,7 @@ subroutine control_spmd() call mpi_bcast (fates_spitfire_mode, 1, MPI_INTEGER, 0, mpicom, ier) call mpi_bcast (fates_harvest_mode, len(fates_harvest_mode) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_stomatal_model, len(fates_stomatal_model) , MPI_CHARACTER, 0, mpicom, ier) + call mpi_bcast (fates_stomatal_assimilation, len(fates_stomatal_assimilation) , 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) call mpi_bcast (use_fates_cohort_age_tracking, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1207,6 +1209,7 @@ subroutine control_print () write(iulog, *) ' fates_spitfire_mode = ', fates_spitfire_mode write(iulog, *) ' fates_harvest_mode = ', fates_harvest_mode write(iulog, *) ' fates_stomatal_model = ', fates_stomatal_model + write(iulog, *) ' fates_stomatal_assimilation = ', fates_stomatal_assimilation write(iulog, *) ' fates_paramfile = ', fates_paramfile write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 31c076e901..76273de44c 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -58,6 +58,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : use_fates_ed_prescribed_phys use clm_varctl , only : fates_harvest_mode use clm_varctl , only : fates_stomatal_model + use clm_varctl , only : fates_stomatal_assimilation use clm_varctl , only : use_fates_inventory_init use clm_varctl , only : use_fates_fixed_biogeog use clm_varctl , only : use_fates_nocomp @@ -405,6 +406,7 @@ subroutine CLMFatesGlobals2() integer :: pass_photosynth_acclimation_switch integer :: pass_daylength_factor_switch integer :: pass_stomatal_model + integer :: pass_stomatal_assimilation call t_startf('fates_globals2') @@ -542,6 +544,13 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('stomatal_model',ival=pass_stomatal_model) + if (trim(fates_stomatal_assimilation) == 'net') then + pass_stomatal_assimilation = 1 + else if (trim(fates_stomatal_assimilation) == 'gross') then + pass_stomatal_assimilation = 2 + end if + call set_fates_ctrlparms('stomatal_assim_model',ival=pass_stomatal_assimilation) + ! FATES logging and harvest modes pass_logging = 0 pass_lu_harvest = 0 From 59eb9f49312b4b6b728964cf8c4a850c33f5fbec Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Tue, 10 Dec 2024 12:23:02 -0800 Subject: [PATCH 05/12] add FATES namelist switch for leaf respiration model This commit facilitates moving this switch from the FATES parameter file to the namelist --- bld/CLMBuildNamelist.pm | 4 ++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 5 +++++ src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 9 +++++++++ 6 files changed, 21 insertions(+), 2 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 40e259d015..81cc343ddd 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -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_model", - "fates_stomatal_assimilation" + "fates_stomatal_assimilation", "fates_leafresp_model" ); # dis-allow fates specific namelist items with non-fates runs @@ -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_model", - "fates_stomatal_assimilation" + "fates_stomatal_assimilation", "fates_leafresp_model" ); foreach my $var ( @list ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 5015ec5ab1..f54e3b31bd 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2391,6 +2391,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 no_harvest ballberry net +ryan1991 .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index eb98708d18..e77707a9d0 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -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. + +Set the FATES leaf maintenance respiration model + + Set net or gross asslimiation for the FATES stomatal model diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 3abb12714f..92d4dc011c 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -333,6 +333,7 @@ module clm_varctl character(len=256), public :: fates_harvest_mode = '' ! five different harvest modes; see namelist definition character(len=256), public :: fates_stomatal_model = '' ! stomatal conductance model, Ball-berry or Medlyn character(len=256), public :: fates_stomatal_assimilation = '' ! net or gross assimilation modes + character(len=256), public :: fates_leafresp_model = '' ! Leaf maintenance respiration model, Ryan or Atkin 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 logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index a3bd36e860..abbc231981 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -244,6 +244,7 @@ subroutine control_init(dtime) fates_inventory_ctrl_filename, & fates_stomatal_model, & fates_stomatal_assimilation, & + fates_leafresp_model, & fates_parteh_mode, & fates_seeddisp_cadence, & use_fates_tree_damage, & @@ -805,6 +806,7 @@ subroutine control_spmd() call mpi_bcast (fates_harvest_mode, len(fates_harvest_mode) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_stomatal_model, len(fates_stomatal_model) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_stomatal_assimilation, len(fates_stomatal_assimilation) , MPI_CHARACTER, 0, mpicom, ier) + call mpi_bcast (fates_leafresp_model, len(fates_leafresp_model) , 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) call mpi_bcast (use_fates_cohort_age_tracking, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1210,6 +1212,7 @@ subroutine control_print () write(iulog, *) ' fates_harvest_mode = ', fates_harvest_mode write(iulog, *) ' fates_stomatal_model = ', fates_stomatal_model write(iulog, *) ' fates_stomatal_assimilation = ', fates_stomatal_assimilation + write(iulog, *) ' fates_leafresp_model = ', fates_leafresp_model write(iulog, *) ' fates_paramfile = ', fates_paramfile write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 76273de44c..ee9c44127e 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -59,6 +59,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : fates_harvest_mode use clm_varctl , only : fates_stomatal_model use clm_varctl , only : fates_stomatal_assimilation + use clm_varctl , only : fates_leafresp_model use clm_varctl , only : use_fates_inventory_init use clm_varctl , only : use_fates_fixed_biogeog use clm_varctl , only : use_fates_nocomp @@ -407,6 +408,7 @@ subroutine CLMFatesGlobals2() integer :: pass_daylength_factor_switch integer :: pass_stomatal_model integer :: pass_stomatal_assimilation + integer :: pass_leafresp_model call t_startf('fates_globals2') @@ -551,6 +553,13 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('stomatal_assim_model',ival=pass_stomatal_assimilation) + if (trim(fates_leafresp_model) == 'ryan1991') then + pass_leafresp_model = 1 + else if (trim(fates_leafresp_model) == 'atkin2017') then + pass_leafresp_model = 2 + end if + call set_fates_ctrlparms('maintresp_leaf_model',ival=pass_leafresp_model) + ! FATES logging and harvest modes pass_logging = 0 pass_lu_harvest = 0 From 11a170892b94b53218d571726f00a026070afebf Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Tue, 10 Dec 2024 12:34:52 -0800 Subject: [PATCH 06/12] add FATES switch to select carbon starvation model This commit facilitates moving this switch from the FATES parameter file to the namelist --- bld/CLMBuildNamelist.pm | 4 ++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 5 +++++ src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 9 +++++++++ 6 files changed, 21 insertions(+), 2 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 81cc343ddd..36b47191d3 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -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_model", - "fates_stomatal_assimilation", "fates_leafresp_model" + "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model" ); # dis-allow fates specific namelist items with non-fates runs @@ -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_model", - "fates_stomatal_assimilation", "fates_leafresp_model" + "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model" ); foreach my $var ( @list ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index f54e3b31bd..d98b5ebab5 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2392,6 +2392,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 ballberry net ryan1991 +linear .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index e77707a9d0..e44135c072 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -780,6 +780,11 @@ This option is older than the luhdata options and may be depricated at some poin Set the FATES leaf maintenance respiration model + +Set the FATES carbon starvation model + + Set net or gross asslimiation for the FATES stomatal model diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 92d4dc011c..78029cc59a 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -334,6 +334,7 @@ module clm_varctl character(len=256), public :: fates_stomatal_model = '' ! stomatal conductance model, Ball-berry or Medlyn character(len=256), public :: fates_stomatal_assimilation = '' ! net or gross assimilation modes character(len=256), public :: fates_leafresp_model = '' ! Leaf maintenance respiration model, Ryan or Atkin + character(len=256), public :: fates_cstarvation_model = '' ! linear or exponential function 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 logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index abbc231981..456b879eef 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -245,6 +245,7 @@ subroutine control_init(dtime) fates_stomatal_model, & fates_stomatal_assimilation, & fates_leafresp_model, & + fates_cstarvation_model, & fates_parteh_mode, & fates_seeddisp_cadence, & use_fates_tree_damage, & @@ -807,6 +808,7 @@ subroutine control_spmd() call mpi_bcast (fates_stomatal_model, len(fates_stomatal_model) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_stomatal_assimilation, len(fates_stomatal_assimilation) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_leafresp_model, len(fates_leafresp_model) , MPI_CHARACTER, 0, mpicom, ier) + call mpi_bcast (fates_cstarvation_model, len(fates_cstarvation_model) , 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) call mpi_bcast (use_fates_cohort_age_tracking, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1213,6 +1215,7 @@ subroutine control_print () write(iulog, *) ' fates_stomatal_model = ', fates_stomatal_model write(iulog, *) ' fates_stomatal_assimilation = ', fates_stomatal_assimilation write(iulog, *) ' fates_leafresp_model = ', fates_leafresp_model + write(iulog, *) ' fates_cstarvation_model = ', fates_cstarvation_model write(iulog, *) ' fates_paramfile = ', fates_paramfile write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index ee9c44127e..0748408e98 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -60,6 +60,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : fates_stomatal_model use clm_varctl , only : fates_stomatal_assimilation use clm_varctl , only : fates_leafresp_model + use clm_varctl , only : fates_cstarvation_model use clm_varctl , only : use_fates_inventory_init use clm_varctl , only : use_fates_fixed_biogeog use clm_varctl , only : use_fates_nocomp @@ -409,6 +410,7 @@ subroutine CLMFatesGlobals2() integer :: pass_stomatal_model integer :: pass_stomatal_assimilation integer :: pass_leafresp_model + integer :: pass_cstarvation_model call t_startf('fates_globals2') @@ -560,6 +562,13 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('maintresp_leaf_model',ival=pass_leafresp_model) + if (trim(fates_cstarvation_model) == 'linear') then + pass_cstarvation_model = 1 + else if (trim(fates_cstarvation_model) == 'expontential') then + pass_cstarvation_model = 2 + end if + call set_fates_ctrlparms('mort_cstarvation_model',ival=pass_cstarvation_model) + ! FATES logging and harvest modes pass_logging = 0 pass_lu_harvest = 0 From 3f2ed72155fed1a701f5ef51aaee525f1f330b69 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Tue, 10 Dec 2024 14:46:19 -0800 Subject: [PATCH 07/12] add FATES seed regeneration model switch to namelist This commit facilitates moving this switch from the FATES parameter file to the namelist --- bld/CLMBuildNamelist.pm | 6 ++++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 15 ++++++++++++--- src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 11 +++++++++++ 6 files changed, 32 insertions(+), 5 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 36b47191d3..bdec6b73b7 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -810,7 +810,8 @@ 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_model", - "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model" + "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model", + "fates_regeneration_model" ); # dis-allow fates specific namelist items with non-fates runs @@ -4707,7 +4708,8 @@ 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_model", - "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model" + "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model", + "fates_regeneration_model" ); foreach my $var ( @list ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index d98b5ebab5..0e2a469b47 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2393,6 +2393,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 net ryan1991 linear +default .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index e44135c072..c8fadff563 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -775,9 +775,13 @@ Allowed values are: This option is older than the luhdata options and may be depricated at some point in the future. - -Set the FATES leaf maintenance respiration model + +Set the FATES seed regeneration model +Valid values: + default: default scheme + trs: Tree Recruitment Scheme (Hanbury-Brown et al., 2022) + trs_no_seed_dyn: Tree Recruitment Scheme (Hanbury-Brown et al., 2022) without seed dynamics + +Set the FATES leaf maintenance respiration model + + Set net or gross asslimiation for the FATES stomatal model diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 78029cc59a..ee5033e211 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -335,6 +335,7 @@ module clm_varctl character(len=256), public :: fates_stomatal_assimilation = '' ! net or gross assimilation modes character(len=256), public :: fates_leafresp_model = '' ! Leaf maintenance respiration model, Ryan or Atkin 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 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 logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index 456b879eef..84c3465b75 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -246,6 +246,7 @@ subroutine control_init(dtime) fates_stomatal_assimilation, & fates_leafresp_model, & fates_cstarvation_model, & + fates_regeneration_model, & fates_parteh_mode, & fates_seeddisp_cadence, & use_fates_tree_damage, & @@ -809,6 +810,7 @@ subroutine control_spmd() call mpi_bcast (fates_stomatal_assimilation, len(fates_stomatal_assimilation) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_leafresp_model, len(fates_leafresp_model) , 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 (use_fates_planthydro, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_tree_damage, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_cohort_age_tracking, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1216,6 +1218,7 @@ subroutine control_print () write(iulog, *) ' fates_stomatal_assimilation = ', fates_stomatal_assimilation write(iulog, *) ' fates_leafresp_model = ', fates_leafresp_model write(iulog, *) ' fates_cstarvation_model = ', fates_cstarvation_model + write(iulog, *) ' fates_regeneration_model = ', fates_regeneration_model write(iulog, *) ' fates_paramfile = ', fates_paramfile write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 0748408e98..f09d23dd6f 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -61,6 +61,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : fates_stomatal_assimilation use clm_varctl , only : fates_leafresp_model use clm_varctl , only : fates_cstarvation_model + use clm_varctl , only : fates_regeneration_model use clm_varctl , only : use_fates_inventory_init use clm_varctl , only : use_fates_fixed_biogeog use clm_varctl , only : use_fates_nocomp @@ -411,6 +412,7 @@ subroutine CLMFatesGlobals2() integer :: pass_stomatal_assimilation integer :: pass_leafresp_model integer :: pass_cstarvation_model + integer :: pass_regeneration_model call t_startf('fates_globals2') @@ -569,6 +571,15 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('mort_cstarvation_model',ival=pass_cstarvation_model) + if (trim(fates_regeneration_model) == 'default') then + pass_regeneration_model = 1 + else if (trim(fates_regeneration_model) == 'trs') then + pass_regeneration_model = 2 + else if (trim(fates_regeneration_model) == 'trs_no_seed_dyn') then + pass_regeneration_model = 3 + end if + call set_fates_ctrlparms('regeneration_model',ival=pass_regeneration_model) + ! FATES logging and harvest modes pass_logging = 0 pass_lu_harvest = 0 From adf7d56e9e859e5122d3e66bf5881da59b9b02c2 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Tue, 10 Dec 2024 14:59:30 -0800 Subject: [PATCH 08/12] add FATES hydro solver selection switch to namelist This commit facilitates moving this switch from the FATES parameter file to the namelist --- bld/CLMBuildNamelist.pm | 4 ++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 5 +++++ src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 11 +++++++++++ 6 files changed, 23 insertions(+), 2 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index bdec6b73b7..99d5c99c9a 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -811,7 +811,7 @@ sub setup_cmdl_fates_mode { "flandusepftdat","use_fates_potentialveg","use_fates_lupft","fates_history_dimlevel", "use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model", "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model", - "fates_regeneration_model" + "fates_regeneration_model", "fates_hydro_solver" ); # dis-allow fates specific namelist items with non-fates runs @@ -4709,7 +4709,7 @@ sub setup_logic_fates { "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_model", "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model", - "fates_regeneration_model" + "fates_regeneration_model", "fates_hydro_solver" ); foreach my $var ( @list ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 0e2a469b47..1210f79796 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2394,6 +2394,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 ryan1991 linear default +1D_Taylor .false. .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index c8fadff563..a53befbfc6 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -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. + +Set the FATES hydro solver method + + Set the FATES seed regeneration model diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index ee5033e211..4a817ba3e5 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -336,6 +336,7 @@ module clm_varctl character(len=256), public :: fates_leafresp_model = '' ! Leaf maintenance respiration model, Ryan or Atkin 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_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 logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index 84c3465b75..7b358599a5 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -247,6 +247,7 @@ subroutine control_init(dtime) fates_leafresp_model, & fates_cstarvation_model, & fates_regeneration_model, & + fates_hydro_solver, & fates_parteh_mode, & fates_seeddisp_cadence, & use_fates_tree_damage, & @@ -811,6 +812,7 @@ subroutine control_spmd() call mpi_bcast (fates_leafresp_model, len(fates_leafresp_model) , 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_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) call mpi_bcast (use_fates_cohort_age_tracking, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1219,6 +1221,7 @@ subroutine control_print () write(iulog, *) ' fates_leafresp_model = ', fates_leafresp_model write(iulog, *) ' fates_cstarvation_model = ', fates_cstarvation_model write(iulog, *) ' fates_regeneration_model = ', fates_regeneration_model + write(iulog, *) ' fates_hydro_solver = ', fates_hydro_solver write(iulog, *) ' fates_paramfile = ', fates_paramfile write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index f09d23dd6f..727cefd24b 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -62,6 +62,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : fates_leafresp_model use clm_varctl , only : fates_cstarvation_model use clm_varctl , only : fates_regeneration_model + use clm_varctl , only : fates_hydro_solver use clm_varctl , only : use_fates_inventory_init use clm_varctl , only : use_fates_fixed_biogeog use clm_varctl , only : use_fates_nocomp @@ -413,6 +414,7 @@ subroutine CLMFatesGlobals2() integer :: pass_leafresp_model integer :: pass_cstarvation_model integer :: pass_regeneration_model + integer :: pass_hydro_solver call t_startf('fates_globals2') @@ -580,6 +582,15 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('regeneration_model',ival=pass_regeneration_model) + if (trim(fates_hydro_solver) == '1D_Taylor') then + pass_hydro_solver = 1 + else if (trim(fates_hydro_solver) == '2D_Picard') then + pass_hydro_solver = 2 + else if (trim(fates_hydro_solver) == '2D_Taylor') then + pass_hydro_solver = 3 + end if + call set_fates_ctrlparms('hydr_solver',ival=pass_hydro_solver) + ! FATES logging and harvest modes pass_logging = 0 pass_lu_harvest = 0 From 47fd4899cfb1c9cef5d45766b20c7026b080df9e Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Tue, 10 Dec 2024 16:23:31 -0800 Subject: [PATCH 09/12] add FATES radiation model switch to the namelist This commit facilitates moving this switch from the FATES parameter file to the namelist --- bld/CLMBuildNamelist.pm | 4 ++-- bld/namelist_files/namelist_defaults_ctsm.xml | 1 + bld/namelist_files/namelist_definition_ctsm.xml | 5 +++++ src/main/clm_varctl.F90 | 1 + src/main/controlMod.F90 | 3 +++ src/utils/clmfates_interfaceMod.F90 | 9 +++++++++ 6 files changed, 21 insertions(+), 2 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 99d5c99c9a..463b9b3a15 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -811,7 +811,7 @@ sub setup_cmdl_fates_mode { "flandusepftdat","use_fates_potentialveg","use_fates_lupft","fates_history_dimlevel", "use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model", "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model", - "fates_regeneration_model", "fates_hydro_solver" + "fates_regeneration_model", "fates_hydro_solver", "fates_radiation_model" ); # dis-allow fates specific namelist items with non-fates runs @@ -4709,7 +4709,7 @@ sub setup_logic_fates { "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_model", "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model", - "fates_regeneration_model", "fates_hydro_solver" + "fates_regeneration_model", "fates_hydro_solver", "fates_radiation_model" ); foreach my $var ( @list ) { diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index 1210f79796..ebfdaecbaf 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2394,6 +2394,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 ryan1991 linear default +norman 1D_Taylor .false. .false. diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index a53befbfc6..d3f96f662e 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -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. + +Set the FATES radiation model + + Set the FATES hydro solver method diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 4a817ba3e5..3be27207b7 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -336,6 +336,7 @@ module clm_varctl character(len=256), public :: fates_leafresp_model = '' ! Leaf maintenance respiration model, Ryan or Atkin 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 diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index 7b358599a5..e7fa8934b2 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -247,6 +247,7 @@ subroutine control_init(dtime) fates_leafresp_model, & fates_cstarvation_model, & fates_regeneration_model, & + fates_radiation_model, & fates_hydro_solver, & fates_parteh_mode, & fates_seeddisp_cadence, & @@ -812,6 +813,7 @@ subroutine control_spmd() call mpi_bcast (fates_leafresp_model, len(fates_leafresp_model) , 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) @@ -1221,6 +1223,7 @@ subroutine control_print () write(iulog, *) ' fates_leafresp_model = ', fates_leafresp_model 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 diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 727cefd24b..fda2ca0461 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -63,6 +63,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : fates_cstarvation_model use clm_varctl , only : fates_regeneration_model use clm_varctl , only : fates_hydro_solver + use clm_varctl , only : fates_radiation_model use clm_varctl , only : use_fates_inventory_init use clm_varctl , only : use_fates_fixed_biogeog use clm_varctl , only : use_fates_nocomp @@ -415,6 +416,7 @@ subroutine CLMFatesGlobals2() integer :: pass_cstarvation_model integer :: pass_regeneration_model integer :: pass_hydro_solver + integer :: pass_radiation_model call t_startf('fates_globals2') @@ -591,6 +593,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 From 02bc32a65411bd846a62d8c2bdf2bf35479349eb Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 15 Jan 2025 09:52:52 -0800 Subject: [PATCH 10/12] change fates photosynthethic acclimation switch from logical to named --- bld/CLMBuildNamelist.pm | 4 ++-- bld/namelist_files/namelist_defaults_ctsm.xml | 2 +- bld/namelist_files/namelist_definition_ctsm.xml | 6 +++--- src/main/clm_varctl.F90 | 2 +- src/main/controlMod.F90 | 6 +++--- src/utils/clmfates_interfaceMod.F90 | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index 463b9b3a15..8783829970 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -809,7 +809,7 @@ sub setup_cmdl_fates_mode { "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", - "use_fates_daylength_factor", "use_fates_photosynth_acclimation", "fates_stomatal_model", + "use_fates_daylength_factor", "fates_photosynth_acclimation", "fates_stomatal_model", "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model", "fates_regeneration_model", "fates_hydro_solver", "fates_radiation_model" ); @@ -4707,7 +4707,7 @@ sub setup_logic_fates { my @list = ( "fates_spitfire_mode", "use_fates_planthydro", "use_fates_ed_st3", "use_fates_ed_prescribed_phys", "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_model", + "use_fates_daylength_factor", "fates_photosynth_acclimation", "fates_stomatal_model", "fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model", "fates_regeneration_model", "fates_hydro_solver", "fates_radiation_model" ); diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index ebfdaecbaf..aab5a9ac9d 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2386,7 +2386,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 .true. -.false. +nonacclimating 0 no_harvest ballberry diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index d3f96f662e..1e922c850a 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -814,9 +814,9 @@ Set net or gross asslimiation for the FATES stomatal model Set the FATES stomatal conductance model - -If TRUE, enable FATES to use a photosynthesis temperature acclimation model. + +Set the FATES photosynthesis temperature acclimation model. (Only relevant if FATES is on) diff --git a/src/main/clm_varctl.F90 b/src/main/clm_varctl.F90 index 3be27207b7..07995749be 100644 --- a/src/main/clm_varctl.F90 +++ b/src/main/clm_varctl.F90 @@ -338,6 +338,7 @@ module clm_varctl 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 + character(len=256), public :: fates_photosynth_acclimation = '' ! nonacclimating, kumarathunge2019 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 logical, public :: use_fates_ed_st3 = .false. ! true => static stand structure @@ -347,7 +348,6 @@ module clm_varctl 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 - logical, public :: use_fates_photosynth_acclimation = .false. ! true => enable fates to use photosynthetic temperature acclimation ! FATES history dimension level ! fates can produce history at either the daily timescale (dynamics) diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index e7fa8934b2..012b1aecc8 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -253,7 +253,7 @@ subroutine control_init(dtime) fates_seeddisp_cadence, & use_fates_tree_damage, & use_fates_daylength_factor, & - use_fates_photosynth_acclimation, & + fates_photosynth_acclimation, & fates_history_dimlevel ! Ozone vegetation stress method @@ -829,7 +829,7 @@ subroutine control_spmd() call mpi_bcast (use_fates_potentialveg, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_bgc, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_fates_daylength_factor, 1, MPI_LOGICAL, 0, mpicom, ier) - call mpi_bcast (use_fates_photosynth_acclimation, 1, MPI_LOGICAL, 0, mpicom, ier) + call mpi_bcast (fates_photosynth_acclimation, len(fates_photosynth_acclimation), MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_inventory_ctrl_filename, len(fates_inventory_ctrl_filename), MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fates_paramfile, len(fates_paramfile) , MPI_CHARACTER, 0, mpicom, ier) call mpi_bcast (fluh_timeseries, len(fluh_timeseries) , MPI_CHARACTER, 0, mpicom, ier) @@ -1227,11 +1227,11 @@ subroutine control_print () write(iulog, *) ' fates_hydro_solver = ', fates_hydro_solver write(iulog, *) ' fates_paramfile = ', fates_paramfile write(iulog, *) ' fates_parteh_mode = ', fates_parteh_mode + write(iulog, *) ' fates_photosynth_acclimation = ', trim(fates_photosynth_acclimation) write(iulog, *) ' use_fates_planthydro = ', use_fates_planthydro write(iulog, *) ' use_fates_tree_damage = ', use_fates_tree_damage write(iulog, *) ' use_fates_cohort_age_tracking = ', use_fates_cohort_age_tracking write(iulog, *) ' use_fates_daylength_factor = ', use_fates_daylength_factor - write(iulog, *) ' use_fates_photosynth_acclimation = ', use_fates_photosynth_acclimation 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 diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index fda2ca0461..95df70effc 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -53,7 +53,7 @@ module CLMFatesInterfaceMod use clm_varctl , only : use_fates_planthydro use clm_varctl , only : use_fates_cohort_age_tracking use clm_varctl , only : use_fates_daylength_factor - use clm_varctl , only : use_fates_photosynth_acclimation + use clm_varctl , only : fates_photosynth_acclimation use clm_varctl , only : use_fates_ed_st3 use clm_varctl , only : use_fates_ed_prescribed_phys use clm_varctl , only : fates_harvest_mode @@ -533,12 +533,12 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('use_cohort_age_tracking',ival=pass_cohort_age_tracking) - if(use_fates_photosynth_acclimation) then + if(trim(fates_photosynth_acclimation) == 'kumarathunge2019') then pass_photosynth_acclimation_switch = 1 - else + else if(trim(fates_photosynth_acclimation) == 'nonacclimating') pass_photosynth_acclimation_switch = 0 end if - call set_fates_ctrlparms('use_photosynth_acclimation',ival=pass_photosynth_acclimation_switch) + call set_fates_ctrlparms('photosynth_acclimation',ival=pass_photosynth_acclimation_switch) if(use_fates_daylength_factor) then pass_daylength_factor_switch = 1 From 660ed58b5b51ee961c2820a884f72d52fff1db77 Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 15 Jan 2025 13:19:06 -0800 Subject: [PATCH 11/12] add year to model switch for fates_stomatal_model namelist option --- bld/namelist_files/namelist_defaults_ctsm.xml | 2 +- bld/namelist_files/namelist_definition_ctsm.xml | 2 +- src/utils/clmfates_interfaceMod.F90 | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bld/namelist_files/namelist_defaults_ctsm.xml b/bld/namelist_files/namelist_defaults_ctsm.xml index aab5a9ac9d..64b190c6f9 100644 --- a/bld/namelist_files/namelist_defaults_ctsm.xml +++ b/bld/namelist_files/namelist_defaults_ctsm.xml @@ -2389,7 +2389,7 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 nonacclimating 0 no_harvest -ballberry +ballberry1987 net ryan1991 linear diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 1e922c850a..86127e5a6c 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -810,7 +810,7 @@ Set net or gross asslimiation for the FATES stomatal model + group="clm_inparm" valid_values="ballberry1987, medlyn2011" value="ballberry1987"> Set the FATES stomatal conductance model diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 95df70effc..151341cfc4 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -535,7 +535,7 @@ subroutine CLMFatesGlobals2() if(trim(fates_photosynth_acclimation) == 'kumarathunge2019') then pass_photosynth_acclimation_switch = 1 - else if(trim(fates_photosynth_acclimation) == 'nonacclimating') + else if(trim(fates_photosynth_acclimation) == 'nonacclimating') then pass_photosynth_acclimation_switch = 0 end if call set_fates_ctrlparms('photosynth_acclimation',ival=pass_photosynth_acclimation_switch) @@ -547,9 +547,9 @@ subroutine CLMFatesGlobals2() end if call set_fates_ctrlparms('use_daylength_factor_switch',ival=pass_daylength_factor_switch) - if (trim(fates_stomatal_model) == 'ballberry') then + if (trim(fates_stomatal_model) == 'ballberry1987') then pass_stomatal_model = 1 - else if (trim(fates_stomatal_model) == 'medlyn') then + else if (trim(fates_stomatal_model) == 'medlyn2011') then pass_stomatal_model = 2 end if call set_fates_ctrlparms('stomatal_model',ival=pass_stomatal_model) From f990b2485421883870dd3c0a1a20f61a40aa483b Mon Sep 17 00:00:00 2001 From: Gregory Lemieux Date: Wed, 15 Jan 2025 13:23:44 -0800 Subject: [PATCH 12/12] fix fates_hydro_solver option name check --- src/utils/clmfates_interfaceMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/clmfates_interfaceMod.F90 b/src/utils/clmfates_interfaceMod.F90 index 151341cfc4..e98633ee18 100644 --- a/src/utils/clmfates_interfaceMod.F90 +++ b/src/utils/clmfates_interfaceMod.F90 @@ -588,7 +588,7 @@ subroutine CLMFatesGlobals2() pass_hydro_solver = 1 else if (trim(fates_hydro_solver) == '2D_Picard') then pass_hydro_solver = 2 - else if (trim(fates_hydro_solver) == '2D_Taylor') then + else if (trim(fates_hydro_solver) == '2D_Newton') then pass_hydro_solver = 3 end if call set_fates_ctrlparms('hydr_solver',ival=pass_hydro_solver)