TCTracks.from_FAST duplicates tracks by iterating over unrelated year dimension
@NicolasColombi 已经在做这个了。
开始于 2026年3月23日。
评估
这个 Issue 还没有评估数据。
描述
I found that TCTracks.from_FAST multiplies tracks when reading FAST NetCDF files that contain both n_trk and year dimensions.
Observed behavior:
Input FAST file has n_trk = 23000 and year = 46.
TCTracks.from_FAST returns 1058000 tracks.
This equals 23000 × 46, suggesting each track is reconstructed once per year index.
Why:
Loader loops over both dataset.year and dataset.n_trk.
It then selects dataset.sel(n_trk=i, year=year), but key per-track variables (lon_trks, lat_trks, vmax_trks, tc_years, tc_month, tc_basins) are indexed by n_trk (and time), not by year.
So the same track is appended repeatedly for each year entry.
Expected behavior:
Each n_trk should produce one track entry.
Returned track count should match n_trk total (or sum across files), not n_trk × n_year.
Impact:
Memory usage and runtime increase massively.
Suggested fix:
Remove the outer loop over dataset.year.
Iterate only over dataset.n_trk and select track = dataset.sel(n_trk=i).
- 主要语言
- Jupyter Notebook
- 星标
- 478
- 派生
- 166
- 平均合并
- 1 天 20 小时
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CLIMADA-project/climada_python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
CLIMADA-project/climada_python#1337 ·
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
CLIMADA-project/climada_python#1336 ·
-
CartoDB basemaps now need an API key (somewhat urgent)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
CLIMADA-project/climada_python#1332 · 4 条评论 · 1 个 reaction ·
-
warnings
难度 2/5 1-3 小时 新手友好度 65/100
CLIMADA-project/climada_python#1241 ·
-
ResourceWarning未关闭warnings
难度 2/5 1-3 小时 新手友好度 62/100
CLIMADA-project/climada_python#1239 ·