Skip to content

Commit

Permalink
Improved comments around HUI in CropUpdateAccVars().
Browse files Browse the repository at this point in the history
  • Loading branch information
samsrabin committed Mar 30, 2022
1 parent e8aee47 commit 66abdbc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/biogeochem/CropType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -589,13 +589,17 @@ subroutine CropUpdateAccVars(this, bounds, t_ref2m_patch, t_soisno_col)
call endrun(msg=errMsg(sourcefile, __LINE__))
endif

! Accumulate and extract HUI and GDDACCUM

! Update HUI. This is not standard for accumulation fields,
! but HUI needs it because it can be changed outside this
! accumulation routine (see CropPhenology). This requires
! the accumulation buffer to be reset.
call extract_accum_field ('HUI', rbufslp, nstep)
do p = begp,endp
rbufslp(p) = max(0.0_r8,this%hui_patch(p)-rbufslp(p))
end do
call update_accum_field ('HUI', rbufslp, nstep)

! Accumulate and extract HUI and GDDACCUM
do p = begp,endp
if (this%croplive_patch(p)) then ! relative to planting date
ivt = patch%itype(p)
Expand Down

0 comments on commit 66abdbc

Please sign in to comment.