CF coordinates get forgotten after operation modifying coordinates
还没有人认领这个 Issue。
评估
调研方向
Start by reproducing the shown DataArray example and compare d.cf.coordinates with d.mean("time").cf.coordinates. Trace how CF coordinates are identified before and after the time reduction; done means the reduced result keeps TLON as longitude and TLAT as latitude without adding ULON or ULAT.
由索引模型根据 Issue 内容生成。
描述
I have a DataArray that's similar, but not quite the same as the popds example dataset (the axes aren't labelled, and it has a time dimension):
<xarray.DataArray 'Tair_m' (time: 1, nj: 1080, ni: 1440)>
array([[[nan, nan, ..., nan, nan],
[nan, nan, ..., nan, nan],
...,
[nan, nan, ..., nan, nan],
[nan, nan, ..., nan, nan]]], dtype=float32)
Coordinates:
* time (time) datetime64[ns] 2255-01-01
TLON (nj, ni) float32 nan nan nan nan nan nan ... nan nan nan nan nan
TLAT (nj, ni) float32 nan nan nan nan nan nan ... nan nan nan nan nan
ULON (nj, ni) float32 nan nan nan nan nan nan ... nan nan nan nan nan
ULAT (nj, ni) float32 nan nan nan nan nan nan ... nan nan nan nan nan
Dimensions without coordinates: nj, ni
Attributes:
units: C
long_name: air temperature
cell_measures: area: tarea
cell_methods: time: mean
time_rep: averaged
And of course, the coordinates get correctly decoded:
>>> d.cf.coordinates
{'longitude': ['TLON'], 'latitude': ['TLAT']}
But if I take the time mean of this dataset, the correct coordinates get forgotten:
>>> d.mean("time").cf.coordinates
{'longitude': ['TLON', 'ULON'], 'latitude': ['TLAT', 'ULAT']}
- 主要语言
- Python
- 星标
- 181
- 派生
- 51
- 平均合并
- 6 小时 39 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
xarray-contrib/cf-xarray 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
xarray-contrib/cf-xarray#623 ·
-
Consider adding opt-in support for circular axes when calling `bounds_to_vertices` (related to #594)未关闭
难度 5/5 一周以上 新手友好度 38/100
xarray-contrib/cf-xarray#596 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 25/100
xarray-contrib/cf-xarray#570 ·
-
难度 4/5 3-5 天 新手友好度 15/100
xarray-contrib/cf-xarray#568 ·
-
难度 3/5 1-2 天 新手友好度 35/100
xarray-contrib/cf-xarray#566 · 2 条评论 ·
查看 xarray-contrib/cf-xarray 的全部 Issue
相似的 Issue
-
SSM GetParameter throttling during concurrent workflow launches可能已有人在做 @alexiswl 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)可能已有人在做 @andest01 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
Rename FunctionalRole BOT_DEV to DEV_STAFF可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭enhancement good first issue
难度 2/5 1-3 小时 新手友好度 79/100
pesu-dev/discord_bot#97 ·
-
难度 1/5 1-3 小时 新手友好度 88/100
gradio-app/gradio#13964 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 条评论 ·
维护者通常 1 天内回复