From 1f308a02f53da836b34e1c5314ac23cff9acd83b Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Wed, 18 Mar 2020 17:37:35 -0600 Subject: [PATCH] Extend loop indices and add calls to pass_vector --- src/parameterizations/lateral/MOM_hor_visc.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/parameterizations/lateral/MOM_hor_visc.F90 b/src/parameterizations/lateral/MOM_hor_visc.F90 index 96239e049a..d9b465ee0a 100644 --- a/src/parameterizations/lateral/MOM_hor_visc.F90 +++ b/src/parameterizations/lateral/MOM_hor_visc.F90 @@ -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) - & @@ -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) ) @@ -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