Anchor Paris weather data to Le Bourget
This commit is contained in:
@@ -351,8 +351,8 @@ const CITY_SPECIFIC_SOURCES: Record<string, OfficialSourceLink[]> = {
|
||||
kind: "agency",
|
||||
},
|
||||
{
|
||||
label: "LFPG METAR",
|
||||
href: "https://aviationweather.gov/data/metar/?id=LFPG&decoded=1&taf=1",
|
||||
label: "LFPB METAR",
|
||||
href: "https://aviationweather.gov/data/metar/?id=LFPB&decoded=1&taf=1",
|
||||
kind: "metar",
|
||||
},
|
||||
],
|
||||
|
||||
@@ -68,17 +68,21 @@ CITY_REGISTRY = {
|
||||
},
|
||||
"paris": {
|
||||
"name": "Paris",
|
||||
"lat": 49.0097,
|
||||
"lon": 2.5480,
|
||||
"icao": "LFPG",
|
||||
"lat": 48.9694,
|
||||
"lon": 2.4414,
|
||||
"icao": "LFPB",
|
||||
"settlement_source": "metar",
|
||||
"settlement_station_code": "LFPB",
|
||||
"settlement_station_label": "Paris-Le Bourget Airport METAR",
|
||||
"settlement_url": "https://www.wunderground.com/history/daily/fr/bonneuil-en-france/LFPB",
|
||||
"tz_offset": 3600,
|
||||
"use_fahrenheit": False,
|
||||
"is_major": True,
|
||||
"risk_level": "medium",
|
||||
"risk_emoji": "🟡",
|
||||
"airport_name": "Charles de Gaulle 机场",
|
||||
"distance_km": 25.2,
|
||||
"warning": "城市热岛效应:市区比机场偏暖1-2°C。",
|
||||
"airport_name": "Paris-Le Bourget 机场",
|
||||
"distance_km": 12.0,
|
||||
"warning": "巴黎市场现按 Le Bourget 机场 METAR / LFPB 历史记录锚定;市区热岛与机场北侧低云可能造成偏差。",
|
||||
},
|
||||
"seoul": {
|
||||
"name": "Seoul",
|
||||
|
||||
@@ -46,7 +46,7 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
|
||||
"austin": ["KAUS", "KEDC", "KSAT"],
|
||||
"houston": ["KHOU", "KIAH", "KSGR", "KCXO"],
|
||||
"mexico city": ["MMMX", "MMSM", "MMTO"],
|
||||
"paris": ["LFPG", "LFPO", "LFPB"],
|
||||
"paris": ["LFPB", "LFPG", "LFPO"],
|
||||
"seoul": ["RKSI", "RKSS"],
|
||||
"busan": ["RKPK", "RKSS"],
|
||||
"hong kong": ["VHHH", "VMMC", "ZGSZ"],
|
||||
|
||||
@@ -26,6 +26,18 @@ def test_new_south_asia_city_registry_entries_are_wired():
|
||||
assert CITIES["masroor air base"]["settlement_source"] == "metar"
|
||||
|
||||
|
||||
def test_paris_registry_uses_le_bourget_anchor():
|
||||
paris = CITY_REGISTRY["paris"]
|
||||
|
||||
assert paris["icao"] == "LFPB"
|
||||
assert paris["settlement_source"] == "metar"
|
||||
assert paris["settlement_station_code"] == "LFPB"
|
||||
assert "bonneuil-en-france/LFPB" in paris["settlement_url"]
|
||||
assert CITIES["paris"]["lat"] == paris["lat"]
|
||||
assert CITIES["paris"]["settlement_source"] == "metar"
|
||||
assert _DummyMetarSource.CITY_TO_ICAO["paris"] == "LFPB"
|
||||
|
||||
|
||||
def test_turkey_metar_uses_fast_cache_ttl():
|
||||
source = _DummyMetarSource()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user