FMS 2025.01-dev
Flexible Modeling System
|
fms_diag_time_utils contains functions and subroutines necessary for the diag_manager_mod
related to time handling.
More...
Functions/Subroutines | |
type(time_type) function | diag_clock_time_inc (time, output_freq, output_units, err_msg) |
Determine the next time data/file is to be written based on the frequency and units using the clock. For example, if doing daily averages and the input time is day1_hour3, the output time will be day2_hour0. | |
type(time_type) function | diag_forecast_time_inc (time, output_freq, output_units, err_msg) |
Determine the next time data/file is to be written based on the frequency and units using forecast time. For example, if doing daily averages and the input time is day1_hour3, the output time will be day2_hour3. | |
real function, public | get_date_dif (t2, t1, units) |
Return the difference between two times in units. | |
character(len=128) function, public | get_time_string (filename, current_time) |
This function determines a string based on current time. This string is used as suffix in output file name. | |
subroutine, public | set_time_type (time_int, time) |
Sets up a time_type based on 6 member array of integers defining the [year month day hour min sec]. | |
fms_diag_time_utils contains functions and subroutines necessary for the diag_manager_mod
related to time handling.
|
private |
Determine the next time data/file is to be written based on the frequency and units using the clock. For example, if doing daily averages and the input time is day1_hour3, the output time will be day2_hour0.
[in] | time | Current model time. |
[in] | output_freq | Output frequency number value. |
[in] | output_units | Output frequency unit. |
[out] | err_msg | Function error message. An empty string indicates the next output time was found successfully. |
Definition at line 66 of file fms_diag_time_utils.F90.
|
private |
Determine the next time data/file is to be written based on the frequency and units using forecast time. For example, if doing daily averages and the input time is day1_hour3, the output time will be day2_hour3.
[in] | time | Current model time. |
[in] | output_freq | Output frequency number value. |
[in] | output_units | Output frequency unit. |
[out] | err_msg | Function error message. An empty string indicates the next output time was found successfully. |
Definition at line 126 of file fms_diag_time_utils.F90.
real function, public get_date_dif | ( | type(time_type), intent(in) | t2, |
type(time_type), intent(in) | t1, | ||
integer, intent(in) | units | ||
) |
Return the difference between two times in units.
[in] | t2 | Most recent time. |
[in] | t1 | Most distant time. |
[in] | units | Unit of return value. |
Definition at line 356 of file fms_diag_time_utils.F90.
character(len=128) function, public get_time_string | ( | character(len=*), intent(in) | filename, |
type(time_type), intent(in) | current_time | ||
) |
This function determines a string based on current time. This string is used as suffix in output file name.
[in] | filename | File name. |
[in] | current_time | Current model time. |
Definition at line 215 of file fms_diag_time_utils.F90.
subroutine, public set_time_type | ( | integer, dimension(6), intent(in) | time_int, |
type(time_type), intent(inout) | time | ||
) |
Sets up a time_type based on 6 member array of integers defining the [year month day hour min sec].
[in] | time_int | The time in the format [year month day hour min second] |
[in,out] | time | The time converted to the time_type |
Definition at line 390 of file fms_diag_time_utils.F90.