-
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
modern_diag_manager: Update output_buffer_obj #1354
modern_diag_manager: Update output_buffer_obj #1354
Conversation
…r routine to match the old diag manager, adjust tests, add a flag that indicates when done writing data to the diag_file, set output buffers to fill value if masked
…e-inits of the buffer to when after writing
866f796
to
011b414
Compare
@@ -67,6 +67,7 @@ module fms_diag_file_object_mod | |||
TYPE(time_type) :: next_output !< Time of the next write | |||
TYPE(time_type) :: next_next_output !< Time of the next next write | |||
TYPE(time_type) :: no_more_data !< Time to stop receiving data for this file | |||
logical :: done_writing_data!< .True. if finished writing data |
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.
finished writing data for the time step? It's a little unclear to me what point of the process this gets turned to true. Maybe data_written_for_timestep
would be more descriptive if that's the intent.
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.
This is for the diag file object.
I think there are two cases where this will be set to true:
- Static files after the first write
- Files that are using the
file_duration
functionality in the yaml 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.
Can you add that to the documentation
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.
|
||
!TODO mostly everything | ||
field_ptr => this%FMS_diag_fields(diag_field_id) | ||
if (field_ptr%has_missing_value()) then | ||
select type (missing_val => field_ptr%get_missing_value(r8)) | ||
type is (real(kind=r8_kind)) |
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.
Where is the r4_kind?
end function is_done_with_math | ||
|
||
!> @brief Set done_with_math to .true. | ||
subroutine set_done_with_math(this) |
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.
How do you set it to false? I think this should take a logical argument so you can set it to true or false.
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 don't think you will you ever set it back to .false.
This will be set to .true. for variables that are static after the "math" (a copy) is done for the first time.
* Add some needed members to the buffer obj, restructure the init_buffer routine to match the old diag manager, adjust tests, add a flag that indicates when done writing data to the diag_file, set output buffers to fill value if masked * inits done_with_math
* Add some needed members to the buffer obj, restructure the init_buffer routine to match the old diag manager, adjust tests, add a flag that indicates when done writing data to the diag_file, set output buffers to fill value if masked * inits done_with_math
Description
MIN_VALUE
fortime_min
,MAX_VALUE
fortime_max
andEMPTY
for others (instead of the missing_value). This is needed for the reduction methods to work correctly (i.e when averaging you are simply adding the input data to the output buffer so if it is the output buffer is initialized to the missing value it won't be correct. The tests were updated to account for this change.do_time_none_wrapper
anddo_time_none
functions so that they take in the missing value. Data points that are masked will be set to this.done_writing_data
to the diag_file object. This will be used for static files after the first write and for files that are using thefile_duration
functionality.Fixes # (issue)
How Has This Been Tested?
CI
Checklist:
make distcheck
passes