diff --git a/MAPL_Base/MAPL_ExtDataGridCompMod.F90 b/MAPL_Base/MAPL_ExtDataGridCompMod.F90 index a678ac9681a6..53a88f9947fa 100644 --- a/MAPL_Base/MAPL_ExtDataGridCompMod.F90 +++ b/MAPL_Base/MAPL_ExtDataGridCompMod.F90 @@ -2393,7 +2393,7 @@ subroutine UpdateBracketTime(item,cTime,bSide,interpTime,fileTime,file_processed ! Convert year offset to the future value yrOffset = iYr - cYearOff ! Determine the template time - call ESMF_TimeSet(newTime,yy=iYr,mm=imm,dd=idd,h=ihr,m=imn,s=isc,__RC__) + call OffsetTimeYear(cTime,yrOffset,newTime,__RC__) ftime = item%reff_time n = 0 do while (.not.found) @@ -2428,8 +2428,7 @@ subroutine UpdateBracketTime(item,cTime,bSide,interpTime,fileTime,file_processed ! yrOffset: Number of years added from current time to get file time Do While ((.not.found).and.(abs(yrOffset).lt.maxOffset)) yrOffset = yrOffset - 1 - iYr = refYear + yrOffset - call ESMF_TimeSet(newTime,yy=iyr,mm=imm,dd=idd,h=ihr,m=imn,s=isc,__RC__) + call OffsetTimeYear(cTime,yrOffset,newTime,__RC__) ! Error check - if the new time is before the first file time, ! all is lost If (newTime.lt.xTSeries(1)) exit