?? mfm_date.f
字號:
! $Id: MFM_Date.F,v 1.3.2.1 2001/11/09 18:44:32 erik Exp $!===============================================================================! MFM_Date Class!===============================================================================!! Dates are part of the Modeling Framework Time Managment module (MFM_TimeMgmt). ! A date object stores the attributes of a calendar date, including year, ! month, day, and time of day. Gregorian (MFM_GREGORIAN) and no leap year ! (MFM_NO_LEAP) calendars are supported.!! Public Member Functions:! ------------------------! MFM_DateInit (Interface only)! MFM_DateSet (Interface only)! MFM_DateGet (Interface only)! MFM_DateGetDayOfYear! MFM_DateGetFltDayOfYear! MFM_DateGetCalendarType! MFM_DateCopy ! MFM_DateDiff! MFM_DateIsLater! MFM_DateIncrement! MFM_DateIncrementSec! MFM_DateIncrementDay! MFM_DateIncrementMonth! MFM_DateIncrementYear! MFM_DateDecrement! MFM_DatePrint!! Private Member Functions:! -------------------------! MFM_DateInitIS (overloads MFM_DateInit)! MFM_DateInitUndefined (overloads MFM_DateInit)! MFM_DateCopyInit (overloads MFM_DateInit)! MFM_DateSetIS (overloads MFM_DateSet)! MFM_DateGetIS (overloads MFM_DateGet)!!===============================================================================!BOP!! !IROUTINE: MFM_DateInitIS!! !INTERFACE: function MFM_DateInitIS(type, yearmmdd, tod, rc) ! !RETURN VALUE: type(MFM_Date) :: MFM_DateInitIS ! returned date object ! !PARAMETERS: integer, intent(in) :: type ! MFM_GREGORIAN or MFM_NO_LEAP integer, intent(in) :: yearmmdd ! calendar date integer, intent(in) :: tod ! time of day in seconds integer, intent(out), optional :: rc ! return code ! !DESCRIPTION:! Initializes a {\tt MFM\_Date} object.!!EOP!------------------------------------------------------------------------------- integer stub call MF_DateInitIS(MFM_DateInitIS, type, yearmmdd, tod, stub) if (present(rc)) rc = stub end function MFM_DateInitIS!===============================================================================!BOP!! !IROUTINE: MFM_DateInitUndefined!! !INTERFACE: function MFM_DateInitUndefined(rc) ! !RETURN VALUE: type(MFM_Date) :: MFM_DateInitUndefined ! returned date object ! !PARAMETERS: integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Initializes a {\tt MFM\_Date} object wih undefined contents. The! values of internal attributes are set to {\tt MFM\_TIME\_UNDEFINED}.!!EOP!------------------------------------------------------------------------------- integer stub call MF_DateInitUndefined(MFM_DateInitUndefined, stub) if (present(rc)) rc = stub end function MFM_DateInitUndefined!===============================================================================!BOP!! !IROUTINE: MFM_DateCopyInit!! !INTERFACE: function MFM_DateCopyInit(orig, rc) ! !RETURN VALUE: type(MFM_Date) :: MFM_DateCopyInit ! returned date object ! !PARAMETERS: type(MFM_Date), intent(in) :: orig ! original date integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Initializes a new date object to the contents of another date.!!EOP!------------------------------------------------------------------------------- integer stub call MF_DateCopyInit(MFM_DateCopyInit, orig, stub) if (present(rc)) rc = stub end function MFM_DateCopyInit!===============================================================================!BOP!! !IROUTINE: MFM_DateSetIS!! !INTERFACE: subroutine MFM_DateSetIS(date, type, yearmmdd, tod, rc)! !PARAMETERS: type(MFM_Date), intent(out) :: date ! date object integer, intent(in) :: type ! MFM_GREGORIAN or MFM_NO_LEAP integer, intent(in) :: yearmmdd ! calendar date integer, intent(in) :: tod ! time of day integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Sets the attributes of a date object.!!EOP!------------------------------------------------------------------------------- integer stub call MF_DateSetIS(date, type, yearmmdd, tod, stub) if (present(rc)) rc = stub end subroutine MFM_DateSetIS!===============================================================================!BOP!! !IROUTINE: MFM_DateGetIS!! !INTERFACE: subroutine MFM_DateGetIS(date, yearmmdd, tod, rc)! !PARAMETERS: type(MFM_Date), intent(in) :: date ! date object integer, intent(out) :: yearmmdd ! calendar date integer, intent(out) :: tod ! time of day integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Returns the attributes of a {\tt date}.!!EOP!------------------------------------------------------------------------------- integer stub call MF_DateGetIS(date, yearmmdd, tod, stub) if (present(rc)) rc = stub end subroutine MFM_DateGetIS!===============================================================================!BOP!! !IROUTINE: MFM_DateGetDayOfYear!! !INTERFACE: function MFM_DateGetDayOfYear(date, rc)! !RETURN VALUE: integer :: MFM_DateGetDayOfYear ! returned day of year! !PARAMETERS: type(MFM_Date), intent(in) :: date ! date object integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Returns the day of the year corresponding to {\tt date}.!!EOP!------------------------------------------------------------------------------- integer stub call MF_DateGetDayOfYear(date, MFM_DateGetDayOfYear, stub) if (present(rc)) rc = stub end function MFM_DateGetDayOfYear!===============================================================================!BOP! ! !IROUTINE: MFM_DateGetFltDayOfYear!! !INTERFACE: function MFM_DateGetFltDayOfYear(date, rc)! !RETURN VALUE: real(8) :: MFM_DateGetFltDayOfYear ! Returns calendar day as intdays.seconds! !PARAMETERS: type(MFM_Date), intent(in) :: date ! date integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Returns the calendar day as a float. The day of year is returned as! the integer part and the seconds/milliseconds are returned in the ! fractional part.!!EOP!------------------------------------------------------------------------------- integer stub call MF_DateGetFltDayOfYear(date, MFM_DateGetFltDayOfYear, stub) if (present(rc)) rc = stub end function MFM_DateGetFltDayOfYear!===============================================================================!BOP!! !IROUTINE: MFM_DateGetCalendarType!! !INTERFACE: function MFM_DateGetCalendarType(date, rc)! !RETURN VALUE: integer :: MFM_DateGetCalendarType ! returned calendar type! !PARAMETERS: type(MFM_Date), intent(in) :: date ! date object integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Returns the calendar type of {\tt date}. Valid values are:! MFM\_CALENDAR\_TYPE\_UNDEFINED = 0, MFM\_NO\_LEAP = 1, ! MFM\_GREGORIAN = 2, MFM\_360\_DAY = 3!!EOP!------------------------------------------------------------------------------- integer stub call MF_DateGetCalendarType(date, MFM_DateGetCalendarType, stub) if (present(rc)) rc = stub end function MFM_DateGetCalendarType!===============================================================================!BOP!! !IROUTINE: MFM_DateCopy!! !INTERFACE: subroutine MFM_DateCopy(date, orig, rc)! !PARAMETERS: type(MFM_Date), intent(out) :: date ! copy of original date type(MFM_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 MF_DateCopy(date, orig, stub) if (present(rc)) rc = stub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -