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

Ignore NaNs when checking for negative basalHeatFlux #551

Conversation

trhille
Copy link
Collaborator

@trhille trhille commented Jan 31, 2024

Ignore NaNs when checking for negative basalHeatFlux by using np.nanmin() instead of just min(). This will not throw an assertion error when NaNs are present in the interpolated basalHeatFlux field. NaNs in datasets are a separate issue from sign conventions, so will be dealt with separately. This merge fixes a bug introduced in #543.

Ignore NaNs when checking for negative basalHeatFlux by using np.nanmin()
instead of just min(). This will not throw an assertion error when NaNs
are present in the interpolated basalHeatFlux field. NaNs in datasets
are a separate issue from sign conventions, so will be dealt with
separately.
Copy link
Member

@matthewhoffman matthewhoffman left a comment

Choose a reason for hiding this comment

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

Tested this in MPAS-Dev/compass#767 and the AIS mesh gen tests passed.

@matthewhoffman matthewhoffman merged commit 083600a into MPAS-Dev:master Jan 31, 2024
7 checks passed
@matthewhoffman matthewhoffman deleted the landice/fix_assert_positive_basalHeatFlux branch January 31, 2024 23:17
matthewhoffman added a commit to MPAS-Dev/compass that referenced this pull request Jan 31, 2024
Update file names on LCRC server

Update file names on LCRC server to use files that do not have negative basal heat flux.

Note: The Antarctic data files still include NaNs as missing values. This requires the changes in MPAS-Dev/MPAS-Tools#551 to pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants