home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 545297609

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
545297609 MDU6SXNzdWU1NDUyOTc2MDk= 3661 How to handle 2d latitude and longitude coordinates within DataArray creation 27021858 closed 0     3 2020-01-04T15:31:43Z 2022-07-09T21:54:21Z 2020-01-04T19:44:15Z NONE      

MCVE Code Sample

```python frames_z.shape -> (25, 1100, 900) grid[:, :, 1].shape -> (1100, 900) grid[:, :, 0].shape -> (1100, 900)

xarray.DataArray(frames_z, coords={'time': timestamps, 'latitude':grid[:, :, 1],'longitude': grid[:, :, 0]}, dims=['time', 'latitude', 'longitude'])

```

Expected Output

Array with latitude and longitude as coordinates.

Problem Description

I am receiving following error message:

MissingDimensionsError: cannot set variable 'latitude' with 2-dimensional data without explicit dimension names. Pass a tuple of (dims, data) instead. And I tried several ways of defining coords and dims but it always fails.

Output of xr.show_versions()

# Paste the output here xr.show_versions() here xarray==0.11.3
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3661/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

  • 0 rows from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.846ms · About: xarray-datasette