home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 204550216

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
204550216 MDU6SXNzdWUyMDQ1NTAyMTY= 1244 wrong decoding of loaded dataset from nc-file 25030860 closed 0     10 2017-02-01T10:45:43Z 2017-02-06T07:09:28Z 2017-02-06T07:09:28Z NONE      

Hello I just upgraded from xarray 0.7.0 to 0.9.0 and noticed that the data in the variables are decoded wrong in the newer version. With ds = xr.open_dataset(filename.nc) in 0.7.0, the resulting dataset was correctly displayed as python <xarray.Dataset> Dimensions: (D1: 3601, X: 5, Z: 5) Coordinates: * D1 (D1) float64 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 ... * Z (Z) float64 1.0 2.0 3.0 4.0 5.0 * X (X) float64 -2.0 -1.0 0.0 1.0 2.0 Data variables: Brad (D1, Z, X) float64 -1.592 0.44 3.032 5.408 4.428 -0.68 0.432 ... Btan (D1, Z, X) float64 -13.33 -12.1 -10.68 -7.524 -4.032 -5.44 ... Bax (D1, Z, X) float64 11.97 12.3 11.7 7.86 3.14 6.112 6.188 5.524 ... T (D1, Z, X) float64 26.79 27.23 26.87 26.75 27.42 27.85 27.19 ... With 0.9.0 the same file shows up the following way python <xarray.Dataset> Dimensions: (D1: 3601, X: 5, Z: 5) Coordinates: * D1 (D1) float64 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 ... * Z (Z) float64 1.0 2.0 3.0 4.0 5.0 * X (X) float64 254.0 255.0 0.0 1.0 2.0 Data variables: Brad (D1, Z, X) float64 32.83 32.77 32.77 57.02 58.94 58.98 58.98 ... Btan (D1, Z, X) float64 33.29 1.835 22.81 16.38 23.33 65.27 15.47 ... Bax (D1, Z, X) float64 11.97 12.3 11.7 7.86 3.14 6.112 6.188 5.524 ... T (D1, Z, X) float64 1.19 1.63 1.27 1.15 1.82 2.25 1.59 1.37 1.33 ... The first thing I guessed was some problem with the decoding according to CF-conventions - but this behaviour is independent from if I used CF-conventions-conform compressing via scale and add_offset or not. Note that both file versions for testing (float64 and integer-compressed) were written with xarray 0.7.0

I hope I didn't miss some important changes between 0.7.0 and 0.9.0, but imho there's no related topic in the changelog, which told me what's the reason here.

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