Skip to content

Commit 3983a98

Browse files
committed
Solved the dimension issue for sqg_struct
1 parent 8309221 commit 3983a98

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -606,19 +606,18 @@ subroutine calc_sqg_struct(h, tv, G, GV, US, CS, dt, MEKE)
606606
G%CoriolisBu(I-1,J) + G%CoriolisBu(I,J-1)), 1.0e-8*US%T_to_s)
607607
enddo ; enddo
608608
endif
609-
if (CS%debug) then
610-
call hchksum(Le, 'SQG length scale', G%HI, unscale=US%L_to_m)
611-
call hchksum(f, 'Coriolis at h point', G%HI, unscale=US%s_to_T)
612-
call uvchksum( 'MEKE LmixScale', dzu, dzv, G%HI, unscale=US%Z_to_m, scalar_pair=.true.)
613-
endif
614609
do k=2,nz ; do j=js,je ; do i=is,ie
615610
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)
616611
dzc = 0.25*(dzu(I-1,j,k) + dzu(I,j,k) + dzv(i,J-1,k) + dzv(i,J,k)) * &
617-
N2**0.5/f(i,j)*US%Z_to_L
612+
N2**0.5/f(i,j)
618613
! dzs = -N2**0.5/f(i,j)*dzc
619-
CS%sqg_struct(i,j,k) = CS%sqg_struct(i,j,k-1)*exp(-CS%sqg_expo*dzc/Le(i,j))
614+
CS%sqg_struct(i,j,k) = CS%sqg_struct(i,j,k-1)*exp(-CS%sqg_expo*(dzc/Le(i,j)))
620615
enddo ; enddo ; enddo
621616

617+
if (CS%debug) then
618+
call hchksum(CS%sqg_struct, 'sqg_struct', G%HI)
619+
endif
620+
622621

623622
if (query_averaging_enabled(CS%diag)) then
624623
if (CS%id_sqg_struct > 0) call post_data(CS%id_sqg_struct, CS%sqg_struct, CS%diag)

0 commit comments

Comments
 (0)