From 5202ed06ff7d225ff47298dfe6189eee70654293 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Mon, 25 May 2026 21:38:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B4=E9=BB=8E=20AROME=20=E4=BB=85=E5=9C=A8?= =?UTF-8?q?=20AEROWEB=20=E4=B8=BA=E4=B8=BB=E6=BA=90=E6=97=B6=E4=BD=9C?= =?UTF-8?q?=E5=AF=B9=E6=AF=94=E5=B1=95=E7=A4=BA=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E4=B8=8E=E5=BD=93=E5=89=8D=E6=B8=A9=E5=BA=A6=E9=87=8D=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LiveTemperatureThresholdChart.tsx | 4 +++ src/data_collection/nws_open_meteo_sources.py | 8 +++++ src/utils/telegram_push.py | 32 +++++++++---------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/frontend/components/dashboard/scan-terminal/LiveTemperatureThresholdChart.tsx b/frontend/components/dashboard/scan-terminal/LiveTemperatureThresholdChart.tsx index 6bb4a205..eda64e12 100644 --- a/frontend/components/dashboard/scan-terminal/LiveTemperatureThresholdChart.tsx +++ b/frontend/components/dashboard/scan-terminal/LiveTemperatureThresholdChart.tsx @@ -914,6 +914,10 @@ export function LiveTemperatureThresholdChart({ // Always default all model curves to hidden across all cities and timeframes series.forEach((s) => { 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); } }); diff --git a/src/data_collection/nws_open_meteo_sources.py b/src/data_collection/nws_open_meteo_sources.py index 1ad8f160..3625e7e7 100644 --- a/src/data_collection/nws_open_meteo_sources.py +++ b/src/data_collection/nws_open_meteo_sources.py @@ -98,6 +98,14 @@ OPEN_METEO_MULTI_MODEL_SPECS: Dict[str, Dict[str, Any]] = { "resolution_km": None, "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()) diff --git a/src/utils/telegram_push.py b/src/utils/telegram_push.py index 8908a80e..f915c2ea 100644 --- a/src/utils/telegram_push.py +++ b/src/utils/telegram_push.py @@ -1123,13 +1123,14 @@ def _build_airport_status_message( if source_label: lines.append("") lines.append(f"📡 {source_label}") - if arome_temp is not None: - diff_str = "" - if display_temp is not None: - d = arome_temp - display_temp - sign = "+" if d >= 0 else "" - diff_str = f"({'偏高' if d > 0 else '偏低'}{sign}{d:.1f}°)" - lines.append(f"🕐 AROME HD 15分钟临近预报:{arome_temp:.1f}{temp_symbol}{diff_str}") + # Show AROME as supplementary info ONLY when AEROWEB is the primary source + if arome_temp is not None and "AEROWEB" in source_label: + diff_str = "" + if display_temp is not None: + d = arome_temp - display_temp + sign = "+" if d >= 0 else "" + 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) models = city_weather.get("multi_model") or {} @@ -1313,19 +1314,18 @@ def _process_airport_city( if not current_obs_time: current_obs_time = str(airport_primary.get("obs_time") or "") 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": + arome_temp_val = _fetch_arome_temp() airport_primary = city_weather.get("airport_primary") or {} if airport_primary.get("source_code") == "aeroweb": source_label = "AEROWEB 机场实况 · Météo-France" - else: - arome_temp_val = _fetch_arome_temp() - if arome_temp_val is not None: - current_temp = arome_temp_val - city_weather.setdefault("current", {})["temp"] = arome_temp_val - source_label = "AROME HD 15分钟临近预报 · Météo-France" - if not current_obs_time: - current_obs_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S") + elif arome_temp_val is not None: + current_temp = arome_temp_val + city_weather.setdefault("current", {})["temp"] = arome_temp_val + source_label = "AROME HD 15分钟临近预报 · Météo-France" + 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: return None