Skip to content

Commit

Permalink
Add another encoding parameter to skip
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcvey3 committed Oct 29, 2024
1 parent 6a69d6c commit f511dd9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mhkit/dolfyn/io/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,15 @@ def save(ds, filename, format="NETCDF4", engine="netcdf4", compression=False, **
enc[ky] = ds[ky].encoding
# Remove unexpected netCDF4 encoding parameters
# https://github.com/pydata/xarray/discussions/5709
params = ["szip", "zstd", "bzip2", "blosc", "contiguous", "chunksizes"]
params = [
"szip",
"zstd",
"bzip2",
"blosc",
"contiguous",
"chunksizes",
"preferred_chunks",
]
[enc[ky].pop(p) for p in params if p in enc[ky]]

if compression:
Expand Down

0 comments on commit f511dd9

Please sign in to comment.