Skip to content

Commit

Permalink
Adds land masking of thicknesses in SGS estimate
Browse files Browse the repository at this point in the history
- The restart tests were failing because land values differ before/after
  a restart. Adding 2d land masking of h value in the stencil removes
  the sensitivity.
  • Loading branch information
adcroft committed Sep 1, 2020
1 parent 63a2e2a commit 4dbc126
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/MOM_PressureForce_FV.F90
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,11 @@ subroutine PressureForce_FV_Bouss(h, tv, PFu, PFv, G, GV, US, CS, ALE_CSp, p_atm
! This block does a thickness weighted variance calculation and helps control for
! extreme gradients along layers which are vanished against topography. It is
! still a poor approximation in the interior when coordinates are strongly tilted.
hl(1) = h(i,j,k) ; hl(2) = h(i-1,j,k) ; hl(3) = h(i+1,j,k) ; hl(4) = h(i,j-1,k) ; hl(5) = h(i,j+1,k)
hl(1) = h(i,j,k) * G%mask2dT(i,j)
hl(2) = h(i-1,j,k) * G%mask2dCu(I-1,j)
hl(3) = h(i+1,j,k) * G%mask2dCu(I,j)
hl(4) = h(i,j-1,k) * G%mask2dCv(i,J-1)
hl(5) = h(i,j+1,k) * G%mask2dCv(i,J)
mn_H = ( hl(1) + ( ( hl(2) + hl(3) ) + ( hl(4) + hl(5) ) ) ) + GV%H_subroundoff
mn_H = 1. / mn_H ! Hereafter, mn_H is the reciprocal of mean h for the stencil
! Mean of T
Expand Down

0 comments on commit 4dbc126

Please sign in to comment.