ESMF_ClockDestroy Subroutine

public subroutine ESMF_ClockDestroy(clock, keywordEnforcer, rc)

Arguments

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

Calls

proc~~esmf_clockdestroy~~CallsGraph proc~esmf_clockdestroy ESMF_ClockDestroy c_esmc_clockdestroy c_esmc_clockdestroy proc~esmf_clockdestroy->c_esmc_clockdestroy proc~esmf_clockgetinit ESMF_ClockGetInit proc~esmf_clockdestroy->proc~esmf_clockgetinit proc~esmf_clocksetinitdeleted ESMF_ClockSetInitDeleted proc~esmf_clockdestroy->proc~esmf_clocksetinitdeleted proc~esmf_imerr ESMF_IMErr proc~esmf_clockdestroy->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_clockdestroy->proc~esmf_logfounderror proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Called by

clockUsageOutgoingwESMF_ClockDestroy
w
ConcurrentComponentw
w
ESMF_AlarmExw
w
ESMF_AppDriverw
w
ESMF_AppMainExw
w
ESMF_AppMainExw
w
ESMF_AppMainExw
w
ESMF_ClockExw
w
ESMF_ClockTestw
w
ESMF_CompFortranAndCw
w
ESMF_ComplianceCheckerSTestw
w
ESMF_ConcurrentEnsembleSTestw
w
ESMF_FieldBundleLSRedistArb2ArbSTestw
w
ESMF_FieldBundleLSRedistArb2ArbUngrdDimSTestw
w
ESMF_FieldLSRedistArb2ArbSTestw
w
ESMF_FieldLSRedistArb2ArbUngrdDimSTestw
w
ESMF_FieldLSSMMSTestw
w
ESMF_FieldMeshSMMSTestw
w
ESMF_FieldRegridLSSTestw
w
ESMF_FieldRegridMeshSTestw
w
ESMF_FieldRegridMeshToMeshSTestw
w
ESMF_FieldRegridPatchDisjointSTestw
w
ESMF_FieldRegridSTestw
w
ESMF_FieldRegridSTestw
w
ESMF_FieldRegridSTestw
w
ESMF_NUOPC_UTestw
w
ESMF_SequentialEnsembleSTestw
w
ESMF_TraceSTestw
w
ESMX_Appw
w
FieldConcurrentComponentw
w
FieldRegridConservw
w
FieldRegridMultiw
w
FieldRegridOrderw
w
get_sync_alarmsw
w
MapperSimpleTwoConcurrentCompsw
w
MapperTwoConcurrentCompsw
w
NUOPC_CheckClockUsageOutgoingw
w
user_finalw
w
user_finalw
w

Source Code

      subroutine ESMF_ClockDestroy(clock, keywordEnforcer, rc)
!
! !ARGUMENTS:
      type(ESMF_Clock), intent(inout)          :: clock
      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:
!     \begin{sloppypar}
!     Releases resources associated with this {\tt ESMF\_Clock}.  This releases
!     the list of associated {\tt ESMF\_Alarm}s (pointers), but not the
!     {\tt ESMF\_Alarm}s themselves; the user must explicitly call
!     {\tt ESMF\_AlarmDestroy()} on each {\tt ESMF\_Alarm} to release its
!     resources.  {\tt ESMF\_ClockDestroy()} and corresponding
!     {\tt ESMF\_AlarmDestroy()}s can be called in either order.
!     \end{sloppypar}
!
!     \begin{sloppypar}
!     If {\tt ESMF\_ClockDestroy()} is called before {\tt ESMF\_AlarmDestroy()},
!     any {\tt ESMF\_Alarm}s that were in the {\tt ESMF\_Clock}'s list will
!     no longer be associated with any {\tt ESMF\_Clock}.  If desired,
!     these "orphaned" {\tt ESMF\_Alarm}s can be associated with a different
!     {\tt ESMF\_Clock} via a call to {\tt ESMF\_AlarmSet(...clock=...)}.
!     \end{sloppypar}
!
!     The arguments are:
!     \begin{description}
!     \item[clock]
!       Release resources associated with this {\tt ESMF\_Clock} and mark the
!       object as invalid.  It is an error to pass this object into any other
!       routines after being destroyed.
!     \item[[rc]]
!       Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOP
! !REQUIREMENTS:
      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_ClockGetInit,clock,rc)

      ! invoke C to C++ entry point
      call c_ESMC_ClockDestroy(clock, localrc)
      if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) then
        ! Don't bail out until Delete
        write(*,*)" c_ESMC_ClockDestroy fails"
      endif

      ! mark output as successfully deleted
      call ESMF_ClockSetInitDeleted(clock)

      ! Return success
      if (present(rc)) rc = localrc
      end subroutine ESMF_ClockDestroy