-
Notifications
You must be signed in to change notification settings - Fork 66
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
Fix regrid example #305
Fix regrid example #305
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
View / edit / reply to this conversation on ReviewNB navidcy commented on 2023-10-23T14:27:30Z can we deal with these warnings? they are trying to warn us about something and we ignore them. @dougiesquire? anton-seaice commented on 2023-10-23T21:48:11Z I don't think they are relevant for our circumstance.
Saying that, i am definitely a dask amateur :) dougiesquire commented on 2023-10-23T22:33:03Z I think we want to understand what's going on here. The warnings are telling us that the cookbook is opening the data with dask chunks that split the chunking on disk, which is definitely not something we want to do. The default chunking of the cookbook should be the chunking on disk, so to me this looks like it could be a bug in either the cookbook or in xarray.
However I can't reproduce the warnings. I don't get them with either |
View / edit / reply to this conversation on ReviewNB navidcy commented on 2023-10-23T14:27:31Z Line #3. ssh_1_regridded = tidy_coords(ssh_1_regridded) this is just 1-2 operations so let's not define a new function, e.g.,
also, let's avoid |
I don't think they are relevant for our circumstance.
Saying that, i am definitely a dask amateur :) View entire conversation on ReviewNB |
I think we want to understand what's going on here. The warnings are telling us that the cookbook is opening the data with dask chunks that split the chunking on disk, which is definitely not something we want to do. The default chunking of the cookbook should be the chunking on disk, so to me this looks like it could be a bug in either the cookbook or in xarray.
However I can't reproduce the warnings. I don't get them with either View entire conversation on ReviewNB |
Ah thanks!
They occur in analysis3-23.07 |
Ah whoops - didn't notice 23.07 - ta |
2aef408
to
073496c
Compare
adding a xr_kwargs = {"chunks": _parse_chunks(ncfiles[0].NCVar)} but I can't see anything obviously wrong there. |
See update here: #305 (comment) |
OK! |
See update here: #305 (comment) |
Specifying |
Maybe In this workbook, they re-chunk before doing processing, so probably no change needed for this one? |
I thought about this for Intake-ESM, but unfortunately object dtype data is too common for this to be a good default.
I didn't get that far through the notebook. If that's the case, it's best to open the data with chunks as close to the final chunks as possible - see here |
Thanks - I can't make the |
|
Sorry, I'm actually wrong about this being an issue in xarray. I didn't notice at first, but the The fix is to get rid of the logic in the cosima-cookbook that sets the default |
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2023-10-24T02:48:47Z @dougiesquire Does this new description make sense? dougiesquire commented on 2023-10-24T02:58:09Z Looks good. |
Looks good. View entire conversation on ReviewNB |
This pull request has been mentioned on ACCESS Hive Community Forum. There might be relevant details there: https://forum.access-hive.org.au/t/xarray-warnings-while-loading-data-using-cosima-cookbook/2169/4 |
Closes #300
After the re-grid, the new index dimensions (x/y) are renamed to longitude and latitude. I added a line to explicitly delete the old longitude and latitude coordinates first to avoid there being a name conflict.
The fix is backward compatible, it works on both conda/analysis and analysis-unstable