-
Notifications
You must be signed in to change notification settings - Fork 24
Description
MOM6/src/parameterizations/vertical/MOM_set_diffusivity.F90
Lines 311 to 315 in 9786710
if (present(Kd_lay)) Kd_lay(:,:,:) = CS%Kd | |
Kd_int(:,:,:) = CS%Kd | |
if (present(Kd_extra_T)) Kd_extra_T(:,:,:) = 0.0 | |
if (present(Kd_extra_S)) Kd_extra_S(:,:,:) = 0.0 | |
if (associated(visc%Kv_slow)) visc%Kv_slow(:,:,:) = CS%Kv |
Kd_lay
and Kv_slow
are set to KD
and KV
; effectively these are background values and the defaults are KD=2e-5, KV=1e-4
Later calculate_bkgnd_mixing
calculates background values Kv_bkgnd
and Kd_bkgnd
(I have HORIZ_VARYING_BACKGROUND=TRUE
) and assigns Kd_lay_2d
and Kd_int_2d
MOM6/src/parameterizations/vertical/MOM_set_diffusivity.F90
Lines 409 to 410 in 9786710
! Add background mixing | |
call calculate_bkgnd_mixing(h, tv, N2_lay, Kd_lay_2d, Kd_int_2d, Kv_bkgnd, j, G, GV, US, CS%bkgnd_mixing_csp) |
Kd_bkgnd
is assigned to Kd_lay
in there, overwriting the KD
values set earlier.
Now back in MOM_set_diffusivity
: Kv_bkgnd
is added to Kv_slow
(≡ KD
):
MOM6/src/parameterizations/vertical/MOM_set_diffusivity.F90
Lines 411 to 414 in 9786710
! Update Kv and 3-d diffusivity diagnostics. | |
if (associated(visc%Kv_slow)) then ; do K=1,nz+1 ; do i=is,ie | |
visc%Kv_slow(i,j,K) = visc%Kv_slow(i,j,K) + Kv_bkgnd(i,K) | |
enddo ; enddo ; endif |
This is NOT what's being done with diffusivity where Kd_lay
is set by calculate_bkgnd_mixing
.
It is wrong because we've added two different "background" viscosity formulations. We should be overwriting Kv_slow
with Kv_bkgnd
.
Setting KD=0, KV=0
makes things work like I expected.
EDIT: For the record, here's the image that shows the issue (mean profiles at 0N, 140W; averaged over years 46-68), the prandtl number (visc/diff) is ~200 below the EUC. We want it to be in the 1-10 range.