Change history:
01/07/2021 Andres Perez Hortal: Group parameters into derived datatypes.!
Model control module
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private, | parameter | :: | ncal | = | 365 | The number of days in a year |
| integer, | private, | parameter | :: | ncal365(12) | = | (/31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/) | The number of days in each month |
For storing dates and times.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | year | ||||
| integer, | private | :: | month | ||||
| integer, | private | :: | day | ||||
| integer, | private | :: | hour | ||||
| integer, | private | :: | minute | ||||
| logical, | private | :: | allocated | = | .false. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(Datetime_t), | private, | pointer | :: | p | => | NULL() |
Structure used to store the model control parameter, like start datem current date, end date, etc.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(Datetime_t), | private | :: | model_datetime | The model's current datetime (continuously updated) |
|||
| type(Datetime_t), | private | :: | start_datetime | The start datetime |
|||
| type(Datetime_t), | private | :: | end_datetime | The end datetime |
|||
| integer, | private | :: | imont1 | The month used for computing seasonal forcing fields |
|||
| real(kind=p), | private | :: | tmonth | The fraction of the current month elapsed |
|||
| real(kind=p), | private | :: | tyear | The fraction of the current year elapsed |
|||
| integer, | private | :: | month_idx | = | 1 | Simulation month (star month=1) |
|
| integer, | private | :: | ndaycal(12,2) | The model calendar |
|||
| integer, | private | :: | diag_interval | Period (number of steps) for diagnostic print-out |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(ControlParams_t), | private, | pointer | :: | p | => | NULL() |
Checks whether two datetimes are equal.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Datetime_t), | intent(in) | :: | datetime1 | |||
| type(Datetime_t), | intent(in) | :: | datetime2 |
Initializes control structure with the default parameters.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ControlParams_t), | intent(inout), | target | :: | control_params | ||
| type(Datetime_t), | intent(in) | :: | start_datetime | |||
| type(Datetime_t), | intent(in) | :: | end_datetime | |||
| integer, | intent(in) | :: | diag_interval |
Updates the current datetime and related date variables.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ControlParams_t), | intent(inout), | target | :: | control_params |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ControlParams_t), | intent(inout), | target | :: | control_params |