ESMF_TimeIsSameCalendar Function

public function ESMF_TimeIsSameCalendar(time1, time2, keywordEnforcer, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Time), intent(in) :: time1
type(ESMF_Time), intent(in) :: time2
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(out), optional :: rc

Return Value logical


Source Code

      function ESMF_TimeIsSameCalendar(time1, time2, keywordEnforcer, rc)

! !RETURN VALUE:
      logical :: ESMF_TimeIsSameCalendar

! !ARGUMENTS:
      type(ESMF_Time), intent(in)            :: time1
      type(ESMF_Time), intent(in)            :: time2
      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:
!     Returns {\tt .true.} if the Calendars in these Times are
!     the same, {\tt .false.} otherwise.
!
!     The arguments are:
!     \begin{description}
!     \item[time1]
!          The first {\tt ESMF\_Time} in comparison.
!     \item[time2]
!          The second {\tt ESMF\_Time} in comparison.
!     \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

      ! Initialize output value in case of error
      ESMF_TimeIsSameCalendar = .false.

      ! check inputs
      ESMF_INIT_CHECK_SHALLOW(ESMF_TimeGetInit,time1,rc)
      ESMF_INIT_CHECK_SHALLOW(ESMF_TimeGetInit,time2,rc)

      ! invoke C to C++ entry point
      call c_ESMC_TimeIsSameCalendar(time1, time2, ESMF_TimeIsSameCalendar, localrc)
      if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
        ESMF_CONTEXT, rcToReturn=rc)) return

      ! Return success
      if (present(rc)) rc = ESMF_SUCCESS    
      end function ESMF_TimeIsSameCalendar