?? mfm_timemgr.f
字號:
!===============================================================================! MFM_TimeMgr Class!===============================================================================! ! The Time Manager class is part of the Modeling Framework Time Management ! module (MFM_TimeMgmt). A Time Manager object stores the step size, start, ! stop and base dates of a model run. It advances the model date with each ! completed timestep.!! Public Member Functions:! ------------------------! MFM_TimeMgrInit (Interface only)! MFM_TimeMgrSetStepSize (Interface only)! MFM_TimeMgrGetStepSize (Interface only)! MFM_TimeMgrRestartGet (Interface only)! MFM_TimeMgrRestartSet (Interface only)! MFM_TimeMgrAdvance! MFM_TimeMgrGetNStep! MFM_TimeMgrSetNStep! MFM_TimeMgrGetStartDate! MFM_TimeMgrGetStopDate! MFM_TimeMgrGetBaseDate! MFM_TimeMgrGetCurrDate ! MFM_TimeMgrSetCurrDate (Interface only)! MFM_TimeMgrGetPrevDate!! Private Member Functions:! -------------------------! MFM_TimeMgrInitStd (overloads MFM_TimeMgrInit)! MFM_TimeMgrInitIS (overloads MFM_TimeMgrInit)! MFM_TimeMgrInitNoBaseStd (overloads MFM_TimeMgrInit)! MFM_TimeMgrInitNoBaseIS (overloads MFM_TimeMgrInit)! MFM_TimeMgrSetStepSizeStd (overloads MFM_SetStepSize)! MFM_TimeMgrSetStepSizeIS (overloads MFM_SetStepSize)! MFM_TimeMgrGetStepSizeStd (overloads MFM_GetStepSize)! MFM_TimeMgrGetStepSizeIS (overloads MFM_GetStepSize)! MFM_TimeMgrSetCurrDateIS (overloads MFM_TimeMgrSetCurrDate)! MFM_TimeMgrRestartWriteIS (overloads MFM_TimeMGrRestartWrite)! MFM_TimeMgrRestartReadIS (overloads MFM_TimeMGrRestartRead)!!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrInitStd!! !INTERFACE: function MFM_TimeMgrInitStd(stepSize, startDate, & stopDate, baseDate, rc)! !RETURN VALUE: type(MFM_TimeMgr) :: MFM_TimeMgrInitStd ! return a new time manager! !PARAMETERS: type(MFM_Time), intent(in) :: stepSize ! step size type(MFM_Date), intent(in) :: startDate ! start date type(MFM_Date), intent(in) :: stopDate ! stop date type(MFM_Date), intent(in) :: baseDate ! base date integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! General initialization for a new time manager object.!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrInit(MFM_TimeMgrInitStd, stepSize, & startDate, stopDate, baseDate, stub) if (present(rc)) rc = stub end function MFM_TimeMgrInitStd!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrInitIS!! !INTERFACE: function MFM_TimeMgrInitIS(stepDays, stepSecs, & startCalendarDate, startTOD, & stopCalendarDate, stopTOD, & baseCalendarDate, baseTOD, & type, rc) ! !RETURN VALUE: type(MFM_TimeMgr) :: MFM_TimeMgrInitIS ! new time manager with ! integer second granularity! !PARAMETERS: integer, intent(in) :: stepDays ! days in time step integer, intent(in) :: stepSecs ! seconds in time step integer, intent(in) :: startCalendarDate ! start date integer, intent(in) :: startTOD ! start time of day integer, intent(in) :: stopCalendarDate ! stop date integer, intent(in) :: stopTOD ! stop time of day integer, intent(in) :: baseCalendarDate ! base date integer, intent(in) :: baseTOD ! base time of day integer, intent(in) :: type ! calendar type integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Initializes a new time manager for climate-type models with ! integer second temporal discretization.!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrInitIS(MFM_TimeMgrInitIS, & stepDays, stepSecs, startCalendarDate, & startTOD, stopCalendarDate, stopTOD, & baseCalendarDate, baseTOD, type, stub) if (present(rc)) rc = stub end function MFM_TimeMgrInitIS!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrInitNoBaseStd!! !INTERFACE: function MFM_TimeMgrInitNoBaseStd(stepSize, startDate, & stopDate, rc) ! !RETURN VALUE: type(MFM_TimeMgr) :: MFM_TimeMgrInitNoBaseStd ! return a new time manager! !PARAMETERS: type(MFM_Time), intent(in) :: stepSize ! step size type(MFM_Date), intent(in) :: startDate ! start date type(MFM_Date), intent(in) :: stopDate ! stop date integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! General initialization for a new time manager object. No base! date is supplied (it is set by default to the start date).!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrInitNoBase(MFM_TimeMgrInitNoBaseStd, stepSize, & startDate, stopDate, stub) if (present(rc)) rc = stub end function MFM_TimeMgrInitNoBaseStd!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrInitNoBaseIS!! !INTERFACE: function MFM_TimeMgrInitNoBaseIS(stepDays, stepSecs, & startCalendarDate, startTOD, & stopCalendarDate, stopTOD, & type, rc) ! !RETURN VALUE: type(MFM_TimeMgr) :: MFM_TimeMgrInitNoBaseIS ! new time manager with ! integer second granularity! !PARAMETERS: integer, intent(in) :: stepDays ! days in time step integer, intent(in) :: stepSecs ! seconds in time step integer, intent(in) :: startCalendarDate ! start date integer, intent(in) :: startTOD ! start time of day integer, intent(in) :: stopCalendarDate ! stop date integer, intent(in) :: stopTOD ! stop time of day integer, intent(in) :: type ! calendar type integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Initializes a new time manager for climate-type models with ! integer second discretization. No base date is supplied (it is ! set by default to the start date).!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrInitNoBaseIS(MFM_TimeMgrInitNoBaseIS, & stepDays, stepSecs, startCalendarDate, & startTOD, stopCalendarDate, stopTOD, type, stub) if (present(rc)) rc = stub end function MFM_TimeMgrInitNoBaseIS!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrLastStep!! !INTERFACE: function MFM_TimeMgrLastStep(timeMgr, rc) ! !RETURN VALUE: logical :: MFM_TimeMgrLastStep ! return true if last step! !PARAMETERS: type(MFM_TimeMgr), intent(in) :: timeMgr ! time manager integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Returns true if the time manager's current date plus time step ! exceeds the stop date.!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrLastStep(timeMgr, MFM_TimeMgrLastStep, stub) if (present(rc)) rc = stub end function MFM_TimeMgrLastStep!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrAdvance!! !INTERFACE: subroutine MFM_TimeMgrAdvance(timeMgr, rc)! !PARAMETERS: type(MFM_TimeMgr), intent(inout) :: timeMgr ! time manager integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Advances time manager by one time step. Resets current date and! previous date.!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrAdvance(timeMgr, stub) if (present(rc)) rc = stub end subroutine MFM_TimeMgrAdvance!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrSetStepSizeStd!! !INTERFACE: subroutine MFM_TimeMgrSetStepSizeStd(timeMgr, stepSize, rc)! !PARAMETERS: type(MFM_TimeMgr), intent(inout) :: timeMgr ! time manager type(MFM_Time), intent(in) :: stepSize ! step size integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Resets the step size in the time manager to stepSize.!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrSetStepSizeStd(timeMgr, stepSize, stub) if (present(rc)) rc = stub end subroutine MFM_TimeMgrSetStepSizeStd!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrSetStepSizeIS!! !INTERFACE: subroutine MFM_TimeMgrSetStepSizeIS(timeMgr, days, seconds, rc)! !PARAMETERS: type(MFM_TimeMgr), intent(inout) :: timeMgr ! time manager integer, intent(in) :: days ! days integer, intent(in) :: seconds ! seconds integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Resets the step size in the time manager using {\tt days} and ! {\tt seconds}.!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrSetStepSizeIS(timeMgr, days, seconds, stub) if (present(rc)) rc = stub end subroutine MFM_TimeMgrSetStepSizeIS!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrGetNStep!! !INTERFACE: function MFM_TimeMgrGetNStep(timeMgr, rc) ! !RETURN VALUE: integer :: MFM_TimeMgrGetNStep ! returned number of time steps! !PARAMETERS: type(MFM_TimeMgr), intent(in) :: timeMgr ! time manager integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Gets the number of time steps in the time manager.!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrGetNStep(timeMgr, MFM_TimeMgrGetNStep, stub) if (present(rc)) rc = stub end function MFM_TimeMgrGetNStep!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrSetNStep!! !INTERFACE: subroutine MFM_TimeMgrSetNStep(timeMgr, nstep, rc) ! !PARAMETERS: type(MFM_TimeMgr), intent(in) :: timeMgr ! time manager integer, intent(in) :: nstep ! New nstep integer, intent(out), optional :: rc ! return code! !DESCRIPTION:! Sets the number of time steps in the time manager.!!EOP!------------------------------------------------------------------------------- integer stub call MF_TimeMgrSetNStep(timeMgr, nstep, stub) if (present(rc)) rc = stub end subroutine MFM_TimeMgrSetNStep!===============================================================================!BOP!! !IROUTINE: MFM_TimeMgrGetStepSizeIS!! !INTERFACE: subroutine MFM_TimeMgrGetStepSizeIS(timeMgr, days, seconds, rc)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -