+Add the optional argument old_name to get_param() #796
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 the new optional argument
old_name
to the 8get_param()
routines. This new capability allows for an archaic parameter name to be specified and for appropriate warnings encouraging the user to migrate to using the new name while still setting the parameter as intended, or error messages in the case of inconsistent setting via the archaic name and the correct name. The logging inside of theMOM_parameter_doc
files only uses the correct parameter name.Also added the new optional argument set to the 8
read_param()
routines, to indicate whether a parameter has been found and successfully set. The new set argument is now being used inread_param()
calls inobsolete_int()
,obsolete_real()
,obsolete_char()
andobsolete_logical()
.Obsolete_logical()
in particular was substantially simplified by the use of this new argument, and is now only about half as long as it was. Theread_param()
set argument is also used in all of theget_param()
routines when they are given anold_name
argument.The new
old_name
argument toget_param()
is not yet being used in the version of the MOM6 code that is being checked in, but it has been tested extensively by adding or modifyingget_param()
calls in a variant of the initialization code, and it will be used in an updated version of github.com//pull/725 to gracefully handle the deprecation of 4 parameter names.All answers are bitwise identical, but there are new optional arguments to two widely used interfaces.