Skip to content

Commit

Permalink
update nuopc_shr_methods to match cdeps/share code
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Dec 17, 2024
1 parent a48ff87 commit 44a0944
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/nuopc_shr_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -618,11 +618,17 @@ subroutine alarmInit( clock, alarm, option, &
case (optNSteps,trim(optNSteps)//'s')
call ESMF_ClockGet(clock, TimeStep=TimestepInterval, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_TimeIntervalSet(AlarmInterval, s=dtime_drv, rc=rc )
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if(dtime_drv > 0) then
call ESMF_TimeIntervalSet(AlarmInterval, s=dtime_drv, rc=rc )
if (ChkErr(rc,__LINE__,u_FILE_u)) return
else
call ESMF_ClockGet(clock, TimeStep=AlarmInterval, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
endif

AlarmInterval = AlarmInterval * opt_n
! timestepinterval*0 is 0 of kind ESMF_TimeStepInterval
if (mod(AlarmInterval, TimestepInterval) /= (timestepinterval*0)) then
if (mod(AlarmInterval, TimestepInterval) /= (TimestepInterval*0)) then
call ESMF_LogWrite(subname//'illegal Alarm setting for '//trim(alarmname), ESMF_LOGMSG_ERROR)
rc = ESMF_FAILURE
return
Expand Down

0 comments on commit 44a0944

Please sign in to comment.