Closed vindelico closed 1 year ago
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 AUTHORS.rst
and .zenodo.json
.:
[ ] The relevant author information has been added to AUTHORS.rst
and .zenodo.json
.
Please make sure you've read our contributing guide. We look forward to reviewing your Pull Request shortly ✨
Looks good! I would add a mention of this both in the Docstrings for save_to_zarr
and save_to_netcdf
(probably where rechunk
is defined), as well as in the documentation: https://xscen.readthedocs.io/en/latest/notebooks/2_getting_started.html#Saving-files-to-disk
Looks good! I would add a mention of this both in the Docstrings for
save_to_zarr
andsave_to_netcdf
(probably whererechunk
is defined), as well as in the documentation: https://xscen.readthedocs.io/en/latest/notebooks/2_getting_started.html#Saving-files-to-disk
I changed the docstrings and and added a line about this in the notebook.
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 atest_rechunk_for_saving
function.
test/test_io.py created. I opted for four tests, to check if lat/lon, rlat/rlon are rechunked and when either is rechunked with X/Y as dims.
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()