home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 449004641

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
449004641 MDU6SXNzdWU0NDkwMDQ2NDE= 2993 `xr.open_dataset` with `pydapdatastore` raises `too many indices for array` error 8037983 closed 0     5 2019-05-27T22:35:36Z 2023-12-02T02:48:09Z 2023-12-02T02:48:09Z NONE      

Hi, I'm trying to use xarray.open_dataset() to open password-protected Opendap files. I was able to create a valid pydap.cas sessionand xr.backends.PydapDataStore object. However, when I pass them to xr.open_dataset() method, I get the IndexError: too many indices for array error. My dataset has a single time point. I'm wondering if this may be related to this previous issue(#476). Could you help me sort out this issue? Thank you!

```python

OpenDAP authroization

from netrc import netrc username, _, pw = netrc().hosts['urs.earthdata.nasa.gov']

OPENDAP client

from pydap.client import open_url from pydap.cas.urs import setup_session

url = ('https://hydro1.gesdisc.eosdis.nasa.gov/opendap/hyrax/FLDAS/' 'FLDAS_NOAH01_A_EA_D.001/2019/04/FLDAS_NOAH01_A_EA_D.A20190401.001.nc')

session = setup_session(username, pw, check_url=url) store = xr.backends.PydapDataStore.open(url, session=session) ds = xr.open_dataset(store) ```

Problem description


Update:

On the other hand, I was able to read in the data using the store.get_variable() method directly, but no coordinate metadata are read.

Also, the store object's dimension attribute doesn't seem to exist:

INSTALLED VERSIONS ------------------ commit: None python: 3.7.1 | packaged by conda-forge | (default, Feb 18 2019, 01:42:00) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 3.10.0-862.11.6.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.6.2 xarray: 0.12.1 pandas: 0.24.2 numpy: 1.16.3 scipy: 1.3.0 netCDF4: 1.5.1.2 pydap: installed h5netcdf: None h5py: 2.9.0 Nio: None zarr: 2.3.1 cftime: 1.0.3.4 nc_time_axis: None PseudonetCDF: None rasterio: 1.0.22 cfgrib: None iris: None bottleneck: None dask: 1.2.2 distributed: 1.28.1 matplotlib: 3.1.0 cartopy: 0.17.0 seaborn: None setuptools: 41.0.1 pip: 19.1 conda: None pytest: 4.5.0 IPython: 7.1.1 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2993/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  not_planned 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 4 rows from issue in issue_comments
Powered by Datasette · Queries took 0.612ms · About: xarray-datasette