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

Ensure attributes are kept upon regridding #27

Merged
merged 9 commits into from
Feb 13, 2024
Merged

Conversation

BSchilperoort
Copy link
Contributor

Tests for the attributes have been added for every method. Only conservative failed, this has been addressed.

@BSchilperoort BSchilperoort linked an issue Feb 12, 2024 that may be closed by this pull request
Copy link
Collaborator

@kjdoore kjdoore left a comment

Choose a reason for hiding this comment

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

Looks good, but the coordinate attributes should not be left out.

src/xarray_regrid/methods/conservative.py Outdated Show resolved Hide resolved
src/xarray_regrid/methods/conservative.py Show resolved Hide resolved
tests/test_regrid.py Outdated Show resolved Hide resolved
src/xarray_regrid/methods/conservative.py Show resolved Hide resolved
src/xarray_regrid/methods/conservative.py Outdated Show resolved Hide resolved
@BSchilperoort
Copy link
Contributor Author

Thanks for having a look @kjdoore! I have added tests for the coordinate attributes (turns out all methods failed) and have fixed them.

Could you have another quick look? Then I'll merge

Copy link
Collaborator

@kjdoore kjdoore 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 look great! Should be good to go.

@BSchilperoort
Copy link
Contributor Author

Thanks for the reviews!

@BSchilperoort BSchilperoort merged commit 9a2db21 into main Feb 13, 2024
7 checks passed
@BSchilperoort BSchilperoort deleted the keep-attrs branch February 13, 2024 14:09
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.

Keep attributes after conservative regridding
2 participants