issues: 242181620
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
242181620 | MDU6SXNzdWUyNDIxODE2MjA= | 1475 | Allow DataArray to hold cell boundaries as coordinate variables | 25473287 | open | 0 | 14 | 2017-07-11T20:58:44Z | 2023-08-24T13:21:05Z | NONE | Cell boundaries can be either N+1 sized arrays as suggested by xgcm/xmitgcm#15, or (N,2) sized arrays as suggested by the CF convention. However, a DataArray cannot hold both kinds of coordinate variables because they contain a new dimension. If you try to assign a new coordinate to a DataArray by On the other hand, if your DataSet contains cell boundary variables (for example, #667), the bounds will be dropped when you extract a single variable into a DataArray. Having cell bounds available in a DataArray is important for a couple of applications:
Plotting or regridding will work fine if you pass cell bounds as an additional argument to a wrapper function. However, having a single DataArray object containing boundary information seems like a more elegant solution. Is it possible to let DataArray accept N+1 sized coordinate variables, and be able to inherit them from the parent DataSet? If that's too drastic, is it possible to write an accessor to extend DataArray's capability? Say, a "bound" accessor for a new attribute |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1475/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 1 } |
13221727 | issue |