Internal module for dc_date. More...
Functions/Subroutines | |
| subroutine, public | dcdate_normalize (day, sec, day_seconds, nondim_flag) |
| subroutine, public | dcdate_set_day_seconds_scl |
| subroutine, public | dcdate_nondimcheck (opr, diff1, diff2, rslt) |
| character(token) function, public | dcdate_parse_unit (str) |
Internal module for dc_date.
This module provides internal constants, variables, and procedures used by the dc_date module. These are for internal use only and should not be used outside of dc_date module.
| Procedure | Description |
|---|---|
| dcdate_normalize | Normalize day and seconds |
| dcdate_set_day_seconds_scl | Set scaled seconds for day |
| dcdate_nondimcheck | Check dimensionality consistency |
| dcdate_parse_unit | Parse time unit string |
| subroutine, public dc_date_internal::dcdate_nondimcheck | ( | character(*), intent(in) | opr, |
| type(dc_difftime), intent(in) | diff1, | ||
| type(dc_difftime), intent(in) | diff2, | ||
| type(dc_difftime), intent(inout) | rslt ) |
Check dimensionality consistency
Checks whether diff1 and diff2 are both dimensional or both non-dimensional, and applies the result to rslt. If one is dimensional and the other is non-dimensional, an error is raised.
This is an internal subroutine and should not be used outside of dc_date module.
| [in] | opr | Name of the operator |
| [in] | diff1 | First operand |
| [in] | diff2 | Second operand |
| [in,out] | rslt | Result operand |
Definition at line 186 of file dc_date_internal.f90.
References dc_error::dc_edimtime, and dc_error::storeerror().
| subroutine, public dc_date_internal::dcdate_normalize | ( | type(dc_scaled_sec), intent(inout) | day, |
| type(dc_scaled_sec), intent(inout) | sec, | ||
| type(dc_scaled_sec), intent(in), optional | day_seconds, | ||
| logical, intent(in) | nondim_flag ) |
Normalize day and seconds
Normalizes day and seconds values. If sec exceeds day_seconds, the excess is carried over to day. Also ensures that sec and day have the same sign.
This is an internal subroutine and should not be used outside of dc_date module.
| [in,out] | day | Day value |
| [in,out] | sec | Second value |
| [in] | day_seconds | Seconds in a day (optional) |
| [in] | nondim_flag | Non-dimensional flag |
Definition at line 93 of file dc_date_internal.f90.
References dc_date_types::day_seconds, dc_date_types::day_seconds_scl, dcdate_set_day_seconds_scl(), and dc_date_types::flag_set_day_seconds_scl.
| character(token) function, public dc_date_internal::dcdate_parse_unit | ( | character(*), intent(in) | str | ) |
Parse time unit string and return symbol
Interprets the string str and returns the time unit symbol. The following strings are interpreted as time units (case insensitive):
| Unit | Symbol constant |
|---|---|
| year | UNIT_SYMBOL_YEAR |
| month | UNIT_SYMBOL_MONTH |
| day | UNIT_SYMBOL_DAY |
| hour | UNIT_SYMBOL_HOUR |
| minute | UNIT_SYMBOL_MIN |
| second | UNIT_SYMBOL_SEC |
| non-dimensional | UNIT_SYMBOL_NONDIM |
If str does not match any of these, UNIT_SYMBOL_ERR is returned.
| [in] | str | Input unit string |
Parse time unit string and return unit string
Interprets the string str and returns the time unit string. Case insensitive. Returns the first element of the unit array. Returns empty string for unrecognized unit.
This is an internal function and should not be used outside of dc_date module.
| [in] | str | Input unit string |
Definition at line 277 of file dc_date_internal.f90.
References dc_types::token, dc_date_types::unit_day, dc_date_types::unit_hour, dc_date_types::unit_min, dc_date_types::unit_month, dc_date_types::unit_nondim, dc_date_types::unit_sec, and dc_date_types::unit_year.
| subroutine, public dc_date_internal::dcdate_set_day_seconds_scl |
Set scaled seconds for day
Sets the scaled seconds value for day_seconds_scl.
Definition at line 140 of file dc_date_internal.f90.
References dc_date_types::day_seconds, dc_date_types::day_seconds_scl, and dc_date_types::flag_set_day_seconds_scl.