home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

13 rows where issue = 89268800 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 5

  • guziy 4
  • shoyer 4
  • jhamman 2
  • j08lue 2
  • spencerahill 1

author_association 2

  • CONTRIBUTOR 7
  • MEMBER 6

issue 1

  • `xray.open_mfdataset` concatenates also variables without time dimension · 13 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
330592365 https://github.com/pydata/xarray/issues/438#issuecomment-330592365 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU5MjM2NQ== guziy 900941 2017-09-19T16:16:57Z 2017-09-19T16:16:57Z CONTRIBUTOR

Thanks @shoyer: Is there a how to contribute guide? I basically look for how to write a test and run test to check if my adding this option did not break anything...

Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330582379 https://github.com/pydata/xarray/issues/438#issuecomment-330582379 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU4MjM3OQ== jhamman 2443309 2017-09-19T15:45:41Z 2017-09-19T15:45:41Z MEMBER

I stand corrected. Misread the old issue. ☕️ 😪

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330582192 https://github.com/pydata/xarray/issues/438#issuecomment-330582192 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU4MjE5Mg== shoyer 1217238 2017-09-19T15:45:06Z 2017-09-19T15:45:06Z MEMBER

Indeed, data_vars is a (somewhat confusingly named) argument to xarray.concat, and isn't deprecated. open_mfdataset could pass the argument on through to concat, but it doesn't do that yet.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330575216 https://github.com/pydata/xarray/issues/438#issuecomment-330575216 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU3NTIxNg== jhamman 2443309 2017-09-19T15:22:51Z 2017-09-19T15:43:37Z MEMBER

~use of data_vars was deprecated in https://github.com/pydata/xarray/pull/473.~

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330580615 https://github.com/pydata/xarray/issues/438#issuecomment-330580615 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU4MDYxNQ== guziy 900941 2017-09-19T15:39:53Z 2017-09-19T15:40:40Z CONTRIBUTOR

This seems to be working, and no deprecation warning... (But probably I have to sort paths...)

```python In [8]: ds = xarray.concat([xarray.open_dataset(p, chunks={"time": 100}) for p in paths], data_vars="minimal", dim="time")

In [9]: ds Out[9]: <xarray.Dataset> Dimensions: (time: 13505, x: 782, y: 808) Coordinates: * x (x) float64 -4.556e+06 -4.546e+06 -4.536e+06 ... * y (y) float64 4.98e+06 4.97e+06 4.96e+06 4.95e+06 ... * time (time) datetime64[ns] 1993-01-01T12:00:09.140797440 ... Data variables: lon (y, x) float64 156.5 156.5 156.6 156.6 156.7 ... lat (y, x) float64 58.55 58.64 58.72 58.81 58.9 ... lambert_conformal_conic int16 -32767 tmin (time, y, x) float64 nan nan nan nan nan nan ...

In [10]: lon = ds["lon"]

In [11]: lon.ndim Out[11]: 2 ``` Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330569786 https://github.com/pydata/xarray/issues/438#issuecomment-330569786 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU2OTc4Ng== guziy 900941 2017-09-19T15:05:27Z 2017-09-19T15:05:49Z CONTRIBUTOR

Thanks @spencerahill : You are right, but the error message won't change, since the data_vars keyword is not known, and I am not able to change the dataset's attribute data_vars. I think I have to use concat explicitly...

Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330568482 https://github.com/pydata/xarray/issues/438#issuecomment-330568482 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU2ODQ4Mg== spencerahill 6200806 2017-09-19T15:01:37Z 2017-09-19T15:01:37Z CONTRIBUTOR

I think you've accidentally used "minimum" instead of "minimal"

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
330567549 https://github.com/pydata/xarray/issues/438#issuecomment-330567549 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDMzMDU2NzU0OQ== guziy 900941 2017-09-19T14:58:55Z 2017-09-19T14:58:55Z CONTRIBUTOR

Hi @shoyer:

where is this data_vars='minimal' set? or maybe I am using a wrong version of xarray? Here is what I get

```python

In [10]: ds = xarray.open_mfdataset("/snow3/huziy/Daymet_daily_derivatives/daymet_spatial_agg_tmin_10x10/daymet_v3_tmin_*.nc4", data_vars="minimum")

TypeError Traceback (most recent call last) <ipython-input-10-ba844206f74a> in <module>() ----> 1 ds = xarray.open_mfdataset("/snow3/huziy/Daymet_daily_derivatives/daymet_spatial_agg_tmin_10x10/daymet_v3_tmin_*.nc4", data_vars="minimum")

/snow3/huziy/Python/python_builds/anaconda3/envs/py3.6-a3/lib/python3.6/site-packages/xarray/backends/api.py in open_mfdataset(paths, chunks, concat_dim, compat, preprocess, engine, lock, **kwargs) 503 paths = sorted(glob(paths)) 504 else: --> 505 paths = [str(p) if isinstance(p, path_type) else p for p in paths] 506 507 if not paths:

/snow3/huziy/Python/python_builds/anaconda3/envs/py3.6-a3/lib/python3.6/site-packages/xarray/backends/api.py in <listcomp>(.0) 503 paths = sorted(glob(paths)) 504 else: --> 505 paths = [str(p) if isinstance(p, path_type) else p for p in paths] 506 507 if not paths:

TypeError: open_dataset() got an unexpected keyword argument 'data_vars'

In [11]: ds = xarray.open_mfdataset("/snow3/huziy/Daymet_daily_derivatives/daymet_spatial_agg_tmin_10x10/daymet_v3_tmin_*.nc4")

In [12]: ds.data_vars = "minimum"

AttributeError Traceback (most recent call last) <ipython-input-12-9026b067946d> in <module>() ----> 1 ds.data_vars = "minimum"

/snow3/huziy/Python/python_builds/anaconda3/envs/py3.6-a3/lib/python3.6/site-packages/xarray/core/common.py in setattr(self, name, value) 180 raise AttributeError( 181 "cannot set attribute %r on a %r object. Use setitem " --> 182 "style assignment (e.g., ds['name'] = ...) instead to " 183 "assign variables." % (name, type(self).name)) 184 object.setattr(self, name, value)

AttributeError: can't set attribute

In [13]: ds.data_vars Out[13]: Data variables: tmin (time, y, x) float64 nan nan nan nan nan nan ... lon (time, y, x) float64 156.5 156.5 156.6 156.6 ... lat (time, y, x) float64 58.55 58.64 58.72 58.81 ... lambert_conformal_conic (time) int64 -32767 -32767 -32767 -32767 -32767 ...

In [16]: xarray.version Out[16]: '0.9.6'

``` Cheers

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
121464036 https://github.com/pydata/xarray/issues/438#issuecomment-121464036 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDEyMTQ2NDAzNg== shoyer 1217238 2015-07-15T02:36:56Z 2015-07-15T02:36:56Z MEMBER

With #473, you will be able to achieve your desired result by adjusting the data_vars argument. data_vars='minimal will probably do the trick.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
113562216 https://github.com/pydata/xarray/issues/438#issuecomment-113562216 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDExMzU2MjIxNg== shoyer 1217238 2015-06-19T16:16:50Z 2015-06-19T16:16:50Z MEMBER

But why not just exclude all that do not have a time dimension?

Yeah, this is probably a good idea.

concat also covers combining datasets along a new dimension (i.e., if time was not a dimension of any of the individual datasets), but that's not the case here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
113422235 https://github.com/pydata/xarray/issues/438#issuecomment-113422235 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDExMzQyMjIzNQ== j08lue 3404817 2015-06-19T08:03:19Z 2015-06-19T08:03:44Z CONTRIBUTOR

netCDF4-python uses a dimension specified by the user or an unlimited dimension it finds in the dataset. Here is the corresponding code section.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
113415070 https://github.com/pydata/xarray/issues/438#issuecomment-113415070 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDExMzQxNTA3MA== j08lue 3404817 2015-06-19T07:44:25Z 2015-06-19T07:45:40Z CONTRIBUTOR

Here is a print-out of the full dataset for POP ocean model output (see that gist in nbviewer).

I can see that the heuristics exclude variables from concatenation that are associated with dimensions of other variables. But why not just exclude all that do not have a time dimension?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800
113202457 https://github.com/pydata/xarray/issues/438#issuecomment-113202457 https://api.github.com/repos/pydata/xarray/issues/438 MDEyOklzc3VlQ29tbWVudDExMzIwMjQ1Nw== shoyer 1217238 2015-06-18T16:02:25Z 2015-06-18T16:02:25Z MEMBER

Hmm, I'll have to think about this one. We use some heuristics to figure out what to concatenation but they aren't perfect. Could you print what the full datasets look like, not just this variable?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  `xray.open_mfdataset` concatenates also variables without time dimension 89268800

Advanced export

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

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 16.696ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows