home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 305327479

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
305327479 MDU6SXNzdWUzMDUzMjc0Nzk= 1988 open_mfdataset() on a single file drops the concat_dim 291576 closed 0     6 2018-03-14T21:02:39Z 2018-04-10T20:48:59Z 2018-04-10T20:48:59Z CONTRIBUTOR      

When calling xr.open_mfdataset() on a 1 element list of filenames, the concat dimension is never added.

This isn't a MWE at the moment (will make one soon enough), just wanted to get my thoughts down.

```python from datetime import datetime import xarray as xr

time_coord = xr.DataArray([datetime.utcnow()], name='time', dims='time') radmax_ds = xr.open_mfdataset(['foobar.nc'], concat_dim=time_coord) print(radmax_ds) <xarray.Dataset> Dimensions: (latitude: 5650, longitude: 12050) Coordinates: * latitude (latitude) float32 13.505002 13.515002 13.525002 13.535002 ... * longitude (longitude) float32 -170.495 -170.485 -170.475 -170.465 ... Data variables: RadarMax (latitude, longitude) float32 dask.array<shape=(5650, 12050), chunksize=(5650, 12050)> Attributes: start_date: 03/07/2017 01:00 end_date: 03/07/2017 01:55 elapsed: 60 ```

Problem description

If there are two files, then there is a time coordinate, and the data array becomes 3D.

Output of xr.show_versions()

I am currently on a recent-ish master of xarray.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1988/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

  • 2 rows from issues_id in issues_labels
  • 6 rows from issue in issue_comments
Powered by Datasette · Queries took 0.82ms · About: xarray-datasette