Skip to content

Commit 67e0842

Browse files
committed
move daylength factor switch from EDParams to FatesInterfaceMod
1 parent 723c6d8 commit 67e0842

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

biogeophys/FatesPlantRespPhotosynthMod.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module FATESPlantRespPhotosynthMod
6363
use EDParamsMod, only : maintresp_nonleaf_baserate
6464
use EDParamsMod, only : stomatal_model
6565
use EDParamsMod, only : stomatal_assim_model
66-
use EDParamsMod, only : dayl_switch
66+
use EDParamsMod, only : hlm_daylength_factor_switch
6767
use EDParamsMod, only : photo_tempsens_model
6868
use PRTParametersMod, only : prt_params
6969
use EDPftvarcon , only : EDPftvarcon_inst
@@ -2398,7 +2398,7 @@ subroutine LeafLayerBiophysicalRates( parsun_per_la, &
23982398
else ! day time
23992399

24002400
! update the daylength factor local variable if the switch is on
2401-
if ( dayl_switch == itrue ) then
2401+
if ( hlm_daylength_factor_switch == itrue ) then
24022402
dayl_factor_local = dayl_factor
24032403
else
24042404
dayl_factor_local = 1.0_r8

main/EDParamsMod.F90

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ module EDParamsMod
7777
real(r8),protected, public :: ED_val_patch_fusion_tol ! minimum fraction in difference in profiles between patches
7878
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
7979
integer,protected, public :: stomatal_model ! switch for choosing between stomatal conductance models, 1 for Ball-Berry, 2 for Medlyn
80-
integer,protected, public :: dayl_switch ! switch for turning on or off day length factor scaling for photosynthetic parameters
8180
integer,protected, public :: regeneration_model ! Switch for choosing between regeneration models:
8281
! (1) for Fates default
8382
! (2) for the Tree Recruitment Scheme (Hanbury-Brown et al., 2022)
@@ -170,7 +169,6 @@ module EDParamsMod
170169
character(len=param_string_length),parameter,public :: ED_name_patch_fusion_tol= "fates_patch_fusion_tol"
171170
character(len=param_string_length),parameter,public :: ED_name_canopy_closure_thresh= "fates_canopy_closure_thresh"
172171
character(len=param_string_length),parameter,public :: ED_name_stomatal_model= "fates_leaf_stomatal_model"
173-
character(len=param_string_length),parameter,public :: ED_name_dayl_switch= "fates_daylength_factor_switch"
174172
character(len=param_string_length),parameter,public :: ED_name_regeneration_model= "fates_regeneration_model"
175173

176174
character(len=param_string_length),parameter,public :: name_theta_cj_c3 = "fates_leaf_theta_cj_c3"
@@ -345,7 +343,6 @@ subroutine FatesParamsInit()
345343
ED_val_patch_fusion_tol = nan
346344
ED_val_canopy_closure_thresh = nan
347345
stomatal_model = -9
348-
dayl_switch = -9
349346
regeneration_model = -9
350347
stomatal_assim_model = -9
351348
max_cohort_per_patch = -9
@@ -500,9 +497,6 @@ subroutine FatesRegisterParams(fates_params)
500497
call fates_params%RegisterParameter(name=ED_name_stomatal_model, dimension_shape=dimension_shape_scalar, &
501498
dimension_names=dim_names_scalar)
502499

503-
call fates_params%RegisterParameter(name=ED_name_dayl_switch, dimension_shape=dimension_shape_scalar, &
504-
dimension_names=dim_names_scalar)
505-
506500
call fates_params%RegisterParameter(name=ED_name_regeneration_model, dimension_shape=dimension_shape_scalar, &
507501
dimension_names=dim_names_scalar)
508502

@@ -727,10 +721,6 @@ subroutine FatesReceiveParams(fates_params)
727721
data=tmpreal)
728722
stomatal_model = nint(tmpreal)
729723

730-
call fates_params%RetrieveParameter(name=ED_name_dayl_switch, &
731-
data=tmpreal)
732-
dayl_switch = nint(tmpreal)
733-
734724
call fates_params%RetrieveParameter(name=ED_name_regeneration_model, &
735725
data=tmpreal)
736726
regeneration_model = nint(tmpreal)
@@ -909,7 +899,6 @@ subroutine FatesReportParams(is_master)
909899
write(fates_log(),fmt0) 'ED_val_patch_fusion_tol = ',ED_val_patch_fusion_tol
910900
write(fates_log(),fmt0) 'ED_val_canopy_closure_thresh = ',ED_val_canopy_closure_thresh
911901
write(fates_log(),fmt0) 'regeneration_model = ',regeneration_model
912-
write(fates_log(),fmt0) 'dayl_switch = ',dayl_switch
913902
write(fates_log(),fmt0) 'stomatal_model = ',stomatal_model
914903
write(fates_log(),fmt0) 'stomatal_assim_model = ',stomatal_assim_model
915904
write(fates_log(),fmt0) 'hydro_kmax_rsurf1 = ',hydr_kmax_rsurf1

main/FatesInterfaceMod.F90

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,7 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval)
14741474
hlm_num_luh2_states = unset_int
14751475
hlm_num_luh2_transitions = unset_int
14761476
hlm_use_cohort_age_tracking = unset_int
1477+
hlm_daylength_factor_switch= unset_int
14771478
hlm_use_logging = unset_int
14781479
hlm_use_ed_st3 = unset_int
14791480
hlm_use_ed_prescribed_phys = unset_int
@@ -1758,6 +1759,11 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval)
17581759
call endrun(msg=errMsg(sourcefile, __LINE__))
17591760
end if
17601761

1762+
if(hlm_daylength_factor_switch .eq. unset_int) then
1763+
write(fates_log(), *) 'use daylength factor switch is unset: hlm_daylength_factor_switch, exiting'
1764+
call endrun(msg=errMsg(sourcefile, __LINE__))
1765+
end if
1766+
17611767
if(hlm_use_sp.eq.itrue.and.hlm_use_nocomp.eq.ifalse)then
17621768
write(fates_log(), *) 'SP cannot be on if nocomp mode is off. Exiting. '
17631769
call endrun(msg=errMsg(sourcefile, __LINE__))
@@ -1961,6 +1967,12 @@ subroutine set_fates_ctrlparms(tag,ival,rval,cval)
19611967
write(fates_log(),*) 'Transfering hlm_use_cohort_age_tracking= ',ival,' to FATES'
19621968
end if
19631969

1970+
case('use_daylength_factor_switch')
1971+
hlm_daylength_factor_switch = ival
1972+
if (fates_global_verbose()) then
1973+
write(fates_log(),*) 'Transfering hlm_daylength_factor_switch= ',ival,' to FATES'
1974+
end if
1975+
19641976
case('use_logging')
19651977
hlm_use_logging = ival
19661978
if (fates_global_verbose()) then

0 commit comments

Comments
 (0)