issues: 293345254
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
293345254 | MDU6SXNzdWUyOTMzNDUyNTQ= | 1875 | roll doesn't handle periodic boundary conditions well | 1217238 | closed | 0 | 5 | 2018-01-31T23:07:42Z | 2018-08-15T08:11:29Z | 2018-08-15T08:11:29Z | MEMBER | DataArray.roll() currently rolls both data variables and coordinates: ```
This is sort of makes sense, but the labels are now all non-monotonic, so you can't even plot the data with xarray. In my experience, you probably want coordinate labels that either look like:
It should be easier to accomplish this is in xarray. I currently resort to using roll and manually fixing up coordinates after the fact. I'm actually not sure if there are any use-cases for the current behavior. Choice (1) would have the virtue of being consistent with shift(): ```
Note: you might argue that this is overly geoscience specific, and it would be, if this was only for handling a longitude coordinate. But periodic boundary conditions are common in many areas of the physical sciences. |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1875/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |