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 #1636. Add History regrid_method attribute #1643

Merged
merged 5 commits into from
Sep 1, 2022

Conversation

mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Aug 23, 2022

Description

This PR adds a new variable metadata to history corresponding to the regrid method used. Testing shows it to be zero-diff and all seems to work.

Also, this fixes a bug where in NEAREST_STOD was not supported by mistake.

Related Issue

Closes #1636

Motivation and Context

We could eventually have different regridding methods per variable. Now we at least have per-collection. By adding some extra metadata, we can at least tell how each variable was regridded:

        float BCDP001(time, lat, lon) ;
                BCDP001:_FillValue = 1.e+15f ;
                BCDP001:add_offset = 0.f ;
                BCDP001:fmissing_value = 1.e+15f ;
                BCDP001:long_name = "Carbonaceous Aerosol Dry Deposition (Bin %d)" ;
                BCDP001:missing_value = 1.e+15f ;
                BCDP001:regrid_method = "conserve_2nd" ;
                BCDP001:scale_factor = 1.f ;
                BCDP001:standard_name = "Carbonaceous Aerosol Dry Deposition (Bin %d)" ;
                BCDP001:units = "kg m-2 s-1" ;
                BCDP001:valid_range = -1.e+15f, 1.e+15f ;
                BCDP001:vmax = 1.e+15f ;
                BCDP001:vmin = -1.e+15f ;

How Has This Been Tested?

Ran GEOS and it built and ran and was zero-diff

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 Aug 23, 2022
@mathomp4 mathomp4 self-assigned this Aug 23, 2022
@mathomp4
Copy link
Member Author

Just realized. I need to test this without GEOS-ESM/GEOSgcm_App#344 as they might come in at different times. I mean...it should work, but let's be careful!

@mathomp4 mathomp4 marked this pull request as ready for review August 29, 2022 16:32
@mathomp4 mathomp4 requested a review from a team as a code owner August 29, 2022 16:32
@mathomp4
Copy link
Member Author

Just realized. I need to test this without GEOS-ESM/GEOSgcm_App#344 as they might come in at different times. I mean...it should work, but let's be careful!

I have done this and all seems to work and I get regrid_method. So...I'll undraft!

@mathomp4 mathomp4 changed the title WIP: Fixes #1636. Add History regrid_method attribute Fixes #1636. Add History regrid_method attribute Aug 29, 2022
@mathomp4 mathomp4 merged commit 4a268b1 into develop Sep 1, 2022
@mathomp4 mathomp4 deleted the feature/mathomp4/1636-regrid-attribute branch September 1, 2022 16:26
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.

2 participants