+Diag_mediator enhancements from ice shelf version#1067
Open
Hallberg-NOAA wants to merge 1 commit intoNOAA-GFDL:dev/gfdlfrom
Open
+Diag_mediator enhancements from ice shelf version#1067Hallberg-NOAA wants to merge 1 commit intoNOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA wants to merge 1 commit intoNOAA-GFDL:dev/gfdlfrom
Conversation
b3cd4b1 to
a4294f8
Compare
a4294f8 to
5caadbc
Compare
Added diag_mediator capabilities that had been developed and used in the SIS2 and MOM_ice_shelf versions of the diag mediator, in preparation for some of these separate versions to be combined into a single version. This includes adding an overload to the register_scalar_field() interface so that scalars can be registered with or without providing a null axis, retaining the existing interface while adding the one that is widely used with the ice shelf code. The previous routine register_scalar_field() is now register_scalar_field_CS(), but it has the same public interface. This commit also adds the new public interface MOM_diag_send_complete() that calls the FMS routine that flushes the IO buffers. Although this call can be too expensive for production runs, it can be very useful for debugging. Internally, register_diag_field() now checks for standard axes for 2-d fields, analogously to what was previously done for 3-d fields, thereby avoiding the allocation of a separate axis group for each 2-d diagnostic. This has been the case for ice-shelf code for some time, and it will save memory will giving identical results. The testing for incompatible mask and array sizes was consolidated into a single call each in post_data_2d_low() and post_data_3d_low(), paving the way for adding the option of masking static fields. All solutions are bitwise identical and diagnostic output (including metadata) is identical to what was previously output, but there are two new public interfaces.
5caadbc to
4b01668
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added diag_mediator capabilities that had been developed and used in the SIS2 and MOM_ice_shelf versions of the diag mediator, in preparation for some of these separate versions to be combined into a single version. This includes adding an overload to the
register_scalar_field()interface so that scalars can be registered with or without providing a null axis, retaining the existing interface while adding the one that is widely used with the ice shelf code. The previous routineregister_scalar_field()is nowregister_scalar_field_CS(), but it has the same public interface.This commit also adds the new public interface
MOM_diag_send_complete()that calls the FMS routine that flushes the IO buffers. Although this call can be too expensive for production runs, it can be very useful for debugging.Internally,
register_diag_field()now checks for standard axes for 2-d fields, analogously to what was previously done for 3-d fields, thereby avoiding the allocation of a separate axis group for each 2-d diagnostic. This has been the case for ice-shelf code for some time, and it will save memory will giving identical results.The testing for incompatible mask and array sizes was consolidated into a single call each in
post_data_2d_low()andpost_data_3d_low(), paving the way for adding the option of masking static fields.Several comments that were confusing to me were revised for clarity. Also corrected multiple instances of spelling errors or non-standard use of white space in comments.
All solutions are bitwise identical and diagnostic output (including metadata) is identical to what was previously output.