xarray icon indicating copy to clipboard operation
xarray copied to clipboard

support `chunks` in `open_groups` and `open_datatree`

Open keewis opened this issue 1 year ago • 1 comments

In trying to support chunks the way we do for open_dataset I had to add a lot of parameters to the top-level open_datatree and open_groups functions.

I'm also still looking for the equivalent of _protect_dataset_variables_inplace, and finally _dataset_from_backend_dataset has been the place to call set_close, while #9651 pushed this to the backends for datatree.

No tests yet, and I also want to improve the docstrings before merging.

(the chunked array methods – chunk, load, compute, and persist – should be a separate PR)

  • [ ] complete docstrings
  • [ ] Tests added

cc @TomNicholas, @shoyer

keewis avatar Oct 22 '24 17:10 keewis

Thanks for doing this @keewis!

sjperkins avatar Oct 23 '24 06:10 sjperkins

I've copied over the docstring of open_dataset to open_groups and open_datatree and changed the code of _datatree_from_backend_datatree to both copy over _close and to protect the data against modifications. Which means this should be ready for another round of reviews and possibly merging.

keewis avatar Oct 23 '24 21:10 keewis

I'm happy to merge this @keewis ?

TomNicholas avatar Oct 24 '24 16:10 TomNicholas

I'm happy to merge this @keewis ?

me too! Feel free to go ahead and merge.

keewis avatar Oct 24 '24 17:10 keewis