Go to the source code of this file.
Functions/Subroutines | |
| subroutine | dccaldateinquire1 (year, month, day, hour, min, sec, zone, elapse_sec, date, cal, err) |
| Inquire information of date. | |
| subroutine | dccaldateinquire2 (date_str, elapse_sec, date, cal, err) |
| subroutine dccaldateinquire1 | ( | integer, intent(out), optional | year, |
| integer, intent(out), optional | month, | ||
| integer, intent(out), optional | day, | ||
| integer, intent(out), optional | hour, | ||
| integer, intent(out), optional | min, | ||
| real(dp), intent(out), optional | sec, | ||
| character(*), intent(out), optional | zone, | ||
| real(dp), intent(in), optional | elapse_sec, | ||
| type(dc_cal_date), intent(in), optional, target | date, | ||
| type(dc_cal), intent(in), optional, target | cal, | ||
| logical, intent(out), optional | err | ||
| ) |
Inquire information of date.
Definition at line 94 of file dccaldateinquire.f90.
References dc_trace::beginsub(), dc_error::dc_einconsistcaldate, dc_error::dc_enotinit, dc_error::dc_noerr, dc_calendar_internal::dccaldate_normalize(), dc_calendar_internal::default_cal, dc_calendar_internal::default_cal_set(), dc_calendar_internal::default_date, dc_types::dp, dc_trace::endsub(), dc_error::storeerror(), dc_types::string, and dc_types::token.
| subroutine dccaldateinquire2 | ( | character(*), intent(out) | date_str, |
| real(dp), intent(in), optional | elapse_sec, | ||
| type(dc_cal_date), intent(in), optional, target | date, | ||
| type(dc_cal), intent(in), optional, target | cal, | ||
| logical, intent(out), optional | err | ||
| ) |
Inquire date information as a string
Inquire information of date. A result is returned as a string like as YYYY-MM-DDThh:mm:ss.sTZD (YYYY is year, MM is month, DD is day, hh is hour, mm is minute, ss.s is second, TZD is time zone). Format of date is conformed to gtool4 netCDF Convention "5.5 Expression of date and time"
If individual variables (year, month, day, hour, minute, second, zone) are needed, use a foregoing homonymous subroutine.
If an optional argument date is omitted, information of date that is stored in the "dc_calendar" is returned, If date is not omitted, information of the variable is returned.
If an optional argument cal is omitted, information of calendar that is stored in the "dc_calendar" is used for conversion of elapsed seconds elapse_sec into year-month-day etc. If cal is not omitted, information of the variable is used.
| [out] | date_str | Strings that express date and time. See gtool4 netCDF Convention 5.5 Expression of date and time for details. |
| [in] | elapse_sec | Elapsed seconds from date |
| [in] | date | An object that stores information of date and time |
| [in] | cal | An object that stores information of calendar |
| [out] | err | Exception handling flag. By default, when error occur in this procedure, the program aborts. If this err argument is given, .true. is substituted to err and the program does not abort. |
Definition at line 292 of file dccaldateinquire.f90.
References dc_trace::beginsub(), dc_error::dc_einconsistcaldate, dc_error::dc_enotinit, dc_error::dc_noerr, dc_calendar_internal::dccaldate_normalize(), dc_calendar_internal::default_cal, dc_calendar_internal::default_cal_set(), dc_calendar_internal::default_date, dc_types::dp, dc_trace::endsub(), dc_error::storeerror(), dc_types::string, and dc_types::token.