home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

1 row where state = "closed" and user = 319297 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date), closed_at (date)

type 1

  • issue 1

state 1

  • closed · 1 ✖

repo 1

  • xarray 1
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
212646769 MDU6SXNzdWUyMTI2NDY3Njk= 1302 Opening multiple OpenDAP paths with open_mfdataset fails nordam 319297 closed 0     5 2017-03-08T06:12:09Z 2019-03-10T12:53:34Z 2019-03-10T12:53:34Z NONE      

I'm trying to open multiple NetCDF files hosted on OpenDAP on a THREDDS server, using xarray.open_mfdataset(), but I get an error. If I open only one file (but still with open_mfdataset()), it works, if I open two, it doesn't.

For example, this works just fine:

import xarray as xr
chunks = {'time' : 1, 'depth' : 1}
paths  = [
    'http://thredds.met.no/thredds/dodsC/fou-hi/norkyst800m-1h/NorKyst-800m_ZDEPTHS_his.an.2017022000.nc',
    ]
d = xr.open_mfdataset(paths, chunks = chunks)

while this doesn't:

import xarray as xr
chunks = {'time' : 1, 'depth' : 1}
paths  = [
    'http://thredds.met.no/thredds/dodsC/fou-hi/norkyst800m-1h/NorKyst-800m_ZDEPTHS_his.an.2017022000.nc',
    'http://thredds.met.no/thredds/dodsC/fou-hi/norkyst800m-1h/NorKyst-800m_ZDEPTHS_his.an.2017022100.nc',
    ]
d = xr.open_mfdataset(paths, chunks = chunks)

I'm running this in a jupyter notebook, and I don't get any output in the notebook, it just keeps running, while in the terminal it prints the following

CURL Error: Failed initialization
curl error details:
CURL Error: Failed initialization
CURL Error: Failed initialization
CURL Error: Failed initialization
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: !�zF^@L������@L�Ы�J�@L�y@L�G`Lp@L�X�ڭ@L�/��a@L���@L��{�:@@L�Hl�D@L���i@L�f���@L�>����@L�x��f@L��DA�h@L�����@L��ڭ�M@L�u���@M
CURL Error: Failed initialization
curl error details:
CURL Error: Failed initialization
CURL Error: Failed initialization
syntax error, unexpected WORD_WORD, expecting $end
context: Dataset { Structure { Float64 lon[Y = 902][X = 2602]; } lon;} fou-hi/norkyst800m-1h/NorKyst-800m_ZDEPTHS_his.an.2017022100.nc;Data^:
CURL Error: Failed initialization
CURL Error: Failed initialization
CURL Error: Failed initialization
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: �@��&��D^@�h�N�{@��I$�@B�

and from there on, it just degenerates into printing more garbage.

Isn't this supposed to work just fine?

I'm not sure if this is relevant, as I don't know if xarray and netCDF4 use the same backends, but in any case, the following works just fine. At least that suggests the problem isn't at the server side.

import netCDF4 as nc
d = nc.MFDataset([
    'http://thredds.met.no/thredds/dodsC/fou-hi/norkyst800m-1h/NorKyst-800m_ZDEPTHS_his.an.2017022000.nc',
    'http://thredds.met.no/thredds/dodsC/fou-hi/norkyst800m-1h/NorKyst-800m_ZDEPTHS_his.an.2017022100.nc',
])

I'm running xarray version 0.9.1, and netCDF4 version 1.2.4, and python 3.5.1, all installed with Anaconda, on a Mac.

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

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 25.195ms · About: xarray-datasette