Skip to content

Commit

Permalink
fix leap day issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Feb 29, 2024
1 parent 7e0908c commit 5c39417
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mediator/med_phases_profile_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ subroutine med_phases_profile(gcomp, rc)
use ESMF , only : ESMF_TimeInterval, ESMF_AlarmGet, ESMF_TimeIntervalGet
use ESMF , only : ESMF_ClockGetNextTime, ESMF_TimeGet, ESMF_ClockGet
use ESMF , only : ESMF_ClockAdvance, ESMF_ClockSet, ESMF_ClockIsStopTime
use ESMF , only : operator(-)
use ESMF , only : operator(-), ESMF_CALKIND_GREGORIAN
use NUOPC , only : NUOPC_CompAttributeGet

! write profile output
Expand Down Expand Up @@ -170,12 +170,12 @@ subroutine med_phases_profile(gcomp, rc)
call ESMF_TimeGet(nexttime, timestring=nexttimestr, rc=rc)
if (med_utils_ChkErr(rc,__LINE__,u_FILE_u)) return
! get current wall clock time
call ESMF_TimeSet(wallclocktime, rc=rc)
call ESMF_TimeSet(wallclockTime, calkindflag=ESMF_CALKIND_GREGORIAN, rc=rc)
if (med_utils_chkerr(rc,__LINE__,u_FILE_u)) return
call ESMF_TimeSyncToRealTime(wallclocktime, rc=rc)
call ESMF_TimeSyncToRealTime(wallclockTime, rc=rc)
if (med_utils_chkerr(rc,__LINE__,u_FILE_u)) return

call ESMF_TimeGet(wallclocktime,timeString=walltimestr, rc=rc)
call ESMF_TimeGet(wallclockTime,timeString=walltimestr, rc=rc)
if (med_utils_ChkErr(rc,__LINE__,u_FILE_u)) return

! 1 model day/ x seconds = 1/365 yrs/ (wallclockelapsed s/86400spd
Expand Down

0 comments on commit 5c39417

Please sign in to comment.