From ee9c6a8cb4ba75cb980409d4d21788e4a66c7c75 Mon Sep 17 00:00:00 2001 From: rgknox Date: Mon, 29 Feb 2016 18:00:06 -0800 Subject: [PATCH 1/2] added a call to update current time prior to eds gdd accumulator in the main model loop --- biogeochem/EDPhenologyType.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/biogeochem/EDPhenologyType.F90 b/biogeochem/EDPhenologyType.F90 index 6924b2d388..ea49fb44a9 100644 --- a/biogeochem/EDPhenologyType.F90 +++ b/biogeochem/EDPhenologyType.F90 @@ -131,7 +131,7 @@ subroutine accumulateAndExtract( this, bounds, & ! Accumulate and extract GDD0 for ED do p = bounds%begp,bounds%endp - + g = gridcell(p) if (latdeg(g) >= 0._r8) then @@ -143,8 +143,8 @@ subroutine accumulateAndExtract( this, bounds, & ! FIX(RF,032414) - is this accumulation a bug in the normal phenology code, ! as it means to count from november but ctually counts from january? if ( month==m .and. day==calParams%firstDayOfMonth .and. secs==get_step_size() ) then - rbufslp(p) = accumResetVal ! reset ED_GDD - else + rbufslp(p) = accumResetVal ! reset ED_GDD0 + else rbufslp(p) = max(0._r8, min(this%checkRefVal, t_ref2m_patch(p)-SHR_CONST_TKFRZ)) & * get_step_size()/SHR_CONST_CDAY end if From 29e049971888b39d0f08dfc2b938629b8ca4c758 Mon Sep 17 00:00:00 2001 From: rgknox Date: Mon, 29 Feb 2016 22:52:09 -0800 Subject: [PATCH 2/2] fixed call order of mon,day,sec between clm_driv and accumulateandExtract --- biogeochem/EDPhenologyType.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/biogeochem/EDPhenologyType.F90 b/biogeochem/EDPhenologyType.F90 index ea49fb44a9..d38923d786 100644 --- a/biogeochem/EDPhenologyType.F90 +++ b/biogeochem/EDPhenologyType.F90 @@ -93,7 +93,7 @@ end subroutine restart subroutine accumulateAndExtract( this, bounds, & t_ref2m_patch, & gridcell, latdeg, & - day, month, secs ) + month, day, secs ) ! ! start formal argument list -- ! group formal (dummy) arguments by use/similarity @@ -165,6 +165,8 @@ subroutine accumulateAndExtract( this, bounds, & call update_accum_field ( trim(this%accString), rbufslp, get_nstep() ) call extract_accum_field ( trim(this%accString), this%ED_GDD_patch, get_nstep() ) + if (this%DEBUG) write(iulog,*) 'MM-DD-SSSS',month,'-',day,'-',secs + if (this%DEBUG) write(iulog,*) 'cd_status:',this%phen_cd_status_patch(:) if (this%DEBUG) write(iulog,*) 'ED_GDD accumAndExtract ', this%ED_GDD_patch deallocate(rbufslp)