time.sim
Purpose¶
time.sim sets the simulation start date, end date, and the sub-daily time step. All time-driven processes (climate reads, routing, output aggregation) use these values.
Source¶
- Reader:
src/time_read.f90 - Type definition:
src/time_module.f90,type time_current
Format¶
- Line 1: title line. Skipped.
- Line 2: header line. Skipped.
- Line 3: five integer values, list-directed.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | day_start | int | Julian day of year on which the simulation starts (1 to 366) |
| 2 | yrc_start | int | Calendar year on which the simulation starts |
| 3 | day_end | int | Julian day of year on which the simulation ends |
| 4 | yrc_end | int | Calendar year on which the simulation ends |
| 5 | step | int | Sub-daily time step code (see below) |
Sub-daily time step values¶
The type definition in time_module.f90 documents these step codes:
| Value | Meaning |
|---|---|
| 0 | daily |
| 1 | 12-hour increment |
| 24 | hourly |
| 96 | 15 minutes |
| 1440 | per minute |
Defaults and derived values¶
The reader applies these adjustments after parsing:
step <= 0is forced to1.day_start <= 0is forced to1.time%nbyris set toyrc_end - yrc_start + 1.time%mo,time%day_mo, andtime%mo_startare computed fromday_startvia thexmonhelper.time%yrcis initialised toyrc_start.
Example¶
refdata/Ames_sub1/time.sim:
This runs from 1 Jan 1975 through 31 Dec 2020 (the zero values for day_start and day_end are interpreted as the first and last day of the year). The step value of 0 is forced to 1 by the reader.
Related files¶
print.prt. Controls which outputs are written within this simulation window.
Important¶
Potential bug. The type documentation in time_module.f90 describes step = 0 as "daily", but the reader explicitly coerces 0 to 1 (12-hour increment). The two are inconsistent. A user setting step = 0 expecting daily routing gets a 12-hour increment. Verify which behaviour is intended before relying on step = 0.