From 138a66e13106a9270e53cf47a9c7ac4059257b31 Mon Sep 17 00:00:00 2001 From: Ian Grooms Date: Fri, 24 Jan 2025 09:49:48 -0700 Subject: [PATCH] Leith+E bugfix (#334) Gustavo Marques noticed that with `LEITH_CK = 0.0` we were still getting negative Laplacian viscosity coefficients southwest of land. There's an if statement designed to limit the magnitude of the backscatter so that it doesn't overcome the biharmonic damping. When c_K = 0.0 *and* when smoothed vorticity at the q point is zero, this if statement ironically causes the backscatter coefficient to equal its largest possible value. Smoothed vorticity at the q point is always zero on land, so cells whose northwest corner are on land always have the max backscatter coefficient (which then gets smoothed into the interior). This commit zeros out the backscatter in those cells. --- src/parameterizations/lateral/MOM_hor_visc.F90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parameterizations/lateral/MOM_hor_visc.F90 b/src/parameterizations/lateral/MOM_hor_visc.F90 index 81f9cadcf9..1593a41a73 100644 --- a/src/parameterizations/lateral/MOM_hor_visc.F90 +++ b/src/parameterizations/lateral/MOM_hor_visc.F90 @@ -1339,6 +1339,7 @@ subroutine horizontal_viscosity(u, v, h, uh, vh, diffu, diffv, MEKE, VarMix, G, else m_leithy(i,j) = CS%m_leithy_max(i,j) endif + m_leithy(i,j) = G%mask2dBu(i,j) * m_leithy(i,j) endif enddo ; enddo