diff --git a/biogeophys/FatesPlantRespPhotosynthMod.F90 b/biogeophys/FatesPlantRespPhotosynthMod.F90 index b768176310..bbdae7e420 100644 --- a/biogeophys/FatesPlantRespPhotosynthMod.F90 +++ b/biogeophys/FatesPlantRespPhotosynthMod.F90 @@ -63,6 +63,7 @@ module FATESPlantRespPhotosynthMod use EDParamsMod, only : maintresp_nonleaf_baserate use EDParamsMod, only : stomatal_model use EDParamsMod, only : stomatal_assim_model + use EDParamsMod, only : dayl_switch use EDParamsMod, only : photo_tempsens_model use PRTParametersMod, only : prt_params use EDPftvarcon , only : EDPftvarcon_inst @@ -685,6 +686,7 @@ subroutine FatesPlantRespPhotosynthDrive (nsites, sites,bc_in,bc_out,dtime) currentCohort%kp25top, & ! in nscaler, & ! in bc_in(s)%t_veg_pa(ifp), & ! in + bc_in(s)%dayl_factor_pa(ifp), & ! in currentPatch%tveg_lpa%GetMean(), & ! in currentPatch%tveg_longterm%GetMean(),& ! in btran_eff, & ! in @@ -2269,6 +2271,7 @@ subroutine LeafLayerBiophysicalRates( parsun_per_la, & co2_rcurve_islope25top_ft, & nscaler, & veg_tempk, & + dayl_factor, & t_growth, & t_home, & btran, & @@ -2304,6 +2307,7 @@ subroutine LeafLayerBiophysicalRates( parsun_per_la, & real(r8), intent(in) :: co2_rcurve_islope25top_ft ! initial slope of CO2 response curve ! (C4 plants) at 25C, canopy top, this pft real(r8), intent(in) :: veg_tempk ! vegetation temperature + real(r8), intent(in) :: dayl_factor ! daylength scaling factor (0-1) real(r8), intent(in) :: t_growth ! T_growth (short-term running mean temperature) (K) real(r8), intent(in) :: t_home ! T_home (long-term running mean temperature) (K) real(r8), intent(in) :: btran ! transpiration wetness factor (0 to 1) @@ -2321,7 +2325,8 @@ subroutine LeafLayerBiophysicalRates( parsun_per_la, & ! (umol electrons/m**2/s) real(r8) :: co2_rcurve_islope25 ! leaf layer: Initial slope of CO2 response curve ! (C4 plants) at 25C - integer :: c3c4_path_index ! Index for which photosynthetic pathway + integer :: c3c4_path_index ! Index for which photosynthetic pathway + real(r8) :: dayl_factor_local ! Local version of daylength factor ! Parameters ! --------------------------------------------------------------------------------- @@ -2369,11 +2374,18 @@ subroutine LeafLayerBiophysicalRates( parsun_per_la, & co2_rcurve_islope = 0._r8 else ! day time + ! update the daylength factor local variable if the switch is on + if ( dayl_switch == itrue ) then + dayl_factor_local = dayl_factor + else + dayl_factor_local = 1.0_r8 + endif + ! Vcmax25top was already calculated to derive the nscaler function - vcmax25 = vcmax25top_ft * nscaler + vcmax25 = vcmax25top_ft * nscaler * dayl_factor_local select case(photo_tempsens_model) case (photosynth_acclim_model_none) - jmax25 = jmax25top_ft * nscaler + jmax25 = jmax25top_ft * nscaler * dayl_factor_local case (photosynth_acclim_model_kumarathunge_etal_2019) jmax25 = vcmax25*jvr case default diff --git a/main/EDParamsMod.F90 b/main/EDParamsMod.F90 index e3454f430c..1389e1c489 100644 --- a/main/EDParamsMod.F90 +++ b/main/EDParamsMod.F90 @@ -498,7 +498,7 @@ subroutine FatesRegisterParams(fates_params) 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) @@ -889,9 +889,9 @@ subroutine FatesReportParams(is_master) write(fates_log(),fmt0) 'ED_val_cohort_age_fusion_tol = ',ED_val_cohort_age_fusion_tol write(fates_log(),fmt0) 'ED_val_patch_fusion_tol = ',ED_val_patch_fusion_tol 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) 'regeneration_model = ',regeneration_model + write(fates_log(),fmt0) 'dayl_switch = ',dayl_switch 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/main/EDPftvarcon.F90 b/main/EDPftvarcon.F90 index 9d57655b54..98367a30ff 100644 --- a/main/EDPftvarcon.F90 +++ b/main/EDPftvarcon.F90 @@ -1790,7 +1790,7 @@ subroutine FatesCheckParams(is_master) use FatesConstantsMod, only : lmr_r_2 use EDParamsMod , only : logging_mechanical_frac, logging_collateral_frac use EDParamsMod , only : logging_direct_frac,logging_export_frac - use EDParamsMod , only : radiation_model + use EDParamsMod , only : radiation_model, dayl_switch use FatesInterfaceTypesMod, only : hlm_use_fixed_biogeog,hlm_use_sp, hlm_name use FatesInterfaceTypesMod, only : hlm_use_inventory_init @@ -1836,6 +1836,13 @@ subroutine FatesCheckParams(is_master) call endrun(msg=errMsg(sourcefile, __LINE__)) end if + if(.not.any(dayl_switch == [itrue,ifalse])) then + write(fates_log(),*) 'The only valid switch options for ' + write(fates_log(),*) 'fates_daylength_factor_switch is 0 or 1 ...' + write(fates_log(),*) 'You specified fates_daylength_factor_switch = ',dayl_switch + write(fates_log(),*) 'Aborting' + call endrun(msg=errMsg(sourcefile, __LINE__)) + end if select case (hlm_parteh_mode) case (prt_cnp_flex_allom_hyp)