气温走势图:多模型逐小时预测曲线 + API 新增 models_hourly 字段
city_payloads 新增 models_hourly 包含 per-model hourly_forecasts。LiveTemperatureThresholdChart 渲染多模型曲线替代点预测卡片。CityDetail 类型新增 models_hourly。
This commit is contained in:
@@ -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": []},
|
||||
|
||||
Reference in New Issue
Block a user