Skip to content

Commit 8dd9072

Browse files
authored
Merge pull request mom-ocean#1346 from marshallward/fgnv_bound_fix
Bugfix: FGNV streamfunction vertical bounds
2 parents a6f680c + 33d28f1 commit 8dd9072

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

src/parameterizations/lateral/MOM_thickness_diffuse.F90

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -993,10 +993,14 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV
993993
! Solve an elliptic equation for the streamfunction following Ferrari et al., 2010.
994994
do I=is-1,ie
995995
if (G%mask2dCu(I,j)>0.) then
996-
Sfn_unlim_u(I,:) = ( 1. + CS%FGNV_scale ) * Sfn_unlim_u(I,:)
996+
do K=2,nz
997+
Sfn_unlim_u(I,K) = (1. + CS%FGNV_scale) * Sfn_unlim_u(I,K)
998+
enddo
997999
call streamfn_solver(nz, c2_h_u(I,:), hN2_u(I,:), Sfn_unlim_u(I,:))
9981000
else
999-
Sfn_unlim_u(I,:) = 0.
1001+
do K=2,nz
1002+
Sfn_unlim_u(I,K) = 0.
1003+
enddo
10001004
endif
10011005
enddo
10021006
endif
@@ -1259,10 +1263,14 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV
12591263
! Solve an elliptic equation for the streamfunction following Ferrari et al., 2010.
12601264
do i=is,ie
12611265
if (G%mask2dCv(i,J)>0.) then
1262-
Sfn_unlim_v(i,:) = ( 1. + CS%FGNV_scale ) * Sfn_unlim_v(i,:)
1266+
do K=2,nz
1267+
Sfn_unlim_v(i,K) = (1. + CS%FGNV_scale) * Sfn_unlim_v(i,K)
1268+
enddo
12631269
call streamfn_solver(nz, c2_h_v(i,:), hN2_v(i,:), Sfn_unlim_v(i,:))
12641270
else
1265-
Sfn_unlim_v(i,:) = 0.
1271+
do K=2,nz
1272+
Sfn_unlim_v(i,K) = 0.
1273+
enddo
12661274
endif
12671275
enddo
12681276
endif

0 commit comments

Comments
 (0)