160-tool MCP server for real-time global intelligence from free public APIs: markets, liquidity, prediction markets, SEC filings, conflict, military, aircraft-cohort early warning, migration and border flows, cyber, climate, news and more. Dated observation history, 29 research prompts, cited briefs, geofences, SSE dashboard. MIT, no paid API keys.
Python ai-toolsai-watchanthropicclaudecybersecuritydashboardgeofencinggeopoliticalgeospatialintelligencemarketsmcpmigrationmilitarymodel-context-protocolnuclearosintreal-timespace-weatherthreat-intelligence
Cyclone forecast tracks: opt-in include_forecast for NHC and JTWC
Phoenix Agent (mac-studio)53f3de54eb6d
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 6311734..1f1c818 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1,5 +1,54 @@# Changelog+## Unreleased++### Added: tropical cyclone forecast tracks+- `intel_cyclones` and `intel_jtwc_cyclones` take `include_forecast`+ (boolean, default false). With it, each storm gains a `forecast`: the+ `initial` fix and forecast `points` (forecast hour, UTC valid time,+ latitude and longitude, max wind and gust in knots, status such as+ POST-TROP/REMNT LOW or DISSIPATED, and the agency's section label),+ `track_status`, and the advisory or warning number and issue time.+ Without it, both responses and the collector's NHC call are unchanged.+- NHC points come from the forecast/advisory text that CurrentStorms.json+ links: the one NHC product that states UTC valid times and post-tropical+ status outright (the KMZ track gives local times, and the shapefile+ labels a post-tropical remnant low "Subtropical Depression"). The cone+ comes from the linked CONE.kmz: its one ring, simplified+ (Douglas-Peucker, 0.01 degrees; Hurricane Trudy advisory 17 went from+ 1,167 vertices to 56) to `[lat, lon]` vertices, with the source vertex+ count, the tolerance, and a note pointing at the official geometry+ (`cone_url`).+- JTWC points come from each storm's linked warning text (its forecast,+ extended outlook and long range outlook blocks). JTWC links no cone:+ `cone_status` is `not_published`, and `data_gaps` says so.++### Data honesty: forecast tracks+- `data_gaps` names every track or cone not delivered, per storm, with a+ status: `fetch_failed`, `unparsed`, `not_linked`, `not_published` or+ `not_fetched_cap` (at most 10 storms per call; the rest are named,+ never dropped). A failure marks the response `degraded`; a product the+ agency does not link is a gap, not degradation. A quiet basin still+ answers zero storms, not degraded, and makes no product fetches; a feed+ outage keeps its existing degraded shape and makes none either.+- The text pages are per storm bin, not per issuance, so one can lag the+ feed: an advisory or warning number that disagrees with the feed is+ returned as `stale_advisory` or `stale_warning` with the expected+ number, and its cached copy is dropped.+- Each product is fetched once per issuance (cache keys carry the+ advisory or warning number; one-hour TTL) under its own circuit breaker+ (`nhc-forecast`, `nhc-gis`, `jtwc-warning`), so a product outage does+ not trip the warning feeds' breakers.+- Remote KML is parsed with the standard library: strict UTF-8, any+ DOCTYPE refused, size caps (KMZ 2 MB, KML 8 MB), and a cone with more+ than one ring refused, never trimmed.+- Measured 2026-10-17: every product used answered HTTP 200 without a+ key; nhc.noaa.gov robots.txt disallows nothing and the NWS disclaimer+ puts the products in the public domain. The JTWC home page and+ robots.txt answered 403 (CloudFront "Request blocked"), so JTWC's site+ terms could not be read; its RSS and warning texts served 200 to the+ same client. Wind radii and seas are not parsed.+## 0.11.0 - 2026-10-12Cross-border migration (MCP tools, CLI, collector and a dashboarddiff --git a/README.md b/README.mdindex 77f7474..15cde53 100644--- a/README.md+++ b/README.md@@ -61,7 +61,7 @@ Built for AI agents that need world awareness: market conditions, geopolitical r| **Severe Weather** | 2 | NWS active CAP alerts (US), Meteoalarm (39 EU countries) || **Space Launches** | 1 | Launch Library 2 upcoming launches || **Volcanoes** | 1 | Smithsonian GVP weekly activity report |-| **Tropical Cyclones** | 2 | NHC (Atlantic, E/C Pacific) + JTWC (NW Pacific, N Indian, S Hemisphere) |+| **Tropical Cyclones** | 2 | NHC (Atlantic, E/C Pacific) + JTWC (NW Pacific, N Indian, S Hemisphere), with opt-in forecast tracks: positions, UTC valid times and intensities, plus NHC's cone of uncertainty || **Situation Brief** | 1 | Cited situational awareness brief over MCP: bounded server-side overview synthesized via local Ollama, with a mechanically-cited fallback |**Total: 139 tools** across 30+ intelligence domains.@@ -492,8 +492,8 @@ different, openly licensed data source; no ews code is used.### Tropical Cyclones (2)| Tool | Description ||------|-------------|-| `intel_cyclones` | NHC active storms: Atlantic, Eastern and Central Pacific |-| `intel_jtwc_cyclones` | JTWC warnings: Northwest Pacific, North Indian Ocean, Southern Hemisphere |+| `intel_cyclones` | NHC active storms: Atlantic, Eastern and Central Pacific. `include_forecast` adds each storm's forecast track (from its forecast/advisory) and a simplified 5-day cone outline |+| `intel_jtwc_cyclones` | JTWC warnings: Northwest Pacific, North Indian Ocean, Southern Hemisphere. `include_forecast` adds each storm's forecast track from its warning text (JTWC publishes no cone) |### Space Launches (1)| Tool | Description |diff --git a/ROADMAP.md b/ROADMAP.mdindex 4f03400..44b28a3 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -612,7 +612,7 @@ Verified absent from `sources/` on 2026-09-01 (grep, not memory):| Feature | Source candidate | Status ||---------|------------------|--------|| Severe weather alerts | NWS (US, 0.5.0) + Meteoalarm (39 EU countries, 0.8.0; per-country feeds only - no Europe-wide feed exists) | :white_check_mark: |-| Tropical cyclone tracking | NHC (0.5.0) + JTWC (0.8.0: NW Pacific/N Indian/S Hemisphere; positions live in linked products). Forecast tracks still open | :yellow_circle: warnings done |+| Tropical cyclone tracking | NHC (0.5.0) + JTWC (0.8.0: NW Pacific/N Indian/S Hemisphere). Forecast tracks (Unreleased): opt-in `include_forecast` on both tools. NHC points come from the linked forecast/advisory text and the cone from the linked `trackCone` CONE.kmz (simplified); JTWC points come from each linked warning text, and JTWC links no cone. Not upstream-blocked, measured 2026-10-17: keyless HTTP 200 for NHC CurrentStorms.json, text/MIATCMEP1.shtml, EP212026_017adv_CONE.kmz and JTWC jtwc.rss, wp2926web.txt, sh0127web.txt; nhc.noaa.gov robots.txt disallows nothing and the NWS disclaimer is public domain; JTWC jtwc.html and robots.txt answered 403 (CloudFront), so JTWC's terms are unread. Wind radii not parsed | :white_check_mark: warnings + forecast tracks || Dedicated volcano monitoring | GVP weekly report shipped in 0.5.0 (`intel_volcano_activity`) | :white_check_mark: || NOTAMs | BLOCKED upstream: official FAA API is key-required (401 verified live 2026-09-01); unofficial backend POST-only/undocumented. Revisit if FAA opens access | :red_circle: blocked || Launch schedules | Launch Library 2 shipped in 0.5.0 (`intel_launch_schedule`) | :white_check_mark: |diff --git a/src/world_intel_mcp/sources/cyclone_forecasts.py b/src/world_intel_mcp/sources/cyclone_forecasts.pynew file mode 100644index 0000000..d09a645--- /dev/null+++ b/src/world_intel_mcp/sources/cyclone_forecasts.py@@ -0,0 +1,744 @@+"""Tropical cyclone forecast tracks (NHC and JTWC) for world-intel-mcp.++Opt-in companion to sources/cyclones.py (NHC) and sources/jtwc.py+(JTWC): their fetchers call in here only when a caller passes+``include_forecast=True``, so the default responses, and the collector's+call, are unchanged. Each storm gains a ``forecast`` dict; the response+gains ``data_gaps`` naming every track or cone it could not deliver.++Upstream facts, measured live 2026-10-17 against Hurricane Trudy (NHC+EP212026 advisory 17, also JTWC 21E), Typhoon 29W (Champi) warning 13+and Tropical Cyclone 01P (Wati) warning 3. Every product named below+answered HTTP 200 without a key to the fetcher's User-Agent.++NHC: CurrentStorms.json links each storm's forecast/advisory text+(``forecastAdvisory.url``, the TCM, an HTML page whose only <pre> holds+the product) and its 5-day track and cone (``forecastTrack`` and+``trackCone``, each as a KMZ and a shapefile zip). Track points come+from the TCM, the one product of the three that states UTC valid times+and post-tropical/dissipated status outright: the KMZ track gives local+times ("6:00 PM CST October 17, 2026"), and the shapefile's point table+stamps its tau-0 row 17/1200 while giving the 1500Z advisory position,+and labels the 96 h post-tropical remnant low "Subtropical Depression"+where the TCM says POST-TROP/REMNT LOW. The cone comes from+``trackCone.kmzFile``: one Polygon ring (1,168 vertices for Trudy #17)+in a KML whose disclaimer reads "The official forecast track in KML+format is an experimental product." The ring is simplified here+(Douglas-Peucker, 0.01 degrees, [lat, lon] vertices) and labelled as+such; NHC's own geometry stays at ``cone_url``. nhc.noaa.gov robots.txt+disallows nothing; the NWS disclaimer puts the products in the public+domain and asks for request cycles matched to each product's update+frequency, which the per-advisory cache keys below give.++JTWC: the RSS links each storm's warning text (``warning_text_url``),+served with CRLF line ends. Forecast blocks read "12 HRS, VALID AT:",+"180000Z --- 13.0N 143.7E", "MAX SUSTAINED WINDS - 120 KT, GUSTS 145+KT", then status lines such as BECOMING EXTRATROPICAL. Times carry day+and hour only; the month comes from the REMARKS date line ("17OCT26.").+JTWC links no cone of uncertainty: its Google Earth overlay (a KMZ of+about 450 KB) holds a "34 knot Danger Swath" polygon, a different+product, which is not fetched. The JTWC HTML home page and robots.txt+answered 403 (CloudFront "Request blocked") to the same client that got+200 for the RSS and the warning texts, so JTWC's site terms could not+be read.++The text URLs are per bin, not per issuance (MIATCMEP1.shtml,+wp2926web.txt), so a page can lag the feed entry pointing at it. The+advisory or warning number in the text is checked against the feed; a+mismatch is returned labelled stale and its cached copy is dropped.++Gaps / not covered: wind radii and seas are not parsed. Not observed+live: a Central Pacific (CPHC) forecast/advisory, potential tropical+cyclone products, a cone crossing the antimeridian (a cone with more+than one ring is refused, never trimmed), and a JTWC final warning (a+warning text without forecast blocks is reported unparsed). JTWC's+danger swath is not fetched.+"""++import asyncio+import html+import io+import logging+import math+import re+import xml.etree.ElementTree as ET+import zipfile+import zlib+from datetime import datetime, timezone+from typing import Any++from ..fetcher import Fetcher++logger = logging.getLogger("world-intel-mcp.sources.cyclone_forecasts")++# Per-call bound on per-storm product fetches. Simultaneous active storms+# per feed have stayed well below this; storms past it are named in+# data_gaps, never dropped silently.+MAX_FORECAST_STORMS = 10++# Planar tolerance (degrees) for simplifying NHC's cone ring. About 1.1 km+# of latitude; Trudy #17's 1,167-vertex ring keeps 56 vertices.+CONE_SIMPLIFY_TOLERANCE_DEG = 0.01++# Cache keys carry the advisory/warning number, so a new issuance is a+# new key; the TTL only bounds how long one issuance is reused.+_FORECAST_CACHE_TTL = 3600+_CONE_MAX_BYTES = 2 * 1024 * 1024+_KML_MAX_BYTES = 8 * 1024 * 1024++_MONTHS = {+ name: number+ for number, name in enumerate(+ ("JAN", "FEB", "MAR", "APR", "MAY", "JUN",+ "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"),+ start=1,+ )+}++# Track statuses meaning the caller asked for data and did not get it+# (or got an older issuance). not_linked / not_published are upstream+# coverage facts: named in data_gaps, not degradation.+_FAILED_STATUSES = frozenset(+ {"fetch_failed", "unparsed", "not_fetched_cap", "stale_advisory", "stale_warning"}+)++_CONE_NOTE = (+ "Outline simplified from NHC's ring (Douglas-Peucker, 0.01 degree "+ "tolerance); not the official geometry, which is at cone_url. NHC's "+ "KML disclaimer calls the KML format experimental."+)+_JTWC_CONE_GAP = (+ "JTWC links no cone of uncertainty: cone is null for every JTWC storm "+ "(the 34 knot danger swath in its KMZ overlay is a different product "+ "and is not fetched)"+)++_LATLON = r"(\d{1,2}(?:\.\d+)?)([NS])[ \t]+(\d{1,3}(?:\.\d+)?)([EW])"++# --- NHC forecast/advisory (TCM) ---+_PRE_RE = re.compile(r"<pre[^>]*>(.*?)</pre>", re.S | re.I)+_TCM_ISSUED_RE = re.compile(+ r"^[ \t]*(\d{1,2})(\d{2}) UTC [A-Z]{3} ([A-Z]{3}) (\d{1,2}) (\d{4})[ \t]*$", re.M+)+_TCM_ADVISORY_RE = re.compile(r"FORECAST/ADVISORY NUMBER[ \t]+(\w+)")+_TCM_CENTER_RE = re.compile(+ r"CENTER LOCATED NEAR[ \t]+" + _LATLON + r"[ \t]+AT[ \t]+(\d{2})/(\d{2})(\d{2})Z"+)+_TCM_SYNOPTIC_RE = re.compile(r"AT[ \t]+(\d{2})/(\d{2})(\d{2})Z[ \t]+CENTER WAS LOCATED NEAR")+_TCM_PRESSURE_RE = re.compile(r"MINIMUM CENTRAL PRESSURE[ \t]+(\d+)[ \t]*MB")+_TCM_SUSTAINED_RE = re.compile(+ r"MAX SUSTAINED WINDS[ \t]+(\d+)[ \t]*KT WITH GUSTS TO[ \t]+(\d+)[ \t]*KT"+)+_TCM_POINT_RE = re.compile(+ r"^[ \t]*(FORECAST|OUTLOOK) VALID[ \t]+(\d{2})/(\d{2})(\d{2})Z"+ r"(?:[ \t]+" + _LATLON + r")?"+ r"(?:[ \t]*\.\.\.[ \t]*(?P<status>[^\n]*\S))?",+ re.M,+)+_TCM_WIND_RE = re.compile(r"MAX WIND[ \t]+(\d+)[ \t]*KT\.\.\.GUSTS[ \t]+(\d+)[ \t]*KT")++# --- JTWC warning text ---+_JTWC_HEADER_RE = re.compile(r"^[ \t]*WT[A-Z]{2}\d{2}[ \t]+[A-Z]{4}[ \t]+(\d{2})(\d{2})(\d{2})\b", re.M)+_JTWC_NUMBER_RE = re.compile(r"WARNING NR[ \t]+(\d+)")+_JTWC_DATE_RE = re.compile(+ r"^[ \t]*(\d{2})(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(\d{2})\.", re.M+)+_JTWC_POSITION_RE = re.compile(+ r"WARNING POSITION:\s*(\d{2})(\d{2})(\d{2})Z\s*-+\s*NEAR\s+" + _LATLON+)+_JTWC_PRESENT_RE = re.compile(+ r"PRESENT WIND DISTRIBUTION:\s*MAX SUSTAINED WINDS\s*-\s*(\d+)\s*KT,\s*GUSTS\s+(\d+)\s*KT"+)+_JTWC_PRESSURE_RE = re.compile(+ r"MINIMUM CENTRAL PRESSURE AT\s+(\d{2})(\d{2})(\d{2})Z\s+IS\s+(\d+)\s+MB"+)+_JTWC_POINT_RE = re.compile(+ r"(\d+)\s+HRS,\s+VALID AT:\s*(\d{2})(\d{2})(\d{2})Z\s*-+\s*" + _LATLON+)+_JTWC_WIND_RE = re.compile(r"MAX SUSTAINED WINDS\s*-\s*(\d+)\s*KT,\s*GUSTS\s+(\d+)\s*KT")+_JTWC_SECTION_RE = re.compile(+ r"^[ \t]*(FORECASTS|EXTENDED OUTLOOK|LONG RANGE OUTLOOK|REMARKS):", re.M+)+_JTWC_SECTIONS = {+ "FORECASTS": "forecast",+ "EXTENDED OUTLOOK": "extended_outlook",+ "LONG RANGE OUTLOOK": "long_range_outlook",+}+# Lines of a forecast block that are structure, not status. Anything+# else in the block ("BECOMING EXTRATROPICAL") is reported as status.+_JTWC_STRUCTURAL_RE = re.compile(+ r"^(?:MAX SUSTAINED WINDS|WIND RADII VALID|RADIUS OF|\d{3} NM [A-Z]+ QUADRANT"+ r"|VECTOR TO|-+$|(?:FORECASTS|EXTENDED OUTLOOK|LONG RANGE OUTLOOK|REMARKS):)"+)+++def _iso(value: datetime | None) -> str | None:+ return value.strftime("%Y-%m-%dT%H:%M:%SZ") if value else None+++def _normalize_newlines(text: str) -> str:+ return text.replace("\r\n", "\n").replace("\r", "\n")+++def _coord(value: str, hemisphere: str) -> float:+ number = float(value)+ return -number if hemisphere in ("S", "W") else number+++def _hours_between(start: datetime | None, end: datetime | None) -> int | None:+ if start is None or end is None:+ return None+ return round((end - start).total_seconds() / 3600)+++def _same_number(found: Any, expected: Any) -> bool:+ try:+ return int(found) == int(expected)+ except (TypeError, ValueError):+ return str(found).lstrip("0").upper() == str(expected).lstrip("0").upper()+++def resolve_day_time(+ day: int, hour: int, minute: int, anchor: datetime | None+) -> datetime | None:+ """Place a day-of-month time ("18/0000Z", "180000Z") in the month+ nearest ``anchor``. Both agencies give the day only; a forecast never+ reaches more than a few days from its issuance."""+ if anchor is None:+ return None+ best: datetime | None = None+ for offset in (-1, 0, 1):+ year, month0 = divmod(anchor.year * 12 + anchor.month - 1 + offset, 12)+ try:+ candidate = datetime(year, month0 + 1, day, hour, minute, tzinfo=timezone.utc)+ except ValueError:+ continue+ if best is None or abs(candidate - anchor) < abs(best - anchor):+ best = candidate+ return best+++# ---------------------------------------------------------------------------+# NHC forecast/advisory text+# ---------------------------------------------------------------------------+++def parse_nhc_forecast_advisory(+ page: str, fallback_anchor: datetime | None = None+) -> dict:+ """Parse an NHC forecast/advisory (TCM) into an initial fix and points.++ ``page`` is the HTML page CurrentStorms.json links (product inside+ its one <pre>) or the bare product. Day-only times resolve against+ the product's own issuance line, else ``fallback_anchor``.+ ``tau_hours`` counts from the synoptic fix ("AT 17/1200Z CENTER WAS+ LOCATED NEAR"), as NHC labels its forecast hours; it is None when+ that line is missing.+ """+ pre = _PRE_RE.search(page)+ text = _normalize_newlines(html.unescape(pre.group(1)) if pre else page)++ issued: datetime | None = None+ stamp = _TCM_ISSUED_RE.search(text)+ if stamp and stamp.group(3) in _MONTHS:+ try:+ issued = datetime(+ int(stamp.group(5)),+ _MONTHS[stamp.group(3)],+ int(stamp.group(4)),+ int(stamp.group(1)),+ int(stamp.group(2)),+ tzinfo=timezone.utc,+ )+ except ValueError:+ issued = None+ anchor = issued or fallback_anchor++ def when(match: re.Match, first: int) -> datetime | None:+ return resolve_day_time(+ int(match.group(first)),+ int(match.group(first + 1)),+ int(match.group(first + 2)),+ anchor,+ )++ initial = None+ center = _TCM_CENTER_RE.search(text)+ if center:+ sustained = _TCM_SUSTAINED_RE.search(text)+ pressure = _TCM_PRESSURE_RE.search(text)+ initial = {+ "valid_time": _iso(when(center, 5)),+ "latitude": _coord(center.group(1), center.group(2)),+ "longitude": _coord(center.group(3), center.group(4)),+ "max_wind_kt": int(sustained.group(1)) if sustained else None,+ "gust_kt": int(sustained.group(2)) if sustained else None,+ "pressure_mb": int(pressure.group(1)) if pressure else None,+ }++ synoptic_match = _TCM_SYNOPTIC_RE.search(text)+ synoptic = when(synoptic_match, 1) if synoptic_match else None++ headers = list(_TCM_POINT_RE.finditer(text))+ points = []+ for i, header in enumerate(headers):+ block_end = headers[i + 1].start() if i + 1 < len(headers) else len(text)+ wind = _TCM_WIND_RE.search(text, header.end(), block_end)+ valid = when(header, 2)+ positioned = header.group(5) is not None+ points.append(+ {+ "tau_hours": _hours_between(synoptic, valid),+ "valid_time": _iso(valid),+ "latitude": _coord(header.group(5), header.group(6)) if positioned else None,+ "longitude": _coord(header.group(7), header.group(8)) if positioned else None,+ "max_wind_kt": int(wind.group(1)) if wind else None,+ "gust_kt": int(wind.group(2)) if wind else None,+ "status": header.group("status"),+ "section": header.group(1).lower(),+ }+ )++ advisory = _TCM_ADVISORY_RE.search(text)+ return {+ "advisory_number": advisory.group(1) if advisory else None,+ "issued": _iso(issued),+ "initial": initial,+ "points": points,+ }+++# ---------------------------------------------------------------------------+# NHC cone KMZ+# ---------------------------------------------------------------------------+++def _local(tag: str) -> str:+ return tag.rsplit("}", 1)[-1]+++def _cone_root(kml: bytes) -> ET.Element:+ # Remote XML, stdlib parser (no new dependency): decode strictly as+ # UTF-8 so the check below sees every byte, then refuse any DOCTYPE.+ # Entity expansion and external entities both need a DTD; NHC's cone+ # KML has none. A non-UTF-8 body raises UnicodeDecodeError (a+ # ValueError).+ text = kml.decode("utf-8-sig")+ if re.search(r"<!DOCTYPE", text, re.I):+ raise ValueError("KML with a DOCTYPE refused")+ return ET.fromstring(text)+++def _ring_from_root(root: ET.Element) -> list[tuple[float, float]]:+ rings = [el for el in root.iter() if _local(el.tag) == "LinearRing"]+ if len(rings) != 1:+ raise ValueError(f"expected one cone ring, found {len(rings)} rings")+ coords = next((el for el in rings[0].iter() if _local(el.tag) == "coordinates"), None)+ if coords is None or not (coords.text or "").strip():+ raise ValueError("cone ring has no coordinates")+ ring: list[tuple[float, float]] = []+ for token in coords.text.split():+ parts = token.split(",")+ if len(parts) < 2:+ raise ValueError(f"malformed KML coordinate {token!r}")+ lon, lat = float(parts[0]), float(parts[1])+ if not (-90.0 <= lat <= 90.0 and math.isfinite(lon)):+ raise ValueError(f"KML coordinate out of range {token!r}")+ ring.append((lat, lon))+ if len(ring) > 1 and ring[0] == ring[-1]:+ ring.pop()+ if len(ring) < 3:+ raise ValueError(f"cone ring has {len(ring)} vertices")+ return ring+++def parse_cone_kml_ring(kml: bytes) -> list[tuple[float, float]]:+ """The cone KML's one ring as open (lat, lon) vertices. A KML with+ more than one ring (a split cone, a hole) is refused, never trimmed."""+ return _ring_from_root(_cone_root(kml))+++def _segment_distance(+ point: tuple[float, float], start: tuple[float, float], end: tuple[float, float]+) -> float:+ (px, py), (ax, ay), (bx, by) = point, start, end+ dx, dy = bx - ax, by - ay+ if dx == 0 and dy == 0:+ return math.dist(point, start)+ t = max(0.0, min(1.0, ((px - ax) * dx + (py - ay) * dy) / (dx * dx + dy * dy)))+ return math.dist(point, (ax + t * dx, ay + t * dy))+++def simplify_closed_ring(+ ring: list[tuple[float, float]], tolerance: float+) -> list[tuple[float, float]]:+ """Douglas-Peucker over a closed ring (first vertex repeated last),+ returned open. Every dropped vertex lies within ``tolerance`` (planar,+ in the coordinates' own units) of the kept outline."""+ count = len(ring)+ closed = count > 1 and ring[0] == ring[-1]+ if count < 4:+ return list(ring[:-1]) if closed else list(ring)+ keep = [False] * count+ keep[0] = keep[-1] = True+ stack = [(0, count - 1)]+ while stack:+ first, last = stack.pop()+ worst_index, worst = -1, -1.0+ for i in range(first + 1, last):+ distance = _segment_distance(ring[i], ring[first], ring[last])+ if distance > worst:+ worst_index, worst = i, distance+ if worst_index != -1 and worst > tolerance:+ keep[worst_index] = True+ stack.append((first, worst_index))+ stack.append((worst_index, last))+ kept = [vertex for vertex, flag in zip(ring, keep) if flag]+ return kept[:-1] if closed else kept+++def parse_nhc_cone_kmz(content: bytes) -> dict:+ """Parse NHC's CONE.kmz into a simplified [lat, lon] outline.++ Raises zipfile.BadZipFile / ValueError / ET.ParseError (and the zip+ layer's zlib.error, RuntimeError, EOFError) on anything unreadable;+ the caller turns those into a named cone failure.+ """+ with zipfile.ZipFile(io.BytesIO(content)) as archive:+ members = [m for m in archive.infolist() if m.filename.lower().endswith(".kml")]+ if not members:+ raise ValueError("KMZ holds no .kml document")+ if members[0].file_size > _KML_MAX_BYTES:+ raise ValueError(+ f"KML of {members[0].file_size} bytes exceeds cap {_KML_MAX_BYTES}"+ )+ with archive.open(members[0]) as handle:+ kml = handle.read(_KML_MAX_BYTES + 1)+ if len(kml) > _KML_MAX_BYTES:+ raise ValueError(f"KML exceeds cap {_KML_MAX_BYTES}")++ root = _cone_root(kml)+ ring = _ring_from_root(root)+ extended: dict[str, str] = {}+ for el in root.iter():+ if _local(el.tag) == "Data" and el.get("name"):+ value = next((c for c in el if _local(c.tag) == "value"), None)+ if value is not None and value.text is not None:+ extended[el.get("name")] = value.text.strip()+ period = extended.get("fcstpd")++ outline = simplify_closed_ring(ring + [ring[0]], CONE_SIMPLIFY_TOLERANCE_DEG)+ return {+ "vertices": [[lat, lon] for lat, lon in outline],+ "vertex_count": len(outline),+ "source_vertex_count": len(ring),+ "simplify_tolerance_deg": CONE_SIMPLIFY_TOLERANCE_DEG,+ "advisory_number": extended.get("advisoryNum"),+ "forecast_period_hours": int(period) if period and period.isdigit() else None,+ "note": _CONE_NOTE,+ }+++# ---------------------------------------------------------------------------+# JTWC warning text+# ---------------------------------------------------------------------------+++def parse_jtwc_warning(text: str, fallback_anchor: datetime) -> dict:+ """Parse a JTWC warning text into an initial fix and forecast points.++ Day-only times resolve against the REMARKS date line ("17OCT26."),+ else ``fallback_anchor`` (the fetch time). ``section`` is JTWC's own+ block label: forecast, extended_outlook, long_range_outlook.+ """+ text = _normalize_newlines(text)++ anchor = fallback_anchor+ dated = _JTWC_DATE_RE.search(text)+ if dated:+ try:+ anchor = datetime(+ 2000 + int(dated.group(3)),+ _MONTHS[dated.group(2)],+ int(dated.group(1)),+ tzinfo=timezone.utc,+ )+ except ValueError:+ anchor = fallback_anchor++ def when(match: re.Match, first: int) -> datetime | None:+ return resolve_day_time(+ int(match.group(first)),+ int(match.group(first + 1)),+ int(match.group(first + 2)),+ anchor,+ )++ header = _JTWC_HEADER_RE.search(text)+ number = _JTWC_NUMBER_RE.search(text)++ initial = None+ position = _JTWC_POSITION_RE.search(text)+ if position:+ present = _JTWC_PRESENT_RE.search(text)+ pressure = _JTWC_PRESSURE_RE.search(text)+ same_fix = pressure is not None and pressure.group(1, 2, 3) == position.group(1, 2, 3)+ initial = {+ "valid_time": _iso(when(position, 1)),+ "latitude": _coord(position.group(4), position.group(5)),+ "longitude": _coord(position.group(6), position.group(7)),+ "max_wind_kt": int(present.group(1)) if present else None,+ "gust_kt": int(present.group(2)) if present else None,+ "pressure_mb": int(pressure.group(4)) if same_fix else None,+ }++ sections = [(m.start(), m.group(1)) for m in _JTWC_SECTION_RE.finditer(text)]+ remarks_at = next((at for at, name in sections if name == "REMARKS"), len(text))+ blocks = [m for m in _JTWC_POINT_RE.finditer(text) if m.start() < remarks_at]+ points = []+ for i, block in enumerate(blocks):+ block_end = blocks[i + 1].start() if i + 1 < len(blocks) else remarks_at+ body = text[block.end() : block_end]+ wind = _JTWC_WIND_RE.search(body)+ status_lines = [+ line.strip()+ for line in body.split("\n")+ if line.strip() and not _JTWC_STRUCTURAL_RE.match(line.strip())+ ]+ section = None+ for at, name in sections:+ if at < block.start() and name in _JTWC_SECTIONS:+ section = _JTWC_SECTIONS[name]+ points.append(+ {+ "tau_hours": int(block.group(1)),+ "valid_time": _iso(when(block, 2)),+ "latitude": _coord(block.group(5), block.group(6)),+ "longitude": _coord(block.group(7), block.group(8)),+ "max_wind_kt": int(wind.group(1)) if wind else None,+ "gust_kt": int(wind.group(2)) if wind else None,+ "status": "; ".join(status_lines) or None,+ "section": section,+ }+ )++ return {+ "warning_number": int(number.group(1)) if number else None,+ "issued": _iso(when(header, 1)) if header else None,+ "initial": initial,+ "points": points,+ }+++# ---------------------------------------------------------------------------+# Fetch orchestration+# ---------------------------------------------------------------------------+++async def _nhc_track(fetcher: Fetcher, storm_id: str, advisory: dict, now: datetime) -> dict:+ url = advisory.get("url")+ out: dict[str, Any] = {+ "track_url": url,+ "track_status": "ok",+ "advisory_number": None,+ "issued": None,+ "initial": None,+ "points": [],+ }+ if not url:+ out["track_status"] = "not_linked"+ out["track_error"] = "CurrentStorms.json links no forecast/advisory for this storm"+ return out++ expected = advisory.get("advNum")+ key = f"cyclones:nhc:tcm:{storm_id}:{expected}:{advisory.get('fileUpdateTime')}"+ page = await fetcher.get_text(+ url, source="nhc-forecast", cache_key=key, cache_ttl=_FORECAST_CACHE_TTL+ )+ if page is None:+ out["track_status"] = "fetch_failed"+ out["track_error"] = "NHC forecast/advisory text unavailable (no live or cached data)"+ return out++ parsed = parse_nhc_forecast_advisory(page, fallback_anchor=now)+ out.update(parsed)+ if not parsed["points"]:+ fetcher.cache.delete(key)+ out["track_status"] = "unparsed"+ out["track_error"] = "forecast/advisory page carried no parseable forecast points"+ elif expected and not _same_number(parsed["advisory_number"], expected):+ fetcher.cache.delete(key)+ out["track_status"] = "stale_advisory"+ out["expected_advisory_number"] = expected+ out["track_error"] = (+ f"forecast/advisory page shows advisory {parsed['advisory_number']}, "+ f"CurrentStorms.json lists {expected}"+ )+ return out+++async def _nhc_cone(fetcher: Fetcher, storm_id: str, cone_meta: dict) -> dict:+ url = cone_meta.get("kmzFile")+ out: dict[str, Any] = {"cone_url": url, "cone_status": "ok", "cone": None}+ if not url:+ out["cone_status"] = "not_linked"+ return out++ key = f"cyclones:nhc:cone:{storm_id}:{cone_meta.get('advNum')}:{cone_meta.get('fileUpdateTime')}"+ cached = fetcher.cache.get(key)+ if cached is not None:+ out["cone"] = cached+ return out++ result = await fetcher.get_bytes(url, source="nhc-gis", max_bytes=_CONE_MAX_BYTES)+ if not result.ok:+ out["cone_status"] = "fetch_failed"+ out["cone_error"] = "NHC cone KMZ fetch failed: " + (+ result.error or f"HTTP {result.status}"+ )+ return out+ try:+ cone = parse_nhc_cone_kmz(result.content)+ except (zipfile.BadZipFile, zlib.error, ET.ParseError, ValueError, RuntimeError, EOFError) as exc:+ out["cone_status"] = "unparsed"+ out["cone_error"] = f"NHC cone KMZ unreadable: {type(exc).__name__}: {exc}"+ return out+ fetcher.cache.set(key, cone, _FORECAST_CACHE_TTL)+ out["cone"] = cone+ return out+++async def _nhc_storm_forecast(fetcher: Fetcher, raw: dict, now: datetime) -> dict:+ storm_id = raw.get("id") or "unknown"+ track, cone = await asyncio.gather(+ _nhc_track(fetcher, storm_id, raw.get("forecastAdvisory") or {}, now),+ _nhc_cone(fetcher, storm_id, raw.get("trackCone") or {}),+ )+ return {"agency": "NHC", **track, **cone}+++async def _jtwc_storm_forecast(fetcher: Fetcher, storm: dict, now: datetime) -> dict:+ url = storm.get("warning_text_url")+ out: dict[str, Any] = {+ "agency": "JTWC",+ "track_url": url,+ "track_status": "ok",+ "warning_number": None,+ "issued": None,+ "initial": None,+ "points": [],+ "cone_url": None,+ "cone_status": "not_published",+ "cone": None,+ }+ if not url:+ out["track_status"] = "not_linked"+ out["track_error"] = "the JTWC RSS item links no warning text for this storm"+ return out++ expected = storm.get("warning_number")+ key = f"jtwc:warning:{storm.get('id')}:{expected}:{storm.get('issued_at')}"+ text = await fetcher.get_text(+ url, source="jtwc-warning", cache_key=key, cache_ttl=_FORECAST_CACHE_TTL+ )+ if text is None:+ out["track_status"] = "fetch_failed"+ out["track_error"] = "JTWC warning text unavailable (no live or cached data)"+ return out++ parsed = parse_jtwc_warning(text, now)+ out.update(parsed)+ if not parsed["points"]:+ fetcher.cache.delete(key)+ out["track_status"] = "unparsed"+ out["track_error"] = "warning text carried no parseable forecast positions"+ elif (+ expected is not None+ and parsed["warning_number"] is not None+ and parsed["warning_number"] != expected+ ):+ fetcher.cache.delete(key)+ out["track_status"] = "stale_warning"+ out["expected_warning_number"] = expected+ out["track_error"] = (+ f"warning text shows warning {parsed['warning_number']}, "+ f"the RSS lists {expected}"+ )+ return out+++def _capped(agency: str) -> dict:+ cone_status = "not_published" if agency == "JTWC" else "not_fetched_cap"+ return {+ "agency": agency,+ "track_status": "not_fetched_cap",+ "track_error": f"not fetched: per-call cap of {MAX_FORECAST_STORMS} storms",+ "initial": None,+ "points": [],+ "cone_status": cone_status,+ "cone": None,+ }+++def _summarize(storms: list[dict]) -> tuple[list[str], bool]:+ """Name every missing track or cone; report whether any was a failure."""+ gaps: list[str] = []+ degraded = False+ for storm in storms:+ forecast = storm.get("forecast") or {}+ label = f"{storm.get('name') or 'unnamed'} ({storm.get('id') or 'no id'})"+ status = forecast.get("track_status")+ if status == "not_fetched_cap":+ gaps.append(+ f"{label}: forecast not fetched, per-call cap of {MAX_FORECAST_STORMS} storms"+ )+ degraded = True+ continue+ if status != "ok":+ gaps.append(f"{label}: forecast track {status}: {forecast.get('track_error')}")+ degraded = degraded or status in _FAILED_STATUSES+ cone_status = forecast.get("cone_status")+ if cone_status in ("fetch_failed", "unparsed"):+ gaps.append(f"{label}: no cone, {forecast.get('cone_error')}")+ degraded = True+ elif cone_status == "not_linked":+ gaps.append(f"{label}: no cone, CurrentStorms.json links no cone KMZ for it")+ return gaps, degraded+++async def attach_nhc_forecasts(+ fetcher: Fetcher, entries: list[tuple[dict, dict]]+) -> tuple[list[str], bool]:+ """Give each NHC storm a ``forecast`` (track from its forecast/advisory,+ cone from its CONE.kmz). ``entries`` pairs each output storm with its+ raw CurrentStorms.json record. Returns (data_gaps, degraded)."""+ now = datetime.now(timezone.utc)+ targets = entries[:MAX_FORECAST_STORMS]+ forecasts = await asyncio.gather(+ *(_nhc_storm_forecast(fetcher, raw, now) for _, raw in targets)+ )+ for (storm, _), forecast in zip(targets, forecasts):+ storm["forecast"] = forecast+ for storm, _ in entries[MAX_FORECAST_STORMS:]:+ storm["forecast"] = _capped("NHC")+ return _summarize([storm for storm, _ in entries])+++async def attach_jtwc_forecasts(+ fetcher: Fetcher, storms: list[dict]+) -> tuple[list[str], bool]:+ """Give each JTWC storm a ``forecast`` from its linked warning text.+ Returns (data_gaps, degraded)."""+ now = datetime.now(timezone.utc)+ targets = storms[:MAX_FORECAST_STORMS]+ forecasts = await asyncio.gather(+ *(_jtwc_storm_forecast(fetcher, storm, now) for storm in targets)+ )+ for storm, forecast in zip(targets, forecasts):+ storm["forecast"] = forecast+ for storm in storms[MAX_FORECAST_STORMS:]:+ storm["forecast"] = _capped("JTWC")+ gaps, degraded = _summarize(storms)+ if storms:+ gaps.append(_JTWC_CONE_GAP)+ return gaps, degradeddiff --git a/src/world_intel_mcp/sources/cyclones.py b/src/world_intel_mcp/sources/cyclones.pyindex edae887..080e954 100644--- a/src/world_intel_mcp/sources/cyclones.py+++ b/src/world_intel_mcp/sources/cyclones.py@@ -17,12 +17,18 @@ returned without degradation markers; only an actual fetch failure ismarked degraded. The quiet-season shape itself (activeStorms: []) isassumed from the populated shape, not observed — four storms wereactive on the day this was written.++``include_forecast=True`` adds each storm's official forecast track and+5-day cone (sources/cyclone_forecasts.py, one text and one KMZ fetch per+storm, capped per call) plus a ``data_gaps`` list; the default call+fetches CurrentStorms.json only."""import loggingfrom datetime import datetime, timezonefrom ..fetcher import Fetcher+from . import cyclone_forecastslogger = logging.getLogger("world-intel-mcp.sources.cyclones")@@ -48,11 +54,15 @@ _BASIN_NAMES: dict[str, str] = {}-async def fetch_cyclones(fetcher: Fetcher) -> dict:+async def fetch_cyclones(fetcher: Fetcher, include_forecast: bool = False) -> dict:"""Fetch active tropical cyclones from the NHC.Args:fetcher: Shared HTTP fetcher with caching and circuit breaking.+ include_forecast: Also fetch each storm's forecast track and cone+ (adds ``forecast`` per storm and ``data_gaps``; a failed+ track or cone is named there and marks the response+ degraded).Returns:Dict with storms list (name, classification, intensity,@@ -83,6 +93,7 @@ async def fetch_cyclones(fetcher: Fetcher) -> dict:}storms = []+ entries: list[tuple[dict, dict]] = [] # (output storm, raw record)by_basin: dict[str, int] = {}for storm in data.get("activeStorms", []):storm_id = storm.get("id") or ""@@ -112,14 +123,21 @@ async def fetch_cyclones(fetcher: Fetcher) -> dict:"advisory_url": advisory.get("url"),})+ entries.append((storms[-1], storm))- return {+ response = {"storms": storms,"count": len(storms),"by_basin": by_basin,"source": "nhc","timestamp": now.strftime("%Y-%m-%dT%H:%M:%SZ"),}+ if include_forecast:+ gaps, degraded = await cyclone_forecasts.attach_nhc_forecasts(fetcher, entries)+ response["data_gaps"] = gaps+ if degraded:+ response["degraded"] = True+ return responsedef _safe_int(value: str | int | None) -> int | None:diff --git a/src/world_intel_mcp/sources/jtwc.py b/src/world_intel_mcp/sources/jtwc.pyindex 897028b..3af81b9 100644--- a/src/world_intel_mcp/sources/jtwc.py+++ b/src/world_intel_mcp/sources/jtwc.py@@ -18,9 +18,12 @@ item says "No Current Tropical Cyclone Warnings." — that is a VALIDempty result, not an outage. Item pubDates use a two-digit year("Tue, 01 Sep 26 ..."); issued_at carries only day/time (DD/HHMMZ).-Positions, intensities, and forecast tracks are NOT in the RSS — they-live in the per-storm warning-text products this module links to but-does not fetch (one fetch per storm would fan out unboundedly).+Positions, intensities, and forecast tracks are NOT in the RSS; they+live in the per-storm warning-text products this module links to. The+default call does not fetch them. ``include_forecast=True`` does, one+text per storm with a per-call cap (sources/cyclone_forecasts.py), and+adds each storm's warning position, intensity and forecast track plus a+``data_gaps`` list."""import logging@@ -28,6 +31,7 @@ import refrom datetime import datetime, timezonefrom ..fetcher import Fetcher+from . import cyclone_forecaststry:import feedparser@@ -62,11 +66,15 @@ _ADVISORY_LINK_RE = re.compile(r"<a\s+href=['\"]([^'\"]+\.txt)['\"][^>]*>([^<]+)_QUIET_MARKER = "No Current Tropical Cyclone Warnings"-async def fetch_jtwc_cyclones(fetcher: Fetcher) -> dict:+async def fetch_jtwc_cyclones(fetcher: Fetcher, include_forecast: bool = False) -> dict:"""Fetch active JTWC tropical cyclone warnings.Args:fetcher: Shared HTTP fetcher with caching and circuit breaking.+ include_forecast: Also fetch each storm's warning text for its+ forecast track (adds ``forecast`` per storm and+ ``data_gaps``; a failed track is named there and marks the+ response degraded). JTWC links no cone of uncertainty.Returns:Dict with storms list (id, name, classification, warning@@ -140,7 +148,7 @@ async def fetch_jtwc_cyclones(fetcher: Fetcher) -> dict:by_basin[basin] = len(basin_storms)storms.extend(basin_storms)- return {+ response = {"storms": storms,"count": len(storms),"by_basin": by_basin,@@ -149,6 +157,12 @@ async def fetch_jtwc_cyclones(fetcher: Fetcher) -> dict:"source": "jtwc","timestamp": timestamp,}+ if include_forecast:+ gaps, degraded = await cyclone_forecasts.attach_jtwc_forecasts(fetcher, storms)+ response["data_gaps"] = gaps+ if degraded:+ response["degraded"] = True+ return responsedef _parse_storms(description: str, basin: str) -> list[dict]:diff --git a/src/world_intel_mcp/tests/fixtures/cyclones/jtwc_rss_20261017.xml b/src/world_intel_mcp/tests/fixtures/cyclones/jtwc_rss_20261017.xmlnew file mode 100644index 0000000..3636670--- /dev/null+++ b/src/world_intel_mcp/tests/fixtures/cyclones/jtwc_rss_20261017.xml@@ -0,0 +1,97 @@+<?xml version="1.0" encoding="UTF-8"?>+<rss version="2.0">+ <channel>+ <title>JTWC TROPICAL CYCLONE INFORMATION FEED</title>+ <link>https://s3.amazonaws.com/www.metoc.navy.mil/jtwc/jtwc.html</link>+ <description>JTWC Tropical Cyclone Information</description>+ <pubDate>Sat, 17 Oct 2026 16:44:01 +0000</pubDate>+ <lastBuildDate>Sat, 17 Oct 2026 16:44:01 +0000</lastBuildDate>+ <generator>ContentFeeder 2.0</generator>+ <image>+ <url>https://s3.amazonaws.com/www.metoc.navy.mil/jtwc/jtwc.html</url>+ <title>JTWC TROPICAL CYCLONE INFORMATION FEED</title>+ <link>https://s3.amazonaws.com/www.metoc.navy.mil/jtwc/jtwc.html</link>+ </image>+ <item>+ <title>Current Northwest Pacific/North Indian Ocean* Tropical Systems</title>+ <link>https://s3.amazonaws.com/www.metoc.navy.mil/jtwc/jtwc.html</link>+ <description><![CDATA[<p><b>Typhoon 29W (Champi) Warning #13 </b><br>+<b>Issued at 17/1500Z<b>++<ul>+<li><a href='https://www.metoc.navy.mil/jtwc/products/wp2926web.txt' target='newwin'>TC Warning Text </a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/wp2926.gif' target='newwin'>TC Warning Graphic</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/wp29261715.gif' target='newwin'>3 Hour Position Update Graphic</a> <><b><font color=red>Valid 17/1500Z</font></b></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/wp2926prog.txt' target='newwin'>Prognostic Reasoning</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/wp2926.tcw' target='newwin'>JMV 3.0 Data</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/wp2926.kmz' target='newwin'>Google Earth Overlay</a> <img src='https://www.metoc.navy.mil/jtwc/img/kml.jpg'></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/29W_171200sair.jpg' target='newwin'>IR Satellite Imagery</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/wp2926fix.txt' target='newwin'>Satellite Fix Bulletin</a></li>+ </ul>+<br>+ <p><i>* Includes Bay of Bengal and Arabian Sea</i>+]]></description>+ <author>[email protected] (JTWC CDO)</author>+ <category>Northwest Pacific/North Indian Ocean* Tropical Systems</category>+ <guid>NWPAC-NIO-WARNINGS</guid>+ <pubDate>Sat, 17 Oct 26 16:44:01 +0000</pubDate>+ </item>+ <item>+ <title>Current Central/Eastern Pacific Tropical Systems</title>+ <link>https://s3.amazonaws.com/www.metoc.navy.mil/jtwc/jtwc.html</link>+ <description><![CDATA[<p><b>Hurricane 21E (Trudy) Warning #17 </b><br>+<b>Issued at 17/1600Z<b>++<ul>+<li><a href='https://www.metoc.navy.mil/jtwc/products/ep2126web.txt' target='newwin'>TC Warning Text </a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/ep2126.gif' target='newwin'>TC Warning Graphic</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/ep2126.tcw' target='newwin'>JMV 3.0 Data</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/ep2126.kmz' target='newwin'>Google Earth Overlay</a> <img src='https://www.metoc.navy.mil/jtwc/img/kml.jpg'></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/21E_171200sair.jpg' target='newwin'>IR Satellite Imagery</a></li>+ </ul>+]]></description>+ <author>[email protected] (JTWC CDO)</author>+ <category>Central/Eastern Pacific Tropical Systems</category>+ <guid>EPAC-CPAC-WARNINGS</guid>+ <pubDate>Sat, 17 Oct 26 16:44:01 +0000</pubDate>+ </item>+ <item>+ <title>Current Southern Hemisphere Tropical Systems</title>+ <link>https://s3.amazonaws.com/www.metoc.navy.mil/jtwc/jtwc.html</link>+ <description><![CDATA[<b>Tropical Cyclone 01P (Wati) Warning #03 <b><br>+<b>Issued at 17/0900Z<b>++<ul>+<li><a href='https://www.metoc.navy.mil/jtwc/products/sh0127web.txt' target='newwin'>TC Warning Text </a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/sh0127.gif' target='newwin'>TC Warning Graphic</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/sh0127prog.txt' target='newwin'>Prognostic Reasoning</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/sh0127.tcw' target='newwin'>JMV 3.0 Data</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/sh0127.kmz' target='newwin'>Google Earth Overlay</a> <img src='https://www.metoc.navy.mil/jtwc/img/kml.jpg'></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/01P_170600sair.jpg' target='newwin'>IR Satellite Imagery</a></li>+ <li><a href='https://www.metoc.navy.mil/jtwc/products/sh0127fix.txt' target='newwin'>Satellite Fix Bulletin</a></li>+ </ul>+]]></description>+ <author>[email protected] (JTWC CDO)</author>+ <category>Southern Hemisphere Tropical Systems</category>+ <guid>SH-WARNINGS</guid>+ <pubDate>Sat, 17 Oct 26 16:44:01 +0000</pubDate>+ </item>+ <item>+ <title>Current Significant Tropical Weather Advisories</title>+ <link>https://s3.amazonaws.com/www.metoc.navy.mil/jtwc/jtwc.html</link>+ <description><![CDATA[<ul>+ <li><b><a href="https://www.metoc.navy.mil/jtwc/products/abpwweb.txt" target='newwin'>ABPW10 (Western/South Pacific Ocean)</a><br>++ Issued at 17/0600Z</b></li>+ <li><b><a href="https://www.metoc.navy.mil/jtwc/products/abioweb.txt" target='newwin'>ABIO10 (Indian Ocean)</a><br>++ Issued at 16/1800Z</b></li>+<li><a href='https://www.metoc.navy.mil/jtwc/products/abpwsair.jpg' target='newwin'>Satellite Image</a></li>+</ul>]]></description>+ <author>[email protected] (JTWC CDO)</author>+ <category>Significant Tropical Weather Advisories</category>+ <guid>TROPICAL-ADVISORIES</guid>+ <pubDate>Sat, 17 Oct 26 16:44:01 +0000</pubDate>+ </item>+ </channel>+</rss>diff --git a/src/world_intel_mcp/tests/fixtures/cyclones/jtwc_sh0127web_wrn003.txt b/src/world_intel_mcp/tests/fixtures/cyclones/jtwc_sh0127web_wrn003.txtnew file mode 100644index 0000000..806a221--- /dev/null+++ b/src/world_intel_mcp/tests/fixtures/cyclones/jtwc_sh0127web_wrn003.txt@@ -0,0 +1,130 @@+WTPS31 PGTW 170900+MSGID/GENADMIN/JOINT TYPHOON WRNCEN PEARL HARBOR HI//+SUBJ/TROPICAL CYCLONE 01P (WATI) WARNING NR 003//+RMKS/+1. TROPICAL CYCLONE 01P (WATI) WARNING NR 003+ 01 ACTIVE TROPICAL CYCLONE IN SOUTHPAC+ MAX SUSTAINED WINDS BASED ON ONE-MINUTE AVERAGE+ WIND RADII VALID OVER OPEN WATER ONLY+ ---+ WARNING POSITION:+ 170600Z --- NEAR 13.2S 163.2W+ MOVEMENT PAST SIX HOURS - 160 DEGREES AT 12 KTS+ POSITION ACCURATE TO WITHIN 060 NM+ POSITION BASED ON CENTER LOCATED BY SATELLITE+ PRESENT WIND DISTRIBUTION:+ MAX SUSTAINED WINDS - 060 KT, GUSTS 075 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 050 KT WINDS - 035 NM NORTHEAST QUADRANT+ 035 NM SOUTHEAST QUADRANT+ 000 NM SOUTHWEST QUADRANT+ 000 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 060 NM NORTHEAST QUADRANT+ 085 NM SOUTHEAST QUADRANT+ 070 NM SOUTHWEST QUADRANT+ 060 NM NORTHWEST QUADRANT+ REPEAT POSIT: 13.2S 163.2W+ ---+ FORECASTS:+ 12 HRS, VALID AT:+ 171800Z --- 14.9S 162.6W+ MAX SUSTAINED WINDS - 070 KT, GUSTS 085 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 010 NM NORTHEAST QUADRANT+ 010 NM SOUTHEAST QUADRANT+ 000 NM SOUTHWEST QUADRANT+ 010 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 040 NM NORTHEAST QUADRANT+ 040 NM SOUTHEAST QUADRANT+ 020 NM SOUTHWEST QUADRANT+ 030 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 090 NM NORTHEAST QUADRANT+ 090 NM SOUTHEAST QUADRANT+ 060 NM SOUTHWEST QUADRANT+ 060 NM NORTHWEST QUADRANT+ VECTOR TO 24 HR POSIT: 145 DEG/ 10 KTS+ ---+ 24 HRS, VALID AT:+ 180600Z --- 16.6S 161.4W+ MAX SUSTAINED WINDS - 075 KT, GUSTS 090 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 020 NM NORTHEAST QUADRANT+ 010 NM SOUTHEAST QUADRANT+ 010 NM SOUTHWEST QUADRANT+ 020 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 050 NM NORTHEAST QUADRANT+ 040 NM SOUTHEAST QUADRANT+ 020 NM SOUTHWEST QUADRANT+ 030 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 090 NM NORTHEAST QUADRANT+ 090 NM SOUTHEAST QUADRANT+ 050 NM SOUTHWEST QUADRANT+ 060 NM NORTHWEST QUADRANT+ VECTOR TO 36 HR POSIT: 130 DEG/ 15 KTS+ ---+ 36 HRS, VALID AT:+ 181800Z --- 18.5S 159.1W+ MAX SUSTAINED WINDS - 065 KT, GUSTS 080 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 020 NM NORTHEAST QUADRANT+ 010 NM SOUTHEAST QUADRANT+ 000 NM SOUTHWEST QUADRANT+ 020 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 050 NM NORTHEAST QUADRANT+ 040 NM SOUTHEAST QUADRANT+ 010 NM SOUTHWEST QUADRANT+ 030 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 090 NM NORTHEAST QUADRANT+ 070 NM SOUTHEAST QUADRANT+ 040 NM SOUTHWEST QUADRANT+ 060 NM NORTHWEST QUADRANT+ VECTOR TO 48 HR POSIT: 125 DEG/ 19 KTS+ ---+ EXTENDED OUTLOOK:+ 48 HRS, VALID AT:+ 190600Z --- 20.7S 155.7W+ MAX SUSTAINED WINDS - 060 KT, GUSTS 075 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 050 KT WINDS - 040 NM NORTHEAST QUADRANT+ 020 NM SOUTHEAST QUADRANT+ 000 NM SOUTHWEST QUADRANT+ 020 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 100 NM NORTHEAST QUADRANT+ 070 NM SOUTHEAST QUADRANT+ 040 NM SOUTHWEST QUADRANT+ 090 NM NORTHWEST QUADRANT+ VECTOR TO 60 HR POSIT: 125 DEG/ 26 KTS+ ---+ 60 HRS, VALID AT:+ 191800Z --- 23.5S 150.9W+ MAX SUSTAINED WINDS - 050 KT, GUSTS 065 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ BECOMING EXTRATROPICAL+ RADIUS OF 050 KT WINDS - 030 NM NORTHEAST QUADRANT+ 020 NM SOUTHEAST QUADRANT+ 000 NM SOUTHWEST QUADRANT+ 000 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 110 NM NORTHEAST QUADRANT+ 040 NM SOUTHEAST QUADRANT+ 020 NM SOUTHWEST QUADRANT+ 100 NM NORTHWEST QUADRANT+ VECTOR TO 72 HR POSIT: 120 DEG/ 27 KTS+ ---+ 72 HRS, VALID AT:+ 200600Z --- 26.3S 145.8W+ MAX SUSTAINED WINDS - 045 KT, GUSTS 055 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ EXTRATROPICAL+ RADIUS OF 034 KT WINDS - 100 NM NORTHEAST QUADRANT+ 000 NM SOUTHEAST QUADRANT+ 040 NM SOUTHWEST QUADRANT+ 090 NM NORTHWEST QUADRANT+ ---+REMARKS:+170900Z POSITION NEAR 13.6S 163.1W.+17OCT26. TROPICAL CYCLONE 01P (WATI), LOCATED APPROXIMATELY 442+NM EAST OF PAGO PAGO, HAS TRACKED SOUTH-SOUTHEASTWARD AT 12 KNOTS+OVER THE PAST SIX HOURS. MINIMUM CENTRAL PRESSURE AT 170600Z IS 986+MB. MAXIMUM SIGNIFICANT WAVE HEIGHT AT 170600Z IS 24 FEET. NEXT+WARNINGS AT 172100Z AND 180900Z.//+NNNNdiff --git a/src/world_intel_mcp/tests/fixtures/cyclones/jtwc_wp2926web_wrn013.txt b/src/world_intel_mcp/tests/fixtures/cyclones/jtwc_wp2926web_wrn013.txtnew file mode 100644index 0000000..f686720--- /dev/null+++ b/src/world_intel_mcp/tests/fixtures/cyclones/jtwc_wp2926web_wrn013.txt@@ -0,0 +1,187 @@+WTPN32 PGTW 171500+MSGID/GENADMIN/JOINT TYPHOON WRNCEN PEARL HARBOR HI//+SUBJ/TYPHOON 29W (CHAMPI) WARNING NR 013//+RMKS/+1. TYPHOON 29W (CHAMPI) WARNING NR 013+ 01 ACTIVE TROPICAL CYCLONE IN NORTHWESTPAC+ MAX SUSTAINED WINDS BASED ON ONE-MINUTE AVERAGE+ WIND RADII VALID OVER OPEN WATER ONLY+ ---+ WARNING POSITION:+ 171200Z --- NEAR 12.6N 146.1E+ MOVEMENT PAST SIX HOURS - 275 DEGREES AT 12 KTS+ POSITION ACCURATE TO WITHIN 030 NM+ POSITION BASED ON EYE FIXED BY A COMBINATION OF+ SATELLITE AND RADAR+ PRESENT WIND DISTRIBUTION:+ MAX SUSTAINED WINDS - 120 KT, GUSTS 145 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 045 NM NORTHEAST QUADRANT+ 050 NM SOUTHEAST QUADRANT+ 035 NM SOUTHWEST QUADRANT+ 040 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 055 NM NORTHEAST QUADRANT+ 070 NM SOUTHEAST QUADRANT+ 060 NM SOUTHWEST QUADRANT+ 055 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 110 NM NORTHEAST QUADRANT+ 110 NM SOUTHEAST QUADRANT+ 110 NM SOUTHWEST QUADRANT+ 100 NM NORTHWEST QUADRANT+ REPEAT POSIT: 12.6N 146.1E+ ---+ FORECASTS:+ 12 HRS, VALID AT:+ 180000Z --- 13.0N 143.7E+ MAX SUSTAINED WINDS - 120 KT, GUSTS 145 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 045 NM NORTHEAST QUADRANT+ 050 NM SOUTHEAST QUADRANT+ 035 NM SOUTHWEST QUADRANT+ 040 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 070 NM NORTHEAST QUADRANT+ 070 NM SOUTHEAST QUADRANT+ 070 NM SOUTHWEST QUADRANT+ 070 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 120 NM NORTHEAST QUADRANT+ 120 NM SOUTHEAST QUADRANT+ 120 NM SOUTHWEST QUADRANT+ 120 NM NORTHWEST QUADRANT+ VECTOR TO 24 HR POSIT: 285 DEG/ 11 KTS+ ---+ 24 HRS, VALID AT:+ 181200Z --- 13.5N 141.6E+ MAX SUSTAINED WINDS - 135 KT, GUSTS 165 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 040 NM NORTHEAST QUADRANT+ 040 NM SOUTHEAST QUADRANT+ 020 NM SOUTHWEST QUADRANT+ 030 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 070 NM NORTHEAST QUADRANT+ 060 NM SOUTHEAST QUADRANT+ 040 NM SOUTHWEST QUADRANT+ 060 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 160 NM NORTHEAST QUADRANT+ 140 NM SOUTHEAST QUADRANT+ 120 NM SOUTHWEST QUADRANT+ 150 NM NORTHWEST QUADRANT+ VECTOR TO 36 HR POSIT: 290 DEG/ 11 KTS+ ---+ 36 HRS, VALID AT:+ 190000Z --- 14.3N 139.5E+ MAX SUSTAINED WINDS - 140 KT, GUSTS 170 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 050 NM NORTHEAST QUADRANT+ 040 NM SOUTHEAST QUADRANT+ 020 NM SOUTHWEST QUADRANT+ 040 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 090 NM NORTHEAST QUADRANT+ 080 NM SOUTHEAST QUADRANT+ 050 NM SOUTHWEST QUADRANT+ 080 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 180 NM NORTHEAST QUADRANT+ 170 NM SOUTHEAST QUADRANT+ 130 NM SOUTHWEST QUADRANT+ 170 NM NORTHWEST QUADRANT+ VECTOR TO 48 HR POSIT: 295 DEG/ 11 KTS+ ---+ EXTENDED OUTLOOK:+ 48 HRS, VALID AT:+ 191200Z --- 15.3N 137.4E+ MAX SUSTAINED WINDS - 135 KT, GUSTS 165 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 060 NM NORTHEAST QUADRANT+ 050 NM SOUTHEAST QUADRANT+ 030 NM SOUTHWEST QUADRANT+ 050 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 100 NM NORTHEAST QUADRANT+ 090 NM SOUTHEAST QUADRANT+ 060 NM SOUTHWEST QUADRANT+ 090 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 210 NM NORTHEAST QUADRANT+ 200 NM SOUTHEAST QUADRANT+ 140 NM SOUTHWEST QUADRANT+ 190 NM NORTHWEST QUADRANT+ VECTOR TO 60 HR POSIT: 295 DEG/ 12 KTS+ ---+ 60 HRS, VALID AT:+ 200000Z --- 16.3N 135.1E+ MAX SUSTAINED WINDS - 135 KT, GUSTS 165 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 060 NM NORTHEAST QUADRANT+ 050 NM SOUTHEAST QUADRANT+ 040 NM SOUTHWEST QUADRANT+ 050 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 110 NM NORTHEAST QUADRANT+ 100 NM SOUTHEAST QUADRANT+ 070 NM SOUTHWEST QUADRANT+ 100 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 240 NM NORTHEAST QUADRANT+ 210 NM SOUTHEAST QUADRANT+ 150 NM SOUTHWEST QUADRANT+ 200 NM NORTHWEST QUADRANT+ VECTOR TO 72 HR POSIT: 295 DEG/ 12 KTS+ ---+ 72 HRS, VALID AT:+ 201200Z --- 17.3N 132.8E+ MAX SUSTAINED WINDS - 135 KT, GUSTS 165 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 080 NM NORTHEAST QUADRANT+ 060 NM SOUTHEAST QUADRANT+ 040 NM SOUTHWEST QUADRANT+ 060 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 120 NM NORTHEAST QUADRANT+ 110 NM SOUTHEAST QUADRANT+ 080 NM SOUTHWEST QUADRANT+ 110 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 250 NM NORTHEAST QUADRANT+ 210 NM SOUTHEAST QUADRANT+ 160 NM SOUTHWEST QUADRANT+ 210 NM NORTHWEST QUADRANT+ VECTOR TO 96 HR POSIT: 300 DEG/ 11 KTS+ ---+ LONG RANGE OUTLOOK:+ ---+ 96 HRS, VALID AT:+ 211200Z --- 19.4N 128.6E+ MAX SUSTAINED WINDS - 125 KT, GUSTS 150 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 090 NM NORTHEAST QUADRANT+ 070 NM SOUTHEAST QUADRANT+ 050 NM SOUTHWEST QUADRANT+ 080 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 130 NM NORTHEAST QUADRANT+ 130 NM SOUTHEAST QUADRANT+ 100 NM SOUTHWEST QUADRANT+ 120 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 240 NM NORTHEAST QUADRANT+ 220 NM SOUTHEAST QUADRANT+ 200 NM SOUTHWEST QUADRANT+ 270 NM NORTHWEST QUADRANT+ VECTOR TO 120 HR POSIT: 305 DEG/ 07 KTS+ ---+ 120 HRS, VALID AT:+ 221200Z --- 21.0N 125.9E+ MAX SUSTAINED WINDS - 105 KT, GUSTS 130 KT+ WIND RADII VALID OVER OPEN WATER ONLY+ RADIUS OF 064 KT WINDS - 100 NM NORTHEAST QUADRANT+ 080 NM SOUTHEAST QUADRANT+ 070 NM SOUTHWEST QUADRANT+ 100 NM NORTHWEST QUADRANT+ RADIUS OF 050 KT WINDS - 140 NM NORTHEAST QUADRANT+ 130 NM SOUTHEAST QUADRANT+ 140 NM SOUTHWEST QUADRANT+ 160 NM NORTHWEST QUADRANT+ RADIUS OF 034 KT WINDS - 270 NM NORTHEAST QUADRANT+ 230 NM SOUTHEAST QUADRANT+ 260 NM SOUTHWEST QUADRANT+ 330 NM NORTHWEST QUADRANT+ ---+REMARKS:+171500Z POSITION NEAR 12.7N 145.5E.+17OCT26. TYPHOON 29W (CHAMPI), LOCATED APPROXIMATELY 96 NM+SOUTHEAST OF ANDERSEN AFB, HAS TRACKED WESTWARD AT 12 KNOTS OVER+THE PAST SIX HOURS. MINIMUM CENTRAL PRESSURE AT 171200Z IS 945 MB.+MAXIMUMS IGNIFICANT WAVE HEIGHT AT 171200Z IS 42 FEET. NEXT WARNINGS+AT 172100Z, 180300Z, 180900Z AND 181500Z.//+NNNNdiff --git a/src/world_intel_mcp/tests/fixtures/cyclones/nhc_current_storms_20261017.json b/src/world_intel_mcp/tests/fixtures/cyclones/nhc_current_storms_20261017.jsonnew file mode 100644index 0000000..34bec73--- /dev/null+++ b/src/world_intel_mcp/tests/fixtures/cyclones/nhc_current_storms_20261017.json@@ -0,0 +1,114 @@+{+ "activeStorms": [+ {+ "id": "ep212026",+ "binNumber": "EP1",+ "name": "Trudy",+ "classification": "HU",+ "intensity": "80",+ "pressure": "979",+ "latitude": "16.6N",+ "longitude": "103.9W",+ "latitudeNumeric": 16.6,+ "longitudeNumeric": -103.9,+ "movementDir": 325,+ "movementSpeed": 10,+ "lastUpdate": "2026-10-17T15:00:00.000Z",+ "publicAdvisory": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:37:43.461Z",+ "url": "https://www.nhc.noaa.gov/text/MIATCPEP1.shtml"+ },+ "forecastAdvisory": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:37:11.524Z",+ "url": "https://www.nhc.noaa.gov/text/MIATCMEP1.shtml"+ },+ "windSpeedProbabilities": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:38:11.685Z",+ "url": "https://www.nhc.noaa.gov/text/MIAPWSEP1.shtml"+ },+ "forecastDiscussion": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:38:41.806Z",+ "url": "https://www.nhc.noaa.gov/text/MIATCDEP1.shtml"+ },+ "forecastGraphics": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:37:43.461Z",+ "url": "https://www.nhc.noaa.gov/graphics_ep1.shtml"+ },+ "forecastTrack": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:39:46.788Z",+ "zipFile": "https://www.nhc.noaa.gov/gis/forecast/archive/ep212026_5day_017.zip",+ "kmzFile": "https://www.nhc.noaa.gov/storm_graphics/api/EP212026_017adv_TRACK.kmz"+ },+ "windWatchesWarnings": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:39:48.964Z",+ "zipFile": "https://www.nhc.noaa.gov/gis/forecast/archive/ep212026_5day_017.zip",+ "kmzFile": "https://www.nhc.noaa.gov/storm_graphics/api/EP212026_017adv_WW.kmz"+ },+ "trackCone": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:39:40.332Z",+ "zipFile": "https://www.nhc.noaa.gov/gis/forecast/archive/ep212026_5day_017.zip",+ "kmzFile": "https://www.nhc.noaa.gov/storm_graphics/api/EP212026_017adv_CONE.kmz"+ },+ "initialWindExtent": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:40:20.718Z",+ "zipFile": "https://www.nhc.noaa.gov/gis/forecast/archive/ep212026_fcst_017.zip",+ "kmzFile": "https://www.nhc.noaa.gov/storm_graphics/api/EP212026_initialradii_017adv.kmz"+ },+ "forecastWindRadiiGIS": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:40:16.758Z",+ "zipFile": "https://www.nhc.noaa.gov/gis/forecast/archive/ep212026_fcst_017.zip",+ "kmzFile": "https://www.nhc.noaa.gov/storm_graphics/api/EP212026_forecastradii_017adv.kmz"+ },+ "bestTrackGIS": {+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:39:58.742Z",+ "zipFile": "https://www.nhc.noaa.gov/gis/best_track/ep212026_best_track.zip",+ "kmzFile": "https://www.nhc.noaa.gov/gis/best_track/ep212026_best_track.kmz"+ },+ "earliestArrivalTimeTSWindsGIS": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:39:42.397Z",+ "kmzFile": "https://www.nhc.noaa.gov/storm_graphics/api/EP212026_017adv_earliest_reasonable_toa_34.kmz"+ },+ "mostLikelyTimeTSWindsGIS": {+ "advNum": "017",+ "issuance": "2026-10-17T15:00:00.000Z",+ "fileUpdateTime": "2026-10-17T14:39:44.575Z",+ "kmzFile": "https://www.nhc.noaa.gov/storm_graphics/api/EP212026_017adv_most_likely_toa_34.kmz"+ },+ "windSpeedProbabilitiesGIS": {+ "issuance": "2026-10-17T12:00:00.000Z",+ "fileUpdateTime": "2026-10-17T15:23:19.452Z",+ "zipFile5km": "https://www.nhc.noaa.gov/gis/forecast/archive/2026101712_wsp_120hr5km.zip",+ "zipFile0p5deg": "https://www.nhc.noaa.gov/gis/forecast/archive/2026101712_wsp_120hrhalfDeg.zip",+ "kmzFile34kt": "https://www.nhc.noaa.gov/gis/forecast/archive/2026101712_wsp34knt120hr_5km.kmz",+ "kmzFile50kt": "https://www.nhc.noaa.gov/gis/forecast/archive/2026101712_wsp50knt120hr_5km.kmz",+ "kmzFile64kt": "https://www.nhc.noaa.gov/gis/forecast/archive/2026101712_wsp64knt120hr_5km.kmz"+ },+ "stormSurgeWatchWarningGIS": null,+ "potentialStormSurgeFloodingGIS": null,+ "peakSurgeKML": null+ }+ ]+}\ No newline at end of filediff --git a/src/world_intel_mcp/tests/fixtures/cyclones/nhc_ep212026_017adv_CONE.kml b/src/world_intel_mcp/tests/fixtures/cyclones/nhc_ep212026_017adv_CONE.kmlnew file mode 100644index 0000000..e690609--- /dev/null+++ b/src/world_intel_mcp/tests/fixtures/cyclones/nhc_ep212026_017adv_CONE.kml@@ -0,0 +1,212 @@+<?xml version='1.0' encoding='UTF-8'?>+<kml xmlns='http://earth.google.com/kml/2.1'>+<Document>+<name>Hurricane Trudy (Advisory #17) - Forecast Track Uncertainty</name>+ <description>+ <TABLE>+ <TR><TD><B>Title:</B> Tropical Cyclone Forecast Cone of Uncertainty for EP212026 (Advisory #17)</TD></TR>+ <TR><TD><B>Description:</B>The cone represents the probable track of the center of a tropical cyclone, and is formed by enclosing the area swept out by a set of circles along the forecast track (at 12, 24, 36 hours, etc). The size of each circle is set so that two-thirds of historical official forecast errors over a 5-year sample fall within the circle. Based on forecasts over the previous 5 years, the entire track of a tropical cyclone can be expected to remain within the cone roughly 60-70% of the time. It is important to note that the area affected by a tropical cyclone can extend well beyond the confines of the cone enclosing the most likely track area of the center. </TD></TR>+ <TR><TD><B>Date Created:</B> 10-17-2026 - 14:38 UTC </TD></TR>+ <TR><TD><B>Created:</B> National Hurricane Center </TD></TR>+ <TR><TD><B>Disclaimer:</B>The official forecast track in KML format is an experimental product.</TD></TR>+ <TR><TD><B>For More Information: </B><a href="https://www.nhc.noaa.gov">https://www.nhc.noaa.gov</a></TD></TR>+ </TABLE>+ </description>+ <Style id='120'>+ <LineStyle>+ <color>ffff7b00</color>+ <width>2</width>+ </LineStyle>+ <PolyStyle>+ <color>33eae12e</color>+ </PolyStyle>+ </Style>+ <Placemark>+ <styleUrl>#120</styleUrl>+ <Polygon>+ <outerBoundaryIs><LinearRing>+ <coordinates>+-103.90001,16.33344,0 -103.88411,16.33436,0 -103.8674,16.33693,0 -103.85878,16.33888,0 -103.83098,16.34587,0 -103.81211,16.35183,0 -103.79344,16.35861,0 -103.77559,16.36642,0+-103.75888,16.37535,0 -103.7356,16.39056,0 -103.72852,16.39631,0 -103.71488,16.40834,0 -103.70206,16.42118,0 -103.67899,16.44944,0 -103.66872,16.46485,0 -103.6638,16.47276,0+-103.65076,16.49824,0 -103.64676,16.50707,0 -103.63631,16.53492,0 -103.63344,16.54427,0 -103.62698,16.57427,0 -103.62482,16.59451,0 -103.62482,16.61485,0 -103.62698,16.63509,0+-103.63087,16.65502,0 -103.63632,16.67444,0 -103.64308,16.69314,0 -103.65077,16.71112,0 -103.65918,16.72838,0 -103.66832,16.74493,0 -103.67796,16.76095,0 -103.6879,16.77667,0+-103.69804,16.79219,0 -103.70831,16.8076,0 -103.71856,16.82301,0 -103.72881,16.83842,0 -103.73907,16.85383,0 -103.74934,16.86925,0 -103.75959,16.88466,0 -103.76985,16.90007,0+-103.77498,16.90777,0 -103.79036,16.93089,0 -103.80063,16.9463,0 -103.81088,16.96171,0 -103.82626,16.98483,0 -103.83139,16.99254,0 -103.84166,17.00795,0 -103.85191,17.02336,0+-103.86217,17.03877,0 -103.87242,17.05418,0 -103.88268,17.0696,0 -103.89294,17.08501,0 -103.90319,17.10042,0 -103.91344,17.11583,0 -103.92371,17.13124,0 -103.93396,17.14665,0+-103.94421,17.16206,0 -103.95448,17.17747,0 -103.96473,17.19289,0 -103.97499,17.2083,0 -103.98524,17.22371,0 -103.9955,17.23912,0 -104.00575,17.25453,0 -104.01602,17.26994,0+-104.02628,17.28535,0 -104.03653,17.30077,0 -104.04678,17.31618,0 -104.05705,17.33159,0 -104.06731,17.347,0 -104.07756,17.36242,0 -104.08781,17.37783,0 -104.1032,17.40094,0+-104.10832,17.40865,0 -104.11858,17.42406,0 -104.12883,17.43947,0 -104.13909,17.45489,0 -104.14935,17.4703,0 -104.1596,17.48571,0 -104.16987,17.50112,0 -104.18012,17.51653,0+-104.19038,17.53194,0 -104.20064,17.54735,0 -104.21089,17.56277,0 -104.22115,17.57818,0 -104.23141,17.59359,0 -104.24167,17.609,0 -104.25706,17.63212,0 -104.26219,17.63982,0+-104.27245,17.65524,0 -104.28259,17.67075,0 -104.29254,17.68647,0 -104.30229,17.70239,0 -104.31654,17.72664,0 -104.32117,17.73486,0 -104.33049,17.7512,0 -104.34485,17.77534,0+-104.34978,17.78325,0 -104.35962,17.79908,0 -104.36946,17.8149,0 -104.3792,17.83082,0 -104.38864,17.84706,0 -104.39767,17.8637,0 -104.40649,17.88055,0 -104.41521,17.8975,0+-104.42372,17.91466,0 -104.43224,17.93182,0 -104.44086,17.94888,0 -104.44936,17.96604,0 -104.46219,17.99172,0 -104.46649,18.00025,0 -104.47501,18.01741,0 -104.48352,18.03456,0+-104.49214,18.05162,0 -104.50066,18.06878,0 -104.50916,18.08594,0 -104.51778,18.10299,0 -104.52629,18.12015,0 -104.53481,18.13731,0 -104.54341,18.15436,0 -104.55193,18.17152,0+-104.56044,18.18868,0 -104.56905,18.20573,0 -104.57758,18.22289,0 -104.58608,18.24005,0 -104.5947,18.25711,0 -104.60321,18.27427,0 -104.61174,18.29142,0 -104.62035,18.30848,0+-104.62886,18.32564,0 -104.63737,18.3428,0 -104.646,18.35985,0 -104.65451,18.37701,0 -104.66302,18.39417,0 -104.67163,18.41122,0 -104.68016,18.42838,0 -104.68867,18.44554,0+-104.69298,18.45407,0 -104.70139,18.47133,0 -104.7139,18.49732,0 -104.72199,18.51489,0 -104.72569,18.52404,0 -104.73697,18.55126,0 -104.74426,18.56965,0 -104.74785,18.5789,0+-104.75881,18.60644,0 -104.76282,18.61527,0 -104.7706,18.63315,0 -104.78281,18.65945,0 -104.79122,18.67671,0 -104.79553,18.68524,0 -104.80836,18.71093,0 -104.81686,18.72808,0+-104.82549,18.74514,0 -104.82969,18.75377,0 -104.84251,18.77946,0 -104.85114,18.79651,0 -104.85954,18.81377,0 -104.87186,18.83997,0 -104.87585,18.84881,0 -104.88354,18.86679,0+-104.89082,18.88518,0 -104.89811,18.90357,0 -104.90539,18.92196,0 -104.91267,18.94036,0 -104.91667,18.94919,0 -104.92847,18.9759,0 -104.93668,18.99337,0 -104.94508,19.01063,0+-104.95369,19.02769,0 -104.9622,19.04485,0 -104.97072,19.062,0 -104.97932,19.07906,0 -104.98354,19.08769,0 -104.99636,19.11338,0 -105.00067,19.1219,0 -105.01338,19.14769,0+-105.01749,19.15643,0 -105.0297,19.18273,0 -105.03739,19.20071,0 -105.04468,19.2191,0 -105.04837,19.22824,0 -105.05923,19.25588,0 -105.06652,19.27427,0 -105.07422,19.29225,0+-105.08232,19.30982,0 -105.09053,19.32729,0 -105.10324,19.35308,0 -105.10754,19.3616,0 -105.11607,19.37876,0 -105.12458,19.39592,0 -105.12889,19.40445,0 -105.14171,19.43013,0+-105.15022,19.44729,0 -105.15453,19.45582,0 -105.16734,19.48151,0 -105.17586,19.49866,0 -105.18018,19.50719,0 -105.19719,19.54151,0 -105.2015,19.55004,0 -105.21012,19.56709,0+-105.21864,19.58425,0 -105.22713,19.60141,0 -105.23145,19.60994,0 -105.24417,19.63573,0 -105.25238,19.65319,0 -105.25638,19.66203,0 -105.26817,19.68874,0 -105.27545,19.70713,0+-105.28273,19.72552,0 -105.29002,19.74391,0 -105.2973,19.7623,0 -105.30499,19.78028,0 -105.3131,19.79785,0 -105.3172,19.80659,0 -105.32971,19.83258,0 -105.33833,19.84964,0+-105.34685,19.8668,0 -105.35966,19.89248,0 -105.36397,19.90101,0 -105.37248,19.91817,0 -105.381,19.93533,0 -105.3896,19.95238,0 -105.39812,19.96954,0 -105.40663,19.9867,0+-105.41093,19.99523,0 -105.42376,20.02091,0 -105.42807,20.02944,0 -105.4409,20.05512,0 -105.4494,20.07228,0 -105.45792,20.08944,0 -105.46654,20.1065,0 -105.47505,20.12366,0+-105.48357,20.14081,0 -105.49219,20.15787,0 -105.50069,20.17503,0 -105.50922,20.19218,0 -105.51782,20.20924,0 -105.53055,20.23503,0 -105.53485,20.24356,0 -105.54347,20.26061,0+-105.55199,20.27777,0 -105.56049,20.29493,0 -105.56911,20.31199,0 -105.58183,20.33777,0 -105.58614,20.3463,0 -105.59045,20.35483,0 -105.59895,20.37199,0 -105.61178,20.39767,0+-105.6204,20.41473,0 -105.6246,20.42336,0 -105.63741,20.44904,0 -105.64613,20.466,0 -105.65495,20.48285,0 -105.66399,20.49949,0 -105.67342,20.51573,0 -105.68317,20.53165,0+-105.69301,20.54747,0 -105.70286,20.56329,0 -105.70768,20.57131,0 -105.72214,20.59535,0 -105.73148,20.61169,0 -105.73619,20.6198,0 -105.75035,20.64415,0 -105.7601,20.66008,0+-105.77003,20.6758,0 -105.7802,20.69131,0 -105.79045,20.70673,0 -105.8007,20.72214,0 -105.81096,20.73755,0 -105.82121,20.75296,0 -105.83147,20.76837,0 -105.84173,20.78378,0+-105.85711,20.8069,0 -105.85711,20.8069,0 -105.86736,20.82231,0 -105.88276,20.84543,0 -105.88799,20.85303,0 -105.90368,20.87584,0 -105.91989,20.89814,0 -105.92543,20.90543,0+-105.93108,20.91262,0 -105.9478,20.93441,0 -105.95323,20.9418,0 -105.96964,20.96389,0 -105.98595,20.98608,0 -105.99139,20.99348,0 -106.00237,21.00817,0 -106.01354,21.02266,0+-106.02472,21.03715,0 -106.03569,21.05184,0 -106.04656,21.06664,0 -106.05744,21.08143,0 -106.06831,21.09623,0 -106.07928,21.11092,0 -106.08493,21.11811,0 -106.10164,21.1399,0+-106.11261,21.15459,0 -106.12349,21.16938,0 -106.13436,21.18418,0 -106.14534,21.19887,0 -106.15663,21.21325,0 -106.16841,21.22712,0 -106.18062,21.24058,0 -106.19315,21.25373,0+-106.20586,21.26668,0 -106.21857,21.27962,0 -106.23108,21.29277,0 -106.24329,21.30624,0 -106.26083,21.32719,0 -106.26636,21.33449,0 -106.27734,21.34918,0 -106.28822,21.36398,0+-106.29919,21.37867,0 -106.31047,21.39305,0 -106.32227,21.40692,0 -106.33448,21.42038,0 -106.34698,21.43353,0 -106.35971,21.44648,0 -106.37254,21.45932,0 -106.39171,21.47864,0+-106.39818,21.48501,0 -106.411,21.49786,0 -106.42381,21.5107,0 -106.43663,21.52354,0 -106.44946,21.53638,0 -106.47551,21.56166,0 -106.48217,21.56782,0 -106.49571,21.57995,0+-106.50278,21.5857,0 -106.53181,21.608,0 -106.5392,21.61344,0 -106.56136,21.62978,0 -106.57602,21.64077,0 -106.57603,21.64077,0 -106.59048,21.65197,0 -106.61962,21.67416,0+-106.61961,21.67416,0 -106.64957,21.69553,0 -106.64957,21.69553,0 -106.68022,21.71618,0 -106.6956,21.72646,0 -106.69561,21.72646,0 -106.71099,21.73673,0 -106.72637,21.74701,0+-106.75726,21.76745,0 -106.75726,21.76745,0 -106.78886,21.78718,0 -106.78885,21.78718,0 -106.82167,21.80567,0 -106.8385,21.81451,0 -106.85542,21.82324,0 -106.87255,21.83177,0+-106.88968,21.8403,0 -106.89819,21.84461,0 -106.92384,21.85746,0 -106.94096,21.86598,0 -106.94948,21.8703,0 -106.97521,21.88304,0 -106.99266,21.89126,0 -107.00138,21.89537,0+-107.02814,21.90708,0 -107.04651,21.91438,0 -107.06487,21.92167,0 -107.08322,21.92897,0 -107.09245,21.93256,0 -107.12004,21.94345,0 -107.14793,21.95404,0 -107.15717,21.95763,0+-107.17645,21.964,0 -107.19615,21.96996,0 -107.2061,21.97284,0 -107.23625,21.98116,0 -107.25616,21.98691,0 -107.27544,21.99328,0 -107.28488,21.99667,0 -107.30251,22.00469,0+-107.32631,22.01938,0 -107.32631,22.01938,0 -107.34026,22.0311,0 -107.35287,22.04414,0 -107.35863,22.05123,0 -107.37595,22.0724,0 -107.38149,22.07969,0 -107.39821,22.10147,0+-107.40939,22.11596,0 -107.42036,22.13065,0 -107.43124,22.14545,0 -107.44211,22.16024,0 -107.45299,22.17504,0 -107.46396,22.18973,0 -107.47514,22.20422,0 -107.48633,22.2187,0+-107.4973,22.2334,0 -107.50806,22.24829,0 -107.51862,22.2634,0 -107.52898,22.27871,0 -107.53923,22.29412,0 -107.54949,22.30953,0 -107.56508,22.33244,0 -107.57042,22.33994,0+-107.58662,22.36224,0 -107.59217,22.36953,0 -107.60335,22.38402,0 -107.61453,22.39851,0 -107.63094,22.4206,0 -107.63628,22.4281,0 -107.64684,22.4432,0 -107.65197,22.4509,0+-107.66232,22.46622,0 -107.68285,22.49704,0 -107.68808,22.50464,0 -107.69865,22.51974,0 -107.7094,22.53464,0 -107.72038,22.54934,0 -107.73157,22.56382,0 -107.74828,22.5856,0+-107.75372,22.593,0 -107.76459,22.6078,0 -107.7809,22.62999,0 -107.79176,22.64478,0 -107.79731,22.65208,0 -107.80849,22.66656,0 -107.81967,22.68105,0 -107.83607,22.70314,0+-107.84151,22.71054,0 -107.85239,22.72533,0 -107.86336,22.74003,0 -107.87465,22.75441,0 -107.88643,22.76828,0 -107.89864,22.78174,0 -107.91116,22.79489,0 -107.92387,22.80784,0+-107.93669,22.82068,0 -107.94951,22.83352,0 -107.9688,22.85274,0 -107.97516,22.85921,0 -108.00079,22.8849,0 -108.00716,22.89137,0 -108.01363,22.89774,0 -108.02643,22.91058,0+-108.03926,22.92342,0 -108.06491,22.94911,0 -108.06491,22.94911,0 -108.07773,22.96195,0 -108.09702,22.98116,0 -108.1162,23.00048,0 -108.1162,23.00048,0 -108.12912,23.01322,0+-108.14891,23.03192,0 -108.15569,23.03798,0 -108.18388,23.0611,0 -108.18388,23.0611,0 -108.19865,23.07199,0 -108.229,23.09295,0 -108.24439,23.10323,0 -108.2444,23.10323,0+-108.25978,23.1135,0 -108.27516,23.12378,0 -108.29056,23.13405,0 -108.30594,23.14432,0 -108.32144,23.1545,0 -108.35302,23.17422,0 -108.36102,23.17905,0 -108.38585,23.19271,0+-108.39425,23.19713,0 -108.41107,23.20597,0 -108.4281,23.2146,0 -108.45384,23.22734,0 -108.47087,23.23597,0 -108.48801,23.2445,0 -108.50513,23.25303,0 -108.52216,23.26166,0+-108.53067,23.26598,0 -108.5479,23.2744,0 -108.57344,23.28734,0 -108.59067,23.29577,0 -108.60811,23.30399,0 -108.62565,23.3121,0 -108.6436,23.31981,0 -108.66206,23.327,0+-108.68073,23.33399,0 -108.6996,23.34077,0 -108.71878,23.34724,0 -108.73806,23.35361,0 -108.75734,23.35998,0 -108.77684,23.36615,0 -108.79663,23.37201,0 -108.81663,23.37766,0+-108.83684,23.3831,0 -108.85724,23.38834,0 -108.87775,23.39348,0 -108.89827,23.39862,0 -108.91879,23.40375,0 -108.93929,23.40889,0 -108.95982,23.41403,0 -108.98044,23.41906,0+-109.00136,23.42379,0 -109.02269,23.4281,0 -109.04443,23.43201,0 -109.0554,23.43386,0 -109.08894,23.43879,0 -109.11111,23.44228,0 -109.13295,23.44608,0 -109.15469,23.44999,0+-109.17654,23.45379,0 -109.19881,23.45718,0 -109.22188,23.45975,0 -109.24588,23.46139,0 -109.27059,23.46232,0 -109.29584,23.46273,0 -109.32137,23.46283,0 -109.34701,23.46283,0+-109.37266,23.46283,0 -109.3983,23.46283,0 -109.42393,23.46283,0 -109.44958,23.46283,0 -109.47522,23.46283,0 -109.50076,23.46273,0 -109.52599,23.46232,0 -109.5382,23.4617,0+-109.57471,23.45975,0 -109.59779,23.45718,0 -109.62006,23.45379,0 -109.64189,23.44999,0 -109.66364,23.44608,0 -109.68549,23.44228,0 -109.70764,23.43879,0 -109.71881,23.43715,0+-109.75217,23.43201,0 -109.774,23.42821,0 -109.79564,23.4242,0 -109.81708,23.41998,0 -109.83842,23.41567,0 -109.85986,23.41146,0 -109.87042,23.4092,0 -109.90211,23.40242,0+-109.92262,23.39728,0 -109.94273,23.39173,0 -109.96232,23.38567,0 -109.9816,23.3793,0 -110.00089,23.37293,0 -110.01053,23.36974,0 -110.03934,23.36008,0 -110.05853,23.35361,0+-110.0778,23.34724,0 -110.09698,23.34077,0 -110.11586,23.33399,0 -110.13453,23.327,0 -110.15298,23.31981,0 -110.17094,23.3121,0 -110.18848,23.30399,0 -110.20592,23.29577,0+-110.22315,23.28734,0 -110.24019,23.27871,0 -110.25731,23.27018,0 -110.27444,23.26166,0 -110.29146,23.25303,0 -110.30859,23.2445,0 -110.32572,23.23597,0 -110.34275,23.22734,0+-110.35987,23.21881,0 -110.377,23.21029,0 -110.39392,23.20155,0 -110.41075,23.19271,0 -110.42737,23.18367,0 -110.44357,23.17422,0 -110.45947,23.16446,0 -110.47516,23.1545,0+-110.50603,23.13405,0 -110.50603,23.13405,0 -110.52141,23.12378,0 -110.5368,23.1135,0 -110.55219,23.10323,0 -110.56757,23.09295,0 -110.58286,23.08257,0 -110.59794,23.07199,0+-110.6127,23.0611,0 -110.62707,23.0498,0 -110.65477,23.02617,0 -110.65477,23.02617,0 -110.66851,23.01425,0 -110.69682,22.99124,0 -110.7041,22.98569,0 -110.71148,22.98024,0+-110.73363,22.96391,0 -110.74091,22.95836,0 -110.75526,22.94706,0 -110.76912,22.93524,0 -110.79568,22.91048,0 -110.79568,22.91048,0 -110.80852,22.89764,0 -110.83324,22.87103,0+-110.83323,22.87103,0 -110.85631,22.84277,0 -110.86185,22.83548,0 -110.87273,22.82068,0 -110.88913,22.79859,0 -110.90042,22.78421,0 -110.90616,22.77712,0 -110.924,22.75647,0+-110.92995,22.74958,0 -110.94759,22.72873,0 -110.95333,22.72164,0 -110.9644,22.70705,0 -110.97507,22.69205,0 -110.99067,22.66913,0 -110.9958,22.66143,0 -111.01118,22.63831,0+-111.01631,22.6306,0 -111.03169,22.60749,0 -111.03682,22.59978,0 -111.04708,22.58437,0 -111.06206,22.56084,0 -111.06699,22.55293,0 -111.08124,22.52868,0 -111.09027,22.51204,0+-111.09468,22.50361,0 -111.1078,22.47824,0 -111.11211,22.46971,0 -111.12053,22.45245,0 -111.12914,22.43539,0 -111.13776,22.41833,0 -111.15407,22.3833,0 -111.15816,22.37457,0+-111.16217,22.36573,0 -111.16954,22.34744,0 -111.18001,22.31939,0 -111.18678,22.30049,0 -111.19006,22.29093,0 -111.1996,22.26196,0 -111.20606,22.24275,0 -111.20935,22.23319,0+-111.21889,22.20422,0 -111.22208,22.19456,0 -111.22844,22.17524,0 -111.23776,22.14606,0 -111.24361,22.12624,0 -111.24925,22.1062,0 -111.25468,22.08596,0 -111.25992,22.06551,0+-111.26494,22.04486,0 -111.26966,22.0239,0 -111.27386,22.00243,0 -111.27736,21.98024,0 -111.27991,21.95712,0 -111.28165,21.93318,0 -111.28299,21.90883,0 -111.28433,21.88448,0+-111.28606,21.86054,0 -111.28864,21.83742,0 -111.29202,21.81512,0 -111.29581,21.79324,0 -111.29961,21.77136,0 -111.30289,21.74916,0 -111.30505,21.72646,0 -111.30576,21.70334,0+-111.30535,21.69214,0 -111.30289,21.65752,0 -111.29961,21.63532,0 -111.29581,21.61344,0 -111.29202,21.59156,0 -111.28864,21.56926,0 -111.28596,21.54625,0 -111.28503,21.53433,0+-111.28207,21.49878,0 -111.28001,21.47515,0 -111.27847,21.46384,0 -111.27386,21.42994,0 -111.26965,21.40847,0 -111.26494,21.38751,0 -111.2599,21.36686,0 -111.25478,21.34631,0+-111.24965,21.32576,0 -111.24452,21.30521,0 -111.2394,21.28466,0 -111.23427,21.26411,0 -111.22903,21.24366,0 -111.2236,21.22342,0 -111.22073,21.21346,0 -111.21489,21.19363,0+-111.20555,21.16445,0 -111.20206,21.1551,0 -111.19508,21.1364,0 -111.18781,21.11801,0 -111.18042,21.09972,0 -111.17304,21.08143,0 -111.16565,21.06314,0 -111.15478,21.03551,0+-111.15118,21.02626,0 -111.14381,21.00797,0 -111.13622,20.98989,0 -111.12431,20.96328,0 -111.12001,20.95475,0 -111.10689,20.92937,0 -111.09744,20.91314,0 -111.08771,20.89721,0+-111.08267,20.8894,0 -111.07262,20.87379,0 -111.05734,20.85057,0 -111.04195,20.82745,0 -111.03682,20.81974,0 -111.03169,20.81204,0 -111.02144,20.79663,0 -111.00606,20.77351,0+-111.00093,20.7658,0 -110.98555,20.74269,0 -110.9753,20.72728,0 -110.96503,20.71186,0 -110.95468,20.69655,0 -110.94411,20.68145,0 -110.93323,20.66665,0 -110.92195,20.65227,0+-110.90411,20.63162,0 -110.8918,20.61826,0 -110.87273,20.59884,0 -110.86636,20.59237,0 -110.85989,20.586,0 -110.84071,20.56668,0 -110.82778,20.55395,0 -110.82143,20.54747,0+-110.79579,20.52179,0 -110.79579,20.52179,0 -110.78297,20.50895,0 -110.77014,20.4961,0 -110.75087,20.47689,0 -110.73814,20.46394,0 -110.72523,20.4512,0 -110.71251,20.43826,0+-110.70604,20.43188,0 -110.68686,20.41257,0 -110.67393,20.39983,0 -110.66101,20.38709,0 -110.65434,20.38093,0 -110.63414,20.36264,0 -110.6127,20.34558,0 -110.60542,20.34003,0+-110.59793,20.33469,0 -110.57527,20.31887,0 -110.56758,20.31373,0 -110.53682,20.29318,0 -110.52143,20.28291,0 -110.51374,20.27777,0 -110.49066,20.26236,0 -110.48296,20.25722,0+-110.46738,20.24715,0 -110.44357,20.23246,0 -110.43557,20.22763,0 -110.41116,20.21356,0 -110.40295,20.20893,0 -110.37875,20.19465,0 -110.36285,20.18489,0 -110.34705,20.17503,0+-110.33916,20.17009,0 -110.32315,20.16044,0 -110.29823,20.14688,0 -110.28079,20.13866,0 -110.26274,20.13105,0 -110.25362,20.12735,0 -110.22612,20.11636,0 -110.2169,20.11276,0+-110.18981,20.10136,0 -110.18099,20.09735,0 -110.16356,20.08913,0 -110.13721,20.07701,0 -110.11967,20.06889,0 -110.10172,20.06119,0 -110.08326,20.054,0 -110.06448,20.04711,0+-110.0453,20.04064,0 -110.02561,20.03468,0 -110.0056,20.02903,0 -109.9854,20.02358,0 -109.96509,20.01824,0 -109.94489,20.01279,0 -109.92488,20.00714,0 -109.90509,20.00129,0+-109.89525,19.99831,0 -109.86632,19.98875,0 -109.84704,19.98238,0 -109.82775,19.97601,0 -109.80858,19.96954,0 -109.78939,19.96307,0 -109.77011,19.9567,0 -109.75083,19.95033,0+-109.73166,19.94385,0 -109.71247,19.93738,0 -109.69319,19.93101,0 -109.6739,19.92464,0 -109.65472,19.91817,0 -109.63554,19.9117,0 -109.61626,19.90532,0 -109.59698,19.89896,0+-109.57779,19.89248,0 -109.55861,19.88601,0 -109.53934,19.87964,0 -109.52005,19.87327,0 -109.50087,19.8668,0 -109.48169,19.86032,0 -109.4624,19.85395,0 -109.44312,19.84758,0+-109.42395,19.84111,0 -109.40475,19.83464,0 -109.38548,19.82827,0 -109.3662,19.8219,0 -109.34702,19.81542,0 -109.32784,19.80895,0 -109.30855,19.80258,0 -109.28926,19.79621,0+-109.26999,19.78984,0 -109.2505,19.78368,0 -109.23071,19.77782,0 -109.21071,19.77217,0 -109.19049,19.76672,0 -109.17018,19.76138,0 -109.16003,19.75871,0 -109.12998,19.75028,0+-109.11018,19.74443,0 -109.09059,19.73837,0 -109.071,19.7323,0 -109.0512,19.72645,0 -109.0312,19.7208,0 -109.011,19.71535,0 -109.00085,19.71268,0 -108.97008,19.70497,0+-108.94956,19.69984,0 -108.92905,19.6947,0 -108.90853,19.68956,0 -108.88802,19.68442,0 -108.8674,19.67939,0 -108.84658,19.67456,0 -108.82556,19.66994,0 -108.80432,19.66552,0+-108.78288,19.66131,0 -108.76146,19.65709,0 -108.74011,19.65278,0 -108.71867,19.64857,0 -108.69704,19.64456,0 -108.67519,19.64076,0 -108.65303,19.63727,0 -108.63067,19.63398,0+-108.60852,19.63049,0 -108.58668,19.62668,0 -108.57581,19.62473,0 -108.54309,19.61898,0 -108.52083,19.61559,0 -108.49776,19.61302,0 -108.47375,19.61137,0 -108.44902,19.61045,0+-108.4238,19.61004,0 -108.39836,19.60983,0 -108.37312,19.60942,0 -108.34841,19.6085,0 -108.3244,19.60685,0 -108.30133,19.60429,0 -108.27907,19.60089,0 -108.25722,19.59709,0+-108.23538,19.59329,0 -108.21312,19.5899,0 -108.19003,19.58733,0 -108.16605,19.58569,0 -108.14132,19.58476,0 -108.11609,19.58435,0 -108.09055,19.58425,0 -108.065,19.58435,0+-108.03978,19.58476,0 -108.01506,19.58569,0 -107.99106,19.58733,0 -107.96799,19.5899,0 -107.94572,19.59329,0 -107.92388,19.59709,0 -107.90204,19.60089,0 -107.87988,19.60439,0+-107.85721,19.60737,0 -107.83412,19.60994,0 -107.81105,19.6125,0 -107.78838,19.61548,0 -107.76624,19.61898,0 -107.74448,19.62288,0 -107.72305,19.62709,0 -107.70172,19.63141,0+-107.68028,19.63562,0 -107.65894,19.63994,0 -107.63802,19.64466,0 -107.61751,19.6498,0 -107.5974,19.65535,0 -107.57771,19.66131,0 -107.56786,19.66429,0 -107.53832,19.67323,0+-107.51833,19.67887,0 -107.49823,19.68443,0 -107.47822,19.69008,0 -107.45852,19.69604,0 -107.44898,19.69932,0 -107.42047,19.70929,0 -107.40201,19.71648,0 -107.38334,19.72347,0+-107.36426,19.72984,0 -107.35493,19.73313,0 -107.32497,19.73919,0 -107.31544,19.74104,0 -107.29555,19.74186,0 -107.28651,19.74134,0 -107.26733,19.73816,0 -107.24898,19.73272,0+-107.23143,19.72542,0 -107.22353,19.72069,0 -107.19902,19.70672,0 -107.19153,19.70138,0 -107.16948,19.68494,0 -107.1624,19.67918,0 -107.15563,19.67312,0 -107.13554,19.65473,0+-107.12262,19.64199,0 -107.1097,19.62925,0 -107.10323,19.62288,0 -107.08344,19.60418,0 -107.0699,19.59206,0 -107.05574,19.58055,0 -107.04117,19.56945,0 -107.01902,19.55312,0+-107.01163,19.54767,0 -107.00435,19.54213,0 -106.9829,19.52507,0 -106.96937,19.51295,0 -106.95604,19.50062,0 -106.94311,19.48788,0 -106.93665,19.48151,0 -106.91747,19.46219,0+-106.90456,19.44945,0 -106.89183,19.4365,0 -106.88537,19.43013,0 -106.86619,19.41082,0 -106.85326,19.39808,0 -106.83408,19.37876,0 -106.82762,19.37239,0 -106.82126,19.36592,0+-106.80198,19.34671,0 -106.79562,19.34023,0 -106.77634,19.32102,0 -106.76362,19.30807,0 -106.74434,19.28886,0 -106.73798,19.28239,0 -106.73152,19.27602,0 -106.70589,19.25033,0+-106.69942,19.24396,0 -106.6867,19.23102,0 -106.67378,19.21828,0 -106.66742,19.2118,0 -106.64813,19.19259,0 -106.63541,19.17965,0 -106.61613,19.16043,0 -106.60977,19.15396,0+-106.6033,19.14759,0 -106.57765,19.1219,0 -106.57119,19.11553,0 -106.55848,19.10259,0 -106.55202,19.09622,0 -106.53284,19.0769,0 -106.52637,19.07053,0 -106.50073,19.04484,0+-106.49428,19.03847,0 -106.48792,19.032,0 -106.47519,19.01905,0 -106.46269,19.00591,0 -106.44444,18.98566,0 -106.43295,18.97149,0 -106.42741,18.96419,0 -106.41099,18.9421,0+-106.40556,18.9347,0 -106.39458,18.92001,0 -106.38329,18.90563,0 -106.3593,18.8783,0 -106.35313,18.87162,0 -106.34042,18.85867,0 -106.33406,18.8522,0 -106.31478,18.83298,0+-106.30206,18.82004,0 -106.29561,18.81367,0 -106.26997,18.78799,0 -106.2635,18.78162,0 -106.25714,18.77514,0 -106.23806,18.75572,0 -106.2319,18.74905,0 -106.2197,18.73559,0+-106.21395,18.7285,0 -106.19662,18.70733,0 -106.18565,18.69264,0 -106.16934,18.67045,0 -106.1638,18.66315,0 -106.15251,18.64877,0 -106.13467,18.62811,0 -106.12236,18.61476,0+-106.10964,18.60181,0 -106.09692,18.58887,0 -106.08421,18.57592,0 -106.07805,18.56924,0 -106.06584,18.55579,0 -106.04832,18.53482,0 -106.04277,18.52753,0 -106.0318,18.51284,0+-106.02093,18.49804,0 -106.00995,18.48335,0 -105.99293,18.46188,0 -105.98103,18.44811,0 -105.97507,18.44122,0 -105.96317,18.42746,0 -105.94573,18.40639,0 -105.9402,18.3991,0+-105.92923,18.38441,0 -105.9238,18.37701,0 -105.90183,18.34763,0 -105.89609,18.34054,0 -105.87825,18.31989,0 -105.87815,18.31999,0 -105.84727,18.2867,0 -105.84112,18.28002,0+-105.83507,18.27324,0 -105.81754,18.25228,0 -105.812,18.24498,0 -105.80101,18.23029,0 -105.79015,18.2155,0 -105.77917,18.2008,0 -105.76789,18.18642,0 -105.75024,18.16556,0+-105.75024,18.16556,0 -105.72644,18.13803,0 -105.72665,18.13782,0 -105.70387,18.10926,0 -105.69844,18.10186,0 -105.68757,18.08707,0 -105.67661,18.07238,0 -105.65957,18.0509,0+-105.64767,18.03713,0 -105.64172,18.03025,0 -105.62388,18.0096,0 -105.6124,17.99542,0 -105.60686,17.98812,0 -105.60143,17.98073,0 -105.58501,17.95864,0 -105.57403,17.94394,0+-105.56829,17.93686,0 -105.55105,17.91559,0 -105.53915,17.90182,0 -105.52725,17.88805,0 -105.50982,17.86699,0 -105.50428,17.8597,0 -105.4933,17.845,0 -105.48244,17.83021,0+-105.47147,17.81552,0 -105.45443,17.79404,0 -105.44838,17.78726,0 -105.43003,17.76712,0 -105.41753,17.75397,0 -105.41136,17.7473,0 -105.39915,17.73383,0 -105.38163,17.71288,0+-105.37608,17.70558,0 -105.3651,17.69089,0 -105.35423,17.67609,0 -105.34869,17.6688,0 -105.32623,17.63993,0 -105.31412,17.62636,0 -105.30181,17.61301,0 -105.28909,17.60006,0+-105.27637,17.58712,0 -105.26345,17.57438,0 -105.25073,17.56143,0 -105.23781,17.54869,0 -105.22509,17.53574,0 -105.20581,17.51653,0 -105.19945,17.51006,0 -105.18057,17.49043,0+-105.17442,17.48376,0 -105.17453,17.48365,0 -105.15085,17.45601,0 -105.14531,17.44872,0 -105.13432,17.43403,0 -105.12344,17.41923,0 -105.11247,17.40454,0 -105.09544,17.38307,0+-105.08334,17.3695,0 -105.06467,17.34967,0 -105.06467,17.34967,0 -105.05196,17.33673,0 -105.02632,17.31104,0 -105.01996,17.30457,0 -105.0135,17.2982,0 -105.00069,17.28536,0+-104.9814,17.26614,0 -104.96868,17.2532,0 -104.95576,17.24046,0 -104.9494,17.23398,0 -104.93657,17.22114,0 -104.91739,17.20183,0 -104.91093,17.19546,0 -104.89174,17.17614,0+-104.87881,17.1634,0 -104.8661,17.15046,0 -104.85963,17.14408,0 -104.84046,17.12477,0 -104.82753,17.11203,0 -104.82117,17.10556,0 -104.8019,17.08634,0 -104.78271,17.06703,0+-104.78271,17.06703,0 -104.76353,17.04771,0 -104.75707,17.04134,0 -104.74426,17.0285,0 -104.72497,17.00928,0 -104.71225,16.99634,0 -104.69933,16.9836,0 -104.68661,16.97065,0+-104.68015,16.96428,0 -104.65451,16.9386,0 -104.64805,16.93223,0 -104.63532,16.91928,0 -104.62241,16.90654,0 -104.60323,16.88722,0 -104.60323,16.88723,0 -104.59041,16.87438,0+-104.57112,16.85517,0 -104.56476,16.8487,0 -104.53902,16.82311,0 -104.53255,16.81674,0 -104.51245,16.79835,0 -104.50569,16.79229,0 -104.4986,16.78654,0 -104.48424,16.77523,0+-104.46219,16.75879,0 -104.44742,16.74791,0 -104.43285,16.73681,0 -104.41869,16.7253,0 -104.40516,16.71318,0 -104.39182,16.70085,0 -104.3789,16.68811,0 -104.35962,16.66889,0+-104.35326,16.66242,0 -104.3468,16.65605,0 -104.32762,16.63673,0 -104.3147,16.62399,0 -104.30835,16.61752,0 -104.29552,16.60468,0 -104.27634,16.58536,0 -104.26341,16.57262,0+-104.25069,16.55968,0 -104.24423,16.55331,0 -104.2186,16.52762,0 -104.21858,16.52762,0 -104.19941,16.5083,0 -104.18649,16.49556,0 -104.17377,16.48262,0 -104.16731,16.47625,0+-104.14813,16.45693,0 -104.14167,16.45056,0 -104.12228,16.43145,0 -104.10896,16.41912,0 -104.09541,16.407,0 -104.07346,16.39046,0 -104.06586,16.38522,0 -104.04105,16.37155,0+-104.02319,16.36374,0 -104.00453,16.35696,0 -103.98555,16.3509,0 -103.97632,16.34813,0 -103.95796,16.34309,0 -103.93181,16.33693,0 -103.92412,16.3357,0 -103.90001,16.33344,0+</coordinates>+ </LinearRing></outerBoundaryIs>+ </Polygon>+ <ExtendedData>+ <Data name="timezone">+ <value>CST</value>+ </Data>+ <Data name="stormType">+ <value>HU</value>+ </Data>+ <Data name="advisoryDate">+ <value>900 AM CST Sat Oct 17 2026</value>+ </Data>+ <Data name="basin">+ <value>EP</value>+ </Data>+ <Data name="fcstpd">+ <value>120</value>+ </Data>+ <Data name="storm">+ <value>Hurricane Trudy</value>+ </Data>+ <Data name="atcfid">+ <value>EP212026</value>+ </Data>+ <Data name="advisoryNum">+ <value>17</value>+ </Data>+ <Data name="stormNum">+ <value>21</value>+ </Data>+ <Data name="stormName">+ <value>Trudy</value>+ </Data>+ </ExtendedData>+ </Placemark>+</Document>+</kml>diff --git a/src/world_intel_mcp/tests/fixtures/cyclones/nhc_tcm_ep212026_adv017.txt b/src/world_intel_mcp/tests/fixtures/cyclones/nhc_tcm_ep212026_adv017.txtnew file mode 100644index 0000000..cc32778--- /dev/null+++ b/src/world_intel_mcp/tests/fixtures/cyclones/nhc_tcm_ep212026_adv017.txt@@ -0,0 +1,73 @@+000+WTPZ21 KNHC 171437+TCMEP1++HURRICANE TRUDY FORECAST/ADVISORY NUMBER 17+NWS NATIONAL HURRICANE CENTER MIAMI FL EP212026+1500 UTC SAT OCT 17 2026++HURRICANE CENTER LOCATED NEAR 16.6N 103.9W AT 17/1500Z+POSITION ACCURATE WITHIN 20 NM++PRESENT MOVEMENT TOWARD THE NORTHWEST OR 325 DEGREES AT 9 KT++ESTIMATED MINIMUM CENTRAL PRESSURE 979 MB+MAX SUSTAINED WINDS 80 KT WITH GUSTS TO 100 KT.+64 KT....... 30NE 25SE 25SW 25NW.+50 KT....... 50NE 40SE 40SW 50NW.+34 KT.......120NE 100SE 70SW 100NW.+4 M SEAS....135NE 120SE 180SW 180NW.+WINDS AND SEAS VARY GREATLY IN EACH QUADRANT. RADII IN NAUTICAL+MILES ARE THE LARGEST RADII EXPECTED ANYWHERE IN THAT QUADRANT.++REPEAT...CENTER LOCATED NEAR 16.6N 103.9W AT 17/1500Z+AT 17/1200Z CENTER WAS LOCATED NEAR 16.3N 103.7W++FORECAST VALID 18/0000Z 17.7N 104.8W+MAX WIND 90 KT...GUSTS 110 KT.+64 KT... 40NE 30SE 20SW 25NW.+50 KT... 50NE 40SE 40SW 50NW.+34 KT...120NE 100SE 70SW 100NW.++FORECAST VALID 18/1200Z 19.1N 105.7W+MAX WIND 90 KT...GUSTS 110 KT.+64 KT... 40NE 30SE 20SW 25NW.+50 KT... 50NE 40SE 30SW 40NW.+34 KT...110NE 80SE 60SW 70NW.++FORECAST VALID 19/0000Z 20.1N 106.4W+MAX WIND 85 KT...GUSTS 105 KT.+64 KT... 30NE 25SE 15SW 25NW.+50 KT... 50NE 40SE 30SW 40NW.+34 KT... 90NE 70SE 60SW 70NW.++FORECAST VALID 19/1200Z 20.7N 107.0W+MAX WIND 65 KT...GUSTS 80 KT.+64 KT... 25NE 20SE 15SW 20NW.+50 KT... 40NE 30SE 25SW 30NW.+34 KT... 70NE 60SE 40SW 60NW.++FORECAST VALID 20/0000Z 20.9N 107.5W+MAX WIND 45 KT...GUSTS 55 KT.+34 KT... 50NE 40SE 30SW 40NW.++FORECAST VALID 20/1200Z 20.9N 108.2W+MAX WIND 35 KT...GUSTS 45 KT.+34 KT... 40NE 0SE 0SW 40NW.++EXTENDED OUTLOOK. NOTE...ERRORS FOR TRACK HAVE AVERAGED NEAR 100 NM+ON DAY 4 AND 125 NM ON DAY 5...AND FOR INTENSITY NEAR 15 KT EACH DAY++OUTLOOK VALID 21/1200Z 21.7N 109.4W...POST-TROP/REMNT LOW+MAX WIND 25 KT...GUSTS 35 KT.++OUTLOOK VALID 22/1200Z...DISSIPATED++REQUEST FOR 3 HOURLY SHIP REPORTS WITHIN 300 MILES OF 16.6N 103.9W++INTERMEDIATE PUBLIC ADVISORY...WTNT31 KNHC/MIATCPEP1...AT 17/1800Z++NEXT ADVISORY AT 17/2100Z++$$+FORECASTER BEVENdiff --git a/src/world_intel_mcp/tests/test_sources_cyclone_forecasts.py b/src/world_intel_mcp/tests/test_sources_cyclone_forecasts.pynew file mode 100644index 0000000..36c672e--- /dev/null+++ b/src/world_intel_mcp/tests/test_sources_cyclone_forecasts.py@@ -0,0 +1,831 @@+"""Tests for opt-in tropical cyclone forecast tracks (sources/cyclone_forecasts.py).++Every upstream body is a live capture from 2026-10-17 ~16:45Z, stored+under ``fixtures/cyclones/``: NHC CurrentStorms.json with Hurricane+Trudy (EP212026, advisory 17), Trudy's forecast/advisory text (the+``<pre>`` body of MIATCMEP1.shtml), Trudy's 5-day cone KML, the JTWC RSS+feed, and the JTWC warning texts for Typhoon 29W (Champi) warning 13+and Tropical Cyclone 01P (Wati) warning 3. Two edits to the captures,+both semantics-free: the cone KML's ``<coordinates>`` whitespace is+re-wrapped (1,168 tuples, values byte-identical), and the JTWC texts+are stored with LF endings and served here with CRLF, as live.++Expected values were read off the products themselves and cross-checked+against an independent product from the same issuance: NHC's KMZ+forecast track for advisory 17 (same positions and winds at every+forecast hour; its times are local "CST" strings) and JTWC's JMV 3.0+``.tcw`` files (same tau/positions/winds; its AMP block lists 01P's+60 h BECOMING EXTRATROPICAL and 72 h EXTRATROPICAL).++Gaps / not covered: a Central Pacific (CPHC) forecast/advisory and a+cone that crosses the antimeridian (neither observed); NHC products for+potential tropical cyclones; a JTWC final warning (not observed, so the+shape of a warning with no forecast blocks is unknown and is reported as+unparsed); the JTWC 21E (Trudy) warning text body (only its failure path+is exercised here); live end-to-end MCP stdio calls.+"""++import asyncio as asyncio_mod+import io+import json+import math+import zipfile+from datetime import datetime, timezone+from pathlib import Path++import httpx+import pytest+import respx++from world_intel_mcp.fetcher import Fetcher+from world_intel_mcp.sources import cyclone_forecasts as cf+from world_intel_mcp.sources.cyclones import fetch_cyclones+from world_intel_mcp.sources.jtwc import fetch_jtwc_cyclones++_FIXTURES = Path(__file__).parent / "fixtures" / "cyclones"++_CURRENT_STORMS_URL = "https://www.nhc.noaa.gov/CurrentStorms.json"+_TCM_URL = "https://www.nhc.noaa.gov/text/MIATCMEP1.shtml"+_CONE_URL = "https://www.nhc.noaa.gov/storm_graphics/api/EP212026_017adv_CONE.kmz"+_JTWC_RSS_URL = "https://www.metoc.navy.mil/jtwc/rss/jtwc.rss"+_JTWC_29W_URL = "https://www.metoc.navy.mil/jtwc/products/wp2926web.txt"+_JTWC_01P_URL = "https://www.metoc.navy.mil/jtwc/products/sh0127web.txt"+_JTWC_21E_URL = "https://www.metoc.navy.mil/jtwc/products/ep2126web.txt"+++def _fixture(name: str) -> str:+ return (_FIXTURES / name).read_text(encoding="utf-8")+++def _current_storms() -> dict:+ return json.loads(_fixture("nhc_current_storms_20261017.json"))+++def _tcm_page() -> str:+ """The live page carries the product in its only <pre>, inside+ <div class="textbackground"><div class="textproduct">."""+ return (+ '<html><body><div class="textbackground"><div class="textproduct">\n'+ " <pre>" + _fixture("nhc_tcm_ep212026_adv017.txt") + " </pre>\n"+ " </div></div></body></html>"+ )+++def _kmz(kml: str, name: str = "ep212026_017adv_CONE.kml") -> bytes:+ """Zip a KML the way the live CONE.kmz is packed (one deflated member)."""+ buf = io.BytesIO()+ with zipfile.ZipFile(buf, "w", zipfile.ZIP_DEFLATED) as zf:+ zf.writestr(name, kml)+ return buf.getvalue()+++def _cone_kmz() -> bytes:+ return _kmz(_fixture("nhc_ep212026_017adv_CONE.kml"))+++def _crlf(text: str) -> str:+ return text.replace("\n", "\r\n")+++def no_sleep(monkeypatch: pytest.MonkeyPatch) -> None:+ """Fetcher retries sleep between attempts; failure-path tests skip it."""++ async def _no_sleep(*args, **kwargs) -> None:+ return None++ monkeypatch.setattr(asyncio_mod, "sleep", _no_sleep)+++def _mock_nhc(+ current: dict | None = None,+ tcm: httpx.Response | None = None,+ cone: httpx.Response | None = None,+) -> dict:+ routes = {+ "current": respx.get(_CURRENT_STORMS_URL).mock(+ return_value=httpx.Response(200, json=current or _current_storms())+ ),+ "tcm": respx.get(_TCM_URL).mock(+ return_value=tcm+ or httpx.Response(+ 200, text=_tcm_page(), headers={"content-type": "text/html; charset=UTF-8"}+ )+ ),+ "cone": respx.get(_CONE_URL).mock(+ return_value=cone+ or httpx.Response(+ 200,+ content=_cone_kmz(),+ headers={"content-type": "application/vnd.google-earth.kmz"},+ )+ ),+ }+ return routes+++# ---------------------------------------------------------------------------+# NHC: forecast track from the forecast/advisory text, cone from the KMZ+# ---------------------------------------------------------------------------++_TRUDY_POINTS = [+ # (tau, valid_time, lat, lon, max_wind_kt, gust_kt, status, section)+ (12, "2026-10-18T00:00:00Z", 17.7, -104.8, 90, 110, None, "forecast"),+ (24, "2026-10-18T12:00:00Z", 19.1, -105.7, 90, 110, None, "forecast"),+ (36, "2026-10-19T00:00:00Z", 20.1, -106.4, 85, 105, None, "forecast"),+ (48, "2026-10-19T12:00:00Z", 20.7, -107.0, 65, 80, None, "forecast"),+ (60, "2026-10-20T00:00:00Z", 20.9, -107.5, 45, 55, None, "forecast"),+ (72, "2026-10-20T12:00:00Z", 20.9, -108.2, 35, 45, None, "forecast"),+ (96, "2026-10-21T12:00:00Z", 21.7, -109.4, 25, 35, "POST-TROP/REMNT LOW", "outlook"),+ (120, "2026-10-22T12:00:00Z", None, None, None, None, "DISSIPATED", "outlook"),+]+++def _as_tuples(points: list[dict]) -> list[tuple]:+ return [+ (+ p["tau_hours"],+ p["valid_time"],+ p["latitude"],+ p["longitude"],+ p["max_wind_kt"],+ p["gust_kt"],+ p["status"],+ p["section"],+ )+ for p in points+ ]+++async def test_nhc_forecast_track_and_cone_from_live_trudy_advisory(+ fetcher: Fetcher,+) -> None:+ routes = _mock_nhc()++ result = await fetch_cyclones(fetcher, include_forecast=True)++ assert result["count"] == 1+ assert "degraded" not in result+ assert result["data_gaps"] == []+ trudy = result["storms"][0]+ assert trudy["id"] == "ep212026"+ # The warning-level fields are untouched by the opt-in.+ assert trudy["intensity_kt"] == 80+ assert trudy["pressure_mb"] == 979++ fc = trudy["forecast"]+ assert fc["agency"] == "NHC"+ assert fc["track_status"] == "ok"+ assert fc["track_url"] == _TCM_URL+ assert fc["advisory_number"] == "17"+ assert fc["issued"] == "2026-10-17T15:00:00Z"+ assert fc["initial"] == {+ "valid_time": "2026-10-17T15:00:00Z",+ "latitude": 16.6,+ "longitude": -103.9,+ "max_wind_kt": 80,+ "gust_kt": 100,+ "pressure_mb": 979,+ }+ assert _as_tuples(fc["points"]) == _TRUDY_POINTS++ assert fc["cone_status"] == "ok"+ assert fc["cone_url"] == _CONE_URL+ cone = fc["cone"]+ assert cone["advisory_number"] == "17"+ assert cone["forecast_period_hours"] == 120+ assert cone["source_vertex_count"] == 1167 # 1,168 tuples, ring closed+ assert cone["simplify_tolerance_deg"] == 0.01+ assert cone["vertex_count"] == len(cone["vertices"])+ assert 3 <= cone["vertex_count"] <= 64+ # [lat, lon] pairs, open ring, starting where NHC's ring starts.+ assert cone["vertices"][0] == [16.33344, -103.90001]+ assert cone["vertices"][0] != cone["vertices"][-1]++ assert routes["tcm"].call_count == 1+ assert routes["cone"].call_count == 1+++async def test_nhc_cone_outline_stays_within_stated_tolerance(fetcher: Fetcher) -> None:+ """The simplified outline is a subset of NHC's vertices, in order,+ and every NHC vertex lies within the stated tolerance of it."""+ _mock_nhc()+ result = await fetch_cyclones(fetcher, include_forecast=True)+ cone = result["storms"][0]["forecast"]["cone"]++ source = cf.parse_cone_kml_ring(_fixture("nhc_ep212026_017adv_CONE.kml").encode())+ assert len(source) == 1167+ kept = [tuple(v) for v in cone["vertices"]]+ positions = [source.index(v) for v in kept]+ assert positions == sorted(positions)++ def seg_dist(p, a, b) -> float:+ (px, py), (ax, ay), (bx, by) = p, a, b+ dx, dy = bx - ax, by - ay+ if dx == 0 and dy == 0:+ return math.dist(p, a)+ t = max(0.0, min(1.0, ((px - ax) * dx + (py - ay) * dy) / (dx * dx + dy * dy)))+ return math.dist(p, (ax + t * dx, ay + t * dy))++ ring = kept + [kept[0]]+ worst = max(+ min(seg_dist(p, ring[i], ring[i + 1]) for i in range(len(ring) - 1))+ for p in source+ )+ assert worst <= cone["simplify_tolerance_deg"] + 1e-9+++async def test_nhc_default_call_is_unchanged_and_fetches_no_products(+ fetcher: Fetcher,+) -> None:+ routes = _mock_nhc()++ result = await fetch_cyclones(fetcher)++ assert "forecast" not in result["storms"][0]+ assert "data_gaps" not in result+ assert routes["tcm"].called is False+ assert routes["cone"].called is False+++async def test_nhc_quiet_season_with_forecast_is_not_degraded(fetcher: Fetcher) -> None:+ routes = _mock_nhc(current={"activeStorms": []})++ result = await fetch_cyclones(fetcher, include_forecast=True)++ assert result["count"] == 0+ assert result["data_gaps"] == []+ assert "degraded" not in result+ assert "error" not in result+ assert routes["tcm"].called is False+++async def test_nhc_feed_down_with_forecast_keeps_feed_failure_marker(+ fetcher: Fetcher, no_sleep: None+) -> None:+ respx.get(_CURRENT_STORMS_URL).mock(return_value=httpx.Response(500))+ tcm = respx.get(_TCM_URL).mock(return_value=httpx.Response(200, text=_tcm_page()))++ result = await fetch_cyclones(fetcher, include_forecast=True)++ assert result["degraded"] is True+ assert result["reason"] == "nhc_fetch_failed"+ assert result["storms"] == []+ assert tcm.called is False+++async def test_nhc_track_outage_is_named_never_an_empty_track(+ fetcher: Fetcher, no_sleep: None+) -> None:+ _mock_nhc(tcm=httpx.Response(503))++ result = await fetch_cyclones(fetcher, include_forecast=True)++ assert result["degraded"] is True+ assert "error" not in result # the warnings themselves arrived+ fc = result["storms"][0]["forecast"]+ assert fc["track_status"] == "fetch_failed"+ assert "unavailable" in fc["track_error"]+ assert fc["points"] == []+ assert fc["initial"] is None+ # The cone is independent of the text product and still arrives.+ assert fc["cone_status"] == "ok"+ assert any("Trudy" in g and "track" in g for g in result["data_gaps"])+++async def test_nhc_cone_outage_keeps_track_and_names_the_gap(+ fetcher: Fetcher, no_sleep: None+) -> None:+ _mock_nhc(cone=httpx.Response(500))++ result = await fetch_cyclones(fetcher, include_forecast=True)++ fc = result["storms"][0]["forecast"]+ assert fc["track_status"] == "ok"+ assert len(fc["points"]) == 8+ assert fc["cone"] is None+ assert fc["cone_status"] == "fetch_failed"+ assert "500" in fc["cone_error"]+ assert result["degraded"] is True+ assert any("Trudy" in g and "cone" in g for g in result["data_gaps"])+++async def test_nhc_unlinked_cone_is_a_gap_not_a_failure(fetcher: Fetcher) -> None:+ current = _current_storms()+ current["activeStorms"][0]["trackCone"] = None+ routes = _mock_nhc(current=current)++ result = await fetch_cyclones(fetcher, include_forecast=True)++ fc = result["storms"][0]["forecast"]+ assert fc["cone_status"] == "not_linked"+ assert fc["cone"] is None+ assert "degraded" not in result+ assert any("no cone" in g for g in result["data_gaps"])+ assert routes["cone"].called is False+++async def test_nhc_html_error_page_served_200_is_unparsed_not_empty(+ fetcher: Fetcher,+) -> None:+ _mock_nhc(+ tcm=httpx.Response(200, text="<html><body><h1>Not Found</h1></body></html>")+ )++ result = await fetch_cyclones(fetcher, include_forecast=True)++ fc = result["storms"][0]["forecast"]+ assert fc["track_status"] == "unparsed"+ assert fc["points"] == []+ assert result["degraded"] is True+++async def test_nhc_lagging_advisory_page_is_flagged_and_not_kept(+ fetcher: Fetcher,+) -> None:+ """CurrentStorms.json can name advisory 018 while the bin-based text+ page still serves 017: return 017 labelled as such, mark the gap,+ and drop the cached page so the next call refetches it."""+ current = _current_storms()+ current["activeStorms"][0]["forecastAdvisory"]["advNum"] = "018"+ routes = _mock_nhc(current=current)++ result = await fetch_cyclones(fetcher, include_forecast=True)++ fc = result["storms"][0]["forecast"]+ assert fc["track_status"] == "stale_advisory"+ assert fc["advisory_number"] == "17"+ assert fc["expected_advisory_number"] == "018"+ assert len(fc["points"]) == 8+ assert result["degraded"] is True+ assert any("018" in g for g in result["data_gaps"])++ await fetch_cyclones(fetcher, include_forecast=True)+ assert routes["tcm"].call_count == 2+++async def test_nhc_forecast_fan_out_is_capped_and_the_cap_is_named(+ fetcher: Fetcher,+) -> None:+ base = _current_storms()["activeStorms"][0]+ many = []+ for i in range(cf.MAX_FORECAST_STORMS + 2):+ storm = json.loads(json.dumps(base))+ storm["id"] = f"ep{30 + i:02d}2026"+ storm["name"] = f"Storm{i}"+ many.append(storm)+ routes = _mock_nhc(current={"activeStorms": many})++ result = await fetch_cyclones(fetcher, include_forecast=True)++ statuses = [s["forecast"]["track_status"] for s in result["storms"]]+ assert statuses[: cf.MAX_FORECAST_STORMS] == ["ok"] * cf.MAX_FORECAST_STORMS+ assert statuses[cf.MAX_FORECAST_STORMS :] == ["not_fetched_cap"] * 2+ assert routes["tcm"].call_count == cf.MAX_FORECAST_STORMS+ assert result["degraded"] is True+ assert sum("cap" in g for g in result["data_gaps"]) == 2+++async def test_nhc_products_are_fetched_once_per_issuance(fetcher: Fetcher) -> None:+ """A second call for the same advisory reuses the text and the parsed+ cone (their cache keys carry the advisory number) instead of+ refetching NHC's products."""+ routes = _mock_nhc()++ first = await fetch_cyclones(fetcher, include_forecast=True)+ second = await fetch_cyclones(fetcher, include_forecast=True)++ fc = second["storms"][0]["forecast"]+ assert fc == first["storms"][0]["forecast"]+ assert _as_tuples(fc["points"]) == _TRUDY_POINTS+ assert fc["cone"]["source_vertex_count"] == 1167+ assert fc["cone"]["vertices"][0] == [16.33344, -103.90001]+ assert second["data_gaps"] == []+ assert routes["tcm"].call_count == 1+ assert routes["cone"].call_count == 1+++async def test_nhc_storm_without_a_forecast_advisory_link_is_a_gap_not_a_failure(+ fetcher: Fetcher,+) -> None:+ current = _current_storms()+ current["activeStorms"][0]["forecastAdvisory"] = None+ routes = _mock_nhc(current=current)++ result = await fetch_cyclones(fetcher, include_forecast=True)++ fc = result["storms"][0]["forecast"]+ assert fc["track_status"] == "not_linked"+ assert fc["track_url"] is None+ assert fc["points"] == []+ assert fc["cone_status"] == "ok" # the cone has its own link+ assert "degraded" not in result+ assert result["data_gaps"] == [+ "Trudy (ep212026): forecast track not_linked: "+ "CurrentStorms.json links no forecast/advisory for this storm"+ ]+ assert routes["tcm"].called is False+++# ---------------------------------------------------------------------------+# NHC parsers: direct+# ---------------------------------------------------------------------------+++def test_cone_kmz_without_kml_member_is_refused() -> None:+ buf = io.BytesIO()+ with zipfile.ZipFile(buf, "w") as zf:+ zf.writestr("readme.txt", "no kml here")+ with pytest.raises(ValueError, match="no .kml"):+ cf.parse_nhc_cone_kmz(buf.getvalue())+++def test_cone_kmz_that_is_not_a_zip_is_refused() -> None:+ with pytest.raises(zipfile.BadZipFile):+ cf.parse_nhc_cone_kmz(b"<html>maintenance</html>")+++def test_cone_with_more_than_one_ring_is_refused_not_trimmed() -> None:+ kml = _fixture("nhc_ep212026_017adv_CONE.kml")+ start = kml.index("<Placemark>")+ end = kml.index("</Placemark>") + len("</Placemark>")+ two = kml[:end] + kml[start:end] + kml[end:]+ assert two.count("<Polygon>") == 2+ with pytest.raises(ValueError, match="2 rings"):+ cf.parse_nhc_cone_kmz(_kmz(two))+++def test_cone_kml_with_doctype_is_refused() -> None:+ kml = '<?xml version="1.0"?><!DOCTYPE kml [<!ENTITY x "y">]><kml/>'+ with pytest.raises(ValueError, match="DOCTYPE"):+ cf.parse_nhc_cone_kmz(_kmz(kml))+++def test_forecast_advisory_without_synoptic_line_keeps_times_drops_tau() -> None:+ text = _fixture("nhc_tcm_ep212026_adv017.txt").replace(+ "AT 17/1200Z CENTER WAS LOCATED NEAR 16.3N 103.7W\n", ""+ )+ parsed = cf.parse_nhc_forecast_advisory(text)+ assert parsed["points"][0]["valid_time"] == "2026-10-18T00:00:00Z"+ assert parsed["points"][0]["tau_hours"] is None+++def test_day_only_times_resolve_across_month_and_year_ends() -> None:+ oct31 = datetime(2026, 10, 31, 21, 0, tzinfo=timezone.utc)+ assert cf.resolve_day_time(1, 0, 0, oct31) == datetime(2026, 11, 1, tzinfo=timezone.utc)+ nov1 = datetime(2026, 11, 1, 3, 0, tzinfo=timezone.utc)+ assert cf.resolve_day_time(31, 18, 0, nov1) == datetime(+ 2026, 10, 31, 18, 0, tzinfo=timezone.utc+ )+ dec31 = datetime(2026, 12, 31, 12, 0, tzinfo=timezone.utc)+ assert cf.resolve_day_time(2, 12, 0, dec31) == datetime(+ 2027, 1, 2, 12, 0, tzinfo=timezone.utc+ )+++def test_simplify_ring_drops_collinear_vertices_only() -> None:+ square = [(0.0, 0.0), (0.5, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0), (0.0, 0.0)]+ assert cf.simplify_closed_ring(square, 0.01) == [+ (0.0, 0.0),+ (1.0, 0.0),+ (1.0, 1.0),+ (0.0, 1.0),+ ]+++# ---------------------------------------------------------------------------+# JTWC: forecast track from the warning text; JTWC links no cone+# ---------------------------------------------------------------------------++_CHAMPI_POINTS = [+ (12, "2026-10-18T00:00:00Z", 13.0, 143.7, 120, 145, None, "forecast"),+ (24, "2026-10-18T12:00:00Z", 13.5, 141.6, 135, 165, None, "forecast"),+ (36, "2026-10-19T00:00:00Z", 14.3, 139.5, 140, 170, None, "forecast"),+ (48, "2026-10-19T12:00:00Z", 15.3, 137.4, 135, 165, None, "extended_outlook"),+ (60, "2026-10-20T00:00:00Z", 16.3, 135.1, 135, 165, None, "extended_outlook"),+ (72, "2026-10-20T12:00:00Z", 17.3, 132.8, 135, 165, None, "extended_outlook"),+ (96, "2026-10-21T12:00:00Z", 19.4, 128.6, 125, 150, None, "long_range_outlook"),+ (120, "2026-10-22T12:00:00Z", 21.0, 125.9, 105, 130, None, "long_range_outlook"),+]++_WATI_POINTS = [+ (12, "2026-10-17T18:00:00Z", -14.9, -162.6, 70, 85, None, "forecast"),+ (24, "2026-10-18T06:00:00Z", -16.6, -161.4, 75, 90, None, "forecast"),+ (36, "2026-10-18T18:00:00Z", -18.5, -159.1, 65, 80, None, "forecast"),+ (48, "2026-10-19T06:00:00Z", -20.7, -155.7, 60, 75, None, "extended_outlook"),+ (60, "2026-10-19T18:00:00Z", -23.5, -150.9, 50, 65, "BECOMING EXTRATROPICAL", "extended_outlook"),+ (72, "2026-10-20T06:00:00Z", -26.3, -145.8, 45, 55, "EXTRATROPICAL", "extended_outlook"),+]+++def _mock_jtwc(trudy: httpx.Response | None = None) -> dict:+ return {+ "rss": respx.get(_JTWC_RSS_URL).mock(+ return_value=httpx.Response(200, text=_fixture("jtwc_rss_20261017.xml"))+ ),+ "29W": respx.get(_JTWC_29W_URL).mock(+ return_value=httpx.Response(+ 200, text=_crlf(_fixture("jtwc_wp2926web_wrn013.txt"))+ )+ ),+ "01P": respx.get(_JTWC_01P_URL).mock(+ return_value=httpx.Response(+ 200, text=_crlf(_fixture("jtwc_sh0127web_wrn003.txt"))+ )+ ),+ "21E": respx.get(_JTWC_21E_URL).mock(+ return_value=trudy or httpx.Response(503)+ ),+ }+++async def test_jtwc_forecast_tracks_from_live_warnings_and_named_failure(+ fetcher: Fetcher, no_sleep: None+) -> None:+ routes = _mock_jtwc()++ result = await fetch_jtwc_cyclones(fetcher, include_forecast=True)++ assert result["count"] == 3+ by_id = {s["id"]: s for s in result["storms"]}++ champi = by_id["29W"]["forecast"]+ assert champi["agency"] == "JTWC"+ assert champi["track_status"] == "ok"+ assert champi["track_url"] == _JTWC_29W_URL+ assert champi["warning_number"] == 13+ assert champi["issued"] == "2026-10-17T15:00:00Z"+ assert champi["initial"] == {+ "valid_time": "2026-10-17T12:00:00Z",+ "latitude": 12.6,+ "longitude": 146.1,+ "max_wind_kt": 120,+ "gust_kt": 145,+ "pressure_mb": 945,+ }+ assert _as_tuples(champi["points"]) == _CHAMPI_POINTS+ assert champi["cone"] is None+ assert champi["cone_status"] == "not_published"++ wati = by_id["01P"]["forecast"]+ assert wati["track_status"] == "ok"+ assert wati["warning_number"] == 3+ assert wati["issued"] == "2026-10-17T09:00:00Z"+ assert wati["initial"] == {+ "valid_time": "2026-10-17T06:00:00Z",+ "latitude": -13.2,+ "longitude": -163.2,+ "max_wind_kt": 60,+ "gust_kt": 75,+ "pressure_mb": 986, # "IS 986 \r\nMB." wraps a line in the live text+ }+ assert _as_tuples(wati["points"]) == _WATI_POINTS++ trudy = by_id["21E"]["forecast"]+ assert trudy["track_status"] == "fetch_failed"+ assert trudy["points"] == []+ assert result["degraded"] is True+ assert "error" not in result+ assert any("Trudy" in g and "track" in g for g in result["data_gaps"])+ assert any("cone" in g for g in result["data_gaps"])+ assert routes["29W"].call_count == 1+++async def test_jtwc_default_call_fetches_no_warning_texts(fetcher: Fetcher) -> None:+ routes = _mock_jtwc()++ result = await fetch_jtwc_cyclones(fetcher)++ assert result["count"] == 3+ assert all("forecast" not in s for s in result["storms"])+ assert "data_gaps" not in result+ assert not any(routes[k].called for k in ("29W", "01P", "21E"))+++async def test_jtwc_quiet_basins_with_forecast_are_not_degraded(fetcher: Fetcher) -> None:+ quiet = (+ "<![CDATA[<ul><li><font color='red'>"+ "No Current Tropical Cyclone Warnings.</font></li></ul>]]>"+ )+ rss = _fixture("jtwc_rss_20261017.xml")+ for guid in ("NWPAC-NIO-WARNINGS", "EPAC-CPAC-WARNINGS", "SH-WARNINGS"):+ head, sep, tail = rss.partition(f"<guid>{guid}</guid>")+ start = head.rindex("<description>") + len("<description>")+ end = head.rindex("</description>")+ rss = head[:start] + quiet + head[end:] + sep + tail+ respx.get(_JTWC_RSS_URL).mock(return_value=httpx.Response(200, text=rss))+ text = respx.get(url__regex=r".*web\.txt").mock(return_value=httpx.Response(500))++ result = await fetch_jtwc_cyclones(fetcher, include_forecast=True)++ assert result["count"] == 0+ assert result["data_gaps"] == []+ assert "degraded" not in result+ assert text.called is False+++async def test_jtwc_lagging_warning_text_is_flagged(fetcher: Fetcher) -> None:+ """The RSS says 21E warning #17; serve 29W's text (warning 13) at+ 21E's URL to stand in for a text file lagging its feed entry."""+ _mock_jtwc(+ trudy=httpx.Response(200, text=_crlf(_fixture("jtwc_wp2926web_wrn013.txt")))+ )++ result = await fetch_jtwc_cyclones(fetcher, include_forecast=True)++ trudy = next(s for s in result["storms"] if s["id"] == "21E")["forecast"]+ assert trudy["track_status"] == "stale_warning"+ assert trudy["warning_number"] == 13+ assert trudy["expected_warning_number"] == 17+ assert result["degraded"] is True+++async def test_jtwc_warning_texts_are_fetched_once_per_warning(+ fetcher: Fetcher, no_sleep: None+) -> None:+ routes = _mock_jtwc()++ await fetch_jtwc_cyclones(fetcher, include_forecast=True)+ second = await fetch_jtwc_cyclones(fetcher, include_forecast=True)++ by_id = {s["id"]: s["forecast"] for s in second["storms"]}+ assert _as_tuples(by_id["29W"]["points"]) == _CHAMPI_POINTS+ assert _as_tuples(by_id["01P"]["points"]) == _WATI_POINTS+ assert routes["29W"].call_count == 1+ assert routes["01P"].call_count == 1+++def _unlinked_jtwc_storm(i: int) -> dict:+ return {+ "id": f"{i:02d}W",+ "name": f"Storm{i}",+ "warning_number": 1,+ "issued_at": "17/1500Z",+ "warning_text_url": None,+ }+++async def test_jtwc_unlinked_text_is_a_gap_and_the_fan_out_cap_a_failure(+ fetcher: Fetcher,+) -> None:+ """A storm whose RSS item links no warning text is a coverage gap,+ not degradation; storms past the per-call cap are named and mark the+ response degraded. Neither makes a request (respx refuses any)."""+ one = [_unlinked_jtwc_storm(0)]+ gaps, degraded = await cf.attach_jtwc_forecasts(fetcher, one)+ assert one[0]["forecast"]["track_status"] == "not_linked"+ assert one[0]["forecast"]["cone_status"] == "not_published"+ assert degraded is False+ assert gaps[0] == (+ "Storm0 (00W): forecast track not_linked: "+ "the JTWC RSS item links no warning text for this storm"+ )+ assert gaps[1].startswith("JTWC links no cone of uncertainty")+ assert len(gaps) == 2++ many = [_unlinked_jtwc_storm(i) for i in range(cf.MAX_FORECAST_STORMS + 1)]+ gaps, degraded = await cf.attach_jtwc_forecasts(fetcher, many)+ statuses = [s["forecast"]["track_status"] for s in many]+ assert statuses == ["not_linked"] * cf.MAX_FORECAST_STORMS + ["not_fetched_cap"]+ assert many[-1]["forecast"]["cone_status"] == "not_published"+ assert degraded is True+ assert sum("per-call cap" in g for g in gaps) == 1+++async def test_jtwc_text_without_forecast_positions_is_unparsed_and_refetched(+ fetcher: Fetcher, no_sleep: None+) -> None:+ """Synthetic body: the first two lines of 29W's warning text, no+ forecast blocks (a real JTWC final warning has not been observed).+ Reported unparsed, degraded, and not kept for the next call."""+ routes = _mock_jtwc()+ routes["29W"].mock(+ return_value=httpx.Response(+ 200,+ text=_crlf("WTPN32 PGTW 171500\nSUBJ/TYPHOON 29W (CHAMPI) WARNING NR 013//\n"),+ )+ )++ result = await fetch_jtwc_cyclones(fetcher, include_forecast=True)++ champi = next(s for s in result["storms"] if s["id"] == "29W")["forecast"]+ assert champi["track_status"] == "unparsed"+ assert champi["warning_number"] == 13+ assert champi["issued"] == "2026-10-17T15:00:00Z"+ assert champi["points"] == []+ assert result["degraded"] is True+ assert any("Champi (29W)" in g and "unparsed" in g for g in result["data_gaps"])++ await fetch_jtwc_cyclones(fetcher, include_forecast=True)+ assert routes["29W"].call_count == 2+++def test_jtwc_warning_without_remarks_date_uses_the_given_anchor() -> None:+ text = _fixture("jtwc_wp2926web_wrn013.txt").replace("17OCT26. ", "")+ anchor = datetime(2026, 10, 17, 16, 45, tzinfo=timezone.utc)+ parsed = cf.parse_jtwc_warning(text, anchor)+ assert parsed["points"][0]["valid_time"] == "2026-10-18T00:00:00Z"+ assert parsed["issued"] == "2026-10-17T15:00:00Z"+++def test_jtwc_text_with_no_forecast_blocks_is_unparsed() -> None:+ parsed = cf.parse_jtwc_warning(+ "WTPN32 PGTW 171500\nSUBJ/TYPHOON 29W (CHAMPI) WARNING NR 013//\n",+ datetime(2026, 10, 17, tzinfo=timezone.utc),+ )+ assert parsed["points"] == []+++# ---------------------------------------------------------------------------+# Tool layer: the opt-in reaches the source through the real handler+# ---------------------------------------------------------------------------+++def _tools_registry():+ """Import world_intel_mcp.tools under the suite's temp cache path+ (same reason and mechanism as test_daily_digest._tools_registry)."""+ import importlib+ import os++ from .test_server_registry import _TMP_CACHE++ prior = os.environ.get("WORLD_INTEL_CACHE_DB")+ os.environ["WORLD_INTEL_CACHE_DB"] = str(_TMP_CACHE)+ try:+ return importlib.import_module("world_intel_mcp.tools")+ finally:+ if prior is None:+ os.environ.pop("WORLD_INTEL_CACHE_DB", None)+ else:+ os.environ["WORLD_INTEL_CACHE_DB"] = prior+++async def test_cyclone_tools_expose_and_honor_include_forecast(+ fetcher: Fetcher, monkeypatch: pytest.MonkeyPatch, no_sleep: None+) -> None:+ tools_pkg = _tools_registry()+ from world_intel_mcp import runtime++ monkeypatch.setattr(runtime, "fetcher", fetcher)+ schemas = {t.name: t.inputSchema for t in tools_pkg.ALL_TOOLS}+ for name in ("intel_cyclones", "intel_jtwc_cyclones"):+ prop = schemas[name]["properties"]["include_forecast"]+ assert prop["type"] == "boolean"+ assert prop["default"] is False++ _mock_nhc()+ _mock_jtwc()++ nhc = await tools_pkg.ALL_HANDLERS["intel_cyclones"]({"include_forecast": True})+ assert nhc["storms"][0]["forecast"]["track_status"] == "ok"+ plain = await tools_pkg.ALL_HANDLERS["intel_cyclones"]({})+ assert "forecast" not in plain["storms"][0]+ # A non-boolean never switches the fan-out on.+ stringly = await tools_pkg.ALL_HANDLERS["intel_cyclones"]({"include_forecast": "false"})+ assert "forecast" not in stringly["storms"][0]++ jtwc = await tools_pkg.ALL_HANDLERS["intel_jtwc_cyclones"]({"include_forecast": True})+ by_id = {s["id"]: s for s in jtwc["storms"]}+ assert by_id["29W"]["forecast"]["track_status"] == "ok"diff --git a/src/world_intel_mcp/tools/hazards.py b/src/world_intel_mcp/tools/hazards.pyindex 7d1a8fd..7106c14 100644--- a/src/world_intel_mcp/tools/hazards.py+++ b/src/world_intel_mcp/tools/hazards.py@@ -185,8 +185,17 @@ TOOLS: list[Tool] = [),Tool(name="intel_cyclones",- description="Get active tropical cyclones from the US National Hurricane Center: name, classification, intensity (knots), pressure (mb), position, movement, by-basin grouping. Covers the Atlantic, Eastern and Central Pacific basins only - Western Pacific / Indian Ocean storms (JTWC) are not included. Zero storms means a quiet tropics, not an outage; a fetch failure carries an explicit error. No API key needed.",- inputSchema={"type": "object", "properties": {}},+ description="Get active tropical cyclones from the US National Hurricane Center: name, classification, intensity (knots), pressure (mb), position, movement, by-basin grouping. Covers the Atlantic, Eastern and Central Pacific basins only - Western Pacific / Indian Ocean storms (JTWC) are not included. Zero storms means a quiet tropics, not an outage; a fetch failure carries an explicit error. No API key needed. Optional: include_forecast (default false) adds each storm's official forecast track from its NHC forecast/advisory (positions with UTC valid times and forecast hours, max wind and gusts in knots, post-tropical/dissipated status) and the 5-day cone of uncertainty as [lat, lon] vertices simplified to 0.01 degrees (NHC's KMZ linked); a track or cone that could not be fetched is named in data_gaps and marks the response degraded.",+ inputSchema={+ "type": "object",+ "properties": {+ "include_forecast": {+ "type": "boolean",+ "description": "Add each storm's forecast track and cone (one text and one KMZ fetch per storm, at most 10 storms per call). Default false.",+ "default": False,+ },+ },+ },),Tool(name="intel_meteoalarm_alerts",@@ -208,8 +217,17 @@ TOOLS: list[Tool] = [),Tool(name="intel_jtwc_cyclones",- description="Get active tropical cyclone warnings from the Joint Typhoon Warning Center: storm id, name, classification, warning number, issue time, warning text/graphic links, by-basin grouping, plus significant tropical weather advisories. Covers the Northwest Pacific, North Indian Ocean, and Southern Hemisphere; its Central/Eastern Pacific item overlaps NHC (intel_cyclones). Positions and intensities are not in the feed - they live in the linked warning products. Zero storms means quiet basins, not an outage. No API key needed.",- inputSchema={"type": "object", "properties": {}},+ description="Get active tropical cyclone warnings from the Joint Typhoon Warning Center: storm id, name, classification, warning number, issue time, warning text/graphic links, by-basin grouping, plus significant tropical weather advisories. Covers the Northwest Pacific, North Indian Ocean, and Southern Hemisphere; its Central/Eastern Pacific item overlaps NHC (intel_cyclones). Positions and intensities are not in the feed - they live in the linked warning products. Zero storms means quiet basins, not an outage. No API key needed. Optional: include_forecast (default false) fetches each storm's warning text and adds its warning position, intensity and pressure plus the forecast track (positions with UTC valid times, forecast hours, max sustained winds and gusts in knots, status lines such as EXTRATROPICAL); JTWC publishes no cone of uncertainty, so cone is null. A warning text that could not be fetched is named in data_gaps and marks the response degraded.",+ inputSchema={+ "type": "object",+ "properties": {+ "include_forecast": {+ "type": "boolean",+ "description": "Add each storm's forecast track from its warning text (one fetch per storm, at most 10 storms per call). Default false.",+ "default": False,+ },+ },+ },),]@@ -277,7 +295,9 @@ async def _volcano_activity(arguments: dict[str, Any]) -> Any:async def _cyclones(arguments: dict[str, Any]) -> Any:- return await cyclones.fetch_cyclones(runtime.fetcher)+ return await cyclones.fetch_cyclones(+ runtime.fetcher, include_forecast=arguments.get("include_forecast") is True+ )async def _meteoalarm_alerts(arguments: dict[str, Any]) -> Any:@@ -293,7 +313,9 @@ async def _meteoalarm_alerts(arguments: dict[str, Any]) -> Any:async def _jtwc_cyclones(arguments: dict[str, Any]) -> Any:from ..sources import jtwc- return await jtwc.fetch_jtwc_cyclones(runtime.fetcher)+ return await jtwc.fetch_jtwc_cyclones(+ runtime.fetcher, include_forecast=arguments.get("include_forecast") is True+ )HANDLERS = {