From 93f7a852a860521b664be669dc1dff4d76640b0d Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Tue, 17 Mar 2026 14:04:22 +0800 Subject: [PATCH] Add Madrid METAR market note --- frontend/components/dashboard/GuideModal.tsx | 4 ++-- src/data_collection/city_registry.py | 18 ++++++++++++++++++ src/data_collection/weather_sources.py | 4 ++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/frontend/components/dashboard/GuideModal.tsx b/frontend/components/dashboard/GuideModal.tsx index 1b9eebf7..15deca33 100644 --- a/frontend/components/dashboard/GuideModal.tsx +++ b/frontend/components/dashboard/GuideModal.tsx @@ -14,7 +14,7 @@ const GUIDE_CARDS = { title: "结算概率引擎", }, { - body: "结算源按城市市场定义:米兰(LIMC)、华沙(EPWA)使用机场 METAR;香港市场使用香港天文台(HKO);台北市场使用交通部中央气象署(CWA)。系统仍会保留 METAR/MGM 作为临近结构参考,并区分观测时间与接收时间。", + body: "结算源按城市市场定义:米兰(LIMC)、华沙(EPWA)、马德里(LEMD)使用机场 METAR;香港市场使用香港天文台(HKO);台北市场使用交通部中央气象署(CWA)。系统仍会保留 METAR/MGM 作为临近结构参考,并区分观测时间与接收时间。", title: "结算点与主观测源", }, { @@ -40,7 +40,7 @@ const GUIDE_CARDS = { title: "Settlement Probability Engine", }, { - body: "Settlement source follows market rule by city: Milan (LIMC) and Warsaw (EPWA) settle on airport METAR, Hong Kong settles on HKO, and Taipei settles on CWA. METAR/MGM are still kept for intraday structure tracking with observation time vs receipt time separated.", + body: "Settlement source follows market rule by city: Milan (LIMC), Warsaw (EPWA), and Madrid (LEMD) settle on airport METAR, Hong Kong settles on HKO, and Taipei settles on CWA. METAR/MGM are still kept for intraday structure tracking with observation time vs receipt time separated.", title: "Settlement Source Logic", }, { diff --git a/src/data_collection/city_registry.py b/src/data_collection/city_registry.py index f1072f85..fc187d09 100644 --- a/src/data_collection/city_registry.py +++ b/src/data_collection/city_registry.py @@ -342,6 +342,21 @@ CITY_REGISTRY = { "distance_km": 10.0, "warning": "平原地形下辐射冷却显著,清晨与夜间温度回落可能偏快。", }, + "madrid": { + "name": "Madrid", + "lat": 40.4722, + "lon": -3.5608, + "icao": "LEMD", + "settlement_source": "metar", + "tz_offset": 3600, + "use_fahrenheit": False, + "is_major": True, + "risk_level": "medium", + "risk_emoji": "🟡", + "airport_name": "阿道弗·苏亚雷斯马德里-巴拉哈斯机场", + "distance_km": 13.0, + "warning": "机场位于东北侧开阔区,午后混合层增强时与核心城区体感温度可能出现偏差。", + }, } ALIASES = { @@ -358,6 +373,7 @@ ALIASES = { "ba": "buenos aires", "wel": "wellington", "luc": "lucknow", "sp": "sao paulo", "mun": "munich", "mil": "milan", "mxp": "milan", "waw": "warsaw", "war": "warsaw", + "mad": "madrid", "madrid": "madrid", "lemd": "madrid", # Chinese names "安卡拉": "ankara", @@ -388,4 +404,6 @@ ALIASES = { "米蘭": "milan", "华沙": "warsaw", "華沙": "warsaw", + "马德里": "madrid", + "馬德里": "madrid", } diff --git a/src/data_collection/weather_sources.py b/src/data_collection/weather_sources.py index c1c6d318..edb1fb69 100644 --- a/src/data_collection/weather_sources.py +++ b/src/data_collection/weather_sources.py @@ -41,6 +41,7 @@ class WeatherDataCollector: "milan": ["LIMC", "LIML", "LIME", "LIPO"], "toronto": ["CYYZ", "CYTZ", "CYKF"], "warsaw": ["EPWA", "EPMO", "EPLL"], + "madrid": ["LEMD", "LETO", "LEGT"], "chicago": ["KORD", "KMDW", "KPWK", "KDPA"], "dallas": ["KDAL", "KDFW", "KADS", "KGKY"], "atlanta": ["KATL", "KPDK", "KFTY"], @@ -1964,6 +1965,9 @@ class WeatherDataCollector: "milan": "Milan", "米兰": "Milan", "米蘭": "Milan", + "madrid": "Madrid", + "马德里": "Madrid", + "馬德里": "Madrid", "tel aviv": "Tel Aviv", "特拉维夫": "Tel Aviv", "toronto": "Toronto",