Skip to content

Commit

Permalink
Add check for AlarmIsRinging
Browse files Browse the repository at this point in the history
Added a check for AlarmIsRinging call.
  • Loading branch information
dpsarmie committed May 9, 2024
1 parent 09ca939 commit fc376d3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1146,9 +1146,12 @@ subroutine ModelAdvance(gcomp, rc)
if (restart_eor) then
call ESMF_ClockGetAlarm(clock, alarmname='alarm_stop', alarm=alarm, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (ESMF_AlarmIsRinging(alarm, rc=rc)) force_restart_now = .true.
call ESMF_AlarmRingerOff( alarm, rc=rc )
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (ESMF_AlarmIsRinging(alarm, rc=rc)) then
if (ChkErr(rc,__LINE__,u_FILE_u)) return
force_restart_now = .true.
call ESMF_AlarmRingerOff( alarm, rc=rc )
if (ChkErr(rc,__LINE__,u_FILE_u)) return
endif
endif

!--------------------------------
Expand Down

0 comments on commit fc376d3

Please sign in to comment.