+Add and use optional conversion argument to register_field in MOM_io_file #780
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.
This PR consists of three commits, the first of which adds the ability to rescale output variables that are written by the
MOM_io_file
routines analogously to what is already available for variables that are written viaMOM_write_field()
or viaMOM_diag_mediator()
. The second commit uses this new capability inwrite_energy()
and revises the internal calculations inwrite_energy()
to work almost entirely with rescaled variables. The third commit corrects 4 conversion arguments tovar_desc()
calls now that they might actually be used.The specific changes include the addition of a new optional conversion argument to
register_field()
, code to rescale variables in 10write_field()
routines, changes tomodify_vardesc()
andquery_vardesc()
to properly store and retrieve conversion factors, and the use of these new capabilities inocean_register_diag()
andwrite_energy()
.All answers and output are bitwise identical, but there are new optional arguments to publicly visible types. The specific commits in this PR include: