-
Notifications
You must be signed in to change notification settings - Fork 9
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
Look at using new xarray.unify_chunks()
function rather than the DataArray method we currently use
#184
Comments
I've just started looking at this and I'm a bit confused. Currently we have:
I don't think the line So I think we should change this anyway to:
I've compared the methods in some tests clisops/tests/test_output_utils.py Lines 214 to 247 in d2e1929
but have found that chunked_ds = chunked_ds.unify_chunks() doesn't change anything in these examples.
The definition of the function is 'Unify chunk size along all chunked dimensions of this Dataset.', so is it not doing anything because we're only chunking time? |
Thanks @ellesmith88, when I was using this and experimenting last year, I got the impression that calling |
Hi @agstephens I've just been having another look at this. Also, |
Thanks @ellesmith88, |
Description
There is a new global level
unify_chunks()
function inxarray
that we should check out. It should improve the logic.http://xarray.pydata.org/en/stable/generated/xarray.unify_chunks.html#xarray.unify_chunks
@ellesmith88: please can you do some testing to confirm that you get the same output from:
ds.unify_chunks()
andda = ds[var_id]; da.unify_chunks()
We use the latter in our
clisops
code, so it would be great if we can switch to the former. Please add one or two unit tests to confirm that they will be functionally equivalent. And if so, then please make the change. ThanksThe text was updated successfully, but these errors were encountered: