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

fixes #351 #352

Merged
merged 1 commit into from
May 1, 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
24 changes: 12 additions & 12 deletions MAPL_Base/MAPL_ExtDataGridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1982,15 +1982,15 @@ subroutine CreateTimeInterval(item,clock,rc)
integer :: iyy,imm,idd,ihh,imn,isc
integer :: lasttoken
character(len=2) :: token
type(ESMF_Time) :: time
type(ESMF_Time) :: time,start_time
integer :: cindex,pindex
character(len=ESMF_MAXSTR) :: creffTime, ctInt

integer :: status

creffTime = ''
ctInt = ''
call ESMF_ClockGet (CLOCK, currTIME=time, __RC__)
call ESMF_ClockGet (CLOCK, currTIME=time, startTime=start_time, __RC__)
if (.not.item%hasFileReffTime) then
! if int_frequency is less than zero than try to guess it from the file template
! if that fails then it must be a single file or a climatology
Expand All @@ -2012,21 +2012,21 @@ subroutine CreateTimeInterval(item,clock,rc)
if (lasttoken.gt.0) then
token = item%file(lasttoken+1:lasttoken+2)
select case(token)
case("y4")
case("y4")
call ESMF_TimeSet(item%reff_time,yy=iyy,mm=1,dd=1,h=0,m=0,s=0,__RC__)
call ESMF_TimeIntervalSet(item%frequency,yy=1,__RC__)
case("m2")
call ESMF_TimeIntervalSet(item%frequency,startTime=start_time,yy=1,__RC__)
case("m2")
call ESMF_TimeSet(item%reff_time,yy=iyy,mm=imm,dd=1,h=0,m=0,s=0,__RC__)
call ESMF_TimeIntervalSet(item%frequency,mm=1,__RC__)
case("d2")
call ESMF_TimeIntervalSet(item%frequency,startTime=start_time,mm=1,__RC__)
case("d2")
call ESMF_TimeSet(item%reff_time,yy=iyy,mm=imm,dd=idd,h=0,m=0,s=0,__RC__)
call ESMF_TimeIntervalSet(item%frequency,d=1,__RC__)
case("h2")
call ESMF_TimeIntervalSet(item%frequency,startTime=start_time,d=1,__RC__)
case("h2")
call ESMF_TimeSet(item%reff_time,yy=iyy,mm=imm,dd=idd,h=ihh,m=0,s=0,__RC__)
call ESMF_TimeIntervalSet(item%frequency,h=1,__RC__)
case("n2")
call ESMF_TimeIntervalSet(item%frequency,startTime=start_time,h=1,__RC__)
case("n2")
call ESMF_TimeSet(item%reff_time,yy=iyy,mm=imm,dd=idd,h=ihh,m=imn,s=0,__RC__)
call ESMF_TimeIntervalSet(item%frequency,m=1,__RC__)
call ESMF_TimeIntervalSet(item%frequency,startTime=start_time,m=1,__RC__)
end select
else
! couldn't find any tokens so all the data must be on one file
Expand Down