Skip to content

Commit

Permalink
Move snow5d_thresh_for_onset to parameter files
Browse files Browse the repository at this point in the history
  • Loading branch information
olyson committed Feb 8, 2024
1 parent 55f496d commit cfdb29d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<!-- The default filenames are given relative to the root directory
for the CLM2 data in the CESM distribution -->
<!-- Plant function types (relative to {csmdata}) -->
<paramfile phys="clm5_1" >/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm51_params.c240201.nc</paramfile>
<paramfile phys="clm5_0" >lnd/clm2/paramdata/clm50_params.c240105.nc</paramfile>
<paramfile phys="clm4_5" >lnd/clm2/paramdata/clm45_params.c240105.nc</paramfile>
<paramfile phys="clm5_1" >/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm51_params.c240208.nc</paramfile>
<paramfile phys="clm5_0" >/glade/campaign/cgd/tss/people/oleson/modify_param/clm50_params.c240208.nc</paramfile>
<paramfile phys="clm4_5" >/glade/campaign/cgd/tss/people/oleson/modify_param/clm45_params.c240208.nc</paramfile>

<!-- ================================================================== -->
<!-- FATES default parameter file -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_ciso_cwd_hr_params.c240105.nc'
paramfile = '/glade/campaign/cgd/tss/people/oleson/modify_param/ctsm51_ciso_cwd_hr_params.c240208.nc'
hist_fincl1 = 'CWDC_HR','C13_CWDC_HR','C14_CWDC_HR','CWD_HR_L2','CWD_HR_L2_vr','CWD_HR_L3','CWD_HR_L3_vr'
7 changes: 5 additions & 2 deletions src/biogeochem/CNPhenologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ module CNPhenologyMod
real(r8) :: soilpsi_off ! critical soil water potential for leaf offset
real(r8) :: lwtop ! live wood turnover proportion (annual fraction)
real(r8) :: phenology_soil_depth ! soil depth used for measuring states for phenology triggers
real(r8) :: snow5d_thresh_for_onset ! 5-day snow depth threshold for leaf onset
end type params_type

type(params_type) :: params_inst
Expand Down Expand Up @@ -280,6 +281,7 @@ subroutine CNPhenologySetParams( )
params_inst%soilpsi_off = -0.8 ! MPa
params_inst%lwtop = 0.7_r8 ! Fraction
params_inst%phenology_soil_depth = 0.08_r8 ! m
params_inst%snow5d_thresh_for_onset = 0.2_r8 ! m
end subroutine CNPhenologySetParams

!-----------------------------------------------------------------------
Expand Down Expand Up @@ -313,6 +315,7 @@ subroutine readParams ( ncid )
call readNcdioScalar(ncid, 'soilpsi_off', subname, params_inst%soilpsi_off)
call readNcdioScalar(ncid, 'lwtop_ann', subname, params_inst%lwtop)
call readNcdioScalar(ncid, 'phenology_soil_depth', subname, params_inst%phenology_soil_depth)
call readNcdioScalar(ncid, 'snow5d_thresh_for_onset', subname, params_inst%snow5d_thresh_for_onset)


end subroutine readParams
Expand Down Expand Up @@ -1136,7 +1139,6 @@ function SeasonalDecidOnset( onset_gdd, onset_gddflag, soilt, soila10, t_a5min,
logical :: do_onset ! Flag if onset should happen (return value)
!
! !LOCAL VARIABLES:
real(r8), parameter :: snow5d_thresh_for_onset = 0.1_r8 ! 5-day snow depth threshold for leaf onset
real(r8), parameter :: min_critical_daylength_onset = 39300._r8/2._r8 ! Minimum daylength for onset to happen
! NOTE above: The 39300/2(19650) value is what we've
! tested with, we are concerned that changing
Expand Down Expand Up @@ -1192,7 +1194,8 @@ function SeasonalDecidOnset( onset_gdd, onset_gddflag, soilt, soila10, t_a5min,
else if (season_decid_temperate == 0 .and. onset_gddflag == 1.0_r8 .and. &
soila10 > SHR_CONST_TKFRZ .and. &
t_a5min > SHR_CONST_TKFRZ .and. ws_flag==1.0_r8 .and. &
dayl>min_critical_daylength_onset .and. snow_5day<snow5d_thresh_for_onset) then
dayl>min_critical_daylength_onset .and. &
snow_5day<params_inst%snow5d_thresh_for_onset) then
do_onset = .true.
end if
else
Expand Down

0 comments on commit cfdb29d

Please sign in to comment.