-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rescaling of internal tide debugging code #763
base: dev/gfdl
Are you sure you want to change the base?
Fix rescaling of internal tide debugging code #763
Conversation
Pull request #764 notes that MOM_internal_tides.F90 may be defining or calculating frequency incorrectly. So far as I can tell this does not impact the debugging code changed here, but any test cases used to confirm the diagnostics may be able to resolve the frequency issue. |
The code itself was not incorrect, per se, but it was inconsistent with the descriptions of the units of the debugging diagnostic variables in the comments describing them. The revised code will give equivalent model output, but it is now internally self-consistent with how it is described. I agree that this PR should be essentially independent of the corrections being made in PR #764. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You asked for @raphaeldussin to review, but IMHO the changes outside of internal tides look good to go.
This rescaling of the debugging options will work as intended and documented in the comments, provided that PR #778 is handled first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debugging prints with different rescaling powers show identical results
Corrected the internal tide rescaling arguments so that some of the debugging variables have units that are consistent with their documented units. This involved changing the scale arguments to global_area_integral to tmp_scale arguments in 8 places so that the units of the output retain the scaling of the input variable. The multiplication by the reverse of the scaling factor was also added to 4 debugging output messages. The documented units of internal wave energies in 5 register_restart_field calls were previously given as "m3 s-2" in non-Boussinesq mode and "J m-2" in Boussinesq mode when the reverse was actually true. This has now been corrected. Also replaced the scale argument to 35 chksum calls with the equivalent but preferred unscale argument, following the pattern elsewhere in the MOM6 code. All answers are bitwise identical, and only debugging code was modified.
6fd0efb
to
7f3cada
Compare
Corrected the internal tide rescaling arguments so that some of the debugging variables have units that are consistent with their documented units. This involved changing the
scale
arguments toglobal_area_integral()
totmp_scale
arguments in 8 places so that the units of the output retain the scaling of the input variable. The multiplication by the reverse of the scaling factor was also added to 4 debugging output messages.The documented units of internal wave energies in 5 register_restart_field calls were previously given as "m3 s-2" in non-Boussinesq mode and "J m-2" in Boussinesq mode when the reverse was actually true. This has now been corrected.
Also replaced the
scale
argument to 35chksum()
calls with the equivalent but preferredunscale
argument, following the pattern elsewhere in the MOM6 code.All answers are bitwise identical, and only debugging code was modified.