Closed iangrooms closed 1 year ago
Patch coverage: 12.82
% and project coverage change: -0.06
:warning:
Comparison is base (
aa58724
) 37.07% compared to head (1c8df77
) 37.02%.:exclamation: Current head 1c8df77 differs from pull request most recent head bd13ba6. Consider uploading reports for the commit bd13ba6 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Just one more minor very minor suggestion. We should follow Fortran2003 conventions, so please use <, <=, >, >=, ==, and /= instead of .LT., .LE., .GT., .GE., .EQ., and .NE., respectively.
@iangrooms, thanks for addressing all the issues. Our tests are passing (mom_pr). I also ran a few manual tests with this scheme enabled to make sure the model reproduces across restarts and with different PE layouts. Everything checks.
This commit adds the 2D Leith+E closure, which uses a modified 2D Leith biharmonic viscosity paired with a harmonic backscatter. ('Modified' here is not used in the same sense as 'modified 2D Leith'; it just means that the biharmonic coefficient is modified to account for enstrophy backscatter.) Variables are often named 'leithy' to refer to Leith+E.
The parameterization is controlled by three main entries in user_nl_mom:
To use Leith+E you should have LAPLACIAN=True and BIHARMONIC=True. (You should also be explicit and set LEITH_AH=False, along with any other viscous closures. Leith+E does use the background value of the biharmonic coefficient as a minimum, but ignores the background harmonic value.) LEITH_CK is the fraction of energy dissipated by the biharmonic term that gets backscattered by the harmonic term (it's a target; the backscatter rate is not exact.) Recommended values between 0 and 1. LEITH_BI_CONST is Upsilon^6 where Upsilon is the ratio between the grid scale and the dissipation scale for enstrophy. Values should be greater than or equal to 1; 8 is a good place to start.
The code is sensitive to the background value of Ah; specifically, if Ah is too large, the code is unstable. This is because the backscatter coefficient is proportional to Ah, and if Ah is large then you get large backscatter. If your code is unstable, consider reducing, e.g.,
AH_VEL_SCALE
.