修复高频机场数据源:AMOS接入airport_primary、Taipei CWA补充mgm_nearby、Paris AROME缓存

- Seoul/Busan: AMOS 跑道传感器纳入 airport_primary 链路(MADIS之后、MGM之前)
    - Seoul/Busan: 跑道温度生效时同步更新 current_obs_time,去重不再依赖慢速METAR
    - Taipei: 新增 _attach_cwa_settlement_nearby,将CWA数据注入 mgm_nearby(icao=RCSS)
    - Paris: AROME HD 抓取新增 10分钟内存缓存(模型15分钟更新),obs_time 为空时补 UTC 时间
    - Istanbul/Ankara MGM 链接修复为直接跳转机场站点页面

    Scope-risk: LOW — 170 测试通过,ruff 零告警
    Tested: python -m pytest -q (170 passed), ruff check .
This commit is contained in:
2569718930@qq.com
2026-05-15 00:10:03 +08:00
parent 2ee00f8016
commit 3bca2093f0
3 changed files with 97 additions and 16 deletions
+29
View File
@@ -273,6 +273,35 @@ def _airport_primary_from_raw(city: str, raw: Dict[str, Any]) -> Dict[str, Any]:
},
)
amos = raw.get("amos") or {}
if amos.get("temp_c") is not None:
return _normalize_station_row(
station_code=amos.get("icao") or meta.get("icao"),
station_label=amos.get("station_label") or meta.get("airport_name") or meta.get("icao"),
temp=amos["temp_c"],
obs_time=amos.get("obs_time") or metar.get("observation_time"),
source_code="amos",
source_label="AMOS",
is_official=True,
is_airport_station=True,
is_settlement_anchor=False,
extra={
"max_so_far": _safe_float(current.get("max_temp_so_far")),
"max_temp_time": current.get("max_temp_time"),
"obs_age_min": None,
"report_time": metar.get("report_time"),
"receipt_time": metar.get("receipt_time"),
"obs_time_epoch": metar.get("obs_time_epoch"),
"obs_time_utc_offset_seconds": 0,
"wind_speed_kt": _safe_float(current.get("wind_speed_kt")),
"wind_dir": _safe_float(current.get("wind_dir")),
"humidity": _safe_float(current.get("humidity")),
"visibility_mi": _safe_float(current.get("visibility_mi")),
"wx_desc": current.get("wx_desc"),
"raw_metar": current.get("raw_metar"),
},
)
mgm = raw.get("mgm") or {}
mgm_current = mgm.get("current") or {}
if mgm_current.get("temp") is not None: