-
Notifications
You must be signed in to change notification settings - Fork 2
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
generalize dims as X/Y when lat/lon or rlat/rlon #221
Conversation
Welcome, new contributor! It appears that this is your first Pull Request. To give credit where it's due, we ask that you add your information to the
Please make sure you've read our contributing guide. We look forward to reviewing your Pull Request shortly ✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Are you able to add a test ? You could create a test/test_io.py
file with the same structure as the other test files with a test_rechunk_for_saving
function.
Looks good! I would add a mention of this both in the Docstrings for |
Co-authored-by: Pascal Bourgault <bourgault.pascal@ouranos.ca>
for more information, see https://pre-commit.ci
Co-authored-by: Pascal Bourgault <bourgault.pascal@ouranos.ca>
Co-authored-by: juliettelavoie <juliette.lavoie@hotmail.ca>
I changed the docstrings and and added a line about this in the notebook. |
test/test_io.py created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can help with the tests, if you want.
Co-authored-by: RondeauG <38501935+RondeauG@users.noreply.github.com>
Co-authored-by: RondeauG <38501935+RondeauG@users.noreply.github.com>
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.What kind of change does this PR introduce?
rechunk:
time: -1
X: 100
Y: 100
instead of
rechunk:
time: -1
rlat: 100
rlon: 100
or
rechunk:
time: -1
lat: 100
lon: 100
This allows to handle grids on different projections together. Example: RDRSv2 (rlat/rlon) and ERA5-Land (lat/lon); different CORDEX-NA RCMs;
Does this PR introduce a breaking change?
No.
Other information:
The duplicated code preparing for rechunking from
save_to_netcdf()
andsave_to_zarr()
was refactored into a private function_rechunk_for_saving()