Label Turkey station observations as MGM

This commit is contained in:
2569718930@qq.com
2026-06-15 21:02:44 +08:00
parent 95b55d4ab3
commit 55cfb202da
5 changed files with 82 additions and 0 deletions
@@ -775,8 +775,12 @@ function airportPrimarySeriesLabel(
row?: ScanOpportunityRow | null,
) {
if (isHKO) return "HKO";
const cityKey = normalizeCityKey(row?.city);
const canonicalLabel = canonicalAirportPrimarySourceLabel(hourly);
if (canonicalLabel === "MGM") return canonicalLabel;
if ((cityKey === "ankara" || cityKey === "istanbul") && (!canonicalLabel || canonicalLabel === "NOAA MADIS")) {
return "MGM";
}
const payloadLabel = String(hourly?.airportPrimary?.source_label || "").trim();
if (payloadLabel && !isGenericAirportPrimaryLabel(payloadLabel)) return payloadLabel;
if (canonicalLabel === "NOAA MADIS" && !isUsAirportCode(airportCodeForSeriesLabel(hourly, row))) {