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

Expand allowed _FillValue type and error handling in FileMetadataUtilities.F90 #1506

Conversation

lizziel
Copy link
Contributor

@lizziel lizziel commented May 11, 2022

Description

This update expands error handling in FileMetadataUtilities to print filename in all calls to _ASSERT and _FAIL. Fail messages about unsupported attribute type now specify the unique type constraint per function. For single precision attribute retrieval there is now handling for double precision input.

Related Issue

Closes #1489

Motivation and Context

This update prevents run fail when retrieving _FillValue from import files containing double precision data used GCHP. It also expands the error handling so that failure on reading import attributes always results in a unique message with the filename, making it easier to find and fix the problem.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Trivial change (affects only documentation or cleanup)

Checklist:

  • I have tested this change with a run of GEOSgcm (if non-trivial)
  • I have added one of the required labels (0 diff, 0 diff trivial, 0 diff structural, non 0-diff)
  • I have updated the CHANGELOG.md accordingly following the style of Keep a Changelog

NOTE: I tested this update successfully with GCHP using MAPL 2.18.3. It was not a straightforward cherry-pick due to the addition of _FAIL but I will fix any build issues if they show up in the automatic build test.

@lizziel lizziel added the 0 Diff Trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.) label May 11, 2022
@lizziel lizziel requested a review from a team as a code owner May 11, 2022 15:25
@mathomp4
Copy link
Member

@lizziel Looks good. I'm not sure why GEOSadas test failed here. I'm going to re-run it to see if it was a transient issue or something fundamental.

@mathomp4
Copy link
Member

@lizziel Looks good. I'm not sure why GEOSadas test failed here. I'm going to re-run it to see if it was a transient issue or something fundamental.

Nope. It's fundamental. I'll need to fix this and get a fix on develop. Once I do, @lizziel, I'll ask if you can merge in that fix to your branch. We'll get this working...

@mathomp4 mathomp4 mentioned this pull request May 16, 2022
7 tasks
@mathomp4
Copy link
Member

@lizziel Okay. Can you update your end to the latest develop. I've fixed the CI issue now.

lizziel added 4 commits May 17, 2022 09:18
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
This update prevents run fail when retrieving _FillValue from import files
containing double precision data.

Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
Signed-off-by: Lizzie Lundgren <elundgren@seas.harvard.edu>
@lizziel lizziel force-pushed the feature/ewl/improvements_to_FileMetadataUtilities branch from 29ee301 to e484e71 Compare May 17, 2022 13:20
@lizziel
Copy link
Contributor Author

lizziel commented May 17, 2022

I rebased on the latest develop. Hopefully this time all will pass.

@mathomp4 mathomp4 requested review from mathomp4 and a team May 17, 2022 13:47
@mathomp4
Copy link
Member

All looks good. I'll run a GEOSgcm run just to make sure it's happy (I can't see why it wouldn't).

Copy link
Member

@mathomp4 mathomp4 left a comment

Choose a reason for hiding this comment

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

Well, a C24 run of GEOSgcm seems happy.

@mathomp4 mathomp4 merged commit 3e34cff into GEOS-ESM:develop May 17, 2022
@lizziel lizziel deleted the feature/ewl/improvements_to_FileMetadataUtilities branch August 31, 2022 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff Trivial The changes in this pull request are trivially zero-diff (documentation, build failure, &c.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants