ESMF_TimeValidate Subroutine

public subroutine ESMF_TimeValidate(time, options, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Time), intent(in) :: time
character(len=*), intent(in), optional :: options
integer, intent(out), optional :: rc

Calls

proc~~esmf_timevalidate~~CallsGraph proc~esmf_timevalidate ESMF_TimeValidate c_esmc_timevalidate c_esmc_timevalidate proc~esmf_timevalidate->c_esmc_timevalidate proc~esmf_imerrs ESMF_IMErrS proc~esmf_timevalidate->proc~esmf_imerrs proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_timevalidate->proc~esmf_logfounderror proc~esmf_timegetinit ESMF_TimeGetInit proc~esmf_timevalidate->proc~esmf_timegetinit 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_TimeValidate(time, options, rc)

! !ARGUMENTS:
      type(ESMF_Time),   intent(in)            :: time
      character (len=*), intent(in),  optional :: options
      integer,           intent(out), optional :: rc

!
! !DESCRIPTION:
!     Checks whether an {\tt ESMF\_Time} is valid.
!     Must be a valid date/time on a valid calendar.
!     The options control the type of validation.
!
!     The arguments are:
!     \begin{description}
!     \item[time]
!          {\tt ESMF\_Time} instant to be validated.
!     \item[{[options]}]
!          Validation options. If none specified, validates all {\tt time} property
!            values. \\
!          "calendar" - validate only the {\tt time}'s calendar. \\
!          "timezone" - validate only the {\tt time}'s timezone. \\
!     \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_SHALLOW(ESMF_TimeGetInit,time,rc)
   
      ! invoke C to C++ entry point
      call c_ESMC_TimeValidate(time, options, localrc)
      if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return

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