-
Notifications
You must be signed in to change notification settings - Fork 65
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
Correct bug in kappa shear viscosity with vertex shear option. #824
Correct bug in kappa shear viscosity with vertex shear option. #824
Conversation
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.
I agree with these changes. I have also examined the code that was not changed, and I have convinced myself that this will not be setting non-zero values for non-coastal land points.
c0b6cd5
to
102867c
Compare
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.
Please change the logging of the new runtime parameter VERTEX_SHEAR_VISCOSITY_BUG
so that is only logged when it is relevant, as described in the comment following the relevant line of code.
Done, thanks for this suggestion. |
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.
Thank you for catching this bug and offering a correction.
- Viscosities at vertices along the coast were incorrectly zero'd out. This commit removes that mask so the non-zero shear driven viscosities can be interpolated from in the model. This bug caused diffusivities to be very large in channels and potentially near coastlines. - A bugfix flag is added with an option to use the current behavior for legacy purposes.
a8a9bb5
to
aac354c
Compare
This has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26303 with the expected changes in some MOM_parameter_doc files due to a new runtime parameter. |
Here is a sample shear driven diffusivity and viscosity at 50m depth in the Gibraltar region from a case with the bug flag as True:

Compared to with the fix:
