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/pull/5065#issuecomment-811810701,https://api.github.com/repos/pydata/xarray/issues/5065,811810701,MDEyOklzc3VlQ29tbWVudDgxMTgxMDcwMQ==,35919497,2021-04-01T10:21:15Z,2021-04-01T11:01:44Z,COLLABORATOR,"> ```python > new_var = var.chunk(chunks, name=name2, lock=lock) > new_var.encoding = var.encoding > ``` Here you are modifying `_maybe_chunk`, but `_maybe_chunk` is also used in `Dataset.chunks`. Probably would be better to change `backend.api.py`, here: https://github.com/pydata/xarray/blob/ddc352faa6de91f266a1749773d08ae8d6f09683/xarray/backends/api.py#L296-L307 But maybe also in this case we want to drop `encoding[""chunks""]` if they are not compatible with dask ones. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,837243943 https://github.com/pydata/xarray/pull/5065#issuecomment-811818035,https://api.github.com/repos/pydata/xarray/issues/5065,811818035,MDEyOklzc3VlQ29tbWVudDgxMTgxODAzNQ==,35919497,2021-04-01T10:35:29Z,2021-04-01T10:36:01Z,COLLABORATOR,"> Hmm. I would also be happy with explicitly deleting `chunks` from encoding for now. It's not adding a lot of technical debt. I see two reasons for keeping it: - We should be able to read and write the data with the same structure on disk. - The user may be interested in this information. But it seems to me that having two different definitions of chunks (dask one and encoded one), is not very intuitive and it's not easy to define a clear default in writing. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,837243943 https://github.com/pydata/xarray/pull/5065#issuecomment-811209453,https://api.github.com/repos/pydata/xarray/issues/5065,811209453,MDEyOklzc3VlQ29tbWVudDgxMTIwOTQ1Mw==,35919497,2021-03-31T16:27:05Z,2021-03-31T17:50:19Z,COLLABORATOR,"~`rechunk`~ `Variable.chunk` is used always when you open a data with dask, even if you are using the default chunking. So in this way, you will drop the encoding always when dask is used (≈ always).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,837243943 https://github.com/pydata/xarray/pull/5065#issuecomment-811284237,https://api.github.com/repos/pydata/xarray/issues/5065,811284237,MDEyOklzc3VlQ29tbWVudDgxMTI4NDIzNw==,35919497,2021-03-31T17:45:29Z,2021-03-31T17:49:17Z,COLLABORATOR,"> Does it actually get called every time we load a dataset with chunks? Yes ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,837243943 https://github.com/pydata/xarray/pull/5065#issuecomment-811199910,https://api.github.com/repos/pydata/xarray/issues/5065,811199910,MDEyOklzc3VlQ29tbWVudDgxMTE5OTkxMA==,35919497,2021-03-31T16:20:30Z,2021-03-31T16:31:32Z,COLLABORATOR,"> Should the Zarr backend be setting this? Yes, they are already defined in zarr: preferred_chunks=chunks. We decide to separate the `chunks` and the `preferred_chunks`: - The `preferred_chunks` is used by the backend to define the default chunks to be used by xarray. - The `chunks` are the on-disk chunks. They are not necessarily the same. Maybe we can drop the `preferred_chunks` after they are used. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,837243943 https://github.com/pydata/xarray/pull/5065#issuecomment-808399567,https://api.github.com/repos/pydata/xarray/issues/5065,808399567,MDEyOklzc3VlQ29tbWVudDgwODM5OTU2Nw==,35919497,2021-03-26T17:34:44Z,2021-03-26T18:08:04Z,COLLABORATOR,"Perhaps we could remove also ``overwrite_encoded_chunks``, it shouldn't be any more necessary. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,837243943