Skip to content

Commit

Permalink
Fix indices in KE calculation
Browse files Browse the repository at this point in the history
Hoping this will fix the floating point exception in symmetric mode.
  • Loading branch information
gustavo-marques committed Apr 17, 2020
1 parent 65f36d7 commit b609dea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parameterizations/lateral/MOM_hor_visc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ subroutine horizontal_viscosity(u, v, h, diffu, diffv, MEKE, VarMix, G, GV, US,
endif

if (CS%Re_Ah > 0.0) then
KE = 0.125*((u(I,j,k)+u(I,j+1,k))**2 + (v(i,J,k)+v(i+1,J,k))**2)
KE = 0.125*((u(I,j,k)+u(I-1,j,k))**2 + (v(i,J,k)+v(i,J-1,k))**2)
Ah = sqrt(KE) * CS%Re_Ah_const_xy(i,j)
endif

Expand Down

0 comments on commit b609dea

Please sign in to comment.