From 3983a98690705216ce1db8df2eab64944ee9c142 Mon Sep 17 00:00:00 2001 From: Wenda Zhang Date: Fri, 11 Oct 2024 14:15:40 -0400 Subject: [PATCH] Solved the dimension issue for sqg_struct --- .../lateral/MOM_lateral_mixing_coeffs.F90 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 index 7d1ccd060e..bdd540dbbf 100644 --- a/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 +++ b/src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90 @@ -606,19 +606,18 @@ subroutine calc_sqg_struct(h, tv, G, GV, US, CS, dt, MEKE) G%CoriolisBu(I-1,J) + G%CoriolisBu(I,J-1)), 1.0e-8*US%T_to_s) enddo ; enddo endif - if (CS%debug) then - call hchksum(Le, 'SQG length scale', G%HI, unscale=US%L_to_m) - call hchksum(f, 'Coriolis at h point', G%HI, unscale=US%s_to_T) - call uvchksum( 'MEKE LmixScale', dzu, dzv, G%HI, unscale=US%Z_to_m, scalar_pair=.true.) - endif do k=2,nz ; do j=js,je ; do i=is,ie N2 = max(0.25*(N2_u(I-1,j,k) + N2_u(I,j,k) + N2_v(i,J-1,k) + N2_v(i,J,k)),0.0) dzc = 0.25*(dzu(I-1,j,k) + dzu(I,j,k) + dzv(i,J-1,k) + dzv(i,J,k)) * & - N2**0.5/f(i,j)*US%Z_to_L + N2**0.5/f(i,j) ! dzs = -N2**0.5/f(i,j)*dzc - CS%sqg_struct(i,j,k) = CS%sqg_struct(i,j,k-1)*exp(-CS%sqg_expo*dzc/Le(i,j)) + CS%sqg_struct(i,j,k) = CS%sqg_struct(i,j,k-1)*exp(-CS%sqg_expo*(dzc/Le(i,j))) enddo ; enddo ; enddo + if (CS%debug) then + call hchksum(CS%sqg_struct, 'sqg_struct', G%HI) + endif + if (query_averaging_enabled(CS%diag)) then if (CS%id_sqg_struct > 0) call post_data(CS%id_sqg_struct, CS%sqg_struct, CS%diag)