08 · STAT Ingest — the real-data bridge
Round 3 · Real-data bridge · data: · reimagines METdataio (the reformat/db-load role)
The keystone that turned MET-AL from synthetic demos into a real-data lab: paste or drop a
real MET .stat, per-line-type .txt, or MODE file and it parses in the browser — no
database, no server. The demo renders a synthetic-but-byte-shaped sample until you drop a
real file. Two de-identified real demo files (grid_stat precip, point_stat upper-air) are
staged for demos.
What it wraps
Section titled “What it wraps”The app is a thin UI over lib/met-stat-parse.mjs:
header-driven and version-tolerant, covering CTC, CTS, SL1L2, CNT, PCT, PSTD, PRC, RHIST,
ECNT, ORANK plus vector wind VL1L2/VAL1L2/VCNT and MODE _obj/_cts files.
Validation
Section titled “Validation”- 97/97 parser self-tests (fixtures are real MET lines, not hand-invented ones).
- Full-archive validation: 6,329
.statfiles / 88,456 records / 0 parse errors. - Independent oracles: 32,389/32,390 SL1L2→CNT and 7,038/7,038 VL1L2→VCNT recomputations match MET’s own paired lines (the single miss is MET’s 5-dp rounding under catastrophic cancellation, documented in Lessons).
- End-to-end: parsed PCT bins reproduce the paired PSTD line’s Brier decomposition exactly.
Security posture
Section titled “Security posture”Every ingested field renders via textContent/createElement — a dropped .stat file is
untrusted input, and this app established the injection-safe pattern the other apps adopt as
they wire real data in.
Single-file build: dist/stat-ingest.html.
