Commit b3cd4b1
committed
+Diag_mediator enhancements from ice shelf version
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.
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.1 parent f52a2b3 commit b3cd4b1
1 file changed
Lines changed: 235 additions & 181 deletions
0 commit comments