📄 esmf_datemod.f
字号:
! !DESCRIPTION:! Returns the calendar type of {\tt date}. Valid values are:! ESMF\_CALENDAR\_TYPE\_UNDEFINED = 0, ESMF\_NO\_LEAP = 1, ! ESMF\_GREGORIAN = 2, ESMF\_360\_DAY = 3!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DateGetCalendarType(date, & ESMF_DateGetCalendarType, stub) if (present(rc)) rc = stub end function ESMF_DateGetCalendarType!===============================================================================!BOP!! !IROUTINE: ESMF_DateCopy!! !INTERFACE: subroutine ESMF_DateCopy(date, orig, rc)! !PARAMETERS: type(ESMF_Date), intent(out) :: date ! copy of original date type(ESMF_Date), intent(in) :: orig ! original date integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Copies the date {\tt orig} to {\tt date}.!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DateCopy(date, orig, stub) if (present(rc)) rc = stub end subroutine ESMF_DateCopy!===============================================================================!BOP!! !IROUTINE: ESMF_DateDiff!! !INTERFACE: subroutine ESMF_DateDiff(earlyDate, lateDate, diff, isLater, rc)! !PARAMETERS: type(ESMF_Date), intent(in) :: earlyDate ! earlier date type(ESMF_Date), intent(in) :: lateDate ! later date type(ESMF_Time), intent(out) :: diff ! time difference between dates logical, intent(out) :: isLater ! true if late date is ! actually later integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Determines the time difference between two dates and returns a ! logical indicator as to which date is later.!!EOP!------------------------------------------------------------------------------- integer stub; call ESMC_DateDiff(earlyDate, lateDate, diff, isLater, stub) if (present(rc)) rc = stub end subroutine ESMF_DateDiff!===============================================================================!BOP!! !IROUTINE: ESMF_DateIsLater!! !INTERFACE: subroutine ESMF_DateIsLater(earlyDate, lateDate, isLater, rc) ! !PARAMETERS: type(ESMF_Date), intent(in) :: earlyDate ! earlier date type(ESMF_Date), intent(in) :: lateDate ! later date logical, intent(out) :: isLater ! true if late date is ! actually later integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Returns true if {\tt lateDate} is later than {\tt earlyDate}.!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DateIsLater(earlyDate, lateDate, isLater, stub) if (present(rc)) rc = stub end subroutine ESMF_DateIsLater!===============================================================================!BOP!! !IROUTINE: ESMF_DateIncrement!! !INTERFACE: function ESMF_DateIncrement(date, time, rc)! !RETURN VALUE: type(ESMF_Date) :: ESMF_DateIncrement ! returns incremented date! !PARAMETERS: type(ESMF_Date), intent(in) :: date ! original date type(ESMF_Time), intent(in) :: time ! time increment integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Increments {\tt date} by {\tt time} and returns the result.!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DateInitUndefined(ESMF_DateIncrement, stub) if (stub == ESMF_SUCCESS) then call ESMC_DateIncrement(date, ESMF_DateIncrement, time, stub) end if if (present(rc)) rc = stub end function ESMF_DateIncrement!===============================================================================!BOP! ! !IROUTINE: ESMF_DateIncrementSec!! !INTERFACE: function ESMF_DateIncrementSec(date, nsecs, rc)! !RETURN VALUE: type(ESMF_Date) :: ESMF_DateIncrementSec ! returns incremented date! !PARAMETERS: type(ESMF_Date), intent(in) :: date ! original date integer, intent(in) :: nsecs ! time increment in seconds integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Increments {\tt date} by {\tt nsecs} seconds and returns! the result.!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DateInitUndefined(ESMF_DateIncrementSec, stub) if (stub == ESMF_SUCCESS) then call ESMC_DateIncrementSec(date, ESMF_DateIncrementSec, nsecs, & stub) end if if (present(rc)) rc = stub end function ESMF_DateIncrementSec!===============================================================================!BOP! ! !IROUTINE: ESMF_DateIncrementDay!! !INTERFACE: function ESMF_DateIncrementDay(date, ndays, rc)! !RETURN VALUE: type(ESMF_Date) :: ESMF_DateIncrementDay ! returns incremented date! !PARAMETERS: type(ESMF_Date), intent(in) :: date ! original date integer, intent(in) :: ndays ! time increment in days integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Increments {\tt date} by {\tt ndays} days and returns! the result.!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DateInitUndefined(ESMF_DateIncrementDay, stub) if (stub == ESMF_SUCCESS) then call ESMC_DateIncrementDay(date, ESMF_DateIncrementDay, ndays, & stub) end if if (present(rc)) rc = stub end function ESMF_DateIncrementDay!===============================================================================!BOP! ! !IROUTINE: ESMF_DateIncrementMonth!! !INTERFACE: function ESMF_DateIncrementMonth(date, nmonths, rc)! !RETURN VALUE: type(ESMF_Date) :: ESMF_DateIncrementMonth ! returns incremented date! !PARAMETERS: type(ESMF_Date), intent(in) :: date ! original date integer, intent(in) :: nmonths ! time increment in months integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Increments {\tt date} by {\tt nmonths} months and returns! the result.!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DateInitUndefined(ESMF_DateIncrementMonth, stub) if (stub == ESMF_SUCCESS) then call ESMC_DateIncrementMonth(date, ESMF_DateIncrementMonth, & nmonths, stub) end if if (present(rc)) rc = stub end function ESMF_DateIncrementMonth!===============================================================================!BOP! ! !IROUTINE: ESMF_DateIncrementYear!! !INTERFACE: function ESMF_DateIncrementYear(date, nyears, rc)! !RETURN VALUE: type(ESMF_Date) :: ESMF_DateIncrementYear ! returns incremented date! !PARAMETERS: type(ESMF_Date), intent(in) :: date ! original date integer, intent(in) :: nyears ! time increment in years integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Increments {\tt date} by {\tt nyears} years and returns! the result.!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DateInitUndefined(ESMF_DateIncrementYear, stub) if (stub == ESMF_SUCCESS) then call ESMC_DateIncrementYear(date, & ESMF_DateIncrementYear, nyears, stub) end if if (present(rc)) rc = stub end function ESMF_DateIncrementYear!===============================================================================!BOP!! !IROUTINE: ESMF_DateDecrement!! !INTERFACE: function ESMF_DateDecrement(date, time, rc)! !RETURN VALUE: type(ESMF_Date) :: ESMF_DateDecrement ! returns decremented date! !PARAMETERS: type(ESMF_Date), intent(in) :: date ! original date type(ESMF_Time), intent(in) :: time ! time increment integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Decrements {\tt date} by {\tt time} and returns the result.!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DateInitUndefined(ESMF_DateDecrement, stub) if (stub == ESMF_SUCCESS) then call ESMC_DateDecrement(date, ESMF_DateDecrement, time, stub) end if if (present(rc)) rc = stub end function ESMF_DateDecrement!===============================================================================!BOP! ! !IROUTINE: ESMF_DatePrint!! !INTERFACE: subroutine ESMF_DatePrint(date, rc)! !PARAMETERS: type(ESMF_Date), intent(in) :: date ! date integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Prints the contents of {\tt date}.!!EOP!------------------------------------------------------------------------------- integer stub call ESMC_DatePrint(date, stub) if (present(rc)) rc = stub end subroutine ESMF_DatePrint end module
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -