Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+Add optional unscale arguments to checksums
Added an optional unscale argument to 16 checksum and 9 spatial_mean or spatial_integral routines. These are synonymous with the existing optional scale arguments to these routines, and if both are provided, the new unscale arguments take precedence. All this is done to come up with a more systematic nomenclature for the various scaling and unscaling arguments, so that the factors passed to them will follow a more regular pattern. With this change, the `scale=` argument to a get_param or read_data call will take the opposite setting to the `unscale=` argument used in a checksum call. For example, for a velocity, these arguments would be `scale=US%m_s_to_L_T` and `unscale=US%L_T_to_m_s`, but the reverse values of `scale=US%L_T_to_m_s` and `unscale=US%m_s_to_L_T` would only work for inverse velocities and will therefore be very uncommon and warrant extra scrutiny. With this change, `unscale=` and `conversion=` arguments used when registering diagnostics will often take similar arguments, although the latter can also have extra factors that are unrelated to dimensional rescaling. As a test of these capabilities, these new `unscale` arguments are being used in 23 calls from the MOM_chksum_packages routines and in 76 calls to chksums or global integrals from MOM_forcing_chksum(), MOM_mech_forcing_chksum() and forcing_diagnostics(). The results are equivalent to what was generated before in cases with debugging enabled so the revised code would be exercised. All answers are bitwise identical, but there are new optional arguments to 25 publicly visible routines.
- Loading branch information