ESMF_Times_Equal Function

public function ESMF_Times_Equal(timeu, timev) result(tval)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Time), intent(in) :: timeu
type(ESMF_Time), intent(in) :: timev

Return Value logical


Calls

proc~~esmf_times_equal~~CallsGraph proc~esmf_times_equal ESMF_Times_Equal ESMF_TimeGet ESMF_TimeGet proc~esmf_times_equal->ESMF_TimeGet proc~rational_equals rational_equals proc~esmf_times_equal->proc~rational_equals

Called by

proc~~esmf_times_equal~~CalledByGraph proc~esmf_times_equal ESMF_Times_Equal proc~test_convert_netcdf_datetime_to_esmf_integer test_convert_NetCDF_DateTime_to_ESMF_integer proc~test_convert_netcdf_datetime_to_esmf_integer->proc~esmf_times_equal proc~test_convert_netcdf_datetime_to_esmf_real test_convert_NetCDF_DateTime_to_ESMF_real proc~test_convert_netcdf_datetime_to_esmf_real->proc~esmf_times_equal

Source Code

   function ESMF_Times_Equal(timeu, timev) result(tval)
      type(ESMF_Time), intent(in) :: timeu, timev
      logical :: tval
      integer :: uyy, umm, udd, uh, um, us, usN, usD
      integer :: vyy, vmm, vdd, vh, vm, vs, vsN, vsD
      integer :: status

      tval = .FALSE.
      call ESMF_TimeGet(timeu, yy=uyy, mm=umm, dd=udd, h=uh, m=um, d=us, sN=usN, sD=usD, rc = status)
      if(status /= _SUCCESS) return
      call ESMF_TimeGet(timev, yy=vyy, mm=vmm, dd=vdd, h=vh, m=vm, d=vs, sN=vsN, sD=vsD, rc = status)
      if(status /= _SUCCESS) return

      tval = ( (uyy == vyy) .and. (umm == vmm) .and. (udd == vdd) &
         .and. (uh == vh) .and. (um == vm) .and. (us == vs) &
         .and. rational_equals([usN, usD], [vsN, vsD]) )

   end function ESMF_Times_Equal