Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lmbirch89 authored and billsacks committed Apr 15, 2020
1 parent aa0f31f commit dd0cbec
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions src/biogeochem/CNPhenologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ subroutine CNPhenology (bounds, num_soilc, filter_soilc, num_soilp, &
cnveg_state_inst, cnveg_carbonstate_inst, cnveg_nitrogenstate_inst, cnveg_carbonflux_inst, cnveg_nitrogenflux_inst)

call CNSeasonDecidPhenology(num_soilp, filter_soilp, &
temperature_inst, waterstatebulk_inst, cnveg_state_inst, dgvs_inst, &
temperature_inst, waterdiagnosticbulk_inst, cnveg_state_inst, dgvs_inst, &
cnveg_carbonstate_inst, cnveg_nitrogenstate_inst, cnveg_carbonflux_inst, cnveg_nitrogenflux_inst)

call CNStressDecidPhenology(num_soilp, filter_soilp, &
Expand Down Expand Up @@ -627,7 +627,7 @@ end subroutine CNEvergreenPhenology

!-----------------------------------------------------------------------
subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
temperature_inst, waterstatebulk_inst, cnveg_state_inst, dgvs_inst , &
temperature_inst, waterdiagnosticbulk_inst, cnveg_state_inst, dgvs_inst , &
cnveg_carbonstate_inst, cnveg_nitrogenstate_inst, cnveg_carbonflux_inst, cnveg_nitrogenflux_inst)
!
! !DESCRIPTION:
Expand All @@ -644,7 +644,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
integer , intent(in) :: num_soilp ! number of soil patches in filter
integer , intent(in) :: filter_soilp(:) ! filter for soil patches
type(temperature_type) , intent(in) :: temperature_inst
type(waterstatebulk_type) , intent(in) :: waterstatebulk_inst
type(waterdiagnosticbulk_type) , intent(in) :: waterdiagnosticbulk_inst
type(cnveg_state_type) , intent(inout) :: cnveg_state_inst
type(dgvs_type) , intent(inout) :: dgvs_inst
type(cnveg_carbonstate_type) , intent(inout) :: cnveg_carbonstate_inst
Expand All @@ -657,7 +657,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
integer :: fp !lake filter patch index
real(r8):: ws_flag !winter-summer solstice flag (0 or 1)
real(r8):: crit_onset_gdd !critical onset growing degree-day sum
real(r8):: crit_daylat !latitudinal light gradient in arctic-boreal
real(r8):: crit_daylat !latitudinal light gradient in arctic-boreal
real(r8):: onset_thresh !flag onset threshold
real(r8):: soilt
!-----------------------------------------------------------------------
Expand All @@ -672,9 +672,9 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &

t_soisno => temperature_inst%t_soisno_col , & ! Input: [real(r8) (:,:) ] soil temperature (Kelvin) (-nlevsno+1:nlevgrnd)
soila10 => temperature_inst%soila10_patch , & ! Input: [real(r8) (:) ]
t_a10min => temperature_inst%t_a10min_patch , & ! input: [real(r8) (:) ]
snow_5day => waterdiagnosticbulk_inst%snow_5day , & ! input: [real(r8) (:) ]
t_a5min => temperature_inst%t_a5min_patch , & ! input: [real(r8) (:) ]
snow_5day => waterdiagnosticbulk_inst%snow_5day_col , & ! input: [real(r8) (:) ]

pftmayexist => dgvs_inst%pftmayexist_patch , & ! Output: [logical (:) ] exclude seasonal decid patches from tropics

annavg_t2m => cnveg_state_inst%annavg_t2m_patch , & ! Input: [real(r8) (:) ] annual average 2m air temperature (K)
Expand Down Expand Up @@ -748,6 +748,8 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
)

! start patch loop


do fp = 1,num_soilp
p = filter_soilp(fp)
c = patch%column(p)
Expand Down Expand Up @@ -844,7 +846,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &

! test for switching from dormant period to growth period
if (dormant_flag(p) == 1.0_r8) then

onset_thresh = 0.0_r8
! Test to turn on growing degree-day sum, if off.
! switch on the growing degree day sum on the winter solstice

Expand Down Expand Up @@ -874,13 +876,11 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
!separate into Arctic boreal and lower latitudes
if (onset_gdd(p) > crit_onset_gdd .and. abs(grc%latdeg(g))<45.0_r8) then
onset_thresh=1.0_r8
else if (onset_gddflag(p) == 1.0_r8 .and. soila10(p) > SHR_CONST_TKFRZ &
.and. t_a10min(p) > SHR_CONST_TKFRZ .and. ws_flag==1.0_r8 &
.and. dayl(g)>(crit_dayl/2.0_r8) .and. snow_5day(c)<0.1_r8) then
else if (onset_gddflag(p) == 1.0_r8 .and. soila10(p) > SHR_CONST_TKFRZ .and. &
t_a5min(p) > SHR_CONST_TKFRZ .and. ws_flag==1.0_r8 .and. &
dayl(g)>(crit_dayl/2.0_r8) .and. snow_5day(c)<0.1_r8) then
onset_thresh=1.0_r8
end if


end if
! set onset_flag if critical growing degree-day sum is exceeded
if (onset_thresh == 1.0_r8) then
onset_flag(p) = 1.0_r8
Expand Down Expand Up @@ -928,12 +928,15 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &
days_active(p) = days_active(p) + fracday
if (days_active(p) > 355._r8) pftmayexist(p) = .false.
end if
! use 15 hr at 65N from eitel 2019, to ~11hours in temperate regions

! use 15 hr (54000 min) at ~65N from eitel 2019, to ~11hours in temperate regions
! 15hr-11hr/(65N-45N)=linear slope = 720 min/latitude
crit_daylat=54000-720*(65-abs(grc%latdeg(g)))
if (crit_daylat < crit_dayl) then
crit_daylat = crit_dayl
crit_daylat = crit_dayl !maintain previous offset from White 2001 as minimum
end if
! only begin to test for offset daylength once past the summer sol

! only begin to test for offset daylength once past the summer sol
if (ws_flag == 0._r8 .and. dayl(g) < crit_daylat) then
offset_flag(p) = 1._r8
offset_counter(p) = ndays_off * secspday
Expand Down

0 comments on commit dd0cbec

Please sign in to comment.