issues: 1412846601
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1412846601 | I_kwDOAMm_X85UNlQJ | 7180 | open_mfdataset for merging of netCDF files with different time values | 761677 | closed | 0 | 2 | 2022-10-18T09:06:14Z | 2022-10-19T08:47:25Z | 2022-10-19T08:47:25Z | NONE | What is your issue?In xarray version 0.16 I could combinine multiple netCDF files with different values on the time coordinate along a new dimension in a straight forward way: ``` def rename_time(ds: xr.Dataset) -> xr.Dataset: return ds.rename_dims({'time': 'sim_time'})
```
The merged dataset got a new time dimension called "sim_time" which had dimensions of simulation and time, so a 2D array.:
When upgrading xarray to 2022.9.0, this code no longer works:
Looking around, I found this answer on stack overflow for a similar question: https://stackoverflow.com/a/55500434
I had to modify the preprocessor in the answer to make it work:
This is not impossible to work with, but I preferred the previous output. My questions are: 1) is the change in behavior in xarray as intended and 2) is there a way for me to get the old dataset structure out of a new version of xarray? |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/7180/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |