气温走势图:多模型逐小时预测曲线 + API 新增 models_hourly 字段

city_payloads 新增 models_hourly 包含 per-model hourly_forecasts。LiveTemperatureThresholdChart 渲染多模型曲线替代点预测卡片。CityDetail 类型新增 models_hourly。
This commit is contained in:
2569718930@qq.com
2026-05-25 05:58:15 +08:00
parent e478a1f08d
commit ce667ba1b6
4 changed files with 80 additions and 8 deletions
+10
View File
@@ -181,6 +181,16 @@ def build_city_detail_payload(
for k, v in (data.get("multi_model") or {}).items()
if not _is_excluded_model_name(k)
},
"models_hourly": {
"times": (data.get("multi_model") or {}).get("hourly_times", []),
"curves": {
model: values
for model, values in (
(data.get("multi_model") or {}).get("hourly_forecasts", {})
).items()
if not _is_excluded_model_name(model)
},
},
"deb": data.get("deb") or {},
"multi_model_daily": data.get("multi_model_daily") or {},
"probabilities": data.get("probabilities") or {"mu": None, "distribution": []},