issues: 616025171
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
616025171 | MDU6SXNzdWU2MTYwMjUxNzE= | 4052 | Opendap access problem when subsetting via latitude and longitude... | 13906519 | open | 0 | 1 | 2020-05-11T16:44:02Z | 2022-04-29T00:37:51Z | NONE | I am trying to access a subset of a netcdf files hosted on a THREDDS server. I can inspect the metadata, but I cannot subset the file via lat and lon slices. A download via the http link provided on the page works... MCVE Code Sample```python import xarray as xr this workstest1 = xr.open_dataset(URL) display(test1) this also workstest2 = xr.open_dataset(URL).sel(lat=slice(30,40)) display(test2) this also workstest3 = xr.open_dataset(URL).sel(lon=slice(100,110)) display(test3) this failstest4 = xr.open_dataset(URL).sel(lat=slice(30,40), lon=slice(100,110)) display(test4) ``` Problem DescriptionError: ``` ~/.pyenv/versions/miniconda3-latest/envs/datascience/lib/python3.7/site-packages/xarray/backends/common.py in robust_getitem(array, key, catch, max_retries, initial_delay) 52 for n in range(max_retries + 1): 53 try: ---> 54 return array[key] 55 except catch: 56 if n == max_retries: netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Variable.getitem() netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Variable._get() netCDF4/_netCDF4.pyx in netCDF4._netCDF4._ensure_nc_success() RuntimeError: NetCDF: Access failure ``` I also tried to use the pydap engine, but I'm not sure if this tells me something about the problem or if I use this option incorrectly... ```python URL = "https://thredds.daac.ornl.gov/thredds/dodsC/ornldaac/1247/T_CLAY.nc4" test1 = xr.open_dataset(URL, engine='pydap') test1 ``` result:
Versions``` INSTALLED VERSIONS commit: None python: 3.7.4 (default, Aug 13 2019, 15:17:50) [Clang 4.0.1 (tags/RELEASE_401/final)] python-bits: 64 OS: Darwin OS-release: 19.5.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: 1.10.4 libnetcdf: 4.6.1 xarray: 0.15.1 pandas: 1.0.1 numpy: 1.18.1 scipy: 1.4.1 netCDF4: 1.4.2 pydap: installed h5netcdf: None h5py: None Nio: None zarr: 2.4.0 cftime: 1.0.4.2 nc_time_axis: None PseudoNetCDF: None rasterio: 1.0.21 cfgrib: None iris: None bottleneck: None dask: 2.11.0 distributed: 2.11.0 matplotlib: 3.1.3 cartopy: 0.17.0 seaborn: 0.10.0 numbagg: None setuptools: 45.2.0.post20200210 pip: 20.0.2 conda: None pytest: None IPython: 7.12.0 sphinx: None ``` |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4052/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |