Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue#1163 #1165

Merged
merged 1 commit into from
Sep 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/biogeochem/CNPhenologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &

! if this is the end of the offset_period, reset phenology
! flags and indices
if (offset_counter(p) == 0.0_r8) then
if (offset_counter(p) < dt/2._r8) then
! this code block was originally handled by call cn_offset_cleanup(p)
! inlined during vectorization

Expand All @@ -797,7 +797,7 @@ subroutine CNSeasonDecidPhenology (num_soilp, filter_soilp , &

! if this is the end of the onset period, reset phenology
! flags and indices
if (onset_counter(p) == 0.0_r8) then
if (onset_counter(p) < dt/2._r8) then
! this code block was originally handled by call cn_onset_cleanup(p)
! inlined during vectorization

Expand Down Expand Up @@ -1092,7 +1092,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &

! if this is the end of the offset_period, reset phenology
! flags and indices
if (offset_counter(p) == 0._r8) then
if (offset_counter(p) < dt/2._r8) then
! this code block was originally handled by call cn_offset_cleanup(p)
! inlined during vectorization
offset_flag(p) = 0._r8
Expand All @@ -1113,7 +1113,7 @@ subroutine CNStressDecidPhenology (num_soilp, filter_soilp , &

! if this is the end of the onset period, reset phenology
! flags and indices
if (onset_counter(p) == 0.0_r8) then
if (onset_counter(p) < dt/2._r8) then
! this code block was originally handled by call cn_onset_cleanup(p)
! inlined during vectorization
onset_flag(p) = 0._r8
Expand Down Expand Up @@ -2282,7 +2282,7 @@ subroutine CNOnsetGrowth (num_soilp, filter_soilp, &
! The transfer rate is a linearly decreasing function of time,
! going to zero on the last timestep of the onset period

if (onset_counter(p) == dt) then
if (abs(onset_counter(p) - dt) <= dt/2._r8) then
t1 = 1.0_r8 / dt
else
t1 = 2.0_r8 / (onset_counter(p))
Expand Down Expand Up @@ -2427,7 +2427,7 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, &
! only calculate fluxes during offset period
if (offset_flag(p) == 1._r8) then

if (offset_counter(p) == dt) then
if (abs(offset_counter(p) - dt) <= dt/2._r8) then
t1 = 1.0_r8 / dt
frootc_to_litter(p) = t1 * frootc(p) + cpool_to_frootc(p)

Expand Down