Open
Description
What is your issue?
The issue is that I am not able to define a custom object codec and use it for encoding particular variables in an xarray Dataset. I found a workaround that requires small changes to two files as follows.
Currently in the zarr backend of xarray, the allowed keys in the encoding dictionary are
{
"chunks",
"compressor",
"filters",
"cache_metadata",
"write_empty_chunks",
}
Would it be possible to add object_codec
to enable the use of custom codecs on object datatypes (change in xarray/backends/zarr.py
)? Also would require ensure_dtype_not_object
to be removed from conventions.py
and placed in the backends as the TODO there suggests.