home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 323839238

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
323839238 MDU6SXNzdWUzMjM4MzkyMzg= 2145 Dataset.resample() adds time dimension to independant variables 22245117 open 0     5 2018-05-17T01:15:01Z 2022-03-21T05:15:52Z   CONTRIBUTOR      

Code Sample, a copy-pastable example if possible

```python ds = ds.resample(time='1D',keep_attrs=True).mean()

```

Problem description

I'm downsampling in time a dataset which also contains timeless variables. I've noticed that resample adds the time dimension to the timeless variables. One workaround is: 1) Split the dataset in a timeless and a time-dependent dataset 2) Resample the time-dependent dataset 3) Merge the two datasets

This is not a big deal, but I was wondering if I'm missing some flag that avoids this behavior. If not, is it something that can be easily implemented in resample? It would be very useful for datasets with variables on staggered grids.

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.6.1.final.0 python-bits: 64 OS: Linux OS-release: 3.10.0-693.17.1.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: None LOCALE: None.None xarray: 0.10.3 pandas: 0.20.2 numpy: 1.12.1 scipy: 0.19.1 netCDF4: 1.2.4 h5netcdf: 0.5.1 h5py: 2.7.0 Nio: None zarr: None bottleneck: 1.2.1 cyordereddict: None dask: 0.17.4 distributed: 1.21.8 matplotlib: 2.0.2 cartopy: 0.16.0 seaborn: 0.7.1 setuptools: 39.1.0 pip: 9.0.1 conda: 4.5.3 pytest: 3.1.2 IPython: 6.1.0 sphinx: 1.6.2
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2145/reactions",
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

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