Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

TCTracks.from_FAST duplicates tracks by iterating over unrelated year dimension

未关闭
#1,268 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@NicolasColombi 已经在做这个了。

开始于 2026年3月23日。

评估

这个 Issue 还没有评估数据。

描述

bugfix enhancement

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

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CLIMADA-project/climada_python 的其他 Issue

查看 CLIMADA-project/climada_python 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。