Module for handling timing in CABLE.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | seconds_per_hour | = | 3600 | |
| integer, | public, | parameter | :: | hours_per_day | = | 24 | |
| integer, | public, | parameter | :: | seconds_per_day | = | 86400 | |
| integer, | public, | parameter | :: | months_in_year | = | 12 | |
| integer, | private, | parameter, dimension(months_in_year) | :: | last_day | = | [31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365] |
Cumulative day of year at the end of each month for a non-leap year. |
| integer, | private, | parameter, dimension(months_in_year) | :: | last_day_leap | = | [31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366] |
Cumulative day of year at the end of each month for a leap year. |
| character(len=16), | public, | parameter | :: | cable_timing_frequencies(5) | = | [character(len=16)::"timestep", "3hrly", "daily", "monthly", "yearly"] |
Frequencies at which output can be written, from finest to coarsest. |
| integer, | private, | parameter | :: | START_YEAR_UNDEFINED | = | -1 | |
| integer, | private | :: | start_year | = | START_YEAR_UNDEFINED |
Start year of the simulation. |
Position of frequency in cable_timing_frequencies, from finest (1) to
coarsest, or 0 if it is not a known frequency.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | frequency |
The date elapsed_days after the given day of the given year, as YYYY-MM-DD.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | start_year |
Year of the starting date. |
||
| integer, | intent(in) | :: | start_day_of_year |
Day of the year of the starting date, from 1. |
||
| integer, | intent(in) | :: | elapsed_days |
Days after the starting date; not negative. |
||
| logical, | intent(in) | :: | leap_years |
Whether leap years have 366 days. |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | year | |||
| logical, | intent(in) | :: | leap_years |
Determines whether the current time step is the end of a period of the given frequency.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(in) | :: | dels |
Model time step in seconds |
||
| integer, | intent(in) | :: | ktau |
Current time step index |
||
| character(len=*), | intent(in) | :: | frequency |
One of |
Set the start year of the simulation. This is used for calculating monthly timing.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | year |