ESMF_AlarmSticky Subroutine

public subroutine ESMF_AlarmSticky(alarm, keywordEnforcer, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Alarm), intent(inout) :: alarm
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(out), optional :: rc

Source Code

      subroutine ESMF_AlarmSticky(alarm, keywordEnforcer, rc)

! !ARGUMENTS:
      type(ESMF_Alarm), intent(inout)         :: alarm
      type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      integer,          intent(out), optional :: rc

!
! !STATUS:
! \begin{itemize}
! \item\apiStatusCompatibleVersion{5.2.0r}
! \end{itemize}
!
! !DESCRIPTION:
!     Set an {\tt ESMF\_Alarm}'s sticky flag; once alarm is ringing,
!     it remains ringing until {\tt ESMF\_AlarmRingerOff()} is called.
!     There is an implicit limitation that in order to properly reverse
!     timestep through a ring end time in {\tt ESMF\_DIRECTION\_REVERSE}, that
!     time must have already been traversed in the forward direction.
!     This is due to the fact that an {\tt ESMF\_Alarm} cannot predict when
!     user code will call {\tt ESMF\_AlarmRingerOff()}.  An error message
!     will be logged when this limitation is not satisfied.
!
!     The arguments are:
!     \begin{description}
!     \item[alarm]
!          The object instance to be set sticky.
!     \item[{[rc]}]
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOP
! !REQUIREMENTS:
!     TMGn.n.n
      integer :: localrc                        ! local return code

      ! Assume failure until success
      if (present(rc)) rc = ESMF_RC_NOT_IMPL
      localrc = ESMF_RC_NOT_IMPL

      ! check input
      ESMF_INIT_CHECK_DEEP(ESMF_AlarmGetInit,alarm,rc)

      ! invoke C to C++ entry point
      call c_ESMC_AlarmSticky(alarm, localrc)
      if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return

      ! Return success
      if (present(rc)) rc = ESMF_SUCCESS
      end subroutine ESMF_AlarmSticky