Derived types and parameters for date and time. More...
Data Types | |
| type | dc_datetime |
| type | dc_difftime |
Variables | |
Calendar type parameters | |
| integer, parameter, public | cal_cyclic = 1 |
| Cyclic calendar (30.6 days per month) | |
| integer, parameter, public | cal_noleap = 2 |
| Calendar without leap years (365 days per year) | |
| integer, parameter, public | cal_julian = 3 |
| Julian calendar | |
| integer, parameter, public | cal_gregorian = 4 |
| Gregorian calendar | |
| integer, dimension(0:3), parameter, public | prepared_caltypes = (/CAL_CYCLIC, CAL_NOLEAP, CAL_JULIAN, CAL_GREGORIAN/) |
| Array of prepared calendar types | |
| integer, save, public | caltype = CAL_GREGORIAN |
| Default calendar type (Gregorian) | |
Time unit conversion parameters | |
| real(dp), parameter, public | cyclic_mdays = 30.6_DP |
| Days per month for cyclic calendar (also used for DC_DIFFTIME) | |
| integer, parameter, public | min_seconds = 60 |
| Seconds per minute | |
| integer, parameter, public | hour_seconds = 3600 |
| Seconds per hour | |
| real(dp), parameter, public | day_seconds_earth = 86400.0_DP |
| Seconds per day on Earth | |
| real(dp), save, public | day_seconds = DAY_SECONDS_EARTH |
| Seconds per day (variable, default is Earth day) | |
| type(dc_scaled_sec), save, public | day_seconds_scl |
| Seconds per day (DC_SCALED_SEC type) | |
| logical, save, public | flag_set_day_seconds_scl = .false. |
| Flag indicating if day_seconds_scl is set | |
| integer, parameter, public | year_days = 365 |
| Days per year (non-leap year) | |
| integer, parameter, public | year_months = 12 |
| Months per year | |
| integer, parameter, public | four_years = YEAR_DAYS * 4 + 1 |
| Days in 4 years (including leap year) | |
| integer, parameter, public | four_century = YEAR_DAYS * 400 + 97 |
| Days in 400 years | |
Unit string parameters | |
| character(*), dimension(1), parameter, public | unit_nondim = (/ '1' /) |
| Strings recognized as nondimensional unit | |
| character(*), dimension(8), parameter, public | unit_sec = (/ 'seconds', 'second ', 'secs. ', 'secs ', 'sec. ', 'sec ', 's. ', 's '/) |
| Strings recognized as second unit | |
| character(*), dimension(4), parameter, public | unit_min = (/ 'minutes', 'minute ', 'min. ', 'min '/) |
| Strings recognized as minute unit | |
| character(*), dimension(8), parameter, public | unit_hour = (/ 'hours', 'hour ', 'hrs. ', 'hrs ', 'hr. ', 'hr ', 'h. ', 'h '/) |
| Strings recognized as hour unit | |
| character(*), dimension(4), parameter, public | unit_day = (/ 'days', 'day ', 'd. ', 'd '/) |
| Strings recognized as day unit | |
| character(*), dimension(6), parameter, public | unit_month = (/ 'months', 'month ', 'mon. ', 'mon ', 'mo. ', 'mo '/) |
| Strings recognized as month unit | |
| character(*), dimension(4), parameter, public | unit_year = (/ 'years', 'year ', 'yr. ', 'yr '/) |
| Strings recognized as year unit | |
Unit symbol parameters | |
| integer, parameter, public | unit_symbol_err = -1 |
| Symbol for invalid unit | |
| integer, parameter, public | unit_symbol_nondim = 1 |
| Symbol for nondimensional unit | |
| integer, parameter, public | unit_symbol_sec = 2 |
| Symbol for second unit | |
| integer, parameter, public | unit_symbol_min = 3 |
| Symbol for minute unit | |
| integer, parameter, public | unit_symbol_hour = 4 |
| Symbol for hour unit | |
| integer, parameter, public | unit_symbol_day = 5 |
| Symbol for day unit | |
| integer, parameter, public | unit_symbol_month = 6 |
| Symbol for month unit | |
| integer, parameter, public | unit_symbol_year = 7 |
| Symbol for year unit | |
Derived types and parameters for date and time.
Derived types, variables, parameters for "dc_date" are provided. Calendar information is also managed in this module.
| Type | Description |
|---|---|
| DC_DATETIME | Represents date-time as a pair of ordinal day and second |
| DC_DIFFTIME | Represents time difference like "X months later" or "X days ago" |
| Parameter | Description |
|---|---|
| UNIT_NONDIM | Strings for nondimensional unit |
| UNIT_SEC | Strings for second unit |
| UNIT_MIN | Strings for minute unit |
| UNIT_HOUR | Strings for hour unit |
| UNIT_DAY | Strings for day unit |
| UNIT_MONTH | Strings for month unit |
| UNIT_YEAR | Strings for year unit |
| UNIT_SYMBOL_* | Integer symbols for units |
| Parameter | Description |
|---|---|
| CAL_CYCLIC | Cyclic calendar (30.6 days per month) |
| CAL_NOLEAP | Calendar without leap years (365 days/year) |
| CAL_JULIAN | Julian calendar |
| CAL_GREGORIAN | Gregorian calendar |
| Parameter | Description |
|---|---|
| CYCLIC_MDAYS | Days per month for cyclic calendar (30.6) |
| DAY_SECONDS_EARTH | Seconds per day on Earth (86400) |
| MIN_SECONDS | Seconds per minute (60) |
| HOUR_SECONDS | Seconds per hour (3600) |
| YEAR_MONTHS | Months per year (12) |
| YEAR_DAYS | Days per year (non-leap year, 365) |
| FOUR_YEARS | Days in 4 years |
| FOUR_CENTURY | Days in 400 years |
| integer, parameter, public dc_date_types::cal_cyclic = 1 |
Cyclic calendar (30.6 days per month)
A calendar where each month has 30.6 days (CYCLIC_MDAYS). (e.g., month 0: 1-30 (30.6), month 1: 1-31 (61.2), month 2: 1-30 (91.8), month 3: 1-31 (122.4), ...) Intended for use in experiments with virtual time.
Definition at line 152 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::cal_gregorian = 4 |
Gregorian calendar
Definition at line 164 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::cal_julian = 3 |
Julian calendar
Definition at line 160 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::cal_noleap = 2 |
Calendar without leap years (365 days per year)
Definition at line 156 of file dc_date_types.f90.
| integer, save, public dc_date_types::caltype = CAL_GREGORIAN |
Default calendar type (Gregorian)
Definition at line 173 of file dc_date_types.f90.
| real(dp), parameter, public dc_date_types::cyclic_mdays = 30.6_DP |
Days per month for cyclic calendar (also used for DC_DIFFTIME)
Definition at line 188 of file dc_date_types.f90.
| real(dp), save, public dc_date_types::day_seconds = DAY_SECONDS_EARTH |
Seconds per day (variable, default is Earth day)
Definition at line 204 of file dc_date_types.f90.
| real(dp), parameter, public dc_date_types::day_seconds_earth = 86400.0_DP |
Seconds per day on Earth
Definition at line 200 of file dc_date_types.f90.
| type(dc_scaled_sec), save, public dc_date_types::day_seconds_scl |
Seconds per day (DC_SCALED_SEC type)
Definition at line 208 of file dc_date_types.f90.
| logical, save, public dc_date_types::flag_set_day_seconds_scl = .false. |
Flag indicating if day_seconds_scl is set
Definition at line 212 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::four_century = YEAR_DAYS * 400 + 97 |
Days in 400 years
Definition at line 228 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::four_years = YEAR_DAYS * 4 + 1 |
Days in 4 years (including leap year)
Definition at line 224 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::hour_seconds = 3600 |
Seconds per hour
Definition at line 196 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::min_seconds = 60 |
Seconds per minute
Definition at line 192 of file dc_date_types.f90.
| integer, dimension(0:3), parameter, public dc_date_types::prepared_caltypes = (/CAL_CYCLIC, CAL_NOLEAP, CAL_JULIAN, CAL_GREGORIAN/) |
Array of prepared calendar types
Definition at line 168 of file dc_date_types.f90.
| character(*), dimension(4), parameter, public dc_date_types::unit_day = (/ 'days', 'day ', 'd. ', 'd '/) |
Strings recognized as day unit
Definition at line 265 of file dc_date_types.f90.
| character(*), dimension(8), parameter, public dc_date_types::unit_hour = (/ 'hours', 'hour ', 'hrs. ', 'hrs ', 'hr. ', 'hr ', 'h. ', 'h '/) |
Strings recognized as hour unit
Definition at line 259 of file dc_date_types.f90.
| character(*), dimension(4), parameter, public dc_date_types::unit_min = (/ 'minutes', 'minute ', 'min. ', 'min '/) |
Strings recognized as minute unit
Definition at line 254 of file dc_date_types.f90.
| character(*), dimension(6), parameter, public dc_date_types::unit_month = (/ 'months', 'month ', 'mon. ', 'mon ', 'mo. ', 'mo '/) |
Strings recognized as month unit
Definition at line 270 of file dc_date_types.f90.
| character(*), dimension(1), parameter, public dc_date_types::unit_nondim = (/ '1' /) |
Strings recognized as nondimensional unit
Definition at line 243 of file dc_date_types.f90.
| character(*), dimension(8), parameter, public dc_date_types::unit_sec = (/ 'seconds', 'second ', 'secs. ', 'secs ', 'sec. ', 'sec ', 's. ', 's '/) |
Strings recognized as second unit
Definition at line 248 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::unit_symbol_day = 5 |
Symbol for day unit
Definition at line 312 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::unit_symbol_err = -1 |
Symbol for invalid unit
Definition at line 292 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::unit_symbol_hour = 4 |
Symbol for hour unit
Definition at line 308 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::unit_symbol_min = 3 |
Symbol for minute unit
Definition at line 304 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::unit_symbol_month = 6 |
Symbol for month unit
Definition at line 316 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::unit_symbol_nondim = 1 |
Symbol for nondimensional unit
Definition at line 296 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::unit_symbol_sec = 2 |
Symbol for second unit
Definition at line 300 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::unit_symbol_year = 7 |
Symbol for year unit
Definition at line 320 of file dc_date_types.f90.
| character(*), dimension(4), parameter, public dc_date_types::unit_year = (/ 'years', 'year ', 'yr. ', 'yr '/) |
Strings recognized as year unit
Definition at line 276 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::year_days = 365 |
Days per year (non-leap year)
Definition at line 216 of file dc_date_types.f90.
| integer, parameter, public dc_date_types::year_months = 12 |
Months per year
Definition at line 220 of file dc_date_types.f90.