-
Notifications
You must be signed in to change notification settings - Fork 371
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
Improve slope calculation and fix slope limiting for redi mixing #5947
Improve slope calculation and fix slope limiting for redi mixing #5947
Conversation
This changes tapering on the redi terms to be fully on the slopes themselves and fixes a bug where k33 slopes are tapered by the square and not linearly. A 'safe slope' calculation is also introduced to bound slopes from -1 to 1.
the redi n2 based limiter options are removed from the namelist and the term1 limiter name is changed to reference tapering not just the n2 based tapering for clarity
@jonbob in addition to the new defaults in the registry I would suggest we change the default for @mark-petersen and/or @dengwirda what are your thoughts on removing the diagonal term disable config? I recall that was introduced to prevent extrema so I'm thinking we could remove that capability now, but it would be easier to keep it but set that value to zero |
@vanroekel, could you give this PR a meaningful title when you have a chance? |
@vanroekel I agree re: updating the defaults to |
Removed some unused initializations of RediKappa Scaling. With that, the three ocean PRs can merge and pass the nightly test suite, as described in #5945 (comment). |
On #5947 (comment), I would change the default to |
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.
Approved, based on code review, discussion, and simulation results.
…xt (PR #5947) Improve slope calculation and fix slope limiting for redi mixing In current MPAS code, slopes are altered directly, e.g. when S > Scrit it is set to zero. Griffies et al 1998 (Appendix C) equates this to slope clipping. The correct approach is to taper the redi kappa coefficient for each individual flux instead. The cross terms ("term2" and "term 3") end up being identical as they are d/dz(kappa S grad phi) so tapering kappa or S are identical. However for the vertical it is d/dz(kappa |S|^2 d phi / dz) so tapering S is different from tapering kappa. Also term 1 (laplacian diffusion) was not being tapered with slopes creating a cross isopycnal flux in steeply sloping regions. These issues are fixed here. In addition a new slope calculation from @dengwirda is introduced to prevent the slopes from getting very large when grad phi or d/dz(phi) get small. This function limits the slope to be between -1 and 1. [NML] [CC]
merged to master |
expected DIFFs and NML DIFFs from the set of PRs are blessed |
This merge updates the E3SM-Project submodule from [894b5b2](https://github.com/E3SM-Project/E3SM/tree/894b5b2) to [5d5f15c](https://github.com/E3SM-Project/E3SM/tree/5d5f15c). This update includes the following MPAS-Ocean and MPAS-Frameworks PRs (check mark indicates bit-for-bit with previous PR in the list): - [ ] (ocn) E3SM-Project/E3SM#5945 - [ ] (ocn) E3SM-Project/E3SM#5946 - [ ] (ocn) E3SM-Project/E3SM#5947 - [ ] (ocn) E3SM-Project/E3SM#5999 - [ ] (ocn) E3SM-Project/E3SM#6037 - [ ] (ocn) E3SM-Project/E3SM#5989 - [ ] (ocn) E3SM-Project/E3SM#6035 - [ ] (ocn) E3SM-Project/E3SM#6077
In current MPAS code, slopes are altered directly, e.g. when S > Scrit it is set to zero. Griffies et al 1998 (Appendix C) equates this to slope clipping. The correct approach is to taper the redi kappa coefficient for each individual flux instead. The cross terms ("term2" and "term 3") end up being identical as they are d/dz(kappa S grad phi) so tapering kappa or S are identical. However for the vertical it is d/dz(kappa |S|^2 d phi / dz) so tapering S is different from tapering kappa. Also term 1 (laplacian diffusion) was not being tapered with slopes creating a cross isopycnal flux in steeply sloping regions. These issues are fixed here.
In addition a new slope calculation from @dengwirda is introduced to prevent the slopes from getting very large when grad phi or d/dz(phi) get small. This function limits the slope to be between -1 and 1.
See initial discussion at E3SM-Ocean-Discussion#65.
[CC]