Skip to content

Commit

Permalink
(*)Reordered setting calculate_density loop bounds
Browse files Browse the repository at this point in the history
  Moved the line setting the calculate_density loop bounds for viscosity to come
after another line that changes the velocity point bounds, fixing a bug with
non-symmetric memory that was introduced in the previous commit and that is
being detected by the automated testing.  All answers are once again bitwise
identical in the MOM6-examples test suite.
  • Loading branch information
Hallberg-NOAA committed Apr 15, 2020
1 parent 77b6b74 commit a00c327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_set_viscosity.F90
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ subroutine set_viscous_BBL(u, v, h, tv, visc, G, GV, US, CS, symmetrize)

is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec ; nz = G%ke
Isq = G%IscB ; Ieq = G%IecB ; Jsq = G%JscB ; Jeq = G%JecB
start = Isq - (G%isd-1) ; npts = G%iec - Isq + 2
nkmb = GV%nk_rho_varies ; nkml = GV%nkml
h_neglect = GV%H_subroundoff
Rho0x400_G = 400.0*(GV%Rho0 / (US%L_to_Z**2 * GV%g_Earth)) * GV%Z_to_H
Expand All @@ -293,6 +292,7 @@ subroutine set_viscous_BBL(u, v, h, tv, visc, G, GV, US, CS, symmetrize)
if (present(symmetrize)) then ; if (symmetrize) then
Jsq = js-1 ; Isq = is-1
endif ; endif
start = Isq - (G%isd-1) ; npts = G%iec - Isq + 2

if (CS%debug) then
call uvchksum("Start set_viscous_BBL [uv]", u, v, G%HI, haloshift=1, scale=US%L_T_to_m_s)
Expand Down

0 comments on commit a00c327

Please sign in to comment.