Set of time utilities for converting between FMS and ESMF time type.
|
type(esmf_calkind_flag) function | fms2esmf_cal_c (calendar) |
| Sets fms2esmf_cal_c to the corresponding ESMF calendar type. More...
|
|
type(esmf_calkind_flag) function | fms2esmf_cal_i (calendar) |
| Sets fms2esmf_cal_i to the corresponding ESMF calendar type. More...
|
|
type(time_type) function | esmf2fms_time_t (time) |
| Converts date from ESMF format to FMS format. More...
|
|
type(time_type) function | esmf2fms_timestep (timestep) |
| Converts time-interval from ESMF format to FMS format. More...
|
|
type(esmf_time) function, public | fms2esmf_time (time, calkind) |
| Converts date from FMS format to ESMF format. More...
|
|
type(time_type) function, public | string_to_date (string, rc) |
| Converts a string (I4.4,I2.2,I2.2,".",I2.2,I2.2,I2.2) that represents yr, mon, day, hr, min, sec to a FMS data format. More...
|
|
type(time_type) function, public time_utils_mod::string_to_date |
( |
character(len=15), intent(in) |
string, |
|
|
integer, intent(out), optional |
rc |
|
) |
| |
Converts a string (I4.4,I2.2,I2.2,".",I2.2,I2.2,I2.2) that represents yr, mon, day, hr, min, sec to a FMS data format.
- Parameters
-
[in] | string | String representing a date |
[out] | rc | ESMF error handler |
- Returns
- FMS time structure
Definition at line 155 of file time_utils.F90.
155 character(len=15),
intent(in) :: string
156 integer,
intent(out),
optional :: rc
157 type(time_type) :: string_to_date
160 integer :: yr,mon,day,hr,min,sec
162 if(
present(rc)) rc = esmf_success
164 read(string,
'(I4.4,I2.2,I2.2,".",I2.2,I2.2,I2.2)') yr, mon, day, hr, min, sec
165 string_to_date = set_date(yr, mon, day, hr, min, sec)