pangeo-data/rechunker

Compressor options in the .encoding dictionaries of a source xr.Dataset are not exploited by the rechunker

ghiggi opened this issue · 1 comments

I noticed that when a Zarr store is read into a xr.Dataset (with compressor options present in each DataArray.encoding), and the xr.Dataset is provided as source to the rechunker, the compressor options are discarded in favour of a default
Blosc(cname='lz4', clevel=5, shuffle=SHUFFLE, blocksize=0).
Would be useful if the existing compressor options are exploited when saving the new zarr arrays.

Hi @ghiggi and thanks for the comment! Sorry it took so long to respond--several of us were on vacation in August.

I agree it would be useful to exploit xarray encoding options. We would welcome a PR to implement this.