Skip to content

Commit

Permalink
Fix issue#1163
Browse files Browse the repository at this point in the history
  • Loading branch information
olyson committed Sep 29, 2020
1 parent 08bc0ad commit 08e5a90
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 08e5a90

Please sign in to comment.