Skip to content

Commit

Permalink
Compression not supported for variable length strings
Browse files Browse the repository at this point in the history
  • Loading branch information
bdestombe committed Jul 28, 2023
1 parent d8111e7 commit cf2a2b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dtscalibration/datastore.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ def get_default_encoding(self, time_chunks_from_key=None):
v['dtype'] = 'int32'
# v['_FillValue'] = -9999 # Int does not support NaN

if np.issubdtype(self[k].dtype, str):
# Compression not supported for variable length strings
# https://github.com/Unidata/netcdf4-python/issues/1205
v["zlib"] = False

if time_chunks_from_key is not None:
# obtain optimal chunk sizes in time and x dim
if self[time_chunks_from_key].dims == ('x', 'time'):
Expand Down

0 comments on commit cf2a2b2

Please sign in to comment.