Skip to content

Conversation

@aurghs
Copy link
Collaborator

@aurghs aurghs commented Dec 3, 2020

Part of #4595
The changes involve only open_dataset(..., engine=zarr) (and marginally open_zarr), in particular, _get_chunks has been modified to fit #4496 (comment) option 1 chunking behaviour and align open_dataset chunking with dataset.chunk:

  • with auto it uses dask auto-chunking (if a preferred_chunking is defined, dask will take it into account as done in dataset.chunk)
  • with -1 it uses dask but no chunking.
  • with {} it uses the backend encoded chunks (when available) for on-disk data (xr.open_dataset) and the current chunking for already opened datasets (ds.chunk)

Add some test

ds_b = xr.open_zarr(store_target, consolidated=True, use_cftime=True)
assert xr.coding.times.contains_cftime_datetimes(ds_b.time)

@requires_dask
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use xfail instead, because this is a real limitation with the current implementation.

@alexamici alexamici merged commit 9802411 into pydata:master Dec 9, 2020
@aurghs aurghs mentioned this pull request Dec 23, 2020
2 tasks
@aurghs aurghs deleted the harmonize-zarr-chunking branch February 11, 2021 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants