-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add time info to diag file obj #1002
Add time info to diag file obj #1002
Conversation
character (len=:), private, allocatable :: file_unlimdim !< The name of the unlimited dimension | ||
type(subRegion_type), private :: file_sub_region !< type containing info about the subregion, if any | ||
integer, private :: file_new_file_freq !< Frequency for closing the existing file | ||
character (len=:), private, allocatable :: file_new_file_freq_units !< Time units for creating a new file. | ||
integer, private :: file_new_file_freq_units !< Time units for creating a new file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I missed this: where does the units get converted to an integer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The units are read to a string buffer and the converter to a integer.
FMS/diag_manager/fms_diag_yaml.F90
Lines 475 to 478 in 8c54912
call get_value_from_key(diag_yaml_id, diag_file_id, "new_file_freq", fileobj%file_new_file_freq, is_optional=.true.) | |
call diag_get_value_from_key(diag_yaml_id, diag_file_id, "new_file_freq_units", buffer, & | |
is_optional=.true.) | |
call set_new_file_freq(fileobj, buffer) |
FMS/diag_manager/fms_diag_yaml.F90
Lines 678 to 679 in 8c54912
fileobj%file_new_file_freq_units = set_valid_time_units(file_new_file_freq_units, & | |
"new_file_freq_units for file:"//trim(fileobj%file_fname)) |
* adds the time info to the fileobj, modifies the yaml obj to store the time_units as integers instead of strings * fix a line length issue and fix test, init the new optional integers * initialize next_open * return if the start_time is already the base_time * refactors the code that sets and converts the time_units to integers * refactors set_valid_time_units
* adds the time info to the fileobj, modifies the yaml obj to store the time_units as integers instead of strings * fix a line length issue and fix test, init the new optional integers * initialize next_open * return if the start_time is already the base_time * refactors the code that sets and converts the time_units to integers * refactors set_valid_time_units
Description
Adds the timing information to the diag file obj
Modifies the yaml to save the frequencies as an integer instead of strings to make it more efficient
Modifies tests for this change
Fixes # (issue)
How Has This Been Tested?
CI
Checklist:
make distcheck
passes