Skip to content

Commit

Permalink
workaround unlimited dims problem
Browse files Browse the repository at this point in the history
Workaround for pydata/xarray#1849
  • Loading branch information
gerritholl committed Jul 20, 2018
1 parent afa5c76 commit 33083ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions FCDR_HIRS/processing/combine_matchups.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,5 +827,11 @@ def merge_files():
logging.info(f"Writing to {p.out:s}")
for (k, v) in new.data_vars.items():
v.encoding["zlib"] = True
# workaround/prevent https://github.com/pydata/xarray/issues/1849
for v in new.variables.values():
try:
del v.encoding["contiguous"]
except KeyError: # no problem
pass
new.to_netcdf(p.out,
unlimited_dims=["M"])

0 comments on commit 33083ed

Please sign in to comment.