home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 621177286

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
621177286 MDU6SXNzdWU2MjExNzcyODY= 4082 "write to read-only" Error in xarray.open_mfdataset() with opendap datasets 65610153 closed 0     26 2020-05-19T18:00:58Z 2022-04-09T15:51:46Z 2022-04-09T15:51:46Z NONE      

Error in loading in data from a THREDDS server. Can't find any info on what might be causing it based on the error messages themselves.

Code Sample

``` def list_dates(start, end): num_days = (end - start).days return [start + dt.timedelta(days=x) for x in range(num_days)]

start_date = dt.date(2017, 3, 1) end_date = dt.date(2017, 3, 31) date_list = list_dates(start_date, end_date) window = dt.timedelta(days=5)

url = 'https://www.ncei.noaa.gov/thredds/dodsC/OisstBase/NetCDF/V2.0/AVHRR/{0:%Y%m}/avhrr-only-v2.{0:%Y%m%d}.nc' data = [] cur_date = start_date for cur_date in date_list:

date_window = list_dates(cur_date - window, cur_date + window)
url_list = [url.format(x) for x in date_window]
window_data=xr.open_mfdataset(url_list).sst
data.append(window_data.mean('time'))

dataf=xr.concat(data, dim=pd.DatetimeIndex(date_list, name='time'))

``` Expected Output No error with dataf containing a data array with the dates listed above.

Error Description Error 1:

KeyError: [<class 'netCDF4._netCDF4.Dataset'>, ('https://www.ncei.noaa.gov/thredds/dodsC/OisstBase/NetCDF/V2.0/AVHRR/201703/avhrr-only-v2.20170322.nc',), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False))]

Error 2: OSError: [Errno -37] NetCDF: Write to read only: b'https://www.ncei.noaa.gov/thredds/dodsC/OisstBase/NetCDF/V2.0/AVHRR/201703/avhrr-only-v2.20170322.nc'

Versions python: 3.7.4 xarray: 0.15.0 pandas: 0.25.1 numpy: 1.16.5 scipy: 1.3.1 netcdf4: 1.5.3

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4082/reactions",
    "total_count": 0,
    "+1": 0,
    "-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
  • 26 rows from issue in issue_comments
Powered by Datasette · Queries took 0.812ms · About: xarray-datasette