home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 353566871

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
353566871 MDU6SXNzdWUzNTM1NjY4NzE= 2380 Cannot specify options for pynio engine through backend_kwargs of open_dataset/open_dataarray 5385574 closed 0     4 2018-08-23T21:50:16Z 2019-02-07T02:56:21Z 2019-02-07T02:56:21Z NONE      

Code Sample

```python frost_run = xr.open_dataarray("nam.grib2", engine="pynio", backend_kwargs={"SingleElementDimensions": "Initial_time"})

or

import Nio nio_options = Nio.options() nio_options.SingleElementDimensions = "Initial_time" frost_run = xr.open_dataarray("nam.grib2", engine="pynio", backend_kwargs={"options": nio_options}) ```

Problem description

The problem is that there is not a way through xarray to set the PyNio specific options, and I have confirmed by taking a look at the initializer signature of NioDataStore python def __init__(self, filename, mode='r', autoclose=False): Which does not provide a way to specify that value of the options parameter of the Nio.open_file method it uses

The only workaround is modify the global defaults for Nio prior to opening, i.e.,

```python import Nio Nio.option_defaults["SingleElementDimensions"] = "Initial_time"

open datasets now

```

Expected Output

Either way from the sample results in TypeError: __init__() got an unexpected keyword argument

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.6.6.final.0 python-bits: 64 OS: Darwin OS-release: 17.7.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 xarray: 0.10.8 pandas: 0.23.4 numpy: 1.15.0 scipy: 1.1.0 netCDF4: 1.4.1 h5netcdf: 0.6.2 h5py: 2.8.0 Nio: 1.5.2 zarr: None bottleneck: 1.2.1 cyordereddict: None dask: 0.18.2 distributed: 1.22.1 matplotlib: 2.2.3 cartopy: 0.16.0 seaborn: 0.9.0 setuptools: 40.0.0 pip: 18.0 conda: 4.5.11 pytest: 3.7.2 IPython: 6.5.0 sphinx: 1.7.5
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2380/reactions",
    "total_count": 2,
    "+1": 2,
    "-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
  • 4 rows from issue in issue_comments
Powered by Datasette · Queries took 78.015ms · About: xarray-datasette