home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 839069111

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/5290#issuecomment-839069111 https://api.github.com/repos/pydata/xarray/issues/5290 839069111 MDEyOklzc3VlQ29tbWVudDgzOTA2OTExMQ== 1217238 2021-05-11T19:45:01Z 2021-05-11T19:45:37Z MEMBER

Hi @niowniow thanks for the feedback and code example here. I've been refactoring the Zarr region re-write functionality in https://github.com/pydata/xarray/pull/5252 so your feedback is timely.

It might be worth trying the code in that PR to see if it changes anything, but in the best case I suspect it would just give you a different error message.

To clarify: - Writing to a region requires that all the desired variables already exist in the Zarr store (e.g., via to_zarr() with compute=False). The main point of writing to a region is that it should be safe to do in parallel, which is not the case for creating new variables. So I think encountering errors in this case is expected, although I agree these error messages are not very informative! - "chunks in coords are not taken into account while saving!?" is correct, but this is actually more a limitation of Xarray's current data model. Coords with the same name as their dimension are converted into an in-memory pandas.Index object -- they can't be stored as dask arrays. You actually still write the data in chunks, but you have to do it by supplying the encoding parameter to to_zarr, e.g., ds.to_zarr(path, mode='w', encoding={'x': {'chunks': 10}}, compute=False, consolidated=True).

If you have any specific suggestions for where the docs might be clarified those would certainly be appreciated!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  887711474
Powered by Datasette · Queries took 0.683ms · About: xarray-datasette