Skip to content

Commit

Permalink
Extend loop indices and add calls to pass_vector
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Mar 18, 2020
1 parent 1ecade5 commit 1f308a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/parameterizations/lateral/MOM_hor_visc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, US,
call barotropic_get_tav(BT, ubtav, vbtav, G, US)
call pass_vector(ubtav, vbtav, G%Domain)

do j=js-1,je+1 ; do i=is-1,ie+1
do j=js-1,je+2 ; do i=is-1,ie+2
dudx_bt(i,j) = CS%DY_dxT(i,j)*(G%IdyCu(I,j) * ubtav(I,j) - &
G%IdyCu(I-1,j) * ubtav(I-1,j))
dvdy_bt(i,j) = CS%DX_dyT(i,j)*(G%IdxCv(i,J) * vbtav(i,J) - &
Expand All @@ -431,6 +431,9 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, US,
- ubtav(I,j)*G%IdxCu(I,j))
enddo ; enddo

call pass_vector(dudx_bt, dvdy_bt, G%Domain, stagger=BGRID_NE)
call pass_vector(dvdx_bt, dudy_bt, G%Domain, stagger=AGRID)

if (CS%no_slip) then
do J=js-1,Jeq ; do I=is-1,Ieq
sh_xy_bt(I,J) = (2.0-G%mask2dBu(I,J)) * ( dvdx_bt(I,J) + dudy_bt(I,J) )
Expand Down Expand Up @@ -1061,6 +1064,7 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, US,

if (CS%use_GME) then
call thickness_diffuse_get_KH(TD, KH_u_GME, KH_v_GME, G)
call pass_vector(KH_u_GME, KH_v_GME, G%Domain)

do j=Jsq,Jeq+1 ; do i=Isq,Ieq+1
if (grad_vel_mag_bt_h(i,j)>0) then
Expand Down

0 comments on commit 1f308a0

Please sign in to comment.