home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 227858207

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
227858207 MDU6SXNzdWUyMjc4NTgyMDc= 1403 Lost coords after multiplication 6420873 closed 0     4 2017-05-11T02:00:59Z 2019-04-11T17:53:16Z 2019-04-11T17:53:16Z NONE      

Recently, I occurred a bug: multiplication discards coords of dsarray.

``` In [1]: import xarray as xr

In [2]: xr.version Out[2]: '0.9.5'

In [3]: tarea = xr.open_dataarray('tarea.nc')

In [4]: tarea Out[4]: <xarray.DataArray 'TAREA' (nlat: 384, nlon: 320)> [122880 values with dtype=float64] Coordinates: TLAT (nlat, nlon) float64 -79.22 -79.22 -79.22 -79.22 -79.22 -79.22 ... TLONG (nlat, nlon) float64 320.6 321.7 322.8 323.9 325.1 326.2 327.3 ... Dimensions without coordinates: nlat, nlon Attributes: long_name: area of T cells units: centimeter^2

In [6]: advt = xr.open_dataarray('advt.nc')

In [7]: advt Out[7]: <xarray.DataArray 'ADVT' (nlat: 384, nlon: 320)> [122880 values with dtype=float64] Coordinates: TLAT (nlat, nlon) float64 -79.22 -79.22 -79.22 -79.22 -79.22 -79.22 ... TLONG (nlat, nlon) float64 320.6 321.7 322.8 323.9 325.1 326.2 327.3 ... Dimensions without coordinates: nlat, nlon

In [8]: advt * tarea Out[8]: <xarray.DataArray (nlat: 384, nlon: 320)> array([[ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ 8091417.091781, 15948194.682816, -49201736.790674, ..., nan, nan, nan], ..., [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan], [ nan, nan, nan, ..., nan, nan, nan]]) Dimensions without coordinates: nlat, nlon ```

TLAT and TLONG are gone. Any suggestion?

Here I provide my test data.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1403/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
  • 4 rows from issue in issue_comments
Powered by Datasette · Queries took 0.796ms · About: xarray-datasette