date Module

For keeping track of the model's date and time.


Used by

  • module~~date~~UsedByGraph module~date date proc~couple_land_atm couple_land_atm proc~couple_land_atm->module~date module~interpolation interpolation proc~couple_land_atm->module~interpolation proc~couple_sea_atm couple_sea_atm proc~couple_sea_atm->module~date proc~couple_sea_atm->module~interpolation proc~set_forcing set_forcing proc~set_forcing->module~date proc~sea_model_init sea_model_init proc~sea_model_init->module~date proc~initialize initialize proc~initialize->module~date module~interpolation->module~date proc~obs_ssta obs_ssta proc~obs_ssta->module~date program~speedy speedy program~speedy->module~date proc~output output proc~output->module~date

Contents


Variables

TypeVisibility AttributesNameInitial
type(datetime), public :: model_datetime

The model's current datetime (continuously updated)

type(datetime), public :: start_datetime

The start datetime

type(datetime), public :: end_datetime

The end datetime

integer, public :: imont1

The month used for computing seasonal forcing fields

real, public :: tmonth

The fraction of the current month elapsed

real, public :: tyear

The fraction of the current year elapsed

integer, public :: isst0

Initial month of SST anomalies

integer, public :: ndaycal(12,2)

The model calendar

integer, private, parameter:: ncal =365

The number of days in a year

integer, private :: ncal365(12) =(/31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/)

The number of days in each month


Derived Types

type, private :: datetime

For storing dates and times.

Components

TypeVisibility AttributesNameInitial
integer, public :: year
integer, public :: month
integer, public :: day
integer, public :: hour
integer, public :: minute

Functions

public function datetime_equal(datetime1, datetime2)

Checks whether two datetimes are equal.

Arguments

Type IntentOptional AttributesName
type(datetime), intent(in) :: datetime1
type(datetime), intent(in) :: datetime2

Return Value logical


Subroutines

public subroutine initialize_date()

Initializes model date and calendar.

Arguments

None

public subroutine newdate()

Updates the current datetime and related date variables.

Arguments

None