Skip to content

Commit

Permalink
Minor change of SSH check in extract_surface_state
Browse files Browse the repository at this point in the history
Previously extreme surface message is triggered when `sea_lev` is
smaller than or **equal** to ocean topography:

sfc_state%sea_lev(i,j) <= -G%bathyT(i,j) - G%Z_ref

The equality is innocuous for a non-zero minimum thickness
(Angstrom/=0), but it can be problematic for true zero thickness.

Besides, there is the fourth criterion in this check:

sfc_state%sea_lev(i,j) + G%bathyT(i,j) + G%Z_ref < CS%bad_val_col_thick

This is supposed to allow a user-specified tolerance (default=0.0),
which should be a more stringent check when the tolerance is larger than
zero. The equality from the first check contradicts this logic.
  • Loading branch information
herrwang0 authored and Hallberg-NOAA committed Dec 30, 2024
1 parent dae6226 commit 8062d20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4014,7 +4014,7 @@ subroutine extract_surface_state(CS, sfc_state_in)
numberOfErrors=0 ! count number of errors
do j=js,je ; do i=is,ie
if (G%mask2dT(i,j)>0.) then
localError = sfc_state%sea_lev(i,j) <= -G%bathyT(i,j) - G%Z_ref &
localError = sfc_state%sea_lev(i,j) < -G%bathyT(i,j) - G%Z_ref &
.or. sfc_state%sea_lev(i,j) >= CS%bad_val_ssh_max &
.or. sfc_state%sea_lev(i,j) <= -CS%bad_val_ssh_max &
.or. sfc_state%sea_lev(i,j) + G%bathyT(i,j) + G%Z_ref < CS%bad_val_col_thick
Expand Down

0 comments on commit 8062d20

Please sign in to comment.