From 4e103117043db472bee85a821be8a89640c4fe5f Mon Sep 17 00:00:00 2001 From: jenniferholm Date: Fri, 29 Dec 2023 13:39:37 -0800 Subject: [PATCH 1/2] adding user switch for turning on and off daylength factor scalingfor photosynthesis parameters --- biogeophys/FatesPlantRespPhotosynthMod.F90 | 21 +++++++++++++++++++++ main/EDParamsMod.F90 | 11 +++++++++++ parameter_files/fates_params_default.cdl | 5 +++++ 3 files changed, 37 insertions(+) diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index 4c8931e8f4..431dc50635 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -61,6 +61,7 @@ module FATESPlantRespPhotosynthMod use PRTGenericMod, only : struct_organ use EDParamsMod, only : maintresp_nonleaf_baserate use EDParamsMod, only : stomatal_model + use EDParamsMod, only : dayl_switch use EDParamsMod, only : stomatal_assim_model use EDParamsMod, only : photo_tempsens_model use PRTParametersMod, only : prt_params @@ -109,6 +110,10 @@ module FATESPlantRespPhotosynthMod integer, parameter :: medlyn_model = 2 integer, parameter :: ballberry_model = 1 + ! Constants used to define day_length switch for scaling photosynthetic parameters + integer, parameter :: dayl_on = 1 + integer, parameter :: dayl_off = 2 + ! Alternatively, Gross Assimilation can be used to estimate ! leaf co2 partial pressure and therefore conductance. The default ! is to use anet @@ -2425,6 +2430,7 @@ subroutine LeafLayerBiophysicalRates( parsun_per_la, & co2_rcurve_islope = 0._r8 else ! day time + if ( dayl_switch == dayl_on ) then ! Vcmax25top was already calculated to derive the nscaler function vcmax25 = vcmax25top_ft * nscaler * dayl_factor select case(photo_tempsens_model) @@ -2437,6 +2443,21 @@ subroutine LeafLayerBiophysicalRates( parsun_per_la, & call endrun(msg=errMsg(sourcefile, __LINE__)) end select + else if ( dayl_switch == dayl_off ) then + ! Vcmax25top was already calculated to derive the nscaler function + vcmax25 = vcmax25top_ft * nscaler + select case(photo_tempsens_model) + case (photosynth_acclim_model_none) + jmax25 = jmax25top_ft * nscaler + case (photosynth_acclim_model_kumarathunge_etal_2019) + jmax25 = vcmax25*jvr + case default + write (fates_log(),*)'error, incorrect leaf photosynthesis temperature acclimation model specified' + call endrun(msg=errMsg(sourcefile, __LINE__)) + end select + + end if + co2_rcurve_islope25 = co2_rcurve_islope25top_ft * nscaler ! Adjust for temperature diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 215d4c3ee7..498ede9945 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -71,6 +71,7 @@ module EDParamsMod real(r8),protected, public :: ED_val_patch_fusion_tol ! minimum fraction in difference in profiles between patches real(r8),protected, public :: ED_val_canopy_closure_thresh ! site-level canopy closure point where trees take on forest (narrow) versus savannah (wide) crown allometry integer,protected, public :: stomatal_model ! switch for choosing between stomatal conductance models, 1 for Ball-Berry, 2 for Medlyn + integer,protected, public :: dayl_switch ! switch for turning on or off day length factor scaling for photosynthetic parameters integer,protected, public :: regeneration_model ! Switch for choosing between regeneration models: ! (1) for Fates default ! (2) for the Tree Recruitment Scheme (Hanbury-Brown et al., 2022) @@ -185,6 +186,7 @@ module EDParamsMod character(len=param_string_length),parameter,public :: ED_name_patch_fusion_tol= "fates_patch_fusion_tol" character(len=param_string_length),parameter,public :: ED_name_canopy_closure_thresh= "fates_canopy_closure_thresh" character(len=param_string_length),parameter,public :: ED_name_stomatal_model= "fates_leaf_stomatal_model" + character(len=param_string_length),parameter,public :: ED_name_dayl_switch= "fates_dayl_switch" character(len=param_string_length),parameter,public :: ED_name_regeneration_model= "fates_regeneration_model" character(len=param_string_length),parameter,public :: name_theta_cj_c3 = "fates_leaf_theta_cj_c3" @@ -359,6 +361,7 @@ subroutine FatesParamsInit() ED_val_patch_fusion_tol = nan ED_val_canopy_closure_thresh = nan stomatal_model = -9 + dayl_switch = -9 regeneration_model = -9 stomatal_assim_model = -9 maxpatch_primary = -9 @@ -511,6 +514,9 @@ subroutine FatesRegisterParams(fates_params) call fates_params%RegisterParameter(name=ED_name_stomatal_model, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) + + call fates_params%RegisterParameter(name=ED_name_dayl_switch, dimension_shape=dimension_shape_scalar, & + dimension_names=dim_names_scalar) call fates_params%RegisterParameter(name=ED_name_regeneration_model, dimension_shape=dimension_shape_scalar, & dimension_names=dim_names_scalar) @@ -728,6 +734,10 @@ subroutine FatesReceiveParams(fates_params) data=tmpreal) stomatal_model = nint(tmpreal) + call fates_params%RetrieveParameter(name=ED_name_dayl_switch, & + data=tmpreal) + dayl_switch = nint(tmpreal) + call fates_params%RetrieveParameter(name=ED_name_regeneration_model, & data=tmpreal) regeneration_model = nint(tmpreal) @@ -901,6 +911,7 @@ subroutine FatesReportParams(is_master) write(fates_log(),fmt0) 'ED_val_canopy_closure_thresh = ',ED_val_canopy_closure_thresh write(fates_log(),fmt0) 'regeneration_model = ',regeneration_model write(fates_log(),fmt0) 'stomatal_model = ',stomatal_model + write(fates_log(),fmt0) 'dayl_switch = ',dayl_switch write(fates_log(),fmt0) 'stomatal_assim_model = ',stomatal_assim_model write(fates_log(),fmt0) 'hydro_kmax_rsurf1 = ',hydr_kmax_rsurf1 write(fates_log(),fmt0) 'hydro_kmax_rsurf2 = ',hydr_kmax_rsurf2 diff --git a/parameter_files/fates_params_default.cdl b/parameter_files/fates_params_default.cdl index f170fe2275..44a9b411d9 100644 --- a/parameter_files/fates_params_default.cdl +++ b/parameter_files/fates_params_default.cdl @@ -245,6 +245,9 @@ variables: double fates_damage_recovery_scalar(fates_pft) ; fates_damage_recovery_scalar:units = "unitless" ; fates_damage_recovery_scalar:long_name = "fraction of the cohort that recovers from damage" ; + double fates_daylength_factor_switch ; + fates_daylength_factor_switch:units = "unitless" ; + fates_daylength_factor_switch:long_name = "user switch for turning on (1) or off (2) the day length factor scaling for photosynthetic parameters" ; double fates_dev_arbitrary_pft(fates_pft) ; fates_dev_arbitrary_pft:units = "unknown" ; fates_dev_arbitrary_pft:long_name = "Unassociated pft dimensioned free parameter that developers can use for testing arbitrary new hypotheses" ; @@ -1603,6 +1606,8 @@ data: fates_damage_event_code = 1 ; + fates_daylength_factor_switch = 1 ; + fates_dev_arbitrary = _ ; fates_fire_active_crown_fire = 0 ; From d2372524f4577cd6e50aa34e78218cbd18271644 Mon Sep 17 00:00:00 2001 From: jenniferholm Date: Mon, 1 Jan 2024 14:59:41 -0800 Subject: [PATCH 2/2] updated EDParams with dayl_factor_switch name --- main/EDParamsMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index 498ede9945..91e6e79247 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -186,7 +186,7 @@ module EDParamsMod character(len=param_string_length),parameter,public :: ED_name_patch_fusion_tol= "fates_patch_fusion_tol" character(len=param_string_length),parameter,public :: ED_name_canopy_closure_thresh= "fates_canopy_closure_thresh" character(len=param_string_length),parameter,public :: ED_name_stomatal_model= "fates_leaf_stomatal_model" - character(len=param_string_length),parameter,public :: ED_name_dayl_switch= "fates_dayl_switch" + character(len=param_string_length),parameter,public :: ED_name_dayl_switch= "fates_daylength_factor_switch" character(len=param_string_length),parameter,public :: ED_name_regeneration_model= "fates_regeneration_model" character(len=param_string_length),parameter,public :: name_theta_cj_c3 = "fates_leaf_theta_cj_c3"