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

Fixes #1888. Set regrid_method to identity for native collections #1922

Merged
merged 8 commits into from
Jan 13, 2023

Conversation

mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Jan 12, 2023

Description

This PR makes it so that if you have a native history collection, the regrid_method is set to identity. Before it was mistakenly set to bilinear. See #1888

Example:

        float H(time, lev, nf, Ydim, Xdim) ;
                H:_FillValue = 1.e+15f ;
                H:add_offset = 0.f ;
                H:coordinates = "lons lats" ;
                H:fmissing_value = 1.e+15f ;
                H:grid_mapping = "cubed_sphere" ;
                H:long_name = "edge_heights" ;
                H:missing_value = 1.e+15f ;
                H:regrid_method = "identity" ;
                H:scale_factor = 1.f ;
                H:standard_name = "edge_heights" ;
                H:units = "m" ;
                H:valid_range = -1.e+15f, 1.e+15f ;
                H:vmax = 1.e+15f ;
                H:vmin = -1.e+15f ;

Also, note to @bena-nasa I also changed the names of a couple of routines to get around a name clash as I wanted to add a get_regrid_method to the abstractregridder.

Related Issue

Closes #1888

Motivation and Context

Makes our output correct!

How Has This Been Tested?

Ran with GEOSgcm. Zero-diff save for metadata change.

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

@mathomp4 mathomp4 added the 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. label Jan 12, 2023
@mathomp4 mathomp4 requested a review from a team as a code owner January 12, 2023 18:02
@mathomp4 mathomp4 self-assigned this Jan 12, 2023
@mathomp4 mathomp4 linked an issue Jan 12, 2023 that may be closed by this pull request
@mathomp4
Copy link
Member Author

Also, ping @lizziel

@lizziel
Copy link
Contributor

lizziel commented Jan 12, 2023

Looks good!

@mathomp4 mathomp4 merged commit ed0b8dd into develop Jan 13, 2023
@mathomp4 mathomp4 deleted the bugfix/mathomp4/1888-identity-method-fix branch January 13, 2023 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

History attribute 'regrid_method' is 'bilinear' if no regridding done
3 participants