Add LightGBM daily high forecasting pipeline

This commit is contained in:
2569718930@qq.com
2026-03-29 23:29:17 +08:00
parent 4a2db4727b
commit 0cc4f4f0d3
25 changed files with 3038 additions and 82 deletions
+97 -43
View File
@@ -93,44 +93,6 @@ CITY_REGISTRY = {
"distance_km": 2.0,
"warning": "海风与地形共同作用,午后对流触发后温度回落可能偏快。",
},
"shek kong": {
"name": "Shek Kong",
"lat": 22.4366,
"lon": 114.0800,
"icao": "VHSK",
"settlement_source": "hko",
"settlement_station_code": "SEK",
"settlement_station_label": "Shek Kong",
"settlement_station_candidates": ["Shek Kong"],
"disable_aviationweather": True,
"tz_offset": 28800,
"use_fahrenheit": False,
"is_major": False,
"risk_level": "medium",
"risk_emoji": "🟡",
"airport_name": "石岗机场",
"distance_km": 0.8,
"warning": "HKO 结算取石岗站分钟级观测,机场报文与 HKO 站点最高温不可直接混用。",
},
"lau fau shan": {
"name": "Lau Fau Shan",
"lat": 22.4674,
"lon": 113.9841,
"icao": "LFS",
"settlement_source": "hko",
"settlement_station_code": "LFS",
"settlement_station_label": "Lau Fau Shan",
"settlement_station_candidates": ["Lau Fau Shan"],
"disable_aviationweather": True,
"tz_offset": 28800,
"use_fahrenheit": False,
"is_major": False,
"risk_level": "medium",
"risk_emoji": "🟡",
"airport_name": "流浮山站",
"distance_km": 0.6,
"warning": "HKO 结算取流浮山站分钟级观测;该站不是机场 METAR,不能与 VHHH/VHSK 报文混用。",
},
"taipei": {
"name": "Taipei",
"lat": 25.0777,
@@ -260,6 +222,90 @@ CITY_REGISTRY = {
"distance_km": 14.5,
"warning": "东河水汽可能在春季产生温差。",
},
"los angeles": {
"name": "Los Angeles",
"lat": 33.9416,
"lon": -118.4085,
"icao": "KLAX",
"tz_offset": -28800,
"use_fahrenheit": True,
"is_major": True,
"risk_level": "medium",
"risk_emoji": "🟡",
"airport_name": "Los Angeles International Airport",
"distance_km": 29.0,
"warning": "海风与沿海层云对午后升温影响明显,LAX 口径常明显低于内陆城区。",
},
"san francisco": {
"name": "San Francisco",
"lat": 37.6213,
"lon": -122.3790,
"icao": "KSFO",
"tz_offset": -28800,
"use_fahrenheit": True,
"is_major": True,
"risk_level": "medium",
"risk_emoji": "🟡",
"airport_name": "San Francisco International Airport",
"distance_km": 20.0,
"warning": "海湾冷空气和平流雾常压制机场升温,SFO 与市区体感差异可快速放大。",
},
"aurora": {
"name": "Aurora",
"lat": 39.7017,
"lon": -104.7518,
"icao": "KBKF",
"tz_offset": -25200,
"use_fahrenheit": True,
"is_major": False,
"risk_level": "medium",
"risk_emoji": "🟡",
"airport_name": "Buckley Space Force Base",
"distance_km": 3.5,
"warning": "丹佛高原地形下日照与下沉增温切换快,Buckley 与 Denver 核心区午后峰值常有明显错位。",
},
"austin": {
"name": "Austin",
"lat": 30.1945,
"lon": -97.6699,
"icao": "KAUS",
"tz_offset": -21600,
"use_fahrenheit": True,
"is_major": True,
"risk_level": "medium",
"risk_emoji": "🟡",
"airport_name": "Austin-Bergstrom International Airport",
"distance_km": 12.0,
"warning": "德州中部午后混合层增强快,干热与局地对流会让峰值窗口前后偏差放大。",
},
"houston": {
"name": "Houston",
"lat": 29.6454,
"lon": -95.2789,
"icao": "KHOU",
"tz_offset": -21600,
"use_fahrenheit": True,
"is_major": True,
"risk_level": "medium",
"risk_emoji": "🟡",
"airport_name": "William P. Hobby Airport",
"distance_km": 12.0,
"warning": "墨西哥湾水汽与海风回流显著,湿热条件下机场白天升温节奏容易偏慢。",
},
"mexico city": {
"name": "Mexico City",
"lat": 19.4363,
"lon": -99.0721,
"icao": "MMMX",
"tz_offset": -21600,
"use_fahrenheit": False,
"is_major": True,
"risk_level": "high",
"risk_emoji": "🔴",
"airport_name": "Benito Juárez International Airport",
"distance_km": 6.5,
"warning": "高海拔盆地城市,辐射增温与午后对流并存,峰值前后 1-2°C 偏差较常见。",
},
"chicago": {
"name": "Chicago",
"lat": 41.9742,
@@ -497,11 +543,15 @@ ALIASES = {
# English shortcuts
"ank": "ankara", "ist": "istanbul", "ltfm": "istanbul", "lon": "london", "par": "paris",
"nyc": "new york", "ny": "new york", "chi": "chicago",
"la": "los angeles", "lax": "los angeles", "losangeles": "los angeles",
"sf": "san francisco", "sfo": "san francisco", "sanfrancisco": "san francisco",
"aur": "aurora", "denver": "aurora", "buckley": "aurora", "kbkf": "aurora",
"aus": "austin", "kaus": "austin",
"hou": "houston", "khou": "houston", "hobby": "houston",
"cdmx": "mexico city", "mexicocity": "mexico city", "mmmx": "mexico city",
"dal": "dallas", "mia": "miami", "atl": "atlanta",
"sea": "seattle", "tor": "toronto", "sel": "seoul",
"seo": "seoul", "hkg": "hong kong", "hk": "hong kong",
"vhsk": "shek kong", "shekkong": "shek kong",
"lfs": "lau fau shan", "laufaushan": "lau fau shan",
"tpe": "taipei", "tp": "taipei", "taipei": "taipei",
"sha": "shanghai", "sh": "shanghai", "sin": "singapore",
"sg": "singapore", "tok": "tokyo", "tyo": "tokyo",
@@ -517,6 +567,13 @@ ALIASES = {
"伦敦": "london",
"巴黎": "paris",
"纽约": "new york",
"洛杉矶": "los angeles",
"旧金山": "san francisco",
"奥罗拉": "aurora",
"丹佛": "aurora",
"奥斯汀": "austin",
"休斯顿": "houston",
"墨西哥城": "mexico city",
"芝加哥": "chicago",
"达拉斯": "dallas",
"迈阿密": "miami",
@@ -525,9 +582,6 @@ ALIASES = {
"多伦多": "toronto",
"首尔": "seoul",
"香港": "hong kong",
"石岗": "shek kong",
"石崗": "shek kong",
"流浮山": "lau fau shan",
"台北": "taipei",
"臺北": "taipei",
"上海": "shanghai",
+7 -2
View File
@@ -35,11 +35,15 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
"istanbul": ["LTFM", "LTBA", "LTFJ"],
"london": ["EGLL", "EGLC", "EGKK", "EGSS", "EGGW"],
"new york": ["KLGA", "KJFK", "KEWR", "KTEB", "KHPN"],
"los angeles": ["KLAX", "KBUR", "KLGB", "KSNA", "KVNY"],
"san francisco": ["KSFO", "KOAK", "KSJC", "KHAF"],
"aurora": ["KBKF", "KDEN", "KAPA", "KBJC"],
"austin": ["KAUS", "KEDC", "KSAT"],
"houston": ["KHOU", "KIAH", "KSGR", "KCXO"],
"mexico city": ["MMMX", "MMSM", "MMTO"],
"paris": ["LFPG", "LFPO", "LFPB"],
"seoul": ["RKSI", "RKSS"],
"hong kong": ["VHHH", "VMMC", "ZGSZ"],
"shek kong": ["VHSK", "VHHH", "VMMC", "ZGSZ"],
"lau fau shan": ["VHHH", "VMMC", "ZGSZ"],
"taipei": ["RCSS", "RCTP"],
"chengdu": ["ZUUU", "ZUTF"],
"chongqing": ["ZUCK", "ZUPS"],
@@ -81,6 +85,7 @@ class WeatherDataCollector(OpenMeteoCacheMixin, SettlementSourceMixin, MetarSour
"new york's central park",
"portland",
"denver",
"aurora",
"austin",
"san diego",
"detroit",