No longer clear all encoding in set_zarr_encoding#90
No longer clear all encoding in set_zarr_encoding#90TomNicholas wants to merge 1 commit intocarbonplan:mainfrom
Conversation
|
Thanks for the PR @TomNicholas! Do you mind sharing more information about what specifically was cleared from the encoding that was frustrating? I can see the value of keeping other encoding fields, but also expect that clearing the encoding may have arisen from differing conventions for fill values which can cause issues with serializing to Zarr (similar to pydata/xarray#7722 but with the Zarr backend). @andersy005 or @norlandrhagen do you know the history / motivation behind fully clearing the encoding fields? |
Specifically the chunking mostly. I create a dataset with some chunking that was chosen for dask purposes, then am asked to save it to disk with another chunking pattern chosen for access via I guess I could alternatively call |
This may be another docs issue. How are you setting the chunking pattern? The recommended way when using |
Oh - I had not seen the I think that because I keep creating a store (an expensive operation) then later trying to modify it somehow I'm hitting issues just because I'm not using the code top-to-bottom in quite the intended way. I think my original complaint might not be valid. |
I found that the way
set_zarr_encodingclears all other encoding fields was frustrating, so this PR changes the function to only change the fields it needs to.I also think this function should be made explicitly public.