home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 986436135

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
986436135 MDU6SXNzdWU5ODY0MzYxMzU= 5760 Matrix Index is tilted using combine_by_coords 25606497 open 0     2 2021-09-02T09:22:28Z 2021-09-02T21:49:57Z   NONE      

My calculations return a strange tilted index. Why does this happen?

What happened: I combined several user defined chunked netcdf data (900 chunks) into one dataset. For this I used the default combine_by_coords in ds.open_mf_dataset(). My result was a tilted grid index - upper left corner i=0, j=1167.

Beforehand I calculated some indices on these chunks and combined them with the default combine='by_coords' in ds.open_mf_dataset() but also tested the combine='nested' separately.

The ones where I used default combine='by_coords' for all functions returned the tilted index. The ones where I used combine='nested' beforehand and then default combine='by_coords' returned the correct index.

What you expected to happen: No tilted index.

Minimal Complete Verifiable Example:

```python

returning wrong index

calculating some climatic indices on numbered chunks and combined them to one ds per chunk

with xr.open_mfdataset(pathtofile+'annual*'+chunknumber+'.nc', chunks=-1, parallel=True, engine='h5netcdf') as ds: ds.to_netcdf(pathtofile, format="NETCDF4_CLASSIC", engine="netcdf4")

combining all

with xr.open_mfdataset(pathtofile+'climateAnnual*.nc', chunks=-1, parallel=True, engine='h5netcd') as ds: ds.to_netcdf(pathtofile, format="NETCDF4_CLASSIC", engine="netcdf4")

returning correct index

calculating some climatic indices on numbered chunks and combined them to one ds per chunk

with xr.open_mfdataset(pathtofile+'annual*'+chunknumber+'.nc', chunks=-1, parallel=True, engine='h5netcdf', combine='nested') as ds: ds.to_netcdf(pathtofile, format="NETCDF4_CLASSIC", engine="netcdf4")

combining all

with xr.open_mfdataset(pathtofile+'climateAnnual*.nc', chunks=-1, parallel=True, engine='h5netcd') as ds: ds.to_netcdf(pathtofile, format="NETCDF4_CLASSIC", engine="netcdf4")

```

Anything else we need to know?:

Environment: Python 3.7.4

Output of <tt>xr.show_versions()</tt> INSTALLED VERSIONS ------------------ commit: None python: 3.7.4 (default, Jun 3 2020, 14:52:58) [GCC 8.3.0] python-bits: 64 OS: Linux OS-release: 3.10.0-1160.15.2.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: de_DE.UTF-8 LOCALE: ('de_DE', 'UTF-8') libhdf5: 1.12.0 libnetcdf: 4.7.4 xarray: 0.18.2 pandas: 0.25.3 numpy: 1.17.3 scipy: 1.3.1 netCDF4: 1.5.7 pydap: installed h5netcdf: 0.11.0 h5py: 3.3.0 Nio: None zarr: 2.8.3 cftime: 1.5.0 nc_time_axis: 1.3.1 PseudoNetCDF: None rasterio: 1.2.6 cfgrib: None iris: None bottleneck: 1.3.2 dask: 2021.06.2 distributed: 2021.06.2 matplotlib: 3.4.2 cartopy: None seaborn: 0.11.1 numbagg: 0.2.1 pint: 0.17 setuptools: 57.0.0 pip: 21.1.3 conda: None pytest: None IPython: None sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5760/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

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