Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes for sea surface height related diagnostics/checks #783

Merged
merged 3 commits into from
Dec 30, 2024

Conversation

herrwang0
Copy link

This PR contains three minor fixes related to SSH diagnostics and checks, which address the following issues:

  1. An indexing error with 1D nominal coordinates
  2. Preventing extreme surface message being trigger with Angstrom=0.0
  3. Bug with dynamical step averaged diagnostics SSH_inst

All answers are bitwise identical, but a diagnostics that has been unlikely used is recovered.

Correct a bug that G%gridLonT/G%gridLatT were not using global indexing
in outputing extreme surface information.
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.
Fix a bug that sea surface height averaged over every dynamic time step
(SSH_inst) is not outputted correctly.
Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes all seem correct to me.

@Hallberg-NOAA Hallberg-NOAA added the bug Something isn't working label Dec 30, 2024
@Hallberg-NOAA
Copy link
Member

This PR has just passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25876.

@Hallberg-NOAA
Copy link
Member

Because this PR fixes 3 distinct bugs, one in each of its 3 commits, I am going to retain them as separate commits and do a rebase rather than a squash merge.

@Hallberg-NOAA Hallberg-NOAA merged commit 9371bb0 into NOAA-GFDL:dev/gfdl Dec 30, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants