巴黎 AROME 仅在 AEROWEB 为主源时作对比展示,避免与当前温度重复
This commit is contained in:
@@ -914,6 +914,10 @@ export function LiveTemperatureThresholdChart({
|
|||||||
// Always default all model curves to hidden across all cities and timeframes
|
// Always default all model curves to hidden across all cities and timeframes
|
||||||
series.forEach((s) => {
|
series.forEach((s) => {
|
||||||
if (s.key.startsWith("model_curve_")) {
|
if (s.key.startsWith("model_curve_")) {
|
||||||
|
// Keep AROME HD visible by default on Paris chart
|
||||||
|
if (city === "paris" && s.key === "model_curve_AROME HD") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
defaults.add(s.key);
|
defaults.add(s.key);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -98,6 +98,14 @@ OPEN_METEO_MULTI_MODEL_SPECS: Dict[str, Dict[str, Any]] = {
|
|||||||
"resolution_km": None,
|
"resolution_km": None,
|
||||||
"horizon": "11d",
|
"horizon": "11d",
|
||||||
},
|
},
|
||||||
|
"meteofrance_arome_france_hd": {
|
||||||
|
"label": "AROME HD",
|
||||||
|
"provider": "Meteo-France",
|
||||||
|
"model": "AROME France HD",
|
||||||
|
"tier": "short_range_europe",
|
||||||
|
"resolution_km": 1.3,
|
||||||
|
"horizon": "1.5d",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
OPEN_METEO_MULTI_MODEL_ORDER = tuple(OPEN_METEO_MULTI_MODEL_SPECS.keys())
|
OPEN_METEO_MULTI_MODEL_ORDER = tuple(OPEN_METEO_MULTI_MODEL_SPECS.keys())
|
||||||
|
|||||||
+16
-16
@@ -1123,13 +1123,14 @@ def _build_airport_status_message(
|
|||||||
if source_label:
|
if source_label:
|
||||||
lines.append("")
|
lines.append("")
|
||||||
lines.append(f"📡 {source_label}")
|
lines.append(f"📡 {source_label}")
|
||||||
if arome_temp is not None:
|
# Show AROME as supplementary info ONLY when AEROWEB is the primary source
|
||||||
diff_str = ""
|
if arome_temp is not None and "AEROWEB" in source_label:
|
||||||
if display_temp is not None:
|
diff_str = ""
|
||||||
d = arome_temp - display_temp
|
if display_temp is not None:
|
||||||
sign = "+" if d >= 0 else ""
|
d = arome_temp - display_temp
|
||||||
diff_str = f"({'偏高' if d > 0 else '偏低'}{sign}{d:.1f}°)"
|
sign = "+" if d >= 0 else ""
|
||||||
lines.append(f"🕐 AROME HD 15分钟临近预报:{arome_temp:.1f}{temp_symbol}{diff_str}")
|
diff_str = f"({'偏高' if d > 0 else '偏低'}{sign}{d:.1f}°)"
|
||||||
|
lines.append(f"🕐 AROME HD 15分钟临近预报:{arome_temp:.1f}{temp_symbol}{diff_str}")
|
||||||
|
|
||||||
# Model summary (compact)
|
# Model summary (compact)
|
||||||
models = city_weather.get("multi_model") or {}
|
models = city_weather.get("multi_model") or {}
|
||||||
@@ -1313,19 +1314,18 @@ def _process_airport_city(
|
|||||||
if not current_obs_time:
|
if not current_obs_time:
|
||||||
current_obs_time = str(airport_primary.get("obs_time") or "")
|
current_obs_time = str(airport_primary.get("obs_time") or "")
|
||||||
source_label = "" # human-readable data source for Paris messages
|
source_label = "" # human-readable data source for Paris messages
|
||||||
arome_temp_val = None # AROME HD temperature for display
|
arome_temp_val = None # AROME HD temperature for display (always fetched for comparison)
|
||||||
if city == "paris":
|
if city == "paris":
|
||||||
|
arome_temp_val = _fetch_arome_temp()
|
||||||
airport_primary = city_weather.get("airport_primary") or {}
|
airport_primary = city_weather.get("airport_primary") or {}
|
||||||
if airport_primary.get("source_code") == "aeroweb":
|
if airport_primary.get("source_code") == "aeroweb":
|
||||||
source_label = "AEROWEB 机场实况 · Météo-France"
|
source_label = "AEROWEB 机场实况 · Météo-France"
|
||||||
else:
|
elif arome_temp_val is not None:
|
||||||
arome_temp_val = _fetch_arome_temp()
|
current_temp = arome_temp_val
|
||||||
if arome_temp_val is not None:
|
city_weather.setdefault("current", {})["temp"] = arome_temp_val
|
||||||
current_temp = arome_temp_val
|
source_label = "AROME HD 15分钟临近预报 · Météo-France"
|
||||||
city_weather.setdefault("current", {})["temp"] = arome_temp_val
|
if not current_obs_time:
|
||||||
source_label = "AROME HD 15分钟临近预报 · Météo-France"
|
current_obs_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S")
|
||||||
if not current_obs_time:
|
|
||||||
current_obs_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S")
|
|
||||||
if current_temp is None or deb_pred is None:
|
if current_temp is None or deb_pred is None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user