home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1343038233

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1343038233 I_kwDOAMm_X85QDSMZ 6929 Support new netcdf4 1.6.0 compression arguments 6883049 closed 0     2 2022-08-18T12:35:34Z 2022-12-01T22:41:53Z 2022-12-01T22:41:53Z CONTRIBUTOR      

Is your feature request related to a problem?

When using the netcdf4 engine, I am not able to use the new "compression" argument to choose a compression scheme different from zlib in the encoding.

``` if raise_on_invalid: invalid = [k for k in encoding if k not in valid_encodings] if invalid:

          raise ValueError(
                f"unexpected encoding parameters for {backend!r} backend: {invalid!r}. Valid "
                f"encodings are: {valid_encodings!r}"
            )

E ValueError: unexpected encoding parameters for 'netCDF4' backend: ['compression']. Valid encodings are: {'fletcher32', 'zlib', 'contiguous', 'dtype', 'least_significant_digit', 'shuffle', 'complevel', '_FillValue', 'chunksizes'}

../../../../netCDF4_.py:279: ValueError ```

Furthermore, according to the release notes of 1.6.0, zlib argument is to be deprecated:

* add 'compression' kwarg to createVariable to enable new compression functionality in netcdf-c 4.9.0. 'None','zlib','szip','zstd','bzip2' 'blosc_lz','blosc_lz4','blosc_lz4hc','blosc_zlib' and 'blosc_zstd' are currently supported. 'blosc_shuffle', 'szip_mask' and 'szip_pixels_per_block' kwargs also added. compression='zlib' is equivalent to (the now deprecated) zlib=True. If the environment variable NETCDF_PLUGIN_DIR is set to point to the directory with the compression plugin lib__nc* files, then the compression plugins will be installed within the package and be automatically available (the binary wheels have this). Otherwise, the environment variable HDF5_PLUGIN_PATH needs to be set at runtime to point to plugins in order to use the new compression options.

I am using the last versions

xarray: 2022.6.0 pandas: 1.4.2 numpy: 1.22.4 scipy: None netCDF4: 1.6.0 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.6.0 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2022.6.0 distributed: 2022.6.0 matplotlib: 3.5.2 cartopy: None seaborn: None numbagg: None fsspec: 2022.5.0 cupy: None pint: None sparse: None flox: None numpy_groupies: None setuptools: 62.6.0 pip: 22.1.2 conda: None pytest: 7.1.2 IPython: 8.4.0 sphinx: 5.1.1

Describe the solution you'd like

Update the netcdf4 backend to support these arguments. Should not be too difficult.

Describe alternatives you've considered

No response

Additional context

I can try to do this myself, it does not look hard.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6929/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.664ms · About: xarray-datasette