fix(cyclones): label NHC classification codes by their published meanings (#1349)

Correct NHC cyclone classification labels and document their published meanings.

Contribution by @rudycelekli.
This commit is contained in:
Sameh Khamis authored and GitHub committed 2026-10-24 23:21:04 -07:00
commit 86d52a0f7a
7 files changed
+19 -6

No files matched your search

@@ -0,0 +1,3 @@
- Label NHC cyclone classifications by their published meanings: `PTC` is a
post-tropical cyclone, `PC` a potential tropical cyclone, and subtropical
systems arrive as `STS` and `STD` (rudycelekli, #1349).
+3
View File
@@ -416,6 +416,9 @@ Cyclones combine fixed NHC/CPHC status and summary GIS endpoints through a bound
same-origin provider. The status endpoint lacks browser CORS; each installation same-origin provider. The status endpoint lacks browser CORS; each installation
fetches keyless public sources at runtime, with no centralized ingestion service. fetches keyless public sources at runtime, with no centralized ingestion service.
The five-minute snapshot covers Atlantic and eastern/central North Pacific only. The five-minute snapshot covers Atlantic and eastern/central North Pacific only.
Classification labels follow NHC status codes: `PC` is a potential tropical
cyclone, `PTC` a post-tropical cyclone, and `STS`/`STD` a subtropical
storm/depression. Unknown codes remain visible unchanged.
Current positions, advisory issue time and position time stay distinct. NHC may Current positions, advisory issue time and position time stay distinct. NHC may
release an advisory before its nominal time (routinely up to about 30 minutes, release an advisory before its nominal time (routinely up to about 30 minutes,
rarely about an hour), so advisory issue and position times up to and including rarely about an hour), so advisory issue and position times up to and including
+1
View File
@@ -1153,6 +1153,7 @@
"OpenStreetMap · community mapped": "OpenStreetMap · mapeado por la comunidad", "OpenStreetMap · community mapped": "OpenStreetMap · mapeado por la comunidad",
"Atlantic and eastern/central North Pacific; not worldwide cyclone coverage.": "Atlántico y Pacífico Norte oriental/central; no es una cobertura mundial de ciclones.", "Atlantic and eastern/central North Pacific; not worldwide cyclone coverage.": "Atlántico y Pacífico Norte oriental/central; no es una cobertura mundial de ciclones.",
"Potential tropical cyclone": "Posible ciclón tropical", "Potential tropical cyclone": "Posible ciclón tropical",
"Post-tropical cyclone": "Ciclón postropical",
"Hurricane": "Huracán", "Hurricane": "Huracán",
"Tropical storm": "Tormenta tropical", "Tropical storm": "Tormenta tropical",
"Tropical depression": "Depresión tropical", "Tropical depression": "Depresión tropical",
+1
View File
@@ -1169,6 +1169,7 @@
"OpenStreetMap · community mapped": "OpenStreetMap · данные сообщества", "OpenStreetMap · community mapped": "OpenStreetMap · данные сообщества",
"Atlantic and eastern/central North Pacific; not worldwide cyclone coverage.": "Атлантика и восточная/центральная часть северного Тихого океана; покрытие циклонов не глобальное.", "Atlantic and eastern/central North Pacific; not worldwide cyclone coverage.": "Атлантика и восточная/центральная часть северного Тихого океана; покрытие циклонов не глобальное.",
"Potential tropical cyclone": "Потенциальный тропический циклон", "Potential tropical cyclone": "Потенциальный тропический циклон",
"Post-tropical cyclone": "Посттропический циклон",
"Hurricane": "Ураган", "Hurricane": "Ураган",
"Tropical storm": "Тропический шторм", "Tropical storm": "Тропический шторм",
"Tropical depression": "Тропическая депрессия", "Tropical depression": "Тропическая депрессия",
+1
View File
@@ -530,6 +530,7 @@
"Cyclone advisories unavailable": "气旋公告不可用", "Cyclone advisories unavailable": "气旋公告不可用",
"Cyclone data unavailable": "气旋数据不可用", "Cyclone data unavailable": "气旋数据不可用",
"Potential tropical cyclone": "潜在热带气旋", "Potential tropical cyclone": "潜在热带气旋",
"Post-tropical cyclone": "后热带气旋",
"Hurricane": "飓风", "Hurricane": "飓风",
"Tropical storm": "热带风暴", "Tropical storm": "热带风暴",
"Tropical depression": "热带低压", "Tropical depression": "热带低压",
+6 -3
View File
@@ -41,13 +41,16 @@ const ADVISORIES_UNAVAILABLE = msg('Cyclone advisories unavailable');
const SERVER_REASONS = new Set([msg('Cyclone data unavailable')]); const SERVER_REASONS = new Set([msg('Cyclone data unavailable')]);
const errorText = (error) => const errorText = (error) =>
error && (SERVER_REASONS.has(error) ? t(error) : translateKnown(error)); error && (SERVER_REASONS.has(error) ? t(error) : translateKnown(error));
// NHC's Tropical Cyclone Status JSON reference: PTC is post-tropical, PC is a
// potential tropical cyclone, and subtropical systems are STS and STD.
const CLASSIFICATION_NAMES = Object.freeze({ const CLASSIFICATION_NAMES = Object.freeze({
PTC: msg('Potential tropical cyclone'), PC: msg('Potential tropical cyclone'),
PTC: msg('Post-tropical cyclone'),
HU: msg('Hurricane'), HU: msg('Hurricane'),
TS: msg('Tropical storm'), TS: msg('Tropical storm'),
TD: msg('Tropical depression'), TD: msg('Tropical depression'),
SS: msg('Subtropical storm'), STS: msg('Subtropical storm'),
SD: msg('Subtropical depression'), STD: msg('Subtropical depression'),
}); });
const classificationName = (code) => const classificationName = (code) =>
Object.hasOwn(CLASSIFICATION_NAMES, code) Object.hasOwn(CLASSIFICATION_NAMES, code)
+4 -3
View File
@@ -513,12 +513,13 @@ test('only the latest queued focus runs and an unchanged selection survives refr
}); });
test('classification display expands known codes without altering the source or guessing unknown meanings', async () => { test('classification display expands known codes without altering the source or guessing unknown meanings', async () => {
for (const [code, label] of [ for (const [code, label] of [
['PTC', 'Potential tropical cyclone'], ['PC', 'Potential tropical cyclone'],
['PTC', 'Post-tropical cyclone'],
['HU', 'Hurricane'], ['HU', 'Hurricane'],
['TS', 'Tropical storm'], ['TS', 'Tropical storm'],
['TD', 'Tropical depression'], ['TD', 'Tropical depression'],
['SS', 'Subtropical storm'], ['STS', 'Subtropical storm'],
['SD', 'Subtropical depression'], ['STD', 'Subtropical depression'],
['EX', 'EX'], ['EX', 'EX'],
['UNKNOWN', 'UNKNOWN'], ['UNKNOWN', 'UNKNOWN'],
]) { ]) {