Skip to content

Commit

Permalink
fh_s=NINT(restart_fh*3600)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSzapiro-NOAA committed Aug 28, 2024
1 parent 00f8ea2 commit 7bf1f5e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions config_src/drivers/nuopc_cap/mom_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1952,8 +1952,8 @@ subroutine ModelSetRunClock(gcomp, rc)
logical :: isPresent, isSet
logical :: first_time = .true.
integer :: localPet
integer :: n, nfh
integer, allocatable :: restart_fh(:)
integer :: n, nfh, fh_s
real(ESMF_KIND_R8), allocatable :: restart_fh(:)
character(len=*),parameter :: subname='(MOM_cap:ModelSetRunClock) '
!--------------------------------

Expand Down Expand Up @@ -2116,13 +2116,14 @@ subroutine ModelSetRunClock(gcomp, rc)

! create a list of times at each restart_fh
do n = 1,nfh
call ESMF_TimeIntervalSet(fhInterval, h=restart_fh(n), rc=rc)
fh_s = NINT(restart_fh(n)*3600)
call ESMF_TimeIntervalSet(fhInterval, s=fh_s, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
restartFhTimes(n) = mcurrtime + fhInterval
call ESMF_TimePrint(restartFhTimes(n), options="string", preString="Restart_Fh at ", unit=timestr, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (localPet == 0) then
if (mod(3600*restart_fh(n),dt_cpl) /= 0) then
if (mod(fh_s,dt_cpl) /= 0) then
write(stdout,'(A)')trim(subname)//trim(timestr)//' will not be written'
else
write(stdout,'(A)')trim(subname)//trim(timestr)//' will be written'
Expand Down

0 comments on commit 7bf1f5e

Please sign in to comment.