ESMF_ClockGetNextTime Subroutine

public subroutine ESMF_ClockGetNextTime(clock, nextTime, keywordEnforcer, timeStep, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Clock), intent(in) :: clock
type(ESMF_Time), intent(out) :: nextTime
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
type(ESMF_TimeInterval), intent(in), optional :: timeStep
integer, intent(out), optional :: rc

Calls

proc~~esmf_clockgetnexttime~~CallsGraph proc~esmf_clockgetnexttime ESMF_ClockGetNextTime c_esmc_clockgetnexttime c_esmc_clockgetnexttime proc~esmf_clockgetnexttime->c_esmc_clockgetnexttime proc~esmf_clockgetinit ESMF_ClockGetInit proc~esmf_clockgetnexttime->proc~esmf_clockgetinit proc~esmf_imerr ESMF_IMErr proc~esmf_clockgetnexttime->proc~esmf_imerr proc~esmf_imerrs ESMF_IMErrS proc~esmf_clockgetnexttime->proc~esmf_imerrs proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_clockgetnexttime->proc~esmf_logfounderror proc~esmf_timeinit ESMF_TimeInit proc~esmf_clockgetnexttime->proc~esmf_timeinit proc~esmf_timeintervalgetinit ESMF_TimeIntervalGetInit proc~esmf_clockgetnexttime->proc~esmf_timeintervalgetinit proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep proc~esmf_imerrs->proc~esmf_logfounderror proc~esmf_initcheckshallow ESMF_InitCheckShallow proc~esmf_imerrs->proc~esmf_initcheckshallow 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

Source Code

      subroutine ESMF_ClockGetNextTime(clock, nextTime, keywordEnforcer, &
        timeStep, rc)

! !ARGUMENTS:
      type(ESMF_Clock),        intent(in)            :: clock
      type(ESMF_Time),         intent(out)           :: nextTime
      type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      type(ESMF_TimeInterval), intent(in),  optional :: timeStep
      integer,                 intent(out), optional :: rc

!
! !STATUS:
! \begin{itemize}
! \item\apiStatusCompatibleVersion{5.2.0r}
! \end{itemize}
!
! !DESCRIPTION:
!     Calculates what the next time of the {\tt clock} will be, based on
!     the {\tt clock}'s current time step or an optionally passed-in
!     {\tt timeStep}.
!
!     The arguments are:
!     \begin{description}
!     \item[clock]
!          The object instance for which to get the next time.
!     \item[nextTime]
!          The resulting {\tt ESMF\_Clock}'s next time.
!     \item[{[timeStep]}]
!          The time step interval to use instead of the clock's.
!     \item[{[rc]}]
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOP
! !REQUIREMENTS:
!     TMGx.x, CCSM
      integer :: localrc                        ! local return code

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

      ! check inputs
      ESMF_INIT_CHECK_DEEP(ESMF_ClockGetInit,clock,rc)
      ESMF_INIT_CHECK_SHALLOW(ESMF_TimeIntervalGetInit,timeStep,rc)

      ! invoke C to C++ entry point
      call c_ESMC_ClockGetNextTime(clock, nextTime, timeStep, localrc)
      if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return

      ! mark output as successfully initialized
      call ESMF_TimeInit(nextTime)

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