Internal module for dc_calendar. More...
Functions/Subroutines | |
| subroutine, public | default_cal_set |
| integer function, public | dccaldate_normalize (year, month, day, hour, min, sec, cal) |
| integer function, public | dccaldate_ym2d (year, month, day, cal, day_of_year) |
| character(token) function, public | dccaltype_str (cal_type) |
| character(token) function, public | dccaldate_str2ustr (str) |
| integer function, public | dccaldate_str2usym (str) |
Variables | |
| type(dc_cal), target, save, public | default_cal |
| Default calendar object | |
| type(dc_cal_date), target, save, public | default_date |
| Default date object | |
Internal module for dc_calendar.
| integer function, public dc_calendar_internal::dccaldate_normalize | ( | integer, intent(inout) | year, |
| integer, intent(inout) | month, | ||
| integer, intent(inout) | day, | ||
| integer, intent(inout) | hour, | ||
| integer, intent(inout) | min, | ||
| real(dp), intent(inout) | sec, | ||
| type(dc_cal), intent(in) | cal | ||
| ) |
Normalize date information
Normalizes date information according to calendar. This is an internal procedure for dc_calendar module.
Normalization is performed in the following cases:
| [in,out] | year | Year |
| [in,out] | month | Month |
| [in,out] | day | Day |
| [in,out] | hour | Hour |
| [in,out] | min | Minute |
| [in,out] | sec | Second |
| [in] | cal | Calendar object |
Definition at line 177 of file dc_calendar_internal.f90.
References dc_calendar_types::cal_gregorian, dc_calendar_types::cal_julian, dc_calendar_types::cal_user_defined, dc_error::dc_einconsistcaldate, dc_error::dc_noerr, and dc_types::dp.
| character(token) function, public dc_calendar_internal::dccaldate_str2ustr | ( | character(*), intent(in) | str | ) |
Parse unit string and return unit string
Interprets the string given in str and returns the unit string. Case insensitive. Returns the first element of the unit array. Returns empty string for unrecognized unit.
| [in] | str | Input unit string |
Definition at line 549 of file dc_calendar_internal.f90.
References dc_types::token, dc_calendar_types::unit_day, dc_calendar_types::unit_hour, dc_calendar_types::unit_min, dc_calendar_types::unit_month, dc_calendar_types::unit_sec, and dc_calendar_types::unit_year.
| integer function, public dc_calendar_internal::dccaldate_str2usym | ( | character(*), intent(in) | str | ) |
Parse unit string and return unit symbol
Interprets the string given in str and returns the unit symbol integer. Case insensitive. Returns UNIT_SYMBOL_ERR for unrecognized unit.
| [in] | str | Input unit string |
Definition at line 633 of file dc_calendar_internal.f90.
References dc_types::token, dc_calendar_types::unit_day, dc_calendar_types::unit_hour, dc_calendar_types::unit_min, dc_calendar_types::unit_month, dc_calendar_types::unit_sec, dc_calendar_types::unit_symbol_day, dc_calendar_types::unit_symbol_err, dc_calendar_types::unit_symbol_hour, dc_calendar_types::unit_symbol_min, dc_calendar_types::unit_symbol_month, dc_calendar_types::unit_symbol_sec, dc_calendar_types::unit_symbol_year, and dc_calendar_types::unit_year.
| integer function, public dc_calendar_internal::dccaldate_ym2d | ( | integer, intent(in) | year, |
| integer, intent(in) | month, | ||
| integer, intent(in) | day, | ||
| type(dc_cal), intent(in) | cal, | ||
| real(dp), intent(out) | day_of_year | ||
| ) |
Convert year/month/day to day of year
Converts year/month/day to day of year according to calendar. Should be called after normalization by dccaldate_normalize.
| [in] | year | Year |
| [in] | month | Month |
| [in] | day | Day |
| [in] | cal | Calendar object |
| [out] | day_of_year | Day of year (double precision) |
Definition at line 420 of file dc_calendar_internal.f90.
References dc_calendar_types::cal_gregorian, dc_calendar_types::cal_julian, dc_calendar_types::cal_user_defined, dc_error::dc_einconsistcaldate, dc_error::dc_noerr, and dc_types::dp.
| character(token) function, public dc_calendar_internal::dccaltype_str | ( | integer, intent(in) | cal_type | ) |
Convert calendar type integer to string
Converts integer calendar type to string representation. Returns empty string for invalid calendar type.
| [in] | cal_type | Calendar type integer |
Definition at line 505 of file dc_calendar_internal.f90.
References dc_calendar_types::cal_360day, dc_calendar_types::cal_cyclic, dc_calendar_types::cal_gregorian, dc_calendar_types::cal_julian, dc_calendar_types::cal_noleap, dc_calendar_types::cal_user_defined, and dc_types::token.
| subroutine, public dc_calendar_internal::default_cal_set |
Set default calendar to Gregorian
When DCCal procedures are called without DC_CAL argument, this procedure is called first to set the default calendar to Gregorian calendar.
If default_cal is already initialized, this procedure does nothing and returns immediately.
Definition at line 105 of file dc_calendar_internal.f90.
References dc_calendar_types::cal_gregorian, and default_cal.
| dc_calendar_internal::default_cal |
Default calendar object
Definition at line 66 of file dc_calendar_internal.f90.
| dc_calendar_internal::default_date |
Default date object
Definition at line 76 of file dc_calendar_internal.f90.