Skip to content

This is the multi-page printable view of this section.

Return to the regular view of this page

Specifications

The documents in this directory are the normative contract for what Xue writes and what every reader must accept. They win over the code, over the developer documentation (contribution/) and over any comment. They are licensed under CC BY 4.0; the code is MIT / Apache-2.0 and the published data keeps its sources' terms (see the README). They are also published at https://xue.ringsaturn.me/docs/spec/.

DocumentSpecifies
zarr-profile.mdThe Zarr v3 store a bundle is published as, the series companion, the polar store, the column store: what is published today, so read this first
bundle.mdWhat every bundle carries: the metadata JSON (schemaVersion 1–4), the codebooks and the residual arithmetic
format.mdThe legacy .xue container (v1, v2) that runs published before the stores still carry
schemas/The JSON Schemas (draft 2020-12) normative for shape: the manifest, bundle metadata v3, a store’s group and array documents, the pointer and the point products’ files
stac.mdThe STAC catalog: layout, run Items, source Collections, point products, the showcase
registry.mdThe registry document: the variables, bundles and sources an encoder builds, the closed sets of rules it names
encoder.mdThe native encoder and its parity rule with the reference encoder
sources.mdWhat each source publishes: variables, grids, axes, caveats
tc.md, airport.md, sounding.md, synop.md, aq.md, alerts.md, nexrad.mdThe point and single-site radar products: pointer, index, files, schemaVersion
fire.mdThe active fire product: FIRMS detections aggregated hourly, pointer, index, sensor files
river.mdRiver flow in a showcase case: the river/ directory, the network and gauge kinds
satellite.mdGeostationary imagery and its composites
indicators.mdThe agriculture indicators: crop-area-weighted daily quantities per forecast run, appended to monthly files read by byte range
metrics.mdThe run metrics: when each forecast run went live, measured from the publish workflows
api.mdThe data API (experimental)

From the viewer to its specification

In the viewerShowsSpecified in
/gfs, /sflux, /ecmwf, /ifs, /aifs, /ifshres, /arpege, /cmageps, /cfsGlobal forecastssources.md, zarr-profile.md
/hrrr, /rrfs, /woofnam, /iconeuRegional forecastssources.md
/gefsaero, /cmadust, /silamAerosol, dust and air-quality forecastssources.md
/mrms, /jma, /hkonowcast, /cwaRadar and precipitation nowcasts, rolling windowssources.md
/himawari, /himawarijp, /goeseast, /goeswest, /meteosatGeostationary imagery and its compositessatellite.md
/auroraThe aurora forecastsources.md
/showcaseHistorical cases, some with river flow or firesstac.md, river.md, fire.md
/typhoon, /tc/Tropical cyclone tracks, forecasts and track errorstc.md
/airports/One page per airport: METAR and TAFairport.md
?stations=snd,apt,syn,aq,fire,alerts on any mapSoundings, airports, surface and air-quality stations, fires, warningssounding.md, airport.md, synop.md, aq.md, fire.md, alerts.md
?radar=<site> on /mrmsOne WSR-88D site’s sweepnexrad.md
/compareEvery live model at one pointsources.md
/workbenchA GFS run along a line or at a point: section, sounding, time-heightzarr-profile.md (the column store)
/metricsWhen each run went livemetrics.md
/apiA console for the data APIapi.md

Versions

Every artifact carries its own version, none tied to a code release.

ArtifactWritten todayRead
Bundle metadata (schemaVersion)31 to 3
Container (FixedHeader.version)2, only when a build asks (--xue)1 and 2
Manifestschema 55; unknown fields ignored
Live pointerschema 11
Zarr store (zarr_format)33
STAC (stac_version)1.1.0—
Point products (schemaVersion, one per product)see each documentup to the one a reader implements
Indicators (schemaVersion)22
Run metrics (schemaVersion)11

Compatibility

  • A reader keeps every version it has ever read. Published runs, rounds and cases are never rebuilt, so a version once published stays readable.
  • An optional new field (a widening) does not change a version: readers ignore fields they do not know. A widening reaches the readers (the shell, the API) before the first data that carries it.
  • A change a current reader could misread is a new version number. Readers reject a version above the one they implement, so a reader that knows the new version is deployed before the first data in it, and the old version keeps being read.
  • Nothing is removed from a specification. A retired artifact (the container) stays specified for the files that exist.

How these are built, tested and released is in contribution/; why the format looks as it does, in contribution/architecture-rationale.md.

Changes to these documents are listed in CHANGELOG.md.

1 - Xue Zarr Profile

This document specifies how Xue bundles are written as Zarr v3 stores, the layout every live run, rolling-window round and showcase case is published in and a STAC catalog lists. It is normative for what the store writers (xuebuild/zarrstore.py, the native encoder’s encode/zarrstore.rs, build-bin) write and for what a store must look like to be one of these. What a bundle carries, its metadata JSON, quantization codebooks and residual arithmetic, is bundle.md; this profile says how those land in a store. A second branch, the polar store, carries radar sweeps in beam-and-gate coordinates for products that have no grid, a third, the network store, one value per river reach per frame, and a fourth, the column store, the codes of a run’s map stores cut so that one cell’s whole profile over the whole axis is a few chunks.

A store is a function of its bundles’ metadata, their quantized codes, their tiles, each variable’s predictor and each bundle’s dimension names (see “Coordinates”), and of nothing else. A build writes it straight from the codes it quantized. The frontend plays a store wherever a bundle’s manifest entry names one (see “Reading”). Runs published before the switch to stores carry .xue containers (format.md), a legacy layout every decoder keeps reading: such a run plays from its containers, and ?backend=xue asks for the container where an entry names both.

Why a profile

A player streams a bundle by range reads: one spatial tile of six frames at a time, a viewport as a few contiguous spans, one cell’s series as one chunk per six frames, each chunk one Zstandard frame whose frames may be wrapping differences against the frame before. Zarr spells that as a uint8 array under a sharding_indexed codec, a zstd codec and, optionally, an array-to-array delta codec. Writing the convention down lets a store written by anyone else be played the same way, and lets xarray, zarrs or zarrita read a Xue run without a decoder of their own. (The .xue container’s v2 index (format.md) cuts the same chunks; the store replaces it.)

Layout

Every bundle of one resolution tier of a run, a rolling window’s round or a segment is one Zarr group, the shared store, xue_profile 2; one variable is one array in it, named by the variable’s id (unique within a source). The coordinates sit beside the variables, written once for the store.

<model>.<run>[/<HHMM>]/bundles.zarr/   every bundle of the full tier
  zarr.json                            group; attributes.xue_bundles = each bundle's metadata JSON
  <variable id>/                       tmp2m/, prate/, ugrd10m/ and vgrd10m/ (wind10m), …
    zarr.json                          array metadata (below)
    c/0/0/0                            the array's one shard: the whole axis of the whole grid
  time/  latitude/  longitude/         the primary coordinates, one chunk each (c/0)
  time_<bundle>/  latitude_<family>/ … a bundle's own axis, a grid family's grid ("Coordinates")
<model>.<run>[/<HHMM>]/bundles.half.zarr/   the half tier, the same shape

bundles and columns (the column store’s) are reserved store stems: no bundle id may be either. A store is a handful of objects per array (two per variable, two per coordinate) plus one group document, whatever the length of its axis and however many bundles it holds. A bucket bills every object written: a store cut one shard per time chunk cost a GFS run some five thousand objects where the container cost sixty, and one store per bundle still spent most of a run’s objects on group documents and coordinate chunks repeated in every store (a GFS run 1,571 objects, 190 of them shards; a satellite round 253, 25 of them shards). A shard the size of the array is one object read by range, as the container was, and its index is the whole index, read once.

A reduced-resolution rendition is its own shared store, bundles.<tier>.zarr, written from the tier’s decimated codes exactly as the full one is from the full codes. The ladder is per source (SourceSpec.variant_factors): every source has the half (bundles.half.zarr, the grid decimated by two), and the satellite disks add the quarter (bundles.quarter.zarr; 3000 → 1500 → 750 cells a side, the tile 64 → 32 → 16), each decimated from the full plane. The eighth (bundles.eighth.zarr, decimation by eight) is still a valid tier that no source builds: a reader takes the tiers a bundle has from its manifest entry, so a store published with one still plays. Every rung is every f-th row and column, except that the 3.9 µm window (ir039) keeps the largest code within f/2 cells of each site, so a one-cell hot spot is not dropped (docs/satellite.md, “The 3.9 µm window”).

Profile 1, the one-bundle store, is the previous revision and stays readable forever: one bundle per group, <bundle>.zarr and <bundle>.<tier>.zarr (tmp2m.zarr, tmp2m.half.zarr), its metadata in the group’s attributes.xue, the same arrays without xue.bundle and the three primary coordinates of that bundle alone. Runs, rounds and showcase cases published before shared stores are profile 1 and are never rebuilt; a series store is still profile 1 (see “Series store”). Everything below applies to both profiles except where it names one.

Array metadata

Every variable array is uint8 of shape [frameCount, height, width] (time, then the grid in the metadata grid’s row-major, north-to-south, west-to-east order) and carries exactly one codec, sharding_indexed. The one exception is a series store’s widened variable, which is uint16 (Series store); everything below holds for it with the differences that section lists. A column store’s surface array cut from such a variable is uint16 too (Column store).

{
  "zarr_format": 3, "node_type": "array",
  "shape": [161, 721, 1440], "data_type": "uint8",
  "chunk_grid": {"name": "regular", "configuration": {"chunk_shape": [162, 728, 1440]}},
  "chunk_key_encoding": {"name": "default"},
  "fill_value": 255,
  "codecs": [{"name": "sharding_indexed", "configuration": {
      "chunk_shape": [6, 52, 48],
      "codecs": [{"name": "bytes"},
                 {"name": "zstd", "configuration": {"level": 15, "checksum": true}}],
      "index_codecs": [{"name": "bytes", "configuration": {"endian": "little"}},
                       {"name": "crc32c"}],
      "index_location": "end"}}],
  "dimension_names": ["time", "latitude", "longitude"],
  "attributes": { "…": "see Attributes" }
}
  • Time chunk. The inner chunk holds six frames on a regular grid: time chunk t covers frames [6t, 6t + 6). The container cuts its groups inside segments of constant step and restarts them where the step changes (GFS: a one-frame group at f120), so a store chunk may straddle two of the container’s groups. The two layouts coincide up to the first change of step.
  • Inner chunk: one time chunk of the bundle’s tile, [6, tileHeight, tileWidth]. Within a shard the inner chunks are ordered row-major over the shard’s chunk grid: time chunk by time chunk, and within each the bundle’s tiles in the bundle’s row-major order, tileRows × tileColumns of them, so one time chunk is one contiguous run of the object, as one group is in the container.
  • Outer chunk (shard): the whole array, the axis rounded up to whole time chunks and the grid rounded up to whole tiles, because the sharding codec requires whole inner chunks along each axis: [6 × timeChunks, tileRows × tileHeight, tileColumns × tileWidth] (GFS at 161 frames: [162, 728, 1440]). The chunk grid may run past the array’s shape; the cells beyond it, and the frames beyond the axis in the last time chunk, are stored as fill_value. A reader takes the shard’s frame count from the array’s own chunk shape and must accept any multiple of the time chunk: stores written before this revision are cut one shard per time chunk (chunk_shape[0] = 6, objects c/<t>/0/0), and those stay readable.
  • fill_value is the variable’s nodataCode. Padding, and any read past the grid, is explicitly nodata rather than a plausible low code.
  • Inner codec chain. The default is the standard [bytes, zstd] with level 15 and a content checksum, which any Zarr client decodes with nothing registered. The delta chain (the writers’ delta option, which the series store always takes) puts {"name": "xue.delta", "configuration": {"axis": 0}} in front of bytes on every variable the bundle predicts from the previous frame, and never on a RAW one (precipitation, reflectivity).
  • Shard index. One (offset, nbytes) pair of little-endian uint64 per inner chunk of the shard’s chunk grid, in row-major order (time chunk, then tile), followed by the CRC-32C of those pairs as four little-endian bytes: 16 × timeChunks × tileCount + 4 bytes (GFS, 27 × 420 chunks: 181,444). Offsets are from the start of the shard. index_location is end by default (a client fetches the index as an HTTP suffix range without knowing the object’s length, and zarrita reads only that form) and may be start. A reader must accept both. A pair of 2^64 − 1 marks a chunk that was never written; the exporter writes every chunk, the padding time chunk past the axis included (a few bytes of fill_value each).
  • chunk_key_encoding is default with the / separator, so the shard is the object c/0/0/0.

The xue.delta codec

Array-to-array. Along axis the first slice is stored whole and every later slice as its wrapping difference against the slice before it, modulo 256 on a uint8 array and modulo 65536 on a uint16 one; decoding is the running sum in the same width. On uint8 that is the residual arithmetic of bundle.md, “Residuals”, the .xue container’s PREVIOUS predictor moved into the codec chain: an inner chunk under [xue.delta, bytes, zstd] compresses to the same bytes as the bundle’s chunk over the same frames and the same unclipped tile. It is not numcodecs’ Delta, which differences the flattened buffer. xuebuild/zarrcodec.py implements it for zarr-python (register()); it is only needed to read a store written with the delta chain.

Group document

The shape of a grid store’s group document, either profile, is schemas/store-group.schema.json, and of every array document (each array’s zarr.json, repeated in the consolidated block) schemas/store-array.schema.json; the polar, network and column branches’ groups are schemas/polar-group.schema.json, schemas/network-group.schema.json and schemas/column-group.schema.json. They are normative for shape, and embed the bundle metadata schema (bundle.md, “Metadata JSON”) wherever a document carries a bundle’s metadata or a variable of it. This section and the ones below say what the fields mean and what a reader checks across them: the profile it implements, exactly one branch’s block, the bundle it opens by id, key order and the CRC. tests/test_schemas.py holds the committed stores (tests/fixtures/indicators/store/, tests/fixtures/river/network/, tests/fixtures/column/) and stores it builds without GDAL (the shell’s synthetic run, a window cut into segments, a polar round and window) to them. The shell checks a group with the generated validator over what it reads, the envelope and the bundle asked for, so a shared store opens every bundle a reader can parse whatever another bundle carries.

A shared store’s zarr.json:

{
  "zarr_format": 3,
  "node_type": "group",
  "attributes": {
    "xue_profile": 2,
    "xue_bundles": {
      "tmp2m": { "schemaVersion": 3, "model": "…", "product": "…", "runTime": "…",
                 "profile": "…", "time": { "…" }, "grid": { "…" }, "variables": [ "…" ] },
      "prate": { "…" },
      "wind10m": { "…" }
    }
  },
  "consolidated_metadata": {
    "kind": "inline", "must_understand": false,
    "metadata": { "tmp2m": { "…the array's zarr.json…" }, "prate": { "…" },
                  "ugrd10m": { "…" }, "vgrd10m": { "…" },
                  "time": { "…" }, "latitude": { "…" }, "longitude": { "…" },
                  "time_prate": { "…" } }
  }
}
  • xue_bundles maps each bundle id to that bundle’s metadata JSON verbatim (bundle.md, “Metadata JSON”), so the parsers that read a bundle’s metadata read a store’s. Its keys are in manifest bundle order (the source’s publication order). A group whose xue_bundles is missing, empty or not an object is invalid. There is no attributes.xue on a shared group: a profile-1 reader refuses the group (it refuses an xue_profile it does not implement), a profile-2 reader selects its bundle by id.
  • xue_profile is this document’s version: 2 for a shared store, 1 for a one-bundle store. A reader refuses any other value.
  • consolidated_metadata is the Zarr v3 inline form zarr-python reads. Every array document of the store is repeated verbatim, so a client on an origin that cannot be listed (a plain HTTP bucket, where every store is served from) still discovers the arrays: xr.open_zarr(url) works with no consolidated= argument and no directory listing. Its keys are in this order: every variable array, bundle by bundle in xue_bundles order and within a bundle in its variables order; then the primary coordinates time, latitude, longitude, y, x, crs, those some bundle uses; then every other coordinate array in the order its first bundle names it (time_<bundle id>, latitude_<family>, longitude_<family>, y_<family>, x_<family> within one bundle).
  • Key order is part of the bytes. The document is serialized as every document of the profile is: JSON with two-space indentation, one member or element per line, ": " after a key, non-ASCII characters as raw UTF-8, and a trailing newline — Python’s json.dumps(document, indent=2, ensure_ascii=False) + "\n" (zarrstore._dump_json), mirrored by the native encoder’s writer for the array and group documents alike.
  • It is written last, after every array, and its CRC-32 is the store’s crc32 — the ?v= every object of the store is fetched under — and the crc32 of every manifest entry that names the store. It covers every array’s metadata too.

A one-bundle store’s zarr.json (profile 1) carries "attributes": {"xue": {…the bundle's metadata…}, "xue_profile": 1} and the same consolidated metadata over its own arrays (the variable arrays, then time, latitude, longitude, or time, y, x, crs on a projected grid). A store written before consolidated metadata lacks it and opens with consolidated=False from a listable store only; one written before that also carries an xue_index attribute naming a whole-store index object, index.bin, which a reader ignores, since the shard’s own index is the whole index.

A reader that opens arrays by name (the frontend, zarr’s open_group(url)["tmp2m"]) never needs the consolidated block.

Array attributes

Each variable array’s zarr.json:

"attributes": {
  "xue": {
    "bundle": "tmp2m",
    "variable": { "numericId": 1, "id": "tmp2m", "label": "…", "unit": "°C",
                  "parameter": { "…" },
                  "quantization": { "type": "linear", "offset": -60.0, "scale": 0.5,
                                    "minimumCode": 0, "maximumCode": 220, "nodataCode": 255 } },
    "predictor": "previous"
  },
  "scale_factor": 0.5, "add_offset": -60.0, "_FillValue": 255
}
  • xue.bundle is the id of the bundle the array belongs to, so an array opened alone knows which entry of xue_bundles describes it. It leads the block in a shared store and is absent from a one-bundle store.
  • xue.variable is that variable’s entry from the metadata’s variables list, copied, for a reader that opens one array alone.
  • xue.predictor is previous or raw and is informational: decoding follows the codec chain.
  • Every store writer writes xue.variable and xue.predictor, and a reader accepts an array without them: the schema names them without requiring them.
  • _FillValue is the nodataCode for every variable. scale_factor and add_offset are written for a linear codebook only, so a CF-aware client dequantizes it (value = code × scale + offset); the log1p codebook has no CF spelling and is described by xue.variable.quantization alone.
  • Dimensions are declared in the array metadata’s dimension_names, the Zarr v3 field: ["time", "latitude", "longitude"], ["time", "y", "x"] on a projected grid, or the bundle’s own names (below). Every array of one bundle carries the same three.
  • On a projected grid every variable array also has grid_mapping: "crs", its last attribute, naming the scalar array of Coordinates, and on no other grid does one.

Coordinates

The coordinate arrays are one-dimensional, one chunk each under [bytes] (little-endian), named by the dimension they label: the frame’s offset from the bundle’s runTime in seconds (int32, units: "seconds since <runTime>", calendar: "proleptic_gregorian", standard_name: "time", fill 0), the cell centre latitudes and longitudes (float64, degrees_north / degrees_east, fill NaN) from the bundle’s grid. They are for xarray and its kind; a player reads the metadata.

On a grid with a gaussian block the latitude coordinate holds the true Gaussian latitudes of its rows, not the regular fields’ even ones. Each is computed alone, by this iteration in this order of operations, so that every writer lands on the same double (a library root finder differs by up to 1.8e-12° near the poles). With N = 2n and i the row on the whole Gaussian grid from the north:

x = cos(π × (i + 0.75) / (N + 0.5))
repeat at most 100 times:
    p0, p1 = 1, x
    for k = 2 … N:
        p0, p1 = p1, ((2k − 1) × x × p1 − (k − 1) × p0) / k
    derivative = N × (x × p1 − p0) / (x × x − 1)
    step = p1 / derivative
    x = x − step
    stop when |step| < 1e-15
latitude = degrees(asin(x))

For n = 95 the first rows are 89.27671287810583, 88.33975425118209, 87.3972623773714; for n = 768, 89.91032453466268, 89.79415738840316, 89.67730421235662. tests/test_native_grids.py and rust/xue/src/projection.rs hold these goldens.

On a grid with a projection block there is no latitude or longitude axis. The coordinates are y and x, in place of latitude and longitude: float64, fill NaN, units: "m", standard_name: "projection_y_coordinate" and "projection_x_coordinate", holding y0 + row × dy and x0 + column × dx. Two-dimensional latitude and longitude arrays are not written; a client computes them from the crs array.

That array, crs, is zero-dimensional: shape: [], chunk_grid with chunk_shape: [], data_type: "int32", fill_value: 0, codecs: [{"name": "bytes", "configuration": {"endian": "little"}}], dimension_names: []. It has a zarr.json and no chunk, and it is written once per store. It exists for its attributes, the CF grid mapping, which xarray and rioxarray read:

AttributeValue
grid_mapping_namelambert_conformal_conic
latitude_of_projection_originlatitudeOfOrigin
longitude_of_central_meridiancentralMeridian
standard_parallel[standardParallel1, standardParallel2]
earth_radiusradius
crs_wktthe same projection as WKT2, in the one spelling reproject.LambertConformal.wkt writes, each number as its shortest round trip, so that writers agree on the bytes

The attributes come in this order. Whatever the grid, a dimension’s coordinate array follows these rules.

  • The primary coordinates time, latitude and longitude, or y and x on a source published on a projection, are the run’s axis and the source’s primary grid at the store’s tier. They are written once per store.
  • A bundle whose time axis is cut by a rule of its own takes the dimension time_<bundle id>, and the store carries a coordinate array of that name with that bundle’s axis (same encoding as time). The rules are the three by which the encoder cuts a bundle’s axis: a published scalar whose series has no analysis frame (discover.analysis_optional_ids: a de-accumulated, de-averaged or window-differenced rate, an interval maximum such as gust, a field the source writes only from a later hour, such as CMA GRAPES GEPS’s 24-hour precipitation probabilities from +24 h, whose axis starts there), a published scalar read from a field the source writes only every so many hours (the source’s variableStepHours: ECMWF’s 24-hour precipitation probabilities, one window ending every 12 hours from +24 h on a three- and six-hourly run, whose axis is the run’s thinned to those hours), and a static field (the terrain, one frame at the analysis). A reader takes a bundle’s frames at the times its own axis lists and has no frame of it between them.
  • A bundle on a grid family of its own takes latitude_<family> and longitude_<family>, <family> being exactly the string discover.bundle_grid_family returns for it: the id of the companion file family its inputs are read from (pgb, the CFSv2 pressure levels on their 1° grid, so latitude_pgb). Every bundle of one family shares the pair, as the primary grid’s bundles share latitude / longitude. A family id matches ^[a-z][a-z0-9]*$.
  • The decision is the rule, not a comparison of axes, so it is a function of the source registry and the bundle id alone (discover.store_dimensions): a rate gets time_prate even on a build whose axis happens to start past the analysis. A fanned-out job building a subset of the bundles therefore writes the same objects a whole build does, and every job writes the primary coordinates it needs, the same bytes each time. A multi-variable bundle’s arrays share one set of names.
  • Two bundles naming one coordinate carry the same document and bytes for it; a writer refuses to merge them otherwise.

A bundle’s dimension names are time or time_<its bundle id>, then latitude and longitude, or latitude_<family> and longitude_<family> with one family id matching ^[a-z][a-z0-9]*$. On a grid with a projection block, and only there, the last two are y and x, or y_<family> and x_<family>. Any other name is invalid, and so is a bundle whose names disagree with its grid block. The array crs belongs to no dimension: a bundle uses it by its variables’ grid_mapping, and every projected bundle of a store shares it, since a family differs in grid and not in projection.

Manifest

The manifest’s shape, schema v5, is schemas/manifest.schema.json, which is normative. The shell checks it with the generated validator before the rules a schema cannot say; the three hand validators (xuebuild/manifest.py, encode/manifest.rs, web/src/data/manifest.ts) hold the rules below, the registered dataset and the core set, and tests/test_schemas.py holds the writers’ manifests to the schema. A manifest entry’s zarr descriptor is unchanged in shape: {path, byteLength, crc32}, or the segmented form (see “Segmented stores”).

  • path names the shared store of the entry’s tier: bundles.zarr on the bundle, bundles.half.zarr on its half variant, and so on. Every entry of a tier carries the same path. The validators (xuebuild/manifest.py, rust/xue/src/encode/manifest.rs, web/src/data/manifest.ts) exempt exactly these paths from the duplicate-path rule: a map store’s path, or a segment’s, whose final path component is exactly bundles.zarr or bundles.<tier>.zarr, <tier> a non-empty run of lowercase ASCII letters other than series (any such tier, not only half, quarter and eighth). Every other path — a container, a series store (so bundles.series.zarr too), a poster, a one-bundle store — stays unique in the manifest.
  • byteLength is the bundle’s share: the objects of its variable arrays (each zarr.json and shard) and of the coordinate arrays it uses (each zarr.json and chunk). The group document is not counted. It is what a viewer downloads for that bundle alone, which is what the delivery sizes and a tier’s bandwidth are computed from.
  • crc32 is the CRC-32 of the store’s group document, identical on every entry naming the store.

A run that ships a column store names it in the manifest’s optional top-level columns, beside bundles: {path, byteLength, crc32}, the store’s root relative to the manifest, the sum of every object in it and the CRC-32 of its group document. path is a relative path with no .. component whose final component is exactly columns.zarr, and it is unique in the manifest like any other. The manifest schema stays 5: a reader that does not know the field reads the run without it. A showcase case and a round of a rolling window have none.

Fan-out and assembly. A publish built one bundle group per job (build-bin --bundles) writes, in each job, its bundles’ arrays and coordinates into the run’s bundles[.<tier>].zarr/ and a partial group document bundles[.<tier>].zarr/zarr.part.<first bundle id>.json — the group document above over that job’s bundles alone, its first bundle (in manifest order) naming it — and no zarr.json. The job’s partial manifest carries the part’s CRC-32 as crc32. Parts are local: the uploads exclude them. assemble-run merges the parts of each store into its group document, in manifest order, writes it, and stamps its CRC-32 on every entry naming the store; a bundle in two parts, a part’s bundle the manifest does not name with that store, or a bundle no part carries is an error. A whole build writes its part and its group document the same way, and removes the part; tests/test_assemble.py holds split = whole.

Top-ups. A top-up builds only the bundles the live run lacks, and merges their parts onto the live group document, fetched from the bucket: a part’s bundle replaces the live one, the live bundles keep their metadata and array documents. The new group document is written over the live one’s path under a new CRC-32, which every entry naming the store — the live ones too — then carries, so nothing is served under an unchanged ?v=. The arrays already on the bucket are not touched. The live manifest’s columns is kept only when no bundle the top-up built is a member of the source’s column store and the source still lists one; otherwise it is dropped and the column store is built anew from the run as topped up.

Reading

What a player needs from a store, in the order it needs it. The frontend’s own reader (web/src/decode/zarr/) is one implementation; the rules are the profile’s.

  1. The group. A reader opens a bundle by (store, bundle id): the store path from the bundle’s manifest entry, and the entry’s variable. Fetch zarr.json at the store’s root under the entry’s ?v=. On xue_profile 2, attributes.xue_bundles[<bundle id>] is the bundle metadata verbatim; on xue_profile 1, attributes.xue is: the grid, the time axis, the variable set with their codebooks and GRIB2 parameter blocks. It is parsed by the rules of bundle.md, “Metadata JSON”, wherever it comes from. A reader must refuse a group with an xue_profile it does not implement, a profile-1 group without xue, a profile-2 group whose xue_bundles is missing, empty or not an object, and a profile-2 group without the bundle asked for. Grid and axis checks are against that bundle’s metadata, never the store’s other bundles. A cache keyed by store path (the group, the coordinates, a shard index) serves every bundle of the tier.
  2. Each array. Fetch <id>/zarr.json for every variable the bundle’s metadata lists (the array’s name is the variable’s id; numericId is the handle a player’s own protocol uses), exactly as for a one-bundle store. Validate before trusting: uint8 (or uint16, on a series store only), three dimensions, a regular chunk grid, exactly one sharding_indexed codec, an inner chain of [bytes, zstd] or [xue.delta{axis: 0}, bytes, zstd] whose bytes is little-endian ({"endian": "little"}, which a uint8 array may leave out; big is refused), index codecs [bytes, crc32c] little-endian, index_location start or end, fill_value the variable’s nodataCode, every code of its codebook within the data_type’s range (255 or 65535), and an outer chunk equal to [shardFrames, tileRows × tileHeight, tileColumns × tileWidth] with shardFrames a positive multiple of the time chunk (the whole axis rounded up on a store this revision writes, six on one written before). Every array of one bundle is cut the same way. The tiling this yields (tileWidth, tileHeight, tileColumns, tileRows) is the same shape the container reports, and a viewport maps to a rectangle of inner chunks the same way.
  3. Locating a frame. A frame’s index on the axis is its position in frameOffsets (or its distance from firstFrameOffset in frameSteps), its time chunk is floor(index / timeChunk), and its frame within the chunk index mod timeChunk. The time chunk is fixed at six on a regular grid and may straddle two of the container’s groups (GFS: from the change of step at 120 h on); a reader never consults the container’s grouping. The time chunk lives in shard floor(timeChunk × timeChunk / shardFrames) (shard 0 on a store this revision writes) as the object c/<shard>/0/0, and its tiles are the tileCount consecutive index entries from position ((timeChunk × timeChunk) mod shardFrames) / timeChunk × tileCount, tile t in row-major order, tileColumns per row.
  4. The shard index. Read the shard’s index once, on the first chunk wanted from it: 16 × chunksPerShard + 4 bytes at the end of the shard (index_location: "end", fetched as the HTTP suffix range bytes=-N without knowing the object’s length) or at its start (bytes=0-(N−1)). Verify the trailing CRC-32C over the pairs before using any offset; a pair of 2^64 − 1 is a chunk the shard never held, which reads as fill_value throughout. Hold the index for the session: on a store this revision writes it is the array’s whole index, so every later frame, viewport and series locates its chunks without another dependent request. It is the container’s structural prefix in Zarr’s terms.
  5. Inner chunks. Fetch [offset, offset + nbytes) of the shard. Decompress the Zstandard frame to exactly timeChunk × tileHeight × tileWidth elements of the data_type — bytes on uint8, twice as many bytes, little-endian, on uint16 (refuse a frame without a content checksum, a checksum that does not match, or an output of any other length) and, under the delta chain, replay the running sum along the frame axis, modulo 256 or 65536. This is the container’s chunk path; decodeChunk in the WASM decoder does exactly it for bytes that did not come out of a .xue index.
  6. Trimming the padding. An inner chunk is stored whole. Its rows past height, its columns past width (the last tile row and column) and, in the last time chunk, its frames past frameCount are padding: copy only min(tileHeight, height − row) rows of min(tileWidth, width − column) cells for the frames that lie on the axis.
  7. Coalescing ranges. A shard’s inner chunks are contiguous in tile order, so a tile row is one contiguous span of the object. A reader that issues one range per inner chunk pays one round trip per tile: a 6 × 4 tile viewport costs 24 requests where the container costs 4. The profile’s recommendation is to gather the ranges of one shard that a read needs, sort them by offset, merge neighbours whose gap is small (the frontend uses 64 KB), and fetch each run as one range; the over-read of a merged gap costs less than the round trip it saves. With that, a global view is one range per time chunk, a viewport one range per tile row per time chunk, and a point series one chunk per time chunk, plus one index read per shard the reader has not seen, which on a store this revision writes is one per array, at open.

A series costs opening plus timeChunks requests, the container’s own shape (its prefix plus one chunk per group), independent of the frame count.

Series store

A series store is the same bundle’s quantized codes cut for the other access pattern: one cell’s whole series. It is a one-bundle store (profile 1) except for the geometry of its arrays, so every rule above applies unchanged; it is never shared, one bundle per store.

  • The store’s root is <bundle>.series.zarr, and its group document carries the bundle’s metadata in attributes.xue, each variable’s quantization the codes this store holds (below), xue_profile 1. Both stores name the same run of the same bundle; a manifest entry carries the map store as zarr and the series store as series, each a {path, byteLength, crc32} descriptor. The series descriptor is full-resolution only and absent wherever the pipeline does not derive one. A reader dequantizes a series with this store’s metadata, never the map store’s: the two may hold one variable under different codebooks.
  • Widened variables. A variable whose registry entry carries a seriesQuantization (registry.md) is written into every series store under that codebook, as sixteen-bit codes, in place of the profile’s byte codebook; every other variable keeps the map store’s codes byte for byte. Its entry of the group’s variables, its array’s attributes.xue.variable, CF scale_factor / add_offset and _FillValue, and the array’s fill_value are all that codebook’s. The codes are quantized from the same field as the map store’s byte codes, in the same pass, never from the byte codes. Only series stores widen: map stores, tiers, containers and column stores keep their byte codes.
  • An array’s data_type is uint16 exactly when its variable’s quantization.nodataCode is above 255, and uint8 otherwise. A reader takes the width from data_type and requires fill_value to be the nodataCode and every code of the codebook to fit the type. A uint16 array’s inner bytes codec is {"name": "bytes", "configuration": {"endian": "little"}}; a uint8 array keeps {"name": "bytes"}, so every byte store’s bytes are what they were. A reader accepts endian absent on uint8 only, or little, and refuses big.
  • Every variable array is uint8 or uint16 of shape [frameCount, height, width] and carries exactly one sharding_indexed codec, with chunk_shape = [frameCount, blockHeight, blockWidth] — the whole axis of one spatial block — and the outer chunk (shard) the whole array rounded up to whole blocks: [frameCount, ceil(height/blockHeight) * blockHeight, ceil(width/blockWidth) * blockWidth]. The array’s own chunk_shape is the authority for the block, as it is the authority for the time chunk above.
  • The inner codec chain is the variable’s, exactly as the map store: [xue.delta{axis: 0}, bytes, zstd] on a PREVIOUS variable and [bytes, zstd] on a RAW one. The delta runs over the whole axis, so an inner chunk is the variable’s whole temporal residual cube for one block. Unlike the map store, which leaves xue.delta off so a generic Zarr client needs nothing registered, the series store defaults to it: it is the layout’s own predictor, and its only readers already decode it. On a uint16 array the delta is element-wise modulo 65536: stored[0] = code[0], stored[t] = code[t] − code[t−1] (mod 65536) along the inner chunk’s time axis. Precipitation stays RAW, widened or not.
  • fill_value is the variable’s nodataCode; the rows and columns past the grid are written as it, before the delta. There is no frame padding: the axis is the time chunk.
  • An inner chunk’s payload is the Zstandard frame (level 15, content checksum) of the padded, delta-coded [frameCount, blockHeight, blockWidth] block in row-major order: one byte per code on uint8, two little-endian bytes on uint16.
  • The three coordinate arrays are the primary ones, over the bundle’s own axis.

The block is a per-source registry value; 8 x 8 is what the reference pipeline writes. Which bundles ship a series store at all is the source registry’s series_bundle_ids — opt-in per source, so a rollout can watch one dataset’s storage and read counts before the next: the GFS 0.25-degree run for tmp2m, dpt2m, prate, wind10m and prmsl, and sflux for tmp2m, prate, dswrf and wind10m. A variable that carries a seriesQuantization (bundle.md, “Series codebooks”) is widened wherever it ships a series store; every variable those bundles hold carries one. Measured on gfs.2026090918 (161 frames, 0.25° global), an 8 x 8 byte-coded series store is 37.2 MB against the bundle’s 37.0 MB for tmp2m (101.4 MB against 100.8 for the two-variable wind10m), its shard index is 262 KB per array (16 bytes per inner chunk), and one cell’s whole series is a 1.9 KB median chunk.

Reading one cell’s series: one inner chunk of the block containing the cell, which holds every frame, plus the shard index once per store. A bilinear read of four neighbouring cells is one chunk where they share a block and two to four where they do not. A series store is read for series only: a frame read through it would fetch one tiny chunk per block, which is not what it is cut for.

Segmented stores

A rolling window (radar, satellite, the aurora nowcast) is rebuilt every few minutes, but between two rounds only its newest frames change. Its map stores are therefore published cut along time: each resolution tier’s shared store is cut into shared segments, every one an ordinary shared store under this profile, and each bundle’s segments’ axes concatenate into the bundle’s.

  • A segment holds the frames of one clock interval: an hour for a feed whose frames are less than an hour apart, six hours (from 00, 06, 12 and 18 UTC) for an hourly or slower one. The window’s newest segment is partial, as is the oldest when the window does not start on a segment boundary; every other one is whole and comes out the same, byte for byte, in every round that holds it.

  • The interval is the store’s: decided from every bundle’s frames together, so the bundles of one tier are cut at the same boundaries. A segment holds every bundle of the tier that has a frame in its interval (a bundle with none there is absent from it), in xue_bundles order.

  • In a segment each bundle is the bundle over its own frames there: xue_bundles[<id>] is the bundle’s metadata with runTime the bundle’s first frame in the segment and the time block recomputed over its frames by the rules of bundle.md, “Time Axis” (the coarsest unitSeconds that fits, frameStep when uniform, frameOffsets where a slot is missing). Everything else in the metadata, its dimension names, its codec choices and the cutting of every array are the bundle’s.

  • Segments live beside the run directories, at <model>.segments/<YYYYMMDDHHMM>/<digest>/bundles[.<tier>].zarr: the segment’s start in UTC, then eight hex digits of a SHA-256 over what the whole shared segment is a function of. The digest’s input is, bundle by bundle in the segment’s xue_bundles order: the bundle id’s UTF-8 bytes and a newline (0x0a); its three dimension names as the JSON array ["time", "latitude", "longitude"] (comma-space separated); its segment metadata as its canonical JSON bytes (binformat.metadata_json_bytes); the JSON array [<delta>, "<index location>"] ([false, "end"]); then for each variable id in sorted order, its UTF-8 bytes followed by its codes, frame by frame. The same contents always land under the same path, and different contents never do, so a round names a segment an earlier round published instead of writing it again, and a client’s cache of it stays valid from round to round. Like every other published object, a segment is never rewritten under the same path.

  • In the manifest, a segmented zarr descriptor carries segments, a non-empty list of {path, byteLength, crc32} store descriptors in ascending time order, and byteLength, their sum. It carries no path or crc32 of its own. A segment’s path is relative to the manifest and may climb out of the round’s directory with at most two leading .. components (a round sits at <model>.<run>/<HHMM>/), and nowhere else:

    "zarr": {
      "byteLength": 64212334,
      "segments": [
        {"path": "../../himawari.segments/202610112200/1a2b3c4d/bundles.half.zarr",
         "byteLength": 11030021, "crc32": "8e0c5a1f"},
        …
      ]
    }

    A series descriptor is never segmented. Every bundle of a shared segment names the same path and crc32 (the segment’s group document’s) with its own byteLength, its share as above; the shared-path exemption applies to a segment’s path by the same final-component test.

  • A reader opens every segment by (segment, bundle id), refuses a list whose segments differ, for that bundle, in anything but runTime and time or whose frames are not strictly ascending across segments, and plays the concatenated axis: frame i of the bundle is the frame at its absolute time in the segment that holds it.

Cutting is a publishing step over finished stores (build-bin --round --segments, xuebuild/segments.py): it reads the codes back and writes each segment with the reference writer, whichever encoder built the round, and it skips every segment the live round already names for every bundle it holds. A round of the previous layout (one store per bundle) is cut into one-bundle segments, <bundle>[.<tier>].zarr, whose digest is the same input as above for its one bundle without the id and dimension prefix. The window’s posters and its window.json stay in the round’s directory.

Polar store

A polar store carries radar sweeps in the radar’s own coordinates — one row per beam, one column per range gate — instead of a latitude-longitude grid. It is the profile’s second branch and the one a single-site radar product writes (nexrad.md); it has no .xue counterpart and is never derived from a bundle. Everything in “Array metadata” and “Reading” applies except where this section says otherwise: the shard, the index, the codecs and the reading of an inner chunk are the same; the dimensions, the chunking and the attributes are its own.

  • A store is one product over one or more rounds, the intervals a product delivers its sweeps in. A polar store is never shared. A round store holds one round, <round directory>/<product>.zarr (nexrad.202610050805/n0b.zarr); a window store holds every round of a closed window, one store per product for the whole of it (a showcase case’s, nexrad.md §1). The group’s attributes carry a xue_polar block in place of xue and xue_profile; its version is this branch’s version, 1. A reader tells the branches apart by which one is present and refuses a group carrying both or neither, or a version it does not implement.

  • One data array, named by the product (n0b), uint8 of shape [site, scan, azimuth, range] with dimension_names exactly those four. site indexes the radars that scanned in the store’s rounds, scan the sweeps of one site in time order, azimuth the beam and range the gate.

  • Chunking. The inner chunk is one site’s sweeps of one round: [1, depth, azimuth, range], where depth is the largest number of sweeps any site has in any one of the store’s rounds. Inner chunk [s, r, 0, 0] is site s in the store’s round r, so scan runs over the whole store, round after round, rounds × depth long, and scan slot r × depth + k is the site’s k-th sweep of round r. The outer chunk (shard) is the whole array, so c/0/0/0/0 is the only data object and its index holds one pair per site and round, in that order; a site with no sweep in a round has the never-written pair there. A site’s round with fewer sweeps is padded to depth with fill_value; whether a sweep exists is said by scan_time, never by the codes. A round store is the one-round case: its index holds one pair per site.

  • Inner codec chain [bytes, zstd] (level 15, content checksum). There is no xue.delta: consecutive sweeps are minutes apart and a difference against the previous one is larger than the sweep itself. Index codecs, index_location and the never-written pair are as above.

  • fill_value is 0.

  • Codes. A sweep’s codes are its source’s own, unchanged: a linear codebook over a contiguous run of codes plus reserved codes that carry a state rather than a value. The data array’s attributes declare both, in their own xue_polar block:

    "attributes": {
      "xue_polar": {
        "variable": { "id": "n0g", "label": "Base velocity", "unit": "m/s",
                      "quantization": { "type": "linear", "offset": -64.5, "scale": 0.5,
                                        "minimumCode": 2, "maximumCode": 255 },
                      "reservedCodes": { "0": "below_threshold", "1": "range_folded" },
                      "signConvention": "positive_away" },
        "geometry": { "azimuthStart": 0.0, "azimuthStep": 0.5,
                      "rangeStart": 0.0, "rangeStep": 0.25 }
      },
      "scale_factor": 0.5, "add_offset": -64.5,
      "flag_values": [0, 1], "flag_meanings": "below_threshold range_folded"
    }

    value = code × scale + offset for minimumCode ≤ code ≤ maximumCode; a reserved code has no value and a reader must not dequantize, filter or interpolate across it as one. signConvention is present on a radial velocity and is positive_away (motion away from the radar is positive). scale_factor / add_offset let a CF client dequantize; flag_values tells it which codes are not values. There is no _FillValue: code 0 is data (no echo), not missing.

  • Geometry. Beam j covers azimuths [azimuthStart + j × azimuthStep, azimuthStart + (j + 1) × azimuthStep) in degrees clockwise from true north; gate i covers slant ranges [rangeStart + i × rangeStep, rangeStart + (i + 1) × rangeStep) in kilometres from the antenna. A source whose beams do not start on this grid is binned by beam centre.

  • Coordinates, beside the data array, each one chunk under [bytes] (little-endian), as a grid store’s coordinates are:

    arraydtypeshapemeaning
    azimuthfloat32[azimuth]beam centre, degrees true
    rangefloat32[range]gate centre, km slant range
    site_latitude, site_longitudefloat64[site]antenna, WGS84 degrees
    site_heightfloat32[site]antenna, metres above mean sea level
    scan_timeint64[site, scan]sweep start, Unix seconds UTC; -1 for a padding sweep
    elevationfloat32[site, scan]sweep elevation angle, degrees; NaN for padding

    The group’s block is {"version": 1, "product": "n0b", "round": "2026-10-05T08:05:00Z", "sites": ["TLX", "TBW", …]}: the product, the round’s UTC minute, and the sites in index order by the source’s own identifiers. A window store carries "rounds": ["2023-03-24T23:05:00Z", …] in place of round: its rounds’ UTC minutes in chunk order, oldest first. A block carrying both or neither is refused.

  • Mapping a gate to the ground is the reader’s: the profile fixes the coordinates, not the projection. The reference reader uses the standard-refraction (4/3 effective earth radius) beam model from the site’s WGS84 position.

  • Reading one site’s round: the group, the array’s zarr.json, then the shard index (suffix range) and the site’s inner chunk of that round; a product that publishes the chunk spans (nexrad.md §4) lets a reader skip the index and read the chunk directly, one range per site per round in either kind of store.

Network store

A network store carries a quantity that lives on the reaches of a river network — one value per reach per frame — instead of on a grid. It is the profile’s third branch and the one a river case writes (river.md); it has no .xue counterpart and is never derived from a bundle. The reaches’ geometry is not in the store: it is a GeoParquet file beside it, cut so that one index serves both. Everything in “Array metadata” and “Reading” applies except where this section says otherwise: the shard, the index, the codecs and the reading of an inner chunk are the same; the dimensions, the chunking and the attributes are its own.

  • A store holds one track: one product over one run of frames, an analysis window or one forecast cycle. A network store is never shared. The group’s attributes carry a xue_network block in place of xue and xue_profile; its version is this branch’s version, 1. A reader tells the branches apart by which block is present and refuses a group carrying more than one of xue (or xue_bundles), xue_polar, xue_network and xue_columns, or a version it does not implement.

  • The block:

    "xue_network": {
      "version": 1, "model": "NWM v3.0", "product": "short_range",
      "runTime": "2025-07-04T09:00:00Z",
      "time": { "unitSeconds": 3600, "firstFrameOffset": 1, "frameCount": 18, "frameStep": 1 },
      "geometry": { "path": "reaches.parquet", "byteLength": 1114663, "crc32": "de943f65",
                    "featureCount": 10940, "rowGroupRows": 4096 },
      "variables": [ { "numericId": 1, "id": "streamflow", "label": "Streamflow", "unit": "m3/s",
                       "quantization": { "type": "log1p", "…": "…" } } ]
    }

    runTime is the cycle of a forecast and the first frame of an analysis window. time follows bundle.md, “Time Axis”, exactly: offsets from runTime on the coarsest unit that fits, frameStep when uniform, frameOffsets otherwise. geometry names the GeoParquet by a path relative to the directory holding the store, its length and the CRC-32 of its bytes, its row count (featureCount) and its row group length (rowGroupRows). variables lists the one variable, streamflow, with its codebook.

  • One data array, streamflow, uint8 of shape [frameCount, featureCount] with dimension_names ["time", "feature"], carrying exactly one sharding_indexed codec. Feature f is row f of the GeoParquet.

  • Chunking. The inner chunk is [6, rowGroupRows]: six frames of one row group’s reaches, time chunk t covering frames [6t, 6t + 6) as in a grid store. The outer chunk (shard) is the whole array rounded up to whole inner chunks, [6 × ceil(frameCount / 6), rowGroupRows × ceil(featureCount / rowGroupRows)], so c/0/0 is the only data object; its index holds one pair per inner chunk in row-major order, time chunk by time chunk and within each the row groups in order, followed by the CRC-32C of the pairs. Frames past the axis and features past the last row are stored as fill_value. One frame is one contiguous run of the shard (every row group of one time chunk), and one reach’s series is one chunk per time chunk.

  • Inner codec chain [xue.delta{axis: 0}, bytes, zstd] (level 15, content checksum): consecutive hours of one reach differ by a code or two. A reader must accept [bytes, zstd] as well. Index codecs [bytes little-endian, crc32c], index_location end, and the never-written pair are as above.

  • fill_value is the codebook’s nodataCode, 255.

  • Codes. The log1p codebook of bundle.md with trace 0.01, scale 1.0 and maximum 100000 (m³/s): code 0 is a flow below 0.01 m³/s, codes 1–253 the logarithmic grid, about 4.7 % apart, 254 a flow above the maximum, and 255 no value — a reach the model does not route, such as one inside a lake, or a time it has none. The data array’s attributes repeat the variable as xue_network.variable and carry _FillValue 255; there is no CF packing, as for any log1p variable.

  • Side arrays, beside the data array, each one chunk under [bytes] (little-endian), as a grid store’s coordinates are:

    arraydtypeshapemeaning
    feature_idint64[feature]the reach’s identifier in its source (NWM feature_id)
    timeint64[time]the frame’s valid time, Unix seconds UTC
    baseflowfloat32[feature]the reach’s usual flow before the event, m³/s; NaN where unknown
  • The group carries consolidated metadata, written last, and the store’s crc32 is the CRC-32 of its group document, as for a grid store.

The GeoParquet. The reaches are a GeoParquet 1.1 file: column geometry, WKB LineString in WGS84 longitude and latitude (no crs key, GeoParquet’s OGC:CRS84 default); a covering.bbox column bbox, a struct of xmin, ymin, xmax, ymax in float32 rounded outward so the box always contains the line; and feature_id (int64), order (int8, the stream order) and gage (string, nullable: the gauge on the reach, if any), in the order feature_id, order, gage, geometry, bbox. Rows are sorted along a Hilbert curve by the length-weighted centroid of each line (a 2^16 grid over the network’s extent), and cut into row groups of exactly rowGroupRows rows (4096), the last one shorter, zstd-compressed. Row group g holds rows [g × rowGroupRows, (g + 1) × rowGroupRows), the reaches of the store’s feature chunk g, so a reader that wants one area reads the row groups whose bbox statistics meet it and then exactly the matching inner chunks, and a reader that has a row from a click knows the chunk without a lookup.

Measured on the Guadalupe 2025 case (10,940 reaches of NWM v3.0, Hilbert order): the GeoParquet is 1,114,663 bytes with a 6,579-byte footer and row groups of 415,954, 394,267 and 297,851 bytes. The 73-frame hourly analysis shard is 145,650 bytes under the delta chain and 163,086 under [bytes, zstd]; the 18-frame forecast shard 33,631 and 38,768. The side arrays weigh 132 KB per store, most of the store at these sizes: whole stores are 286,352 and 173,890 bytes.

Reading one frame: the group, the array’s zarr.json, the shard index (suffix range), then one range covering the frame’s time chunk. Reading one reach’s series: the same index, then one chunk per time chunk at the reach’s row group.

Column store

A column store carries a forecast run’s isobaric families and the surface fields a profile stands on, cut so that one cell’s column, every level over the whole axis, is one chunk per quantity. It is the profile’s fourth branch. It is cut from the codes of the run’s published stores and holds exactly those codes: nothing in it is quantized again. A uint8 array is cut from the map stores, so a value read from it is the value the map shows for that cell; a uint16 surface array is cut from its bundle’s series store (“Series store”), so a value read from it is the one a pinned point reads there. A run without one is complete; a reader then takes a column from the map stores, one bundle at a time. Everything in “Array metadata” and “Reading” applies except where this section says otherwise.

  • One store per run, <model>.<run>/columns.zarr, full resolution only. It is never shared, never segmented and has no reduced tiers. The manifest names it in columns (see “Manifest”).
  • The group’s attributes carry an xue_columns block in place of xue and xue_profile; its version is this branch’s version, 1. A reader tells the branches apart by which block is present and refuses a group carrying more than one, or a version it does not implement.

Arrays. An array is one quantity. A levelled array holds it on several isobaric surfaces, shape [frameCount, levelCount, height, width], dimension_names ["time", "level", "latitude", "longitude"]. A surface array holds one field that has no level, shape [frameCount, height, width], dimension_names ["time", "latitude", "longitude"]. An array on a time axis other than the store’s has the dimension time_<array> in place of time, and a levelled array whose levels are not the first levelled array’s has level_<array> in place of level, <array> being its id. Version 1 is for regular and Gaussian grids; a run on a projected grid has no column store.

  • data_type is uint8, except on a surface array whose variable its bundle’s series store widens to sixteen-bit codes and whose bundle the run ships a series store of: that array is cut from the series store and is uint16, as the series store’s array is. A levelled array is always uint8. As in a grid store, data_type is uint16 exactly when the members’ nodataCode exceeds 255, and a reader refuses an array whose type is not the one its members’ codebook needs, a uint16 levelled array, and a code of the codebook or a fill_value the type does not hold.

  • Each array carries exactly one codec, sharding_indexed.

  • Inner chunk: [frameCount, levelCount, blockHeight, blockWidth] (surface [frameCount, blockHeight, blockWidth]): the whole axis and every level of one block of cells. The writer’s block is 8 x 8; a reader takes it from the array document.

  • Outer chunk (shard): [frameCount, levelCount, shardHeight, shardWidth] (surface [frameCount, shardHeight, shardWidth]). shardHeight and shardWidth are whole multiples of the block and shardWidth is at least the grid’s width, so the shards are bands of rows. The writer’s shardHeight is 96, twelve blocks, and its shardWidth the width rounded up to whole blocks. The band keeps an object small enough (a few hundred MB at most) for a CDN that will not cache one over 512 MB, and its index at 34,564 bytes on a 0.25-degree global grid where one index over the whole array would be 262 KB.

  • Shard s holds rows [s × shardHeight, (s + 1) × shardHeight) and is the object c/0/0/<s>/0 (surface c/0/<s>/0), s from 0 to ceil(height / shardHeight) − 1. The last band’s chunk may run past the grid, as the outer chunk of a grid store may.

  • Inner chunks of a shard are in row-major order over its blocks: block (r, c) of a shard is index entry r × (shardWidth / blockWidth) + c. A block partly past the grid is stored whole, its cells past the grid as fill_value. A block wholly past the grid is never written: its index pair is 2^64 − 1 twice. Any other block is written, whatever it holds. A reader reads a never-written block as fill_value.

  • Shard index: 16 × chunksPerShard + 4 bytes with the layout and the CRC-32C of a grid store’s, chunksPerShard being (shardHeight / blockHeight) × (shardWidth / blockWidth). Offsets are from the start of the shard. index_location is "start", so the index is the plain range bytes=0-(N−1), which a browser sends without the CORS preflight a suffix range costs. A reader accepts "end" too.

  • Inner codec chain: [xue.delta{axis: 0}, bytes, zstd] (level 6, content checksum) on an array whose variables are all predicted from the previous frame, [bytes, zstd] on one whose variables are all RAW, and on a one-frame array. bytes is {"name": "bytes"} on a uint8 array and {"name": "bytes", "configuration": {"endian": "little"}} on a uint16 one; a reader accepts the order unsaid on uint8 only and refuses big. On uint16 the delta is modulo 65536. The level is 6 where the other stores’ is 15 for the cut time: a run’s whole column store is compressed on one machine after the run is live. Measured on an M3 Max, level 6 is 7 times faster than 15 for 8 % more bytes on an ECMWF temperature, and 4 times faster for 1.4 % more on a GFS relative humidity. A reader does not depend on the level. The predictor is the variable’s, the one the series store uses; an array mixing the two is an error in the writer. The delta runs along time only: a further difference along the levels made the arrays 20 % larger. A reader follows the codec chain.

  • fill_value is the variables’ nodataCode, which is the same for every variable of one array (an error in the writer otherwise).

Group document. The block:

"xue_columns": {
  "version": 1, "model": "GFS", "product": "pgrb2.0p25",
  "runTime": "2026-11-24T00:00:00Z", "profile": "balanced",
  "time": { "unitSeconds": 3600, "firstFrameOffset": 0, "frameCount": 161, "frameOffsets": [ "…" ] },
  "grid": { "…the bundle metadata's grid block…" },
  "arrays": [
    { "id": "tmp", "levels": [1000, 975, 950],
      "members": [ { "bundle": "tmp1000", "variable": { "…" } },
                   { "bundle": "tmp975", "variable": { "…" } },
                   { "bundle": "tmp950", "variable": { "…" } } ],
      "shards": ["8a1f0c3e", "…"] },
    { "id": "orog", "time": { "unitSeconds": 3600, "firstFrameOffset": 0, "frameCount": 1, "frameStep": 1 },
      "members": [ { "bundle": "orog", "variable": { "…" } } ],
      "shards": ["0d3a2e6b", "…"] }
  ]
}
  • model, product, runTime, profile and grid are those of the bundles’ metadata, which every member shares; time is the time block of the first array’s bundles (bundle.md, “Time Axis”). An array whose bundles’ block differs carries its own time. All members of one array share one axis.
  • arrays lists the arrays; the writer lists levelled arrays first. An id matches ^[a-z][a-z0-9]*$, is unique and is none of time, level, latitude and longitude. A surface array’s id is its variable’s.
  • levels is present on a levelled array and only there: positive integers in hPa, strictly descending. members is index for index with it. A surface array has exactly one member.
  • A member names the bundle its codes come from, which is the id a reader asks by, and carries that bundle’s variable object verbatim (“Metadata JSON”), codebook included: on a uint16 array the series store’s variable, its sixteen-bit quantization with it. The codebooks of one array’s levels may differ in offset and scale. A variable id occurs once in a store. numericId inside a member is the bundle’s own and means nothing here. Two arrays may name one bundle: a wind bundle’s two components are the arrays ugrd and vgrd.
  • shards holds the CRC-32 of each of the array’s shard objects, in order. It makes the group document, and so the store’s crc32, depend on every byte of the store: two stores of one run that differ in any object differ in their ?v=. The writer writes it; a reader needs it for nothing.
  • consolidated_metadata is present, inline, and holds every array document verbatim: the data arrays in the order of arrays, then time, level (where a levelled array exists), latitude, longitude, then each time_<array> and level_<array> in the order of arrays. A reader takes an array’s document from it and fetches no <array>/zarr.json; it holds each data array’s document to the block (type, shape, dimension names, one sharding_indexed codec, chunk shapes, chain, index codecs, fill_value) before using it. The document is serialized as every document of the profile is and is written last; its CRC-32 is the store’s crc32.

Array attributes. xue_columns, {"array": "<id>"}; long_name and units where every member has the same label and the same unit; scale_factor and add_offset only where every member has the same linear codebook (a levelled array whose levels differ has no CF spelling, and a client dequantizes it by the members); _FillValue. In that order.

Coordinates. time, latitude and longitude are a grid store’s (“Coordinates”), the true Gaussian rows included; time_<array> is the same encoding over that array’s axis. level (and level_<array>) is int32 hPa in the array’s order, one chunk under [bytes] (little-endian), fill 0, attributes standard_name: "air_pressure", units: "hPa", positive: "down".

Reading one cell’s column. Read the group document once per run. For each array, s = floor(row / shardHeight); fetch that shard’s index once and verify its CRC-32C; the cell’s block is entry floor((row − s × shardHeight) / blockHeight) × (shardWidth / blockWidth) + floor(column / blockWidth). Fetch [offset, offset + nbytes), decompress it to exactly frameCount × levelCount × blockHeight × blockWidth codes (bytes, or little-endian u16 on a uint16 array), replay the running sum along time under the delta chain, and take the cell at (row mod blockHeight, column mod blockWidth): frameCount × levelCount codes. A value is the member’s codebook applied to its level’s codes. Neighbouring cells of a block need no further request.

The size against the map store depends on the axis. On one GFS run’s fifteen levels, hourly over most of the axis, the five levelled arrays measured 2.99 GB at level 15 against the map store’s 2.97 GB, one cell’s blocks about 0.18 MB in five reads; blocks of 4 x 4 and 16 x 16 cells were 8 % and 3 % larger. On ECMWF’s three-hourly axis the tmp array measured 32 % over the map store’s arrays. The delta is smaller than RAW on the GFS run and was 6 % larger on that array; an array still takes the one chain its variables’ predictor says. Other fields and sources were not measured.

Writing. Two writers, the reference (xuebuild/columns.py, write_column_store) and the wheel’s (xue.write_columns), take one plan document, read the rest from the map stores it names and write the same bytes for one libzstd version, whatever number of processes or threads cut the shards. build-columns builds the plan from the source’s column_arrays, the registry and the run’s manifest, runs either writer and attaches the store to the run. A surface array’s member names its bundle’s series store (the manifest entry’s series path) where that store widens the variable (it has a series codebook, docs/registry.md seriesQuantization, and its bundle is one of the source’s series bundles) and the manifest names one; every other member names the map store. The plan:

{ "columnsPlan": 1, "arrays": [
  { "id": "tmp", "predictor": "previous", "levels": [1000, 975],
    "members": [ { "bundle": "tmp1000", "variable": "tmp1000", "store": "bundles.zarr" },
                 { "bundle": "tmp975", "variable": "tmp975", "store": "bundles.zarr" } ] },
  { "id": "orog", "predictor": "previous",
    "members": [ { "bundle": "orog", "variable": "orog", "store": "bundles.zarr" } ] } ] }

store is a map store of either profile, or a bundle’s series store, relative to the run’s directory; of it a writer opens zarr.json, whose consolidated metadata holds the array documents, and <variable>/c/0/0/0. A series store’s array is read as any grid store’s is: its tiles are its blocks and its one time chunk the whole axis. levels is present on a levelled array only. A writer refuses a plan whose columnsPlan is not the integer 1, an unknown key or predictor, no array, an array id or a variable twice, an id the block would refuse, levels that are not strictly descending positive integers of at most 2147483647, one per member, or a surface array whose one member is not its id; members whose model, product, runTime, profile or grid differ; members of one array whose time or nodataCode differs; a projected grid; a map array whose shape is not its bundle’s [frameCount, height, width], or that is more than one shard; a nodataCode the array’s data_type does not hold, or a data_type that is not the one its codebook needs; a levelled array with a uint16 member; and an output directory that exists. A cut that fails removes its output. Values are equal here when they are the same JSON: 1 and 1.0 differ, key order does not matter. An array that mixes predicted and RAW variables has no plan, nor has a store whose members’ published isobaric surfaces are not its levels, and build-columns attaches no store with an object over 512 MB.

Besides the codes, the bytes are fixed by these choices.

  • The block’s keys, in order: version, model, product, runTime, profile, time, grid, arrays; an array’s: id, time (if its own), levels (if levelled), members, shards; a member’s: bundle, variable. time, grid and variable are the bundle metadata’s objects with their keys in their order and their numbers as the map store’s group document has them: an integer stays one, and a float is its shortest round trip with a fractional part. The two writers’ JSON libraries spell a float below 1e-4 or from 1e16 in magnitude (zero aside) differently, so no such number may occur in a codebook; the registry admits none. profile is copied with the other three. The arrays are in the plan’s order and the store’s time is the first one’s.
  • The group document’s keys: zarr_format, node_type, attributes (holding xue_columns alone), consolidated_metadata (kind, must_understand, metadata), as in a grid store.
  • A data array’s document is a grid store’s in every key and its order (zarr_format, node_type, shape, data_type, chunk_grid, chunk_key_encoding, fill_value, codecs, attributes, dimension_names; in the sharding configuration chunk_shape, codecs, index_codecs, index_location), with the attributes of “Array attributes” in that order. scale_factor and add_offset are the scale and offset of the one quantization object, of type linear, that every member carries identically. A coordinate’s document is a grid store’s coordinate document.
  • A shard is its index, then the payloads back to back in index order, the first at offset 16 × chunksPerShard + 4, with nothing between or after them. A payload is one Zstandard frame over one whole block in C order (frame, level, row, column), little-endian on a uint16 array, compressed alone, level 6, content checksum and content size on. Under the delta chain the block is differenced along frames with its padding cells included, which are fill_value in every frame. Every block the grid reaches is written, one that is all fill_value too; the blocks of a band past the grid’s last row are the index entries after the written ones and are 2^64 − 1 twice.
  • A cell of a map array’s chunk that was never written is fill_value.

Equivalence with the container

A build asked for .xue containers as well (format.md) writes them and the stores from the same codes, so the two carry identical codes by construction. tests/test_zarr.py holds a NumPy-only read-back of every frame to the codes a store was written from, and the container parity test (tests/test_native.py) builds both deliveries and reads the container back through the wheel’s decoder. Compressed bytes are identical where the layouts coincide (a store chunk covering exactly one of the bundle’s groups on a tile the grid does not clip) under the delta chain for a predicted variable and under either chain for a RAW one.


Part of the Xue specification, licensed under CC BY 4.0.

2 - Xue Bundle Metadata and Codes

A Xue bundle is one or more variables of one forecast run or observation window, quantized to single-byte codes on the source’s native grid (a series store’s widened variables to sixteen-bit ones, “Series codebooks”). This document is normative for what every bundle carries whatever writes it down: the metadata JSON and its schema versions, the quantization codebooks, and the modulo-256 residual arithmetic. The published layout is a Zarr v3 store (zarr-profile.md); the .xue container (format.md) is the legacy layout every decoder keeps reading. Both carry the codes and the metadata specified here unchanged.

The Python encoder (xuebuild/metadata.py, xuebuild/quantize.py, xuebuild/temporal.py) is the reference; the native encoder and the Rust decoder (rust/xue) are held to it by cross-language golden and parity tests.

Conventions

  • Metadata is UTF-8 JSON.
  • All quantization rounding is round-half-up: round(x) = floor(x + 0.5). Every rounded quantity in this format is non-negative, so this equals round-half-away-from-zero. Implementations must not use round-half-even (the behavior of Python’s built-in round and the IEEE 754 default); a mismatch changes codes for values landing exactly on a half step.

Metadata JSON

The shape of a schemaVersion 3 or 4 document is schemas/bundle-metadata.schema.json, which is normative: a document that does not match it is not version 3 or 4 metadata. The sections below give the meaning of each field and the rules across fields that a schema cannot say, which every reader checks after the shape: the lowest version that fits, the one encoding of a time axis, unique numericIds, and the halves of a GRIB2 value that are null together. Versions 1 and 2 have no schema; their rules are this section’s prose alone. tests/test_schemas.py holds the frozen container corpus (tests/fixtures/v1/), the synthetic run’s containers, posters and stores, and the committed stores to it; the shell checks a version 3 document with the validator generated from it (web/src/schema/generated/), and the Rust decoder’s tests tie the fields it reads to the names the schema gives.

Example (a single-variable GFS temperature bundle):

{
  "schemaVersion": 3,
  "model": "GFS",
  "product": "pgrb2.0p25",
  "runTime": "2026-08-15T06:00:00Z",
  "time": {
    "unitSeconds": 3600,
    "firstFrameOffset": 0,
    "frameStep": 1,
    "frameCount": 121
  },
  "grid": {
    "width": 1440,
    "height": 721,
    "layout": "row-major",
    "rowOrder": "north-to-south",
    "columnOrder": "west-to-east",
    "firstLongitude": -180.0,
    "firstLatitude": 90.0,
    "longitudeStep": 0.25,
    "latitudeStep": -0.25,
    "wrapLongitude": true
  },
  "variables": [
    {
      "numericId": 1,
      "id": "tmp2m",
      "label": "2 meter temperature",
      "unit": "°C",
      "parameter": {
        "discipline": 0,
        "parameterCategory": 0,
        "parameterNumber": 0,
        "typeOfFirstFixedSurface": 103,
        "scaleFactorOfFirstFixedSurface": 0,
        "scaledValueOfFirstFixedSurface": 2
      },
      "quantization": {
        "type": "linear",
        "offset": -60.0,
        "scale": 0.5,
        "minimumCode": 0,
        "maximumCode": 220,
        "nodataCode": 255
      }
    }
  ]
}

A bundle may declare more than one variable; the two 10 m wind components ship together in one two-variable wind10m bundle. Every variable’s quantization block must be one of the codebook types below.

numericId is a handle, unique within the bundle and meaningless outside it: the variable’s position in a store’s group document, its variableId in a container’s index (format.md, “variableId is file-local”). The encoders here number the variables 1…n in the order they are listed.

Metadata Schema Version

schemaVersion is the lowest metadata schema a reader must implement to parse the file. It versions the metadata JSON only; the layout that carries it is versioned on its own (a store’s xue_profile, a container’s FixedHeader version).

schemaVersionIntroducesRecognized by
1—a uniform whole-hour time axis declaring stepHours
2Explicitly listed forecast hoursa whole-hour time axis listing hours
3Per-variable GRIB2 identity, and a time axis in units it namesa parameter block on every variable (optionally with band / producer / aerosol / ensemble beside it), and a time block declaring unitSeconds
4A grid on a map projectiona grid.projection block in place of the four regular grid fields; variables and time block as in version 3

An encoder must emit the lowest version that can express the file: the highest version any single feature of the metadata requires, and no higher. For the versions defined so far that is 4 when the grid carries projection, otherwise 3 when the variables carry parameter, otherwise 2 when the axis lists hours, otherwise 1. A schemaVersion 3 file with a uniform axis is still version 3, since the parameter block sets its floor, and a parameter block is invalid below version 3. A file on a regular grid never declares version 4, and a reader that does not implement version 4 refuses a projected file rather than misplacing it.

Decoders enforce both sides of that rule: they must reject a schema version they do not implement, and must reject a declared version higher than the lowest the metadata needs (see Error Handling). Rejecting unknown versions makes an older decoder reject a file it would otherwise misread; rejecting overdeclared versions gives any given metadata exactly one valid encoding. Every already published bundle stays valid and byte-identical under both rules.

Schema version 3 is what the reference encoder writes; versions 1 and 2 remain readable and are published by nothing. Because older decoders reject a version they do not implement, a decoder implementing a new version must be deployed before the first file at that version is published.

Variable Identity

From schemaVersion 3, every variable declares what it is in GRIB2’s own terms, so a reader can recognize a field without matching on id strings. The block is required on every variable of a version 3 file and invalid below it.

The parameter block is a variable’s identity. Neither variableId (a file-local handle) nor the id string carries it; the parameter triple and the fixed surface do, and two files describe the same field exactly when their blocks agree.

FieldGRIB2 originRule
disciplineSection 0, octet 70–255
parameterCategorySection 4, code table 4.10–255
parameterNumberSection 4, code table 4.20–255
typeOfFirstFixedSurfaceSection 4, code table 4.50–255
scaleFactorOfFirstFixedSurfaceSection 4−127…127, or null
scaledValueOfFirstFixedSurfaceSection 40…4294967294, or null
typeOfStatisticalProcessingSection 4, code table 4.100–255, optional

The surface value is scaledValueOfFirstFixedSurface × 10^−scaleFactorOfFirstFixedSurface in that surface’s own unit. A surface that carries no value (“entire atmosphere”, type 10, or a source that encodes the value as missing) writes both halves as null, which is how GRIB2 encodes it; one half alone is invalid. Both keys are always present.

typeOfStatisticalProcessing is absent for an instantaneous field and present when the values are a statistic over the step. It distinguishes a prate bundle whose source carried an instantaneous rate (GFS pgrb2) from one derived by de-accumulating, de-averaging or differencing a window’s total (ECMWF, GFS sflux, WOOF-NAM), which are otherwise the same parameter.

No other keys are allowed; a version 3 decoder must reject an unknown one, so any later addition is a new schema version. GRIB2’s local-use ranges (parameter numbers and surface types 192–254) need no special treatment: a local number is an ordinary number, and several variables below use one.

The identity written is the registered one, whatever record the encoder read. Centres write the same quantity differently (ECMWF encodes its mean sea level pressure as plain pressure on the mean sea level surface, its gust as an interval maximum on the 10 m surface, its skin temperature as a parameter of its own with no surface value), and the encoder’s registry accepts such a record as an alias (another parameter number on the same surface) or an alternate (a whole other identity: surface, value, statistical process, unit) of the variable, so that GFS and ECMWF publish one chart under one parameter block. The table notes each such acceptance; none of them is ever written.

The identities this pipeline produces are below. This is not an admission list: a decoder validates the shape of a parameter block, never its contents against this table, and a file naming a parameter not listed here is a well-formed file. The table says which fields a chart-aware reader (one with a palette, a contour interval or a legend for the quantity) can recognize; anything else it can still decode.

idParameterSurfaceNotes
tmp2m0 / 0 / 0103, 2 m
prate0 / 1 / 71, 0typeOfStatisticalProcessing: 0 when derived (ECMWF, sflux)
ugrd10m0 / 2 / 2103, 10 m
vgrd10m0 / 2 / 3103, 10 m
ugrd100m / vgrd100m0 / 2 / 2, 0 / 2 / 3103, 100 m100 m wind components, the turbine hub height; the wind100m bundle
dswrf0 / 4 / 1921, 0NCEP local parameter
cref0 / 16 / 510, no valueComposite reflectivity, entire atmosphere; observed (the radar mosaic) or forecast (HRRR’s REFC, NCEP-local 0 / 16 / 196, accepted on input and never written)
rqi209 / 8 / 0102, 0 mRadar quality index of the MRMS mosaic, 0–1, unitless. MRMS-local (discipline 209): no WMO parameter carries it, so the local identity is the one written
gust0 / 2 / 221, 0Instantaneous surface wind gust (GFS). ECMWF’s 10fg / 10fg3, the same parameter on the 10 m surface (103, 10 m) as the maximum over the interval ending at the frame, product template 4.8, is accepted on input under this identity and never written; on ECMWF the series starts at the first step
tcdc0 / 6 / 110, no valueTotal cloud cover, entire atmosphere; the instantaneous record, not the interval average. ECMWF’s tcc, the ECMWF-local 0 / 6 / 192 on the ground surface as a 0–1 fraction, is accepted on input, scaled to percent, and never written
cape0 / 7 / 61, 0Surface-based CAPE (not the mixed-layer variants on surface type 108). ECMWF’s mucape, the same parameter departing from surface type 17, the most unstable parcel’s level, is accepted on input and never written
cin0 / 7 / 71, 0Surface-based convective inhibition in J/kg, never positive (not the mixed-layer variants on surface type 108)
lcdc / mcdc / hcdc0 / 6 / 3, 0 / 6 / 4, 0 / 6 / 5214 / 224 / 234, no valueLow / middle / high cloud cover, each its own parameter on its own layer surface; the instantaneous records
vis0 / 19 / 01, 0Surface visibility, quantized in km
dpt2m0 / 0 / 6103, 2 m2 m dew point
aptmp2m0 / 0 / 21103, 2 mNCEP’s 2 m apparent temperature
pwat0 / 1 / 3200, no valuePrecipitable water, the column mass in kg/m² (a millimetre of water); NCEP writes it on its local “entire atmosphere (considered as a single layer)” surface, type 200, which carries no value like the WMO type 10
hpbl0 / 3 / 1961, 0Planetary boundary layer height in metres, NCEP’s local number (the WMO table’s 0 / 3 / 18 is not what pgrb2 carries)
orog0 / 3 / 51, 0Orography in metres, a static one-frame bundle. ECMWF open data’s surface geopotential, 0 / 3 / 4 on the same surface, is accepted on input and divided by g; DWD’s and Météo-France’s geometric height, 0 / 3 / 6 in metres, is accepted as it is
ptype0 / 1 / 191, 0Precipitation type: one categorical field the encoder derives from the four flags below, in WMO code table 4.201’s own values (1 rain, 3 freezing rain, 5 snow, 8 ice pellets, 0 none). Never fetched; the flags are inputs only and reach no bundle
crain / cfrzr / cicep / csnow0 / 1 / 192–1951, 0The four 0/1 categorical precipitation-type flags pgrb2 carries (rain, freezing rain, ice pellets, snow; NCEP-local numbers), input-only, combined into ptype
tmpsfc0 / 0 / 01, 0Surface (skin) temperature, the SST over water. ECMWF’s skt, its own parameter 0 / 0 / 17 with no surface value, is accepted on input and never written
icec10 / 2 / 01, 0Sea ice cover, a 0–1 proportion quantized in percent (GFS only)
icetk10 / 2 / 11, 0Sea ice thickness; ECMWF’s sithick carries no surface value and a bitmap over land (GDAL’s 9999, the bottom of the codebook), and is accepted on input
htsgw10 / 0 / 31, no valueSignificant height of combined wind waves and swell (GFS-Wave, ECMWF swh); WAVEWATCH III writes the surface value as 1 and ECMWF none, so none is declared and any is accepted
perpw10 / 0 / 111, no valuePrimary wave mean period (GFS-Wave); ECMWF’s peak period pp1d, 10 / 0 / 34, is the nearest neighbour and accepted on input under this identity
dirpw10 / 0 / 101, no valuePrimary wave direction, degrees true the waves come from (GFS-Wave); ECMWF’s mean wave direction mwd, 10 / 0 / 14, is accepted the same way; a record’s 360 is reduced to 0
wvhgt / wvper / wvdir10 / 0 / 5, 10 / 0 / 6, 10 / 0 / 41, no valueSignificant height, mean period and direction (degrees true the waves come from) of the wind waves (GFS-Wave); the direction is input-only, reduced like dirpw, and reaches a bundle only inside uwindwave / vwindwave
swhgt / swper / swdir10 / 0 / 8, 10 / 0 / 9, 10 / 0 / 7241, 1Significant height, mean period and direction of the first (strongest) swell partition (GFS-Wave). Type 241 is NCEP’s local “ordered sequence of data” surface, its value the partition’s rank; only rank 1 is matched. The direction is input-only and reaches a bundle only inside uswell / vswell
tsoil<n>2 / 0 / 2106, the layer’s upper bound in mSoil temperature in layer n (1–4) counted from the surface, in °C. The registered surface is GFS’s (Noah layers 0–0.1, 0.1–0.4, 0.4–1 and 1–2 m, so 0, 0.1, 0.4 and 1); ECMWF’s sot, the WMO 2 / 3 / 18 on its soil level surface (151) with layer n at value n − 1 (IFS layers 0–7, 7–28, 28–100 and 100–289 cm), is accepted on input and never written. The id is the layer’s index, not its depth: which depths a layer spans is the source’s (sources.md). Water carries no soil: the record’s bitmap there becomes the bottom of the codebook, code 0, one step below every real value (GFS, which writes the ice’s temperature over sea ice; the IFS writes the model’s value over the sea)
soilw<n>2 / 0 / 192106, the layer’s upper bound in mVolumetric soil moisture in layer n, total (liquid and frozen) water in m³/m³, NCEP’s local SOILW (not the liquid part, SOILL). ECMWF’s vsw, the WMO 2 / 0 / 25 on its soil level surface as for tsoil<n>, is accepted on input and never written. Water is code 0 as for tsoil<n> (GFS, which also masks the sea ice and writes 1 over the ice sheets, and AIFS; the IFS writes 0 over the sea)
uwave / vwave10 / 0 / 250, 10 / 0 / 2511, no valueWave vector components in metres: the significant wave height laid along the direction the waves travel, derived by the encoder from htsgw and dirpw as the wind’s (-h sin θ, -h cos θ); Xue-local parameter numbers
uwindwave / vwindwave10 / 0 / 252, 10 / 0 / 2531, no valueWind-wave vector components, derived from wvhgt and wvdir the way uwave / vwave are; Xue-local parameter numbers
uswell / vswell10 / 0 / 254, 10 / 0 / 255241, 1Swell vector components of the first partition, derived from swhgt and swdir the same way, on their inputs’ surface; Xue-local parameter numbers
prmsl0 / 3 / 1101, no valueMean sea level pressure, the quantity ECMWF calls msl and encodes as 0 / 3 / 0 on this surface, and HRRR writes as its MAPS reduction MSLMA, 0 / 3 / 198; both accepted on input, never written (not NCEP’s MSLET, 0 / 3 / 192)
hgt<level>0 / 3 / 5100, <level> hPa in PaGeopotential height, one variable per isobaric surface
tmp<level>0 / 0 / 0100, <level> hPa in PaTemperature on the isobaric surface
rh<level>0 / 1 / 1100, <level> hPa in PaRelative humidity on the isobaric surface
spfh<level>0 / 1 / 0100, <level> hPa in PaSpecific humidity on the isobaric surface, quantized in g/kg
ugrd<level> / vgrd<level>0 / 2 / 2, 0 / 2 / 3100, <level> hPa in PaWind components on the isobaric surface
uqflx<level> / vqflx<level>0 / 1 / 250, 0 / 1 / 251100, <level> hPa in PaWater vapour flux components, q·V/g in g·cm⁻¹·hPa⁻¹·s⁻¹; Xue-local parameter numbers
vvel<level>0 / 2 / 8100, <level> hPa in PaVertical velocity ω in Pa/s on the isobaric surface
relv<level>0 / 2 / 12100, <level> hPa in PaRelative vorticity in 10⁻⁵ s⁻¹ (the record’s s⁻¹ times 10⁵). Registered on 925, 700, 500 and 250 hPa only
thetae<level>0 / 0 / 3100, <level> hPa in PaEquivalent potential temperature in K, derived by the encoder (Bolton 1980) from the temperature and specific humidity on the surface; GRIB2’s EPOT number
cat<level>0 / 19 / 29100, <level> hPa in PaClear-air turbulence as an eddy dissipation rate in m^(2/3)/s: the Ellrod TI1 index (vertical wind shear times total deformation) derived by the encoder from the wind and height on the surface and the ones bracketing it, projected per source onto the climatological EDR distribution (below); GRIB2’s CAT EDR number. Registered on 300, 250 and 200 hPa only
aod0 / 20 / 10210, no valueAerosol optical thickness at 550 nm, total aerosol (GEFS-Aerosols), dimensionless. An aerosol product (template 4.48): the aerosol block beside the parameter (below) is part of the identity — type 62000, particles smaller than 20 µm, 545–565 nm — and tells it from the other six wavelengths and five species the same parameter carries in one file
aoddust / aodsalt / aodsulf / aodorg / aodbc0 / 20 / 10210, no valueThe same optical thickness for dust, sea salt, sulphate, particulate organic matter and black carbon: the same parameter and intervals, aerosolType 62001 / 62008 / 62006 / 62010 / 62009
pm250 / 13 / 1931, 0PM2.5 surface concentration in µg/m³, NCEP’s local PMTF number; aerosol type 62000, particles smaller than 2.5 µm, no wavelength interval
pm10 / pm10dust0 / 13 / 1921, 0PM10 surface concentration in µg/m³ (NCEP’s local PMTC), total aerosol and dust alone: one parameter, aerosolType 62000 / 62001, particles smaller than 10 µm, no wavelength interval
dustsfc0 / 20 / 01, 0Surface dust concentration in µg/m³ (CMA-CW/DUST), the mass density of dust of every particle size the model carries: aerosolType 62001, no size interval and no wavelength interval (both type 255, limits null), which tells it from pm10dust

The twenty-one registered isobaric surfaces are 1000, 975, 950, 925, 900, 850, 800, 750, 700, 650, 600, 550, 500, 450, 400, 350, 300, 250, 200, 150 and 100 hPa, and every isobaric family but cat and relv is registered on all twenty-one; hgt, tmp, ugrd and vgrd go on to the stratospheric 70, 50, 30, 20 and 10 hPa. Which of them a source publishes is the source’s own list. relv is registered on 925, 700, 500 and 250 hPa. cat is registered on 300, 250 and 200 hPa: its vertical shear is taken across 250–300 hPa for cat300, 200–300 for cat250 and 200–250 for cat200, the deformation on the surface itself.

The cat<level> derivation, in float64, in this order (both encoders): centred differences on the uncropped global plane, before any crop window is cut, with R = 6371000 m, dx = R·cos φ·Δλ per row and dy = R·Δφ, the columns wrapping on a global grid; DST = ∂u/∂x − ∂v/∂y, DSH = ∂v/∂x + ∂u/∂y, DEF = √(DST² + DSH²); VWS = |V_above − V_below| / max(z_above − z_below, 1 m); TI1 = VWS·DEF; then EDR = exp(a + b·ln max(TI1, 10⁻¹²)) with b = 0.5067 / σ_L, a = −2.572 − b·μ_L, the climatological ln EDR mean and standard deviation of Sharman & Pearson (2017) and the source’s own ln TI1 fit (SourceSpec.cat_calibration); then every EDR < 0.10 (ICAO’s nil turbulence) becomes 0, 0.10 itself keeping its code. The first and last rows and every row past 85° latitude are written as 0, the codebook floor.

Within a family the variables differ only in the surface value, written in the surface’s own unit, pascals: hgt500 carries scaleFactorOfFirstFixedSurface: 0, scaledValueOfFirstFixedSurface: 50000.

The water vapour flux is not a GRIB2 field: the encoder derives it on each surface as the specific humidity (g/kg) times the wind component (m/s) over standard gravity (9.80665 m/s²), in g·cm⁻¹·hPa⁻¹·s⁻¹. GRIB2 has no standard parameter for a per-level horizontal vapour flux, so the two components take local-use numbers 250 and 251 in the moisture category, which no centre this pipeline reads from uses.

The precipitation type is derived the same way: the encoder reads pgrb2’s four 0/1 categorical flags — crain, cfrzr, cicep and csnow, its local numbers 0 / 1 / 192–195 on the ground surface — and writes one categorical field under WMO code table 4.201’s own values (0 none, 1 rain, 3 freezing rain, 5 snow, 8 ice pellets). The four are mutually exclusive in the model’s own output, so a chart of ptype never has to resolve a real disagreement; where two were set anyway, the order rain, freezing rain, ice pellets, snow decides, each later flag overriding, and both encoders share that order so the plane stays byte-identical. The four flags are input-only and reach no bundle.

Band, Producer and Aerosol

A parameter block names a quantity on a surface, which is a satellite image’s whole identity only together with the channel it was taken in: brightness temperature at the top of the atmosphere (0 / 4 / 4 on surface 8) is one parameter for every infrared channel of every imager, and a composite computed from several channels has no GRIB2 parameter at all. Nor is it an aerosol product’s whole identity: aerosol optical thickness (0 / 20 / 102 on the entire atmosphere) is one parameter for every species at every wavelength, and GRIB2 puts what tells them apart in the product definition template rather than the parameter. Three optional blocks may sit beside parameter on a variable, at the same level as it and never inside it, to carry what the parameter does not:

  • band: the spectral band and the instrument that measured it, in the fields of GRIB2 product definition templates 4.31 and 4.32 for one contributing band (the templates’ band count is 1 and is not written);
  • producer: the algorithm that derived the field from other variables;
  • aerosol: the aerosol type and the size and wavelength intervals of an aerosol product, in the fields of GRIB2 product definition template 4.48 (of which 4.44 and 4.46 are subsets).
{
  "numericId": 1,
  "id": "ir104",
  "label": "Brightness temperature, 10.4 µm",
  "unit": "K",
  "parameter": {
    "discipline": 0, "parameterCategory": 4, "parameterNumber": 4,
    "typeOfFirstFixedSurface": 8,
    "scaleFactorOfFirstFixedSurface": null, "scaledValueOfFirstFixedSurface": null
  },
  "band": {
    "satelliteSeries": 0,
    "satelliteNumber": 174,
    "instrumentType": 297,
    "scaleFactorOfCentralWaveNumber": 0,
    "scaledValueOfCentralWaveNumber": 96086
  },
  "quantization": { "type": "linear", "offset": 180.0, "scale": 0.6,
                    "minimumCode": 0, "maximumCode": 253, "nodataCode": 255 }
}
band fieldGRIB2 originRule
satelliteSeriesTemplate 4.31, Common Code Table C-50–65535
satelliteNumberTemplate 4.31, Common Code Table C-50–65535
instrumentTypeTemplate 4.31, Common Code Table C-80–65535
scaleFactorOfCentralWaveNumberTemplate 4.31−127…127
scaledValueOfCentralWaveNumberTemplate 4.310…4294967294

The central wave number is scaledValueOfCentralWaveNumber × 10^−scaleFactorOfCentralWaveNumber in m⁻¹. All five keys are required when the block is present and no other key is allowed. parameter stays the identity a reader keys on; band says which channel of which instrument measured it, and a chart-aware reader classifies a channel by its central wave number (an infrared window, a water vapour band), not by the spacecraft: the satellite succeeding at an orbital slot changes satelliteNumber and nothing else.

producer fieldRule
id^[a-z][a-z0-9]*$, the algorithm’s name
versiona non-empty string, the algorithm’s version as it names it

Both keys are required when the block is present and no other key is allowed. A produced field’s parameter uses GRIB2’s local-use ranges (category 192 and above in the discipline that fits); a reader that charts such fields tells them apart by producer.id and the parameter number together, since local numbers mean nothing across producers.

{
  "numericId": 1,
  "id": "aoddust",
  "label": "Dust aerosol optical depth at 550 nm",
  "unit": "1",
  "parameter": {
    "discipline": 0, "parameterCategory": 20, "parameterNumber": 102,
    "typeOfFirstFixedSurface": 10,
    "scaleFactorOfFirstFixedSurface": null, "scaledValueOfFirstFixedSurface": null
  },
  "aerosol": {
    "aerosolType": 62001,
    "typeOfSizeInterval": 0,
    "scaleFactorOfFirstSize": 6, "scaledValueOfFirstSize": 20,
    "scaleFactorOfSecondSize": 0, "scaledValueOfSecondSize": 0,
    "typeOfWavelengthInterval": 7,
    "scaleFactorOfFirstWavelength": 9, "scaledValueOfFirstWavelength": 545,
    "scaleFactorOfSecondWavelength": 9, "scaledValueOfSecondWavelength": 565
  },
  "quantization": { "type": "log1p", "trace": 0.005, "scale": 0.05, "maximum": 5.0,
                    "minimumCode": 1, "maximumCode": 253, "zeroCode": 0,
                    "overflowCode": 254, "nodataCode": 255 }
}
aerosol fieldGRIB2 originRule
aerosolTypeTemplate 4.48 octets 12–13, code table 4.2330–65535
typeOfSizeIntervalOctet 14, code table 4.910–255
scaleFactorOfFirstSize / scaledValueOfFirstSizeOctets 15 / 16–19−127…127 / 0…4294967294, or both null
scaleFactorOfSecondSize / scaledValueOfSecondSizeOctets 20 / 21–24as above
typeOfWavelengthIntervalOctet 25, code table 4.910–255
scaleFactorOfFirstWavelength / scaledValueOfFirstWavelengthOctets 26 / 27–30as above
scaleFactorOfSecondWavelength / scaledValueOfSecondWavelengthOctets 31 / 32–35as above

All eleven keys are required when the block is present and no other key is allowed. A limit is scaledValue × 10^−scaleFactor metres, and each of the four is a pair whose two halves are both integers or both null, the way the parameter’s fixed surface value is. An interval whose type is 255 (missing) carries no limits: its two pairs are null, whatever a record wrote in the octets (NCEP writes zeros there for a particulate matter record, and they never reach the file); an interval of any other type carries all four limits as integers. parameter stays the identity a reader keys on together with this block: two aerosol variables are the same field exactly when both blocks agree, and a reader that charts such fields recognizes a species by aerosolType and a band by the wavelength interval. A record is accepted under a registered aerosol variable only when its template carries this whole identity — the encoder compares every field — and an aerosol variable takes no aliases or alternates.

Each block is optional and any may appear without the others; a file that carries none is unchanged from before they were defined. All three are valid only from schemaVersion 3, like parameter, and none raises the version a file must declare: a version 3 reader that predates them reads the keys it knows on a variable object and ignores the rest, which is what lets them widen version 3 rather than open a version 4. A block that is present must be well formed; a reader that implements this section rejects a malformed one (see Error Handling). A block is present or absent, never null, so a variable has exactly one encoding.

Ensemble

A parameter block names a quantity; a field computed from an ensemble of forecasts of that quantity is not the quantity itself but a statistic of it — the members’ mean, their spread, a percentile of their distribution, or the share of members past a threshold — and GRIB2 says which in the product definition template (4.2 and 4.12 for a derived forecast, 4.6 and 4.10 for a percentile, 4.5 and 4.9 for a probability), not in the parameter. The optional ensemble block, beside parameter like the three above, carries it. A variable without the block is a single forecast (or an observation).

The block has exactly one of three shapes; which keys it carries says which:

"ensemble": { "derivedForecast": 4 }        // templates 4.2 / 4.12
"ensemble": { "percentileValue": 75 }       // templates 4.6 / 4.10
"ensemble": {                               // templates 4.5 / 4.9
  "probabilityType": 3,
  "scaleFactorOfLowerLimit": 2, "scaledValueOfLowerLimit": 1000,
  "scaleFactorOfUpperLimit": null, "scaledValueOfUpperLimit": null
}
ensemble fieldGRIB2 originRule
derivedForecastTemplates 4.2 / 4.12, code table 4.70–255 (0 is the unweighted mean of all members, 4 their spread)
percentileValueTemplates 4.6 / 4.100–100
probabilityTypeTemplates 4.5 / 4.9, code table 4.90–5
scaleFactorOfLowerLimit / scaledValueOfLowerLimitTemplates 4.5 / 4.9−127…127 / 0…4294967294, or both null
scaleFactorOfUpperLimit / scaledValueOfUpperLimitTemplates 4.5 / 4.9as above

A derived forecast carries derivedForecast alone and a percentile percentileValue alone. A probability carries all five of its keys, and which limits are integers is fixed by its type, whatever a record wrote in the octets the type does not use (CMA writes the threshold into both): types 0 (below the lower limit), 3 (above the lower limit) and 5 (equal to the lower limit) carry the lower limit and a null upper one; types 1 (above the upper limit) and 4 (below the upper limit) the upper limit and a null lower one; type 2 (between the limits) both. A limit is scaledValue × 10^−scaleFactor in the GRIB2 unit of the quantity the parameter names (kg m⁻² for a precipitation total, m s⁻¹ for a speed), never the variable’s unit; each limit is a pair whose two halves are both integers or both null, as for the fixed surface value.

A probability’s unit is % and its values the percentage of members past the limit; its parameter is the quantity the limit is on, a total over an interval carrying typeOfStatisticalProcessing 1. A percentile, a mean and a spread keep the quantity’s unit. parameter stays the identity a reader keys on together with this block: two variables are the same field exactly when both agree, so a reader that charts the quantity can draw an ensemble member’s percentile or mean beside a single forecast of it, and tells a spread or a probability from the quantity by the block.

ensemble is optional, valid only from schemaVersion 3, and does not raise the version a file must declare, on the same terms as band, producer and aerosol above. A version 3 reader that predates it would draw a spread or a probability as the quantity itself, so a shell that charts it is deployed before the first file carrying one is published (see contribution/delivery.md).

The ensemble fields this pipeline publishes (CMA GRAPES GEPS, cmageps; the spreads and probabilities of the ECMWF ensemble beside the deterministic run, ecmwf) are below. CMA’s central fields keep the ids of the single-forecast fields they stand in for (tmp2m, prate, prmsl, …) and carry the block that says which statistic they are: {"percentileValue": 50}, or {"derivedForecast": 0} for the 500 hPa height and the sea-level pressure, where the mean is the only statistic CMA exchanges. A field’s identity is the one in the table whichever centre wrote it: ECMWF writes its spread as derivedForecast 2 (the standard deviation with respect to the ensemble mean), its sea-level pressure spread as pressure (0 / 3 / 0) and its precipitation probabilities on the precipitation rate (0 / 1 / 52) with the limit unscaled, and is published under the identities below, as its deterministic msl is under prmsl’s.

idParameter, surfaceensembleNotes
<id>q25 / <id>q75 for tmp2m, prate, gust, tcdc, cape, tmp850as <id>percentileValue 25 / 75The quartiles of the members’ distribution, in the quantity’s unit and codebook; prateq25 / prateq75 are the six-hour totals’ quartiles divided by six, as prate is the median’s
prmslsd / hgt500sd / tmp850sdas prmsl / hgt500 / tmp850derivedForecast 4The members’ spread, in hPa / m / °C (tmp850sd from ECMWF only)
apcp24gt1, apcp24gt5, apcp24gt10, apcp24gt25, apcp24gt50, apcp24gt1000 / 1 / 8, 1, 0, typeOfStatisticalProcessing 1probabilityType 3, the lower limit 1 / 5 / 10 / 25 / 50 / 100 kg m⁻²The percentage of members whose precipitation over the 24 hours ending at the frame exceeds the limit; from the 24th hour, at every frame on cmageps and every 12 hours on ecmwf

Time Axis

The axis is a list of integer frame offsets from runTime, each worth unitSeconds seconds. The frame at offset o is valid at runTime + o × unitSeconds; a frame’s position on the axis is its index in a store’s time dimension, and o is what a container index’s frameOffset field carries.

From schemaVersion 3 the block is:

  • unitSeconds: seconds per offset unit. It must be a whole divisor of 3600, and it must be the coarsest unit that expresses every offset exactly, so an axis has one encoding. Formally, gcd(3600 / unitSeconds, offset₀, offset₁, …) must be 1. Every forecast source is hourly and declares 3600, which leaves its offsets equal to its forecast hours; the radar mosaic declares 360. A long axis is no different in kind: the CFSv2 seasonal run reaches hour 6552 in 1092 six-hourly frames, still in hourly units with frameStep: 6, well inside the [0, 65534] range an offset has.
  • firstFrameOffset and frameCount: always present.
  • Exactly one of frameStep (the axis is uniform, and frame i is at firstFrameOffset + i × frameStep) and frameOffsets (the axis does not hold one step throughout and is listed outright). A forecast run lists its offsets because the source changes cadence partway; an observation series lists them because the archive has gaps where a publication was missed.

No other field may appear in the block.

A mixed axis, hourly then three-hourly:

"time": {
  "unitSeconds": 3600,
  "firstFrameOffset": 0,
  "frameCount": 6,
  "frameOffsets": [0, 1, 2, 3, 6, 9]
}

The production GFS 240-hour axis is the same shape at full length: the 161-element list 0, 1, …, 119, 120, 123, 126, …, 237, 240.

A frameOffsets array must have exactly frameCount elements, must be strictly increasing, must begin with firstFrameOffset, and every element must be in [0, 65534]: the frameOffset field is a u16 and 65535 is the dependencyOffset sentinel. The same upper bound applies to a uniform axis’s last offset, firstFrameOffset + (frameCount − 1) × frameStep. A frameOffsets array whose steps are all equal is invalid, since a uniform axis has exactly one encoding, frameStep; this also rules out arrays of fewer than three elements. Declaring both frameStep and frameOffsets, or neither, makes the file invalid.

Schema versions 1 and 2 describe the same thing in whole hours only: firstForecastHour plus one of stepHours (uniform, version 1) and hours (listed, version 2), with unitSeconds implicitly 3600. Those files remain valid and are read unchanged. The two shapes never mix: a version 1 or 2 block carrying any version 3 field, or a version 3 block carrying any of the hour-named fields, is invalid.

A segment is a maximal run of frames with a constant step. For frames h[0] < h[1] < … < h[n-1] with steps d[i] = h[i+1] - h[i], a segment boundary falls between h[i] and h[i+1] exactly where d[i] != d[i-1]: the last frame of the old cadence closes the earlier segment and the first frame of the new cadence opens the next. A uniform axis is one segment. The GFS 240-hour axis is two: 121 hourly frames f000–f120, then 40 three-hourly frames f123–f240.

Segments are derived, never stored. They bound temporal grouping (see Temporal Prediction), and they are where the physical meaning of a derived field changes: past a step increase, a precipitation rate obtained by de-accumulating or de-averaging its source records is a mean over a longer window, so the field is smoother and its peaks lower on the far side of the boundary. That is a property of the source data; a renderer that labels units should not present the two segments as the same measurement.

A field that does not vary in time — a model’s own terrain height — is an ordinary bundle whose axis holds a single frame: frameCount 1 with frameStep 1 on the declared unit. Nothing in a bundle marks it as static; a producer that knows one (Xue’s registry does, the variable descriptor’s static flag is the fetcher’s and the converter’s, not the file’s) simply fetches and encodes the plane once rather than at every lead time. A reader draws it like any one-frame field, and a viewer that offers playback has nothing to scrub.

The encoder rotates longitude columns so the first column is -180, preserving north-to-south row order. Grids that natively start at Greenwich (the GFS surface-flux Gaussian grid) are rolled by the encoder into the same -180-first layout. A renderer applies inverse Web Mercator, converts longitude and latitude to grid coordinates, and samples this layout directly. The grid’s layout, rowOrder and columnOrder (row-major, north-to-south, west-to-east, each the only value allowed) spell this order out; every encoder writes them, and a reader accepts a document without them, since the schema names them without requiring them.

Regional Grids

A grid need not cover the world. The grid block says what a file covers, and a regional file is an ordinary file whose origin and extent name a window rather than the globe; the layout and every codebook are unchanged. The reference pipeline publishes such files for its historical showcase cases, cut out of a global run.

Two rules follow for readers, both of which a global grid satisfies trivially:

  • wrapLongitude is true only when width x longitudeStep is 360 degrees. A reader must take the horizontal wrap from this field, not from the model: sampling filters may wrap across the antimeridian only when it is true, and must clamp otherwise.
  • The grid coordinate of a longitude is (longitude - firstLongitude) mod 360 / longitudeStep. Taking the offset modulo 360 keeps a window that crosses the antimeridian contiguous: such a window declares a firstLongitude near +180 and runs past it. Coordinates outside [0, width) or [0, height) are outside the file; a renderer must draw nothing there rather than clamp.

The four regular fields are a regular grid’s. A grid carries them or a projection block (Projected Sources), never both and never neither.

Gaussian rows

A regular Gaussian grid is regular in longitude only: its latitudes are the roots of a Legendre polynomial. The regular fields describe it as evenly spaced as GDAL reports it (within 0.014 of a row of the roots on GFS-SFLUX, whose step spans its first row to its last; on CFSv2, at GDAL’s 180°/190 from the first root, drifting to half a row by the southern edge), the optional gaussian block beside them says what its rows really are, and it raises no version floor:

"grid": {
  "width": 3072,
  "height": 1536,
  "firstLongitude": -180.0,
  "firstLatitude": 89.9103,
  "longitudeStep": 0.1171875,
  "latitudeStep": -0.1171469,
  "wrapLongitude": true,
  "gaussian": { "n": 768, "firstRow": 0, "rowStride": 1 }
}
  • n is the number of latitudes per hemisphere (1 to 32768); row r of the file is row firstRow + r × rowStride of the Gaussian grid’s 2n, counted from the north. A crop raises firstRow, a reduced-resolution tier rowStride. The last row must lie on the Gaussian grid. The block has exactly these three integer fields and needs schemaVersion 3.
  • A renderer keeps sampling by the regular fields, and a reader that ignores the block draws what it always drew. The true latitudes are for what names a place: a point read’s nearest row and the cell centre it reports, and a store’s latitude coordinate. Past the edge of a crop a point belongs to the edge row for half a row’s spacing; the first and last rows of the whole Gaussian grid own the polar caps.
  • The latitudes are computed, never stored: docs/zarr-profile.md, “Coordinates”, gives the iteration.

Projected Sources

A model computed on a map projection is published on its own grid. The grid block declares the projection in place of the regular fields, and the file is schemaVersion 4:

"grid": {
  "width": 1799,
  "height": 1059,
  "layout": "row-major",
  "rowOrder": "north-to-south",
  "columnOrder": "west-to-east",
  "wrapLongitude": false,
  "projection": {
    "kind": "lambert-conformal",
    "radius": 6371229.0,
    "standardParallel1": 38.5,
    "standardParallel2": 38.5,
    "latitudeOfOrigin": 38.5,
    "centralMeridian": -97.5,
    "x0": -2697520.143,
    "y0": 1586693.847,
    "dx": 3000.0,
    "dy": -3000.0
  }
}
  • kind is a closed set, today lambert-conformal alone. A reader refuses a kind it does not implement; a new kind is a new value, not a new field.
  • x0 and y0 are the centre of the first cell, the north-west one, in projected metres. Cell (row, column) has its centre at x0 + column × dx, y0 + row × dy. dx is positive, dy negative, and wrapLongitude false. Since GDAL’s geotransform names the first cell’s outer corner and different GDAL builds differ in its last digits, an encoder rounds the corner to three decimal places and adds half a step: x0 = round(gt0, 3) + dx / 2, y0 = round(gt3, 3) + dy / 2.
  • A crop adds column × dx and row × dy to x0 and y0. A reduced-resolution tier doubles dx and dy and keeps x0 and y0, with width = (width + 1) // 2 and likewise height.
  • The formulas are the spherical Lambert conformal conic’s (Snyder 1987, §15): with two equal standard parallels the cone constant is n = sin φ1, otherwise n = ln(cos φ1 / cos φ2) / ln(tan(π/4 + φ2/2) / tan(π/4 + φ1/2)). A longitude is taken to within 180° of centralMeridian before it is projected. Both standard parallels and latitudeOfOrigin lie strictly between the poles, and the two parallels must not sum to zero, which leaves no cone.
  • A grid coordinate is (x − x0) / dx, (y − y0) / dy, with the rule for outside coordinates of Regional Grids. Cells are not regular in longitude or latitude: a reader that maps between them and geography goes through the projection.
  • Vector components are east and north, on this grid as on every other. A model writes its winds along the grid’s axes (GRIB2 resolution and component flags 0x08), and an encoder turns each pair before quantizing it: u_e = cos α × u + sin α × v, v_e = −sin α × u + cos α × v, with α the cone constant times the longitude’s distance from centralMeridian. The speed is the model’s. docs/encoder.md, “Native grids”, gives the arithmetic.

Older files do something else, and a reader keeps reading them. Up to schemaVersion 3 a projected model was resampled by the encoder onto a regular latitude/longitude grid before anything else read it, and the file is an ordinary regional file of that grid. Its target is fixed: the regular grid of the source’s declared step whose origin is a whole multiple of the step and which covers the extremes of longitude and latitude the source’s boundary cell centers reach; each target cell center is projected with the source’s own forward formulas and the source plane is bilinearly interpolated there. A conic domain is a trapezoid on that rectangle. The corners it never covered are neither gaps nor a reserved code (the format has neither) but the nearest source cell continued outwards (the sampling coordinate is clamped to the source grid), so the plane is complete and no filter or contour meets an edge. Those cells are not a forecast: a reader that knows the source’s projection clips to its footprint, and one that does not draws the extension. A reader tells the two apart by the grid block alone, never by the source: one model publishes both.

model and product identify the source dataset. Every encoder writes product, and a reader accepts a document without it: the schema names the field without requiring it. Registered pairs:

modelproductGridSteps publishedNotes
GFSpgrb2.0p251440 × 721, 0.25°1 h to f120, 3 h to f240All series include the analysis frame (f000). prate is an instantaneous rate at every step
ECMWFifs-0p251440 × 721, 0.25°3 h to 144 h, 6 h to 240 hprate is de-accumulated from the run-total tp, so its series has no analysis frame and starts at firstFrameOffset: 3; so does gust, whose record (the maximum over the interval ending at the frame) is empty at the analysis. Its wave fields come from the cycle’s wave stream
GFS-SFLUXsfluxgrb3072 × 1536 Gaussian, ~13 km1 h to f120, 3 h to f240prate is de-averaged from window-cumulative records and starts at firstFrameOffset: 1; the only source shipping dswrf
HRRRwrfsfc1799 × 1059, 3 km Lambert conformal, regional (see “Projected Sources” above)1 h to f18A new cycle every hour. Runs published before schemaVersion 4 are on a regular 2441 × 1051 grid at 0.03° (134.10 W – 60.90 W, 52.62 N – 21.12 N), resampled by the encoder. Its prmsl is the MAPS reduction and its cref the model’s forecast reflectivity
RRFS2dfld.3km.conus1799 × 1059, 3 km Lambert conformal, regional: HRRR’s grid1 h to f84The 00/06/12/18Z cycles. Isobaric records come from the prslev file of each hour. Carries the near-surface smoke and dust of RRFS-SD
WOOF-NAMawphys614 × 428, 12.19 km Lambert conformal, regional: NCEP grid 2181 h to f84The 00/06/12/18Z cycles of WOOF-NAM by Recast, not a NOAA forecast. prate is differenced from totals that restart every 12 hours, so its series has no analysis frame and starts at firstFrameOffset: 1; the core is tmp2m alone
CFSv2time-grib-01384 × 190 Gaussian, 0.9375° (T126)6 h from f6 to f6552The seasonal source: ensemble member 01 of the 00Z and 12Z cycles, thirty-nine weeks of a nine-month run. Its series begin at the first step, so every bundle starts at firstFrameOffset: 6 — the cycle’s analysis is in another file family and is not published. prate, dswrf and tcdc are means over the six hours ending at the frame (typeOfStatisticalProcessing: 0) although the records carry the instantaneous template
CMA-RADARl3-mst-creftile grid, 360/(256·2^z) degrees6 min, as publishedObservations, not a forecast: runTime is the first observation and offsets count from it. The only one whose unitSeconds is not 3600; the axis lists its offsets wherever a publication was missed

How far a run is published is a pipeline choice; the steps above are what each source makes available. A uniform series declares a frameStep; a series that runs to 240 hours crosses a step change on every forecast source above and lists its offsets; an observation series lists them wherever the archive has a gap.

CMA-RADAR is a series of observed analyses, and the metadata describes it with no change: runTime is the first observation in the series and each frame’s frameOffset counts six-minute units from it. A reader that labels the axis should take that from the dataset identity rather than assume every file is a forecast.

Time axes may differ between bundles of one run, in both step and extent. The layout is identical for every model; only the metadata identity, the grid, and the time axis differ. Readers must derive the frame list from time and the grid from grid, never from the model name, and must not assume two bundles of one run share an axis.

Quantization Codebooks

Linear ("type": "linear")

q = round((clamp(x, offset, offset + scale * maximumCode) - offset) / scale)
x = offset + q * scale

Codes 0 through maximumCode are valid; nodataCode marks missing data; codes between maximumCode + 1 and nodataCode - 1 are reserved. The maximum in-range quantization error is scale / 2.

Registered linear codebooks (the quality profile; balanced uses the same values unless noted):

VariableoffsetscalemaximumCodenodataCodeError budget
tmp2m−60 °C0.52202550.25 °C
ugrd10m / vgrd10m / ugrd100m / vgrd100m−63.5 m/s0.52542550.25 m/s
dswrf0 W/m²52542552.5 W/m²
cref0 dBZ0.51602550.25 dB
rqi−0.10.111255none: MRMS publishes tenths; code 0 is outside radar coverage, code 1 an index of 0 (every profile)
gust0 m/s0.52542550.25 m/s
tcdc0 %0.52002550.25 %
cape0 J/kg2525425512.5 J/kg
cin−1016 J/kg42542552 J/kg
lcdc / mcdc / hcdc0 %0.52002550.25 %
pwat0 kg/m²0.52542550.25 kg/m²
hpbl0 m2025425510 m
orog−430 m3725425518.5 m
ptype018255—
vis0 km0.12542550.05 km
dpt2m−70 °C0.52202550.25 °C
aptmp2m−90 °C11502550.5 °C
tmpsfc−60 °C0.52542550.25 °C
icec0 %0.52002550.25 %
icetk0 m0.022542550.01 m
htsgw0 m0.12542550.05 m
perpw0 s0.12542550.05 s
wvhgt / swhgt0 m0.12542550.05 m
wvper / swper0 s0.12542550.05 s
dirpw0°1.52392550.75°
wvdir / swdir0°1.52392550.75°
uwave / vwave−25.4 m0.22542550.1 m
uwindwave / vwindwave, uswell / vswell−25.4 m0.22542550.1 m
tsoil<n>−61 °C0.52542550.25 °C; code 0 is no soil
soilw<n>−0.01 m³/m³0.0052022550.0025 m³/m³; code 0 is no soil
prmsl870.5 hPa12542550.5 hPa
hgt1000−905 m102542555 m
hgt925−249 m62542553 m
hgt850423 m62542553 m
hgt7001911 m62542553 m
hgt5004252 m82542554 m
hgt3007505 m102542555 m
hgt2508598 m122542556 m
hgt20010086 m122542556 m
tmp1000−60 °C0.52402550.25 °C
tmp925−65 °C0.52302550.25 °C
tmp850−70 °C0.52302550.25 °C
tmp700−75 °C0.52202550.25 °C
tmp500−85 °C0.52002550.25 °C
tmp300−95 °C0.51902550.25 °C
tmp250−100 °C0.51902550.25 °C
tmp200−100 °C0.51802550.25 °C
rh<level>0 %0.52002550.25 %
spfh1000 / spfh9250 g/kg0.22542550.1 g/kg
spfh850 / spfh7000 g/kg0.12542550.05 g/kg
spfh5000 g/kg0.022542550.01 g/kg
spfh3000 g/kg0.012542550.005 g/kg
spfh250 / spfh2000 g/kg0.0052542550.0025 g/kg
ugrd<level> / vgrd<level>−127 m/s12542550.5 m/s
uqflx<level> / vqflx<level>−63.5 g·cm⁻¹·hPa⁻¹·s⁻¹0.52542550.25
vvel<level>−6.35 Pa/s0.052542550.025 Pa/s
thetae1000235 K0.52542550.25 K
thetae925232 K0.52542550.25 K
thetae850230 K0.52542550.25 K
thetae700235 K0.52542550.25 K
thetae500250 K0.52542550.25 K
thetae300285 K0.52542550.25 K
thetae250295 K0.52542550.25 K
thetae200305 K0.52542550.25 K
cat<level>0 m^(2/3)/s0.0051272550.0025 m^(2/3)/s

The compact profile doubles each scale (temperature 1.0 → maximumCode 110, wind 1.0 → 127, dswrf 10 → 127, cref 1.0 → 80, gust 1.0 → 127, every cloud cover 1.0 → 100, cape 50 → 127, cin 8 → 127, vis 0.2 → 127, dpt2m 1.0 → 110, aptmp2m 2 → 75, pwat 1.0 → 127, hpbl 40 → 127, orog 74 → 127, tmpsfc 1.0 → 127, icec 1.0 → 100, icetk 0.04 → 127, htsgw, perpw and the wind-wave and swell heights and periods 0.2 → 127, tsoil 1.0 → 127, soilw 0.01 → 101, and every pressure-family and isobaric codebook → half its maximumCode over the same range; cat<level> 0.01 over 0–0.64 → 64). Two codebooks do not keep the same range: dirpw’s compact codebook (and wvdir’s and swdir’s) stops at 357° (3 → 119), because 360 / 3 codes would put 360°, which is 0°, back on the grid; and the wave vectors' stop at ±25.2 m (0.4 → 126) so that 0 stays on the grid, since land is (0, 0) in the pair and the middle code of both. The categorical ptype takes one book in every profile: its integer class codes have no resolution to trade, and the codes between the four types GFS reports are never written. balanced takes the compact icec beside the compact humidity and cloud cover, and the quality book for every other one-sided field (the inhibition, the precipitable water, the boundary layer height), as it does for the aerosol fields.

The wave fields are the first whose records do not cover the grid: GFS-Wave carries a bitmap, and land comes out of GDAL as its nodata value (9999). The encoder maps those points to code 0 (0 m, 0 s, 0°) before quantization, as the radar mosaic’s fill is handled (see “Complete planes” below); the nodataCode is still never written. The soil layers’ records do not cover it either (GFS masks the open water, and the sea ice for the moisture; AIFS the sea for the moisture). Their codebooks start one step below the least real value — −61 °C, −0.01 m³/m³ — so the masked points, filled with that bottom, are code 0 and no real value is: a reader tells “no soil” from a value without a bitmap, and 0 °C and 0 m³/m³ are codes of their own in both profiles.

The isobaric temperature takes its range per level: the low end holds the Antarctic winter at every surface, the high end the below-ground extrapolation the lowest surfaces take under high terrain, and no single 127-degree window covers both 850 hPa in summer and 200 hPa in winter. Specific humidity spans two orders of magnitude between the surface and the upper troposphere, so its step follows the level. Relative humidity is the noisiest field published, so the balanced profile takes its compact codebook (1 %, maximumCode 100), and the cloud covers follow it; those are the departures from quality in that profile besides precipitation. The equivalent potential temperature takes a 127 K window per level at the temperature’s step, placed so the tropical end fits (850 hPa runs to 357 K); only the 850 hPa window is verified against an analysis, the others follow the potential temperature’s rise with height. None of the isobaric fills is contoured, so none carries the half-code rule below.

The pressure family’s offsets are chosen so that every standard contour value lands exactly half a code off: (contour − offset) / scale has fractional part 0.5, for the level’s own interval (4 hPa for prmsl, 30 m up to 700 hPa, 40 m at 500, 120 m above) and for the emphasised lines (every 20 hPa on prmsl; 5840 and 5880 gpm on hgt500). This is an encoder rule, in the same sense as a container’s segment grouping: a decoder must not assume it, and nothing in a bundle records it. It exists because a contour drawn where the code is flat covers a whole plateau instead of a line. The coverage is fixed per variable for all time rather than fitted per run; byte-identical re-encoding, a stable legend, and comparable point series across runs depend on it.

cref code 0 is both “no echo” and “outside the radar network’s coverage”. A reader that must tell them apart reads the mosaic’s rqi beside it, whose code 0 is outside coverage and whose code 1 is covered with an index of 0. A ground mosaic is a regional product on a rectangular grid, and a bundle carries no bitmap, so the bottom of the codebook is what a renderer paints as nothing. It is an ordinary in-range code rather than a reserved one: a renderer that interpolates codes before its palette lookup would otherwise colour the gap between a reserved code and its neighbour with a class the data never reached.

Values outside the range clamp to the range ends before quantization.

Logarithmic ("type": "log1p", precipitation)

Precipitation is sparse and long-tailed, so it uses a logarithmic codebook with parameters trace, scale, maximum:

  • Code zeroCode (0): dry, below trace.
  • Codes minimumCode (1) through maximumCode: positive logarithmic values.
  • Code overflowCode (maximumCode + 1): above maximum.
  • Code nodataCode: missing data.

For trace <= p <= maximum, with span = maximumCode - 1:

lo = ln(1 + trace / scale)
hi = ln(1 + maximum / scale)
u = (ln(1 + p / scale) - lo) / (hi - lo)
q = 1 + round(span * u)

Decode with:

u = (q - 1) / span
p = scale * (exp(lo + u * (hi - lo)) - 1)

Code maximumCode decodes to exactly maximum. The overflow code decodes one codebook step above the maximum (the same formula evaluated at q = maximumCode + 1), extending the logarithmic grid by one step so decoded values remain strictly increasing across all non-nodata codes, and overflow pixels stay distinguishable from the top in-range code in both a palette and scalar inspection.

Registered precipitation codebooks (trace = 0.01 mm/h, scale = 0.05 mm/h, maximum = 128 mm/h in both):

ProfilemaximumCodeoverflowCodenodataCode
quality (256-level)253254255
balanced / compact (128-level)125126127

The 128-level codebook still uses full R8 bytes; the smaller symbol alphabet improves entropy coding, and the GPU needs no bit unpacking.

Series codebooks

A series store (zarr-profile.md, “Series store”) holds some variables as sixteen-bit codes, in place of the profile’s byte codebook: a cell’s series is read as a line, where a byte step shows as a staircase. Each is a linear codebook (the formulas above), one per variable whatever the profile, carried in the registry as the variable’s seriesQuantization (registry.md) and, inside a series store, as that variable’s quantization. Every variable below carries one (quantize.SERIES_CODEBOOKS); any other variable of a series store keeps its byte codes:

VariableoffsetscalemaximumCodenodataCodeError budget
tmp2m / dpt2m−90 °C0.11500655350.05 °C
prmsl850 hPa0.12500655350.05 hPa
ugrd10m / vgrd10m−100 m/s0.12000655350.05 m/s
prate0 mm/h0.0165500655350.005 mm/h
dswrf0 W/m²11500655350.5 W/m²

The rate is linear here, where its byte codebook is logarithmic. A codebook whose nodataCode is above 255 is a sixteen-bit one: its codes are held as uint16 and fit only a uint16 array. Every code key of a quantization block (minimumCode, maximumCode, zeroCode, overflowCode, nodataCode) is an integer from 0 to 65535; that every code fits a byte is checked where the codes sit, by the reader of a uint8 array or of a container, which carry byte codes only. A series code is quantized from the same value as the variable’s byte code, in the same pass, never from the byte code.

Residuals

A predicted variable stores each frame after the first of its run of frames as a residual against an earlier one (a store’s xue.delta codec, a container’s predictors).

Residuals are defined unconditionally as one-byte modulo-256 wrapping differences:

residual = (current - base) mod 256
current  = (residual + base) mod 256

Wrapping subtraction and addition are lossless for every byte pair, so there is no residual range check, no signed interpretation, and no RAW fallback for out-of-range differences. Sixteen-bit codes (a series store’s widened variables) wrap the same way modulo 65536.

Complete planes

A bundle requires complete input planes: every point of every plane carries a code. The forecast grids satisfy that outright, and a source whose product does not cover its whole grid (the radar mosaic) resolves it before quantization by mapping absent points to the bottom of the variable’s codebook, a value rather than a gap. A future missing-data implementation should add a separate bitmap so residual bytes never conflict with the nodata code.

Bundle naming

One bundle per variable per run (tmp2m, prate, dswrf, cref), a vector’s components together (wind10m), and reduced-resolution renditions <bundle>.half, <bundle>.quarter and <bundle>.eighth (decimated by 2, 4 and 8; which rungs a source ships is a registry value, every source at least the half, none the eighth today, though published ones stay valid), structurally identical bundles whose metadata declares the decimated grid. A shared store holds every bundle of one tier (bundles.zarr, bundles.half.zarr; zarr-profile.md, “Layout”); a one-bundle store is <name>.zarr, a container <name>.xue.


Part of the Xue specification, licensed under CC BY 4.0.

3 - Xue Container Format

This document is the normative specification of the Xue container (.xue), a single indexed file holding one bundle: the metadata and quantized codes of bundle.md, framed so a browser can decode a run frame by frame from HTTP range reads.

The container is a legacy layout. Every live run, round and showcase case is published as a Zarr v3 store (zarr-profile.md) alone, and a build writes the store straight from its codes; an encoder writes a container only when asked (--xue, container=True). Every decoder keeps reading it, since runs and cases published as containers are never rebuilt: for a reader nothing here is deprecated.

Two container versions exist, and they differ in what a payload is:

  • v1 is plane-major: one payload is one whole plane of one frame. Sections marked (v1) describe it. Nothing writes it any more; every decoder must keep reading it.
  • v2 is tiled: one payload is a chunk, one spatial tile of one temporal group for one variable, so a reader can fetch the region it is showing and read one cell’s whole series at one chunk per group. Both encoders write it. See Container v2.

Both share the fixed header and the payload rules below; the metadata, the codebooks and the residual arithmetic are bundle.md’s. A decoder rejects a container version it does not implement, so a v2-capable shell must be deployed before the first v2 run is published.

The Python encoder (xuebuild/binformat.py) and the Rust decoder (rust/xue) are the two reference implementations, held byte-identical by cross-language golden tests.

Design Summary

The format targets a product that animates a complete global forecast (steps of one to six hours out to 240 hours, changing step partway through the range) with continuous playback and timeline scrubbing. For one 121-frame GFS run, per-frame raster PMTiles for two variables measured 3,205.87 MB against 137.73 MB of source GRIB. Xue stores each variable as quantized single-byte planes on the native grid (projection and coloring happen on the GPU) with bounded temporal prediction and per-payload Zstandard compression; the same two variables fit in 65–71 MB for that run depending on profile. Size grows roughly linearly with frame count; coarser-step frames have larger inter-frame differences and compress slightly worse. Every frame is individually addressable, and the index makes HTTP-range streaming possible: a client fetches the structural prefix (a few KB) and then range-requests one temporal group or one chunk at a time.

Design decisions:

  • Quantized uint8 planes. Each decoded frame is a contiguous single-channel plane that uploads directly to a WebGL2 R8 texture. Codebooks are visualization-oriented (0.25 °C temperature error budget, a logarithmic precipitation codebook that preserves light-rain resolution).
  • An axis that names its own unit and may change step. GFS is hourly to f120 and three-hourly beyond, ECMWF three-hourly to 144 hours and six-hourly beyond, and the radar mosaic publishes every six minutes. The axis declares the seconds one step unit is worth and either a uniform step or its offsets outright, so it is always exact.
  • Bounded temporal groups. Smooth fields are coded in six-frame groups with one-byte residuals; groups are formed inside a segment of constant step, so no group straddles a change of cadence. In v1 a group is a middle RAW anchor plus residuals against it, capping random access at two plane decodes; in v2 a group is packed whole into each tile’s chunk and the residuals chain against the previous frame, which is smaller and, since the chunk decompresses as a unit, no more expensive to seek into. Precipitation regions move with weather systems and temporal differencing increases their compressed size, so precipitation is stacked RAW in both versions.
  • One independent Zstandard frame per payload (a plane in v1, a chunk in v2) for direct indexing, sequential reads, and localized failure isolation.
  • Space is addressable in v2. A payload covers one tile of the grid, so a zoomed-in viewport fetches only the tiles it shows, and one cell’s whole series costs one chunk per group. Tiles are cut in grid space, not Web Mercator; reprojection stays in the fragment shader.
  • Strict parsing. All offsets and lengths are validated with checked arithmetic before any allocation; sections must be strictly adjacent with zero padding; every reconstructed plane carries a CRC-32.

Conventions

  • All binary integers are little-endian.
  • All offsets are absolute (relative to the beginning of the file).
  • Structural sections are aligned to 8 bytes; align8(x) rounds x up to the next multiple of 8. Padding bytes must be zero.
  • Metadata is UTF-8 JSON; the index uses fixed-width binary entries.
  • Quantization follows bundle.md, “Conventions”.

Container Layout

Both versions have the same five sections in the same order; the index and what the payloads are differ. This is v1; see Container v2 for the tiled index.

+------------------------------+ 0
| FixedHeader, 80 bytes        |  version = 1
+------------------------------+ metadataOffset
| UTF-8 metadata JSON          |
+------------------------------+ indexOffset
| IndexHeader, 16 bytes        |
| PlaneEntry[entryCount]       |
+------------------------------+ dictionaryOffset, optional
| Zstandard dictionary         |
+------------------------------+ dataOffset
| Zstandard payloads           |
| zero padding for alignment   |
+------------------------------+ fileSize

FixedHeader

The magic value is the 8-byte sequence XUE\0\0\0\0\0 (ASCII XUE followed by five NUL bytes).

OffsetLengthTypeFieldRule
08bytesmagicXUE\0\0\0\0\0
82u16version1 for v1
102u16headerSizeFixed at 80
124u32flagsFixed at 0 for v1
168u64fileSizeMust equal the actual file length
248u64metadataOffsetFixed at 80 for v1
328u64metadataLengthJSON byte count, excluding padding
408u64indexOffset8-byte aligned
488u64indexLengthIncludes IndexHeader and every entry
568u64dataOffset8-byte aligned
648u64dictionaryOffset8-byte aligned, 0 when no dictionary
728u64dictionaryLengthDictionary byte count, 0 when no dictionary

Before allocating memory, the parser must validate checked addition and multiplication, monotonic offsets, and containment of every range within fileSize.

Sections are strictly adjacent, separated only by zero padding for 8-byte alignment. The parser must verify:

  • metadataOffset = 80.
  • indexOffset = align8(metadataOffset + metadataLength).
  • When dictionaryLength is 0, dictionaryOffset must be 0 and dataOffset = align8(indexOffset + indexLength).
  • When dictionaryLength is nonzero, dictionaryOffset = align8(indexOffset + indexLength) and dataOffset = align8(dictionaryOffset + dictionaryLength).
  • Payloads are stored contiguously in physical order starting at dataOffset, with no per-payload alignment and no unindexed gaps.
  • fileSize = align8(end of the last payload), and every padding byte is zero.

Unindexed gaps, overlaps, and nonzero padding bytes make the file invalid.

Metadata JSON

The UTF-8 metadata JSON of bundle.md, “Metadata JSON”, verbatim.

IndexHeader (v1)

OffsetLengthTypeFieldRule
04bytesmagicASCII IDX1
42u16entrySizeFixed at 40 for v1
62u16versionFixed at 1 for v1
84u32entryCountMust equal (variables × frames per variable) declared in metadata
124u32reservedMust be 0

PlaneEntry (v1)

Index entries are sorted by (variableId, frameOffset). Each entry is 40 bytes:

OffsetLengthTypeFieldRule
01u8variableIdA handle into this file’s metadata; see below
11u8predictorSee enum below
21u8compression0 NONE, 1 ZSTD, 2 ZSTD_DICT
31u8flagsSee flags below
42u16frameOffsetThis plane’s offset on the metadata time axis
62u16dependencyOffset65535 when no dependency exists
82u16groupIdTemporal group ID; equals frameOffset for RAW-only series
102u16reserved0Must be 0
124u32compressedLengthPayload byte count
168u64dataOffsetAbsolute payload offset
244u32decodedLengthMust equal grid.width × grid.height
284u32crc32CRC-32 of the reconstructed quantized plane
321u8minimumCodeActual minimum code in the final plane
331u8maximumCodeActual maximum code in the final plane
346bytesreserved1Every byte must be 0

Predictor enum:

ValueNameMeaning
0RAWDecompressed payload is the complete quantized plane
1ANCHORPayload is a residual relative to dependencyOffset
2PREVIOUSPayload is a residual relative to the preceding frame on this variable’s time axis
3ZERONo payload, output a zero-filled plane, reserved for local block formats

Flags:

  • Bit 0: Zstandard frame includes a checksum.
  • All other bits must be 0.

Residuals always use modulo-256 wrapping semantics, so no flag describes residual interpretation. Overflow presence is derivable from maximumCode, so no flag duplicates it.

The crc32 field uses CRC-32/IEEE (polynomial 0x04C11DB7, reflected implementation 0xEDB88320, initial value and final XOR 0xFFFFFFFF, identical to zlib’s crc32), computed over the reconstructed quantized plane. The Zstandard checksum validates the compressed payload; the CRC32 validates predictor reconstruction.

variableId is file-local

variableId is a handle, not a name: it ties an index entry to one variable descriptor in this file’s metadata. It must be 1–255 and unique within the file, and every id an index entry names must appear in the file’s variables; there is no global table to check it against, and a decoder must not carry one. What a variable is lives in the metadata: its parameter block (see bundle.md, “Variable Identity”) and its id string.

The encoders in this repository assign ids positionally: 1…n by the variable’s order in the bundle’s variable list, which is also the order the v2 chunk layout uses. A single-variable bundle is always id 1, and a vector bundle is 1 for the U component and 2 for the V component.

Historical assignment: encoders before this rule drew ids from a global registry, and files already published carry those numbers: 1 tmp2m, 2 prate, 3 ugrd10m, 4 vgrd10m, 5 dswrf, 6 cref, 7 prmsl, 8–15 hgt1000 … hgt200, 16–23 tmp1000 … tmp200, 24–31 rh1000 … rh200, 32–39 spfh1000 … spfh200, 40–47 ugrd1000 … ugrd200, 48–55 vgrd1000 … vgrd200, 56–63 uqflx1000 … uqflx200, 64–71 vqflx1000 … vqflx200 (each isobaric family in the level order 1000, 925, 850, 700, 500, 300, 250, 200). No decoder required those numbers, so every such file stays valid.

Payload Rules (v1)

  • Every non-ZERO entry maps to one independent Zstandard frame.
  • ZSTD_DICT frames decompress with the embedded dictionary, which the decoder loads once at open time. A ZSTD_DICT entry is invalid when dictionaryLength is 0. No production build embeds a dictionary: trained dictionaries showed no gain on full ~1 MB planes. The section and mode are reserved for smaller payloads.
  • The decompressed payload length must equal decodedLength.
  • RAW decompresses directly to the quantized plane.
  • ANCHOR decompresses to a one-byte residual, then adds the dependency plane.
  • PREVIOUS decompresses to a one-byte residual, then adds the plane of the preceding frame on the time axis: frameOffsets[i - 1], or frameOffset - frameStep on a uniform axis (not frameOffset - 1, which does not exist on an axis whose step is not one unit). A PREVIOUS entry on the first frame of the axis is invalid, and every PREVIOUS entry must carry exactly that preceding offset in dependencyOffset: like ANCHOR, the dependency is explicit in the index, never the sentinel, never derived, so the same file has only one encoding. No reference bundle uses PREVIOUS in v1; the reference encoder emits only RAW and ANCHOR there.
  • The decoder must reject a frame when length, checksum, or dependency validation fails.
  • The decoder must not allocate an output larger than width × height or a configured safety limit based on untrusted file values.

Quantization Codebooks

The codebooks of bundle.md, “Quantization Codebooks”.

Temporal Prediction

The predictors are shared by both container versions. Which of them a file may use, and what a residual is computed against, is defined by the index: v1 allows all four per plane (PlaneEntry (v1)), v2 allows RAW and PREVIOUS per variable and chains inside a chunk (Container v2).

The residual arithmetic is bundle.md, “Residuals”.

Per-variable rules in v1:

  • Linear-codebook fields (tmp2m, ugrd10m, vgrd10m, dswrf, the surface diagnostics, the ocean fields, the isobaric fills and the pressure family prmsl / hgt<level>) use temporal prediction. Each segment of the time axis splits independently into groups of 6 frames, so a group never spans a change of step. Within each group of n frames, the frame at zero-based index floor(n / 2) is the anchor: it uses predictor RAW, and every other frame in the group uses ANCHOR residuals against it. A trailing single-frame group is its own anchor and uses RAW. Random access to any frame costs at most two plane decodes (anchor + target). groupId counts groups sequentially across the whole variable and does not restart at a segment boundary.
  • Precipitation (prate) uses independent RAW planes for every frame, with groupId mirroring frameOffset. Precipitation regions move with weather systems; fixed-grid differencing creates both entering and leaving edges and measurably increases compressed size.

Grouping per segment rather than across the whole timeline keeps every ANCHOR residual a difference between frames one step apart. A group straddling the GFS 120-hour transition would difference frames three hours apart against an anchor chosen among frames one hour apart: still lossless, since residuals wrap modulo 256, but a larger residual and a worse-compressing one. Splitting costs at most one extra RAW anchor per segment boundary per variable.

Segment-aligned grouping is an encoder rule, not a decode-time invariant. A decoder validates the dependency structure recorded in the index (see Error Handling) and never needs to derive segments; a group that straddled a boundary would still reconstruct exactly and is not rejected.

Every plane is complete; see bundle.md, “Complete planes”.

Physical Payload Order (v1)

Payloads are ordered by variable and temporal group, with each group’s anchor payload first inside its group:

temperature group 0 anchor (f003)
temperature group 0 residual f000
temperature group 0 residual f001
temperature group 0 residual f002
temperature group 0 residual f004
temperature group 0 residual f005
temperature group 1 anchor
...
precipitation f000 RAW
precipitation f001 RAW
...

The anchor’s actual frame offset remains in the index; sequential playback does not depend on physical payload order. Keeping a temporal group’s payloads contiguous means one HTTP range request fetches one decodable group.

In the two-variable wind bundle the payloads interleave per temporal group (a ugrd10m group followed by the same vgrd10m group), so streaming one wind frame touches two adjacent byte spans.

Interleaving all forecast times per grid point would turn single-plane reads into wide file gathers, so Xue v1 keeps complete planes contiguous; temporal continuity is represented by residuals instead.

Streaming

This section describes v1; Streaming (v2) covers the tiled container, which streams the same way with narrower spans.

The format needs no side files to stream. The structural prefix [0, dataOffset) (header, metadata, index, optional dictionary; a few KB in production) validates like a whole file minus the byte-content checks past the prefix. An explicit offsets array costs roughly five bytes per frame, under 1 KB for a 240-hour axis, so the prefix stays small enough to fetch in one range request. A streaming reader then range-fetches payload spans on demand; the per-group contiguity above means the bytes for one frame form one or two contiguous spans. Integrity comes from the per-plane CRC-32 and the Zstandard frame checksums, so a whole-file checksum is only meaningful for full downloads.

Error Handling

These rules apply to both versions except where they name a v1 structure; Error handling, additions for v2 adds the tiled index’s own.

A decoder must reject:

  • Unknown container versions, and metadata schemaVersion values the decoder does not implement.
  • Nonzero reserved fields in a known version.
  • Unknown predictor, compression, or flags values, and a variableId that is not one of the file’s own metadata variables (“unknown” here means absent from this file, not absent from any registry; there is none).
  • ZSTD_DICT entries when dictionaryLength is 0.
  • Entries overlapping the header, metadata, index, or dictionary.
  • Overlapping payload ranges (ZERO entries may have zero length).
  • Unindexed gaps between sections or payloads, and nonzero padding bytes.
  • Duplicate (variableId, frameOffset) pairs.
  • A time block declaring both frameStep and frameOffsets, or neither; a frameOffsets array that is not strictly increasing, whose length differs from frameCount, whose first element differs from firstFrameOffset, whose steps are all equal, or that contains an offset above 65534; a uniform axis whose last offset firstFrameOffset + (frameCount − 1) × frameStep exceeds 65534; a unitSeconds that is not a whole divisor of 3600 or is finer than the offsets need; a field the time block does not define; a version 1 or 2 block carrying a version 3 field, or the reverse. The same rules apply to a version 1 or 2 axis under its own field names.
  • A parameter block in a file below schemaVersion 3, or a variable without one in a schemaVersion 3 file; a parameter code outside 0–255; a fixed surface with exactly one of its scale factor and scaled value null; a key the block does not define.
  • A band, producer or aerosol block in a file below schemaVersion 3; a block that is not an object (null included); a band block missing one of its five fields, carrying a value outside its range, or carrying a key it does not define; a producer block missing id or version, whose id does not match ^[a-z][a-z0-9]*$, whose version is not a non-empty string, or carrying a key it does not define; an aerosol block missing one of its eleven fields or carrying a key it does not define, a type outside its range, a limit with exactly one of its scale factor and scaled value null, a null limit under an interval type other than 255, or a non-null limit under type 255.
  • An ensemble block in a file below schemaVersion 3; one that is not an object (null included); one whose keys are not exactly one of the three shapes (derivedForecast alone, percentileValue alone, or probabilityType with its four limit fields); a value outside its range; a limit with exactly one of its scale factor and scaled value null; a limit that is null where its probability type uses it, or not null where the type does not.
  • A grid.projection that is not an object (null included), whose kind is not one the decoder implements, missing one of its ten fields, carrying a key it does not define, with a field of the wrong type or not finite, a radius that is not positive, a standard parallel or latitudeOfOrigin at or past a pole, standard parallels that sum to zero, a centralMeridian outside ±180, a dx that is not positive or a dy that is not negative. A grid carrying projection and any of the four regular fields or gaussian, even null, or whose wrapLongitude is anything but false.
  • A grid.gaussian that is not an object (null included), in a file of any version but 3, missing one of its three fields or carrying a key it does not define, with an n outside 1–32768, a negative firstRow, a rowStride below 1, or a last row firstRow + (height − 1) × rowStride at or past 2n.
  • A declared schemaVersion other than the lowest able to express the metadata: a schemaVersion 2 file that declares stepHours, a schemaVersion 1 or 2 file whose variables carry parameter or whose time block names a unit, a schemaVersion 4 file without grid.projection, or a file below schemaVersion 4 with one.
  • An incomplete frame sequence for any declared variable. The expected sequence is frameOffsets when present, and firstFrameOffset + i * frameStep otherwise; a decoder must never reconstruct it arithmetically when frameOffsets is present.
  • ANCHOR or PREVIOUS dependencies that leave the variable or temporal group, cyclic dependencies, or chains deeper than the group length; a PREVIOUS entry whose dependencyOffset is not exactly the preceding frame on the axis (the 65535 sentinel included).
  • Any integer computation that would overflow (use checked arithmetic).
  • A plane whose CRC-32 or Zstandard checksum fails.

Container v2

Container v2 changes what a payload is: a chunk, one spatial tile of one temporal group for one variable, instead of one whole plane of one frame. A file holds the same set of quantized codes as its v1 counterpart, cut into tiles and packed group by group, so a reader can fetch the region it is looking at, and read one cell’s series by fetching one chunk per group. An encoder writes one version or the other for a whole file; there is no mixing.

The fixed header, the metadata JSON (schema versions 1–3, variable identity, the time axis, regional grids), the quantization codebooks and the modulo-256 residual arithmetic are shared with v1 and are not repeated here.

+------------------------------+ 0
| FixedHeader, 80 bytes        |  version = 2
+------------------------------+ metadataOffset = 80
| UTF-8 metadata JSON          |  unchanged, schemaVersion 3
+------------------------------+ indexOffset
| IndexHeader, 32 bytes        |  magic IDX2
| VariableEntry[variableCount] |  4 bytes each
| GroupEntry[groupCount]       |  4 bytes each
| ChunkEntry[chunkCount]       |  8 bytes each
+------------------------------+ dictionaryOffset, optional
| Zstandard dictionary         |
+------------------------------+ dataOffset
| chunk payloads, contiguous   |
| zero padding for alignment   |
+------------------------------+ fileSize

Tiling is a storage property, not a dataset property: the grid, the time axis, the variable identities and the codebooks are unchanged, so the metadata JSON is byte-for-byte what a v1 file of the same data would carry and the tiling appears only in the binary index.

FixedHeader (v2)

Identical to v1 in layout and rules, with version = 2. flags stays 0. Section adjacency, alignment and zero padding are validated exactly as in v1; indexLength covers the IndexHeader and all three tables.

Tiles

The grid declared in the metadata is cut into tiles of tileWidth × tileHeight cells, starting at the grid’s first cell (the north-west corner in the published layout) and laid out row-major:

tileColumns = ceil(width  / tileWidth)
tileRows    = ceil(height / tileHeight)
tileCount   = tileColumns × tileRows
tile t covers columns [ (t mod tileColumns) × tileWidth,  +tileWidth  )
          and rows    [ (t div tileColumns) × tileHeight, +tileHeight )

Tiles in the last column and the last row are clipped to the grid; the width of a clipped tile is width − (tileColumns − 1) × tileWidth, and likewise for its height. A file must declare 1 ≤ tileWidth ≤ width and 1 ≤ tileHeight ≤ height, so a file with one tile declares its grid size exactly. tileColumns, tileRows and tileCount are derived from the metadata grid and never stored, so the geometry has one encoding.

Tiles are cells, never degrees: the geographic footprint of a tile follows from the grid block, and the horizontal wrap of a global grid is a property of the grid, not of any tile; the last tile column does not wrap into the first.

Temporal groups

A group is a run of consecutive frames on the time axis. The groups of a file partition the axis in order: the first group starts at frame index 0, each group starts where the previous one ends, and the last group ends at frameCount. Every variable in the file uses the same groups (a file has one axis). A group’s frames are stored inside every chunk of that group in axis order.

Grouping is chosen by the encoder (see Encoder rules); a decoder validates the partition and nothing else about it.

IndexHeader (v2)

OffsetLengthTypeFieldRule
04bytesmagicASCII IDX2
42u16version2
62u16headerSize32
82u16tileWidth1 ≤ tileWidth ≤ grid.width
102u16tileHeight1 ≤ tileHeight ≤ grid.height
122u16groupCount≥ 1
141u8variableCount≥ 1, equals the number of metadata variables
151u8compression1 ZSTD or 2 ZSTD_DICT, for every chunk
164u32chunkCountMust equal groupCount × tileCount × variableCount
204u32reserved0
248u64reserved0

VariableEntry

One per variable, sorted by ascending variableId; the set must equal the metadata’s variables.

OffsetLengthTypeFieldRule
01u8variableIdA handle into this file’s metadata (unchanged from v1)
11u8predictor0 RAW or 2 PREVIOUS
22u16reserved0

The predictor applies to every chunk of the variable. ANCHOR (1) and ZERO (3) are not valid in v2: a chunk is decompressed whole, so an anchor adds no random access and would only give one chunk a second valid encoding.

GroupEntry

One per group, in axis order.

OffsetLengthTypeFieldRule
02u16firstFrameIndex into the axis (not a frame offset); 0 for the first group, the previous group’s firstFrame + frameCount otherwise
21u8frameCount1–255; the last group must end exactly at the axis’s frameCount
31u8reserved0

ChunkEntry and chunk order

One per chunk, in physical order:

for group g in 0 .. groupCount
  for tile t in 0 .. tileCount           (row-major)
    for variable v in 0 .. variableCount (ascending variableId)
      chunk position p = (g × tileCount + t) × variableCount + v
OffsetLengthTypeFieldRule
04u32compressedLength≥ 1
44u32crc32CRC-32/IEEE of the reconstructed chunk

A chunk’s offset is not stored. Payloads are contiguous in position order starting at dataOffset: the offset of chunk 0 is dataOffset and the offset of chunk p + 1 is the offset of chunk p plus its compressedLength. fileSize = align8(end of the last chunk), and every padding byte is zero. All of this is checked arithmetic against fileSize before any allocation. Since the order is fixed by this specification and the chunks are strictly adjacent, a stored offset would be redundant and would more than double the index.

This order serves the three access patterns: a whole group is one contiguous span (a global view fetches what v1 fetched); the tiles a viewport needs form one contiguous span per tile row per group; and one cell’s series is one chunk per group, with the two components of a wind bundle adjacent.

Chunk contents

Every chunk is one independent Zstandard frame that must carry a content checksum, decompressing to exactly

decodedLength = group.frameCount × tile.height × tile.width

bytes (the tile’s clipped height and width), laid out frame-major: the group’s frames in axis order, each as the tile’s rows top to bottom, each row west to east, the same orientation as the plane. With ZSTD_DICT the embedded dictionary applies, and a ZSTD_DICT file with dictionaryLength = 0 is invalid.

The reconstructed chunk is derived from the decompressed bytes by the variable’s predictor:

  • RAW: the bytes are the codes.
  • PREVIOUS: the first frame’s bytes are its codes; every later frame’s bytes are the modulo-256 residual against the reconstructed previous frame of the same chunk, which is the preceding frame on the axis because groups are contiguous. residual = (current − previous) mod 256, current = (residual + previous) mod 256.

crc32 covers the reconstructed chunk in the same frame-major layout. A decoder must reject a chunk whose Zstandard checksum, decompressed length or CRC-32 fails, and must not allocate more than decodedLength (or a configured safety limit) from file values.

Decoding a frame and a series

A frame of a variable is assembled from the chunks of its group for the tiles wanted: each chunk contributes the frame’s tile.height × tile.width block at the tile’s grid position. A reader may assemble a partial plane from a subset of tiles; which tiles it holds is then part of the frame’s state, and a renderer must not draw cells no tile has covered.

One cell’s series is the cell’s byte from the frame block of the tile containing it, in every group’s chunk of that tile. The cost of a series is one chunk per group of one tile, independent of the number of frames.

Streaming (v2)

The structural prefix [0, dataOffset) validates as in v1. A streaming reader derives every chunk’s byte span from the index and range-fetches spans on demand; the spans a viewport needs are contiguous per tile row and may be coalesced across small gaps at the reader’s discretion. Integrity is per chunk (Zstandard checksum plus CRC-32).

The index is larger than v1’s: the chunk count is the group count times the tile count times the variable count, at 8 bytes each (94 KB for a 420-tile, 28-group GFS bundle). That is one extra range request before the first frame.

Error handling, additions for v2

A decoder must reject, in addition to the v1 rules that still apply (unknown container versions, section geometry, padding, dictionary presence, overflow):

  • An IndexHeader whose magic, version or headerSize differ, or whose reserved words are nonzero.
  • tileWidth or tileHeight of zero or larger than the grid.
  • A variableCount or variable set that differs from the metadata’s own (every variableId here must be a variableId there, and the two sets must be equal); unsorted or duplicate variableIds; a predictor other than RAW or PREVIOUS; nonzero reserved fields.
  • Groups that do not partition the axis: a first group not starting at 0, a gap or overlap between consecutive groups, a frameCount of 0, or a last group not ending at the axis’s frameCount.
  • A chunkCount other than groupCount × tileCount × variableCount, or an indexLength other than the header plus the three tables.
  • A compressedLength of 0, or chunk spans that exceed fileSize or leave fileSize ≠ align8(end of the last chunk).
  • A Zstandard frame without a content checksum, or one whose decompressed length differs from decodedLength.
  • A reconstructed chunk whose CRC-32 fails.

Encoder rules (v2)

Normative for byte identity between the two encoders:

  • Every variable’s grouping is GROUP_LENGTH = 6 frames, formed inside segments of constant step exactly as v1’s temporal grouping, applied once per file to the shared axis. A trailing short group is its own group.
  • Predictor: RAW for prate, cref and the categorical ptype; PREVIOUS for every linear-codebook field.
  • Tile size is a per-source registry value; a reduced-resolution variant decimated by f (2, 4 or 8: every f-th row and column of the canonical plane, from row and column 0; the 3.9 µm window’s sites carry the largest code within f / 2 cells, satellite.md) uses (ceil(tileWidth / f), ceil(tileHeight / f)), so a tile with the same number covers the same ground in every tier. A regional (cropped) file tiles its own grid from its own origin with the source’s tile size.
  • The tile is then clamped to the grid: min(tileWidth, width) and min(tileHeight, height). The format requires 1 <= tile <= grid so that a single-tile file states its grid size exactly, and a regional crop is routinely smaller than its source’s tile (a six-degree showcase window is 24 x 24 cells against the 0.25-degree grid’s 48 x 52). Clamping makes such a file one tile.
  • Compression is ZSTD at the production level with the content checksum; no dictionary.

File Naming

A container is named after its bundle (bundle.md, “Bundle naming”) with .xue: tmp2m.xue, wind10m.xue, tmp2m.half.xue. A run’s manifest.json names each bundle’s container (path, byte length and whole-file CRC-32) where one was written, beside or instead of its store; the manifest and the latest.json pointer are delivery concerns defined by the reference implementations (xuebuild/manifest.py, web/src/data/manifest.ts), not by this container spec.

Retired artifacts readers still accept

The H.264 companion is retired: no encoder writes it and the viewer no longer decodes it. A run or case published with it carries, beside a scalar bundle, <variable>.h264 (a raw Annex B stream), its per-frame index <variable>.h264.index.json and a debug playlist <variable>.h264.m3u8, and its manifest entry carries a video block (streamPath, indexPath, byteLength, crc32, codec, width, height, gop, frameCount, metadataJson). Every manifest validator admits an entry with that block and leaves it unread, whatever its shape; the STAC Item of such a run still lists the two files as assets (stac.md).


Part of the Xue specification, licensed under CC BY 4.0.

4 - The registry document

What an encoder needs to know about the variables, bundles and sources it builds, as one JSON document. The Python tables in xuebuild/ author it (xue registry prints it); the native encoder reads it in place of a table of its own, so a table change is a document change and needs no release. The committed snapshot rust/xue/registry.json is held to the tables by a test.

The document is not a published artifact and not part of the format. What reaches a store is the variable block of docs/bundle.md, which the label, unit, parameter, producer, aerosol, ensemble and quantization keys of a variable entry are, key for key: an encoder copies them into attributes.xue, it never computes them. seriesQuantization reaches a series store the same way, as that store’s quantization. Everything else in an entry is how to obtain the field and what to do with it.

Shape

{
  "registrySchema": 1,
  "variables": { "<variable id>": { … } },
  "bundles":   { "<bundle id>":   { … } },
  "sources":   { "<source id>":   { … } }
}

Bundle ids are the ^[a-z][a-z0-9]*$ strings the manifest admits; a variable that is read and never published may carry _ (prate_ave). Keys are camelCase. Every key of an entry is written, even when empty, except where a key is marked optional below: an absent optional key means “none”.

registrySchema is the version of this document’s own shape. A reader implements a set of schemas and refuses a document outside it before any input is read. Adding a key an existing reader can ignore keeps the number; changing what a reader must do with an existing key raises it.

Variables

"tmp2m": {
  "label": "2 meter temperature",
  "unit": "°C",
  "parameter": { "discipline": 0, "parameterCategory": 0, "parameterNumber": 0,
                 "typeOfFirstFixedSurface": 103,
                 "scaleFactorOfFirstFixedSurface": 0, "scaledValueOfFirstFixedSurface": 2 },
  "producer": { "id": "shachen" },                 // optional
  "aerosol": { "aerosolType": 62001, … },          // optional
  "ensemble": { "percentileValue": 25 },           // optional
  "quantization": {                                // optional: absent = input-only
    "quality":  { "type": "linear", "offset": -60.0, "scale": 0.5, "minimumCode": 0, "maximumCode": 220, "nodataCode": 255 },
    "compact":  { … },
    "balanced": { … }
  },
  "seriesQuantization": { "type": "linear", "offset": -90.0, "scale": 0.1,  // optional
                          "minimumCode": 0, "maximumCode": 1500, "nodataCode": 65535 },
  "valueRange": [-60, 50],
  "fillValues": [],
  "static": false,
  "predictor": "delta",
  "decimation": "sample",
  "companions": ["poster", "video"],
  "conversion": { "rule": "celsius" },
  "match": { … }
}
KeyMeaning
label, unit, parameter, producer, aerosol, ensembleExactly the metadata blocks of docs/bundle.md. producer carries the id alone; the version is stamped on the series the producer wrote and read off it at build time. ensemble is the variable’s own statistic (a quartile, a spread, a probability); a shared variable whose record a source reads as an ensemble’s centre has none, and the source names the block it writes (ensembles, below).
quantizationOne codebook block per profile, each exactly as the metadata writes it. The type is one of the closed set below. A variable without this key is read and never published (tp, the categorical precipitation flags).
seriesQuantizationOptional. The codebook a series store holds this variable’s codes in (docs/bundle.md, “Series codebooks”; docs/zarr-profile.md, “Series store”): one linear block whatever the profile, with a nodataCode above 255, so its codes are uint16. An encoder that writes a source’s seriesBundleIds writes every variable of those bundles that carries this key under it, quantized from the same plane as the profile’s codes, and puts the block in the series store’s metadata as the variable’s quantization; every other variable of a series store keeps its profile codebook. Absent: the series store holds the profile’s byte codes. Present exactly for tmp2m, ugrd10m, vgrd10m, prate and dswrf.
valueRange[low, high] in unit: the range the pipeline treats as the field’s own.
fillValuesValues GDAL hands back where the record carries no data; folded to valueRange[0] before anything else touches the plane.
staticTrue for a field read at the analysis alone and published as one frame.
predictordelta (chunks chain against the previous frame) or raw.
decimationHow reduced tiers sample the full tier: sample (the site’s own code) or peak (the warmest code around the site).
companionsThe subset of poster, video this variable’s bundle ships beside the store. video is further subject to the source’s video flag.
conversionThe unit rule: see below.
matchHow the record is found: see below.

conversion

{"rule": <name>, …}. The rule names the arithmetic that takes a record’s values to unit and the unit spellings it accepts a record under; a record under any other spelling is an error. Spellings are compared after compaction: lower-cased, whitespace and *()[] removed, ² written ^2.

RuleAcceptsArithmetic
nonethe entry’s acceptedUnits list, compacted; no list = any unitidentity
celsiusk, kelvin; c, celsius, degc; f, fahrenheit, degf (after dropping °, degrees, degree)K − 273.15; (F − 32) × 5⁄9
soil-temperatureas celsiusas celsius, after the soil read-through: a plane GDAL labels [C] whose values are kelvins is kelvins
precipitation-ratekg/m^2s, kg/m2s, kgm^-2s^-1, kgm-2s-1; mm/h, mm/hr× 3600; identity for mm/h
precipitation-accumulation-, m, empty; kg/m^2, kg/m2, kgm^-2, kgm-2, mm, kg/m^2s, kg/m^2*s, kg/m2s, kg/m2*s× 1000 for metres; identity for the millimetre spellings
pascal-to-hectopascalpa÷ 100
metre-to-kilometrem, metre, meter, metres, meters÷ 1000
mass-ratio-to-g-per-kgkg/kg× 1000
proportion-to-percentproportion, fraction, 1, -, empty× 100
cloud-cover%; -, 1, fraction, proportion, 0-1identity for %; × 100 otherwise
degrees-truedegreetrue, degtrue, degrees, degree, deg, degreestruevalue mod 360
geopotential-to-metresgpm, m; m2/s2, m2s-2 (compacted further: ^ dropped too)identity; ÷ 9.80665 for the geopotential
mass-density-to-microgramskg/m^3, kg/m3, kgm^-3, kgm-3× 10⁹, kg/m³ to µg/m³
per-second-to-1e-51/s, /s, s-1, s^-1× 10⁵, s⁻¹ to 10⁻⁵ s⁻¹
code-table1, -, empty, the entry’s table, any spelling containing it or 0=no (after dropping codetable)identity

A GRIB record is accepted under the listed spellings alone. A series variable read out of a NetCDF file is accepted, in addition, under the variable’s own unit and its udunits spelling, which take the identity: the scaling rules scale only under their listed input spellings, so a series already in the published unit is left as it is.

The raster expression the two inspection paths compare (gdal.py, inspect.rs) is derived from the rule and the unit alone and is never written anywhere. A variable whose gdal list is empty matches no band; that is not an error.

match

"match": {
  "gribElement": "TMP",
  "indexField": ":TMP:2 m above ground:",
  "excludedIndexPhrases": [],
  "indexQualifier": "",
  "alternateIndexFields": [],
  "ecmwfParam": "2t",
  "ecmwfAlternateParams": [],
  "openMeteo": "temperature_2m",
  "dwdParam": "T_2M",
  "mrmsProduct": "",
  "gdalUnit": "C",
  "statistical": null,
  "aliases": [[0, 3, 0]],
  "alternates": [ { "discipline": 0, "category": 2, "number": 22, "levelType": 103,
                    "levelValue": 10.0, "statistical": 2, "gdalUnit": "" } ],
  "gdal": [ { "rule": "height", "element": "TMP", "metres": 2 } ]
}

The first eleven keys are the fetch-side spellings of VariableSpec (xuebuild/variables.py), one for one. statistical is the code table 4.10 process the record must carry (null: instantaneous). aliases are other parameter triples on the same surface, alternates whole other record identities, both accepted when matching and never written.

gdal is how the variable’s record is recognised among a GRIB’s bands as GDAL describes them: a list of rules, the band is the record when any one accepts it. Empty for a field no GRIB band carries (a derived field, a series-file variable). Each rule reads the band’s GRIB_ELEMENT, GRIB_SHORT_NAME, GRIB_COMMENT, GRIB_LEVEL, description and, for the template rules, GRIB_PDS_PDTN, GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES and GRIB_DISCIPLINE; the “text” is the short name, comment, level and description joined and lower-cased, except that isobaric, phrase, local-parameter, total-precipitation and accumulation-from-start search the comment, level and description without the short name. accumulation-from-start also reads GRIB_FORECAST_SECONDS. Elements compare upper-cased; the template-mrms element compares as written.

A band whose GRIB_PDS_PDTN is an ensemble template — 2, 12 (a derived forecast), 6, 10 (a percentile), 5, 9 (a probability) — is a statistic of an ensemble’s members, which the element and surface do not tell from the quantity (GDAL spells a spread as it spells the mean): only a template-ensemble rule accepts it, every other rule refuses it. The GRIB2 header index applies the same rules to the octets it reads, and a variable that carries its own ensemble block matches no record of another template.

RuleParametersAccepts the band when
surfaceelementsthe element is one of elements, and the short name ends in -SFC, or the text contains sfc=" or ground or water surface
heightelement, metresthe element matches, and the short name is <metres>-HTGL or <metres>-M-HTGL, or the text matches `(^
entire-atmosphereelementthe element matches, and the short name is 0-EATM or the text contains entire atmosphere
mean-sea-levelelementsthe element is one of elements, and the short name is 0-MSL or the text contains mean sea level
isobaricelement, hpathe element matches, and: where GRIB_PDS_PDTN is 0, 1, 8 or 11 and the assembled values (with GRIB_DISCIPLINE) give a first surface of type 100 with a value of whole pascals (the scaled value at index 11 times 10 to the minus the scale factor at index 10, a scale factor of at most 9 either way), that value is <hpa×100>; otherwise the short name is <hpa>-ISBL or <hpa×100>-ISBL, or the text names this level as <hpa> mb/hPa or <hpa×100> Pa and no other. The template decides first because GDAL spells 10 hPa 1000-ISBL, 1000 hPa’s short name in hectopascals
cloud-layerelement, shortName, phrasesthe element matches, and the short name is shortName or the text contains one of phrases
template—GRIB_PDS_PDTN is 0 and the assembled values’ parameter category and number, surface type and surface value equal the entry’s parameter or one of its alternates (a null level value accepts any)
template-aerosol—GRIB_PDS_PDTN is 48 and the assembled values equal the entry’s parameter and aerosol blocks whole
template-ensemblediscipline, category, number, levelType, levelValue, ensemble, hours, statisticalsee below
template-rank—the element is match.gribElement, then as template against the entry’s own identity, the surface value being the rank; without an assembled template, the short name is <rank>-RESERVED(<surface type>)
template-mrms—the element is the entry’s mrmsProduct up to its first _, the discipline is 209, and the assembled template 4.0 values equal the entry’s discipline-209 alternate (or its own identity); without an assembled template, a surface of type 102 must spell <value>-GPML in the short name
total-precipitation—the element is unknown, tp, apcp or tprate; the short name is 0-SFC or the text contains surface; and the comment contains cat 1, subcat 193 or the text total precipitation
accumulation-from-start—the element is APCP followed by nothing or by digits (GDAL names an accumulation by its length in hours, APCP06, APCP264, and the empty interval APCP); GRIB_PDS_PDTN is 8; GRIB_FORECAST_SECONDS, for template 4.8 the interval’s start, reads as 0 (a run total, where a window that starts later, the NAM’s APCP06 at 21600 s, is refused); and the short name is 0-SFC or the text contains ground or water surface
local-parametercategory, numberthe element is unknown, the short name is 0-SFC or the text contains ground or water surface, and the comment contains cat <category>, subcat <number>
phraseelement, phrasesthe element matches and the text contains one of phrases
geopotential-surfaceelementsthe element is one of elements, the short name ends in -SFC or the text contains ground or water surface, and the text contains geopotential

template-ensemble names the record whole:

{ "rule": "template-ensemble", "discipline": 0, "category": 1, "number": 8,
  "levelType": 1, "levelValue": null, "ensemble": { "percentileValue": 50 },
  "hours": 6, "statistical": 1 }

levelValue is a number or null (any value, a missing one included); ensemble is a block of docs/bundle.md §“Ensemble”; hours and statistical are both integers (an interval of at least one hour and its code table 4.10 process) or both null. It accepts a band when all hold:

  • GRIB_PDS_PDTN is the template of the block’s shape: a derived forecast 2 (hours null) or 12 (hours set), a percentile 6 or 10, a probability 5 or 9;
  • the leading integer of GRIB_DISCIPLINE is discipline;
  • in GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES (space-separated integers, from index 0): index 0 is category, 1 number, 9 levelType, and when levelValue is not null the surface value, index 11 × 10^−(index 10), equals it (a missing pair never equals a number);
  • the record’s statistic equals ensemble. After the fifteen values every template shares with 4.0, a derived forecast’s code is index 15, a percentile’s index 15, a probability’s type index 17 with the lower limit at 18–19 and the upper at 20–21; a limit with either half missing is null, and a probability keeps only the limits its type uses (types 0, 3, 5 the lower, 1, 4 the upper, 2 both), whatever the record wrote in the others;
  • of an interval template, there is exactly one time range, its unit is hours (1), its length is hours and its process statistical: indices 23, 25, 27, 28 of 4.12, 22, 24, 26, 27 of 4.10, 28, 30, 32, 33 of 4.9 (the range count, the process, the unit, the length).

A missing scale factor is −127 or 255 and a missing scaled value −2147483647 or 4294967295, whichever way the driver assembles them. A template the driver did not assemble, or assembled short, is no record.

Bundles

A bundle id absent from bundles is the scalar bundle of the variable of the same id. Every other bundle is listed:

"wind10m":   { "kind": "vector", "members": ["ugrd10m", "vgrd10m"] },
"qflux850":  { "kind": "vector", "members": ["uqflx850", "vqflx850"],
               "derivation": { "kind": "vapour-flux", "inputs": ["spfh850", "ugrd850", "vgrd850"] } },
"thetae850": { "kind": "scalar",
               "derivation": { "kind": "theta-e", "inputs": ["tmp850", "spfh850"], "levelHpa": 850 } },
"prate":     { "kind": "scalar",
               "derivation": { "kind": "precipitation-rate", "inputs": ["prate", "tp", "prate_ave", "apcp"] } },
"dustrgb":   { "kind": "composite", "members": ["dustr", "dustg", "dustb"], "producer": "shachen",
               "inputs": ["ir086", "ir104", "ir112", "ir123"], "optionalInputs": ["ir112"] },
"refl3d":    { "kind": "volume", "members": ["refl0500", …] }
KeyMeaning
kindscalar, vector (two members, u then v), composite (members an algorithm produced in the fetch stage, read off the series), volume (members read directly, lowest level first).
membersThe variables the bundle’s arrays hold, in file order (variableId 1…n). Absent for a scalar.
derivationoptional. The members are computed in the converter from inputs, by the named algorithm. levelHpa is written where the algorithm takes the surface.
producer, inputs, optionalInputsA composite’s producer id, the channels it reads, and the subset of those a source may lack (read when the source fetches them, left out otherwise).

derivation.kind is one of the closed set: vapour-flux (q·V/g from a specific humidity and a wind pair), wave-vector (a height laid along a direction), theta-e (Bolton’s equivalent potential temperature at levelHpa), precipitation-type (the four categorical flags combined), clear-air-turbulence (Ellrod at levelHpa, calibrated by the source’s catCalibration), precipitation-rate (the first of inputs the source lists, de-accumulated, de-averaged, divided by its interval, differenced within its window or taken as is by the source’s precipitation flags).

Sources

One entry per source, every field of xuebuild/sources.py’s SourceSpec under its camelCase name, nested records as objects, tuples as arrays — except feed and packing, which only the fetch reads (the native encoder never fetches), and columnArrays, which only build-columns reads (zarr-profile.md, “Column store”). A companion family’s repack is always false: repacking is the source’s packing, not a family’s.

"gfs": {
  "id": "gfs", "manifestModel": "GFS", "product": "pgrb2-0p25", "latestFilename": "latest.json",
  "steps": [[120, 1], [384, 3]],
  "inputVariableIds": ["tmp2m", "prate", …],
  "accumulatedPrecipitation": false, "averagedPrecipitation": false, "intervalPrecipitation": false,
  "windowedPrecipitation": false, "averageWindowHours": 6, "accumulationWindowHours": 12, "firstHour": 0,
  "companionFiles": [{ "id": "wave", "variableIds": ["htsgw", …], "repack": false, "productionGrid": null, "tile": null }],
  "optionalAtAnalysis": ["prate", …],
  "statisticalProcesses": [["gust", 2]],
  "bands": [["ir039", { "satelliteSeries": 0, "satelliteNumber": 174, "instrumentType": 297, "centralWavenumber": 257380 }]],
  "ensembles": [["tmp2m", { "percentileValue": 50 }]],
  "intervalPrecipitationPairs": [["prateq25", "apcpq25"]],
  "variableFirstHours": [["apcp24gt1", 24]],
  "variableStepHours": [["apcp24gt1", 12]],
  "platform": null, "openMeteo": null, "gridStep": null, "region": null,
  "bundleScalarIds": [...], "coreBundleIds": [...], "bundleVectorIds": [...], "bundleCompositeIds": [], "bundleVolumeIds": [],
  "productionGrid": [1440, 721], "tile": [48, 52], "variantFactors": [2], "seriesBundleIds": [...],
  "fetchConcurrency": 4, "observation": false, "windowHours": null, "cadenceSeconds": null, "objectCadenceSeconds": null,
  "seriesFile": false, "downsample": null, "cycleHours": 6, "longCycles": [], "longCycleSteps": [],
  "gridRelativeWinds": false, "gaussianN": null, "video": true, "catCalibration": [[300, 0.0, 0.0], …]
}

The four precipitation flags name how the source’s precipitation input becomes prate, and a source sets at most one: accumulatedPrecipitation (a total since the run began, differenced against the previous frame), averagedPrecipitation (a mean rate since the start of a window of averageWindowHours, scaled to a total and differenced within the window), intervalPrecipitation (the total over the interval ending at the frame, divided by the interval’s hours) and windowedPrecipitation (a total since the start of a window of accumulationWindowHours, differenced against the previous frame of the same window and, on the window’s first frame, against zero). A window that ends at hour h starts at w × ⌊(h − 1) / w⌋ for its length w. A source that sets none reads the rate as it is.

ensembles names, per published variable that is an ensemble’s centre standing in for the deterministic field under its id, the ensemble block written onto that variable’s metadata, as bands names a channel’s. intervalPrecipitationPairs are further [rate, total] pairs an intervalPrecipitation source derives the way it derives prate from its input: the total over the interval ending at the frame divided by the interval’s hours, on the same axis and analysis-optional through the total’s own optionalAtAnalysis entry; the rate is then the bundle the total is read for. variableFirstHours names inputs absent from every frame before an hour (an integer above 0): no earlier frame is read for them or required to carry them, they never key a run’s axis, and the series of a bundle read from them starts at that hour, on a time_<id> axis of its own; a build that ends before the hour leaves the bundle out. variableStepHours names inputs written only every so many hours (an integer above 0), counted from the input’s first hour (0 when variableFirstHours does not name it): a frame at hour h carries one exactly when h is at least the first hour and h less the first hour is a multiple of the step. No other frame is read for it or required to carry it, it never keys a run’s axis, and a bundle read from it is on a time_<id> axis of its own, the run’s axis thinned to those hours — even when its first hour is the analysis.

downsample is {"factor": n} or null. gridRelativeWinds is true on a source published on a map projection, whose wind pairs a reader turns to east and north (docs/encoder.md, “Native grids”), and whose bundles are on y and x. gaussianN is the latitudes per hemisphere of a primary grid that is regular Gaussian, or null. The meaning of each field is SourceSpec’s docstring and docs/contribution/sources.md.

The shell’s copy

xue registry --shell web/src/data/registry.ts writes, beside the document, the part of it the shell reads, as a TypeScript module (export const REGISTRY = {…} as const) so the ids reach the type checker as literal unions. It carries every published variable’s unit, parameter, producer, aerosol, ensemble and quality codebook; every bundle’s kind and members; each source’s label (manifestModel), product, latestFilename, observation, coreBundleIds and cadenceSeconds; and, from the same tables, the isobaric, turbulence, stratosphere and relative vorticity levels, the family lists the shell’s rail groups by, the pressure family’s contour intervals and the tropical cyclone registry (xuebuild/tc/registry.py). It is not a published artifact either, and it is held to the tables by the same test as the document.

Closed sets

A reader implements these names and refuses a document that names any other, as it refuses a registrySchema it does not implement. Adding a name is a behaviour change and needs the readers released; using an existing name on a new entry does not.

FieldNames
quantization.<profile>.typelinear, log1p
seriesQuantization.typelinear
conversion.rulethe thirteen rules above
match.gdal[].rulethe fifteen rules above
predictordelta, raw
decimationsample, peak
companions[]poster, video
bundles.<id>.kindscalar, vector, composite, volume
derivation.kindthe six algorithms above
sources.<id>.downsamplethe one shape

Validation

Before reading any input, a reader checks: the schema; every name above; that every members, inputs and derivation.inputs id is a variable; that every bundle id a source lists is a variable or a bundles entry; that every id a source’s ensembles, intervalPrecipitationPairs, variableFirstHours and variableStepHours name is a variable, the pairs only on an intervalPrecipitation source and every first hour and step above 0; that a source sets at most one precipitation flag, and a windowedPrecipitation source an accumulationWindowHours above 0; that a vector has two members; that a published variable (one with quantization) has every profile the reader is asked for; that a seriesQuantization is a linear codebook whose code range follows from its parameters, every code from 0 to 65535 and its nodataCode above 255, so its codes are sixteen-bit; and that every profile codebook under quantization keeps every code from 0 to 255. Any failure refuses the whole build. A build is handed one source’s part of the document: that source, the bundles it publishes and the variables they read (registry.source_document_json), so these checks stop only the sources that reach the problem.


Part of the Xue specification, licensed under CC BY 4.0.

5 - The native encoder

xuebuild/ is the reference encoder: Python driving GDAL and zstd as CLI subprocesses. rust/xue/src/encode/ is the same convert-bin pipeline written in Rust with those tools linked in process, behind the xue crate’s off-by-default encoder feature, and published as the xuepy wheel.

A build converts through it by default. The Python encoder remains the reference (a format change lands there first), and the native encoder is held to it by byte-for-byte identical output.

Motivation

Profiling the Python pipeline put the remaining wall time in extraction: gdal_translate -of ENVI -ot Float64 writes every plane to disk as float64 and the encoder reads it back. A full GFS run is 121 files × 4 variables × 1.04 M points × 8 bytes ≈ 4 GB written and re-read per build, plus one subprocess per file. Reading the same bands through GDAL’s C API skips all of it.

Components

StagePythonNative
grid + band metadatagdalinfo -json subprocessgdal-sys (georust) in process, exported back to Python as xue.gdal_info so xuebuild can inspect without a system GDAL
plane extractiongdal_translate → ENVI → np.fromfileGDALRasterIO into a Vec<f64>; PNG-packed GRIB2 (template 5.41, every MRMS product) inflated directly (gribpng.rs), with the single-precision unpack calibrated against one GDAL read per process
GRIB2 record indexhand-rolled section walker (xuebuild/grib2.py)grib-rs
compressioncompression.zstd / zstd CLIzstd crate (ZSTD_compress2)
poster deflatezlib.compress(level=9)flate2 on libz
read-back verifyxuebuild/binformat.py reference readerthe xue decoder crate, the same code the browser runs

gdal-sys is used rather than the high-level gdal crate because, as of gdal 0.19, the safe wrapper does not compile against GDAL 3.13 (its GDALDataType and GDALRasterIOExtraArg changed shape). The surface needed here is a dozen stable C functions (src/gdalio.rs).

GDAL’s GRIB driver takes about 0.3 s to unpack one 7000 × 3500 MRMS plane whose PNG inflates in under 10 ms; gribpng.rs reads it in about 80 ms. Its values must be GDAL’s to the bit. g2clib computes refD + bdscale × X in single precision, and whether that multiply-add is fused depends on how the linked GDAL was compiled. So the first eligible plane is read both ways, and the arithmetic that reproduces GDAL is used from then on. If neither does, every read stays on GDAL.

Each band is taken through the whole per-plane chain (column roll, fill values, block thinning, crop, the completeness check, unit conversion) as soon as it is read, before the next band is read, so a worker holds one full-resolution plane at a time rather than every record of its file. That matters for the MRMS 3D mosaic, whose frame is 33 records of 7000 × 3500 doubles: 6.5 GB read whole, 196 MB a plane. A file the netCDF driver reads is the exception: its reads stay serialized under netcdf_guard, and its planes are finished after the guard is released.

Building

GDAL must be discoverable through pkg-config, and gdal-sys generates its bindings with bindgen, so libclang must be present too:

export PKG_CONFIG_PATH="$(gdal-config --prefix)/lib/pkgconfig"
cargo build --release -p xue-encode

Or, from the repository root, make encoder-rust.

Using

xue-encode convert-bin data/raw/gfs.2026082006 --model gfs --output out/
xue-encode convert-bin cases/ --model gfs --output out/ \
    --bbox 105,28,122,42 --bundles prate,wind10m --manifest out/manifest.json
xue-encode convert-bin --help

--skip-video is accepted and ignored: no encoder builds the retired H.264 companion.

In the build pipeline

xuebuild depends on the xuepy wheel and converts through it by default. xuebuild/encoder.py is the dispatch and XUE_ENCODER overrides it:

XUE_ENCODER
auto (default)the native encoder when the wheel imports, the Python pipeline otherwise
nativerequire the wheel; fail if it is missing
pythonthe reference pipeline, whatever is installed

make check reports which one a build would take. The scheduled publish-* workflows pin native: a run that fell back to the Python pipeline would take hours longer and look identical in the logs. publish-jma.yml and the other rolling windows are the exception: a wheel ships on the crate’s tags, so the wheel on PyPI can predate a rule the registry document now names, and a scheduled run cannot pass an input. Their Resolve the encoder step asks native.knows_source(model) and sets XUE_ENCODER=native when the installed wheel implements the document, else python with GDAL installed and a ::warning:: on the run, so the fall back is explicit rather than silent; a dispatch can still insist on either. The question is the wheel’s validate_build(registry=..., model=..., bundle_ids=...): the checks convert_bin makes before it reads any input (the document, the source, the profile’s codebooks, the bundle list), run alone. It returns None, or raises xue.UnsupportedRegistry (a RuntimeError) naming what this wheel does not implement, which is the one answer that falls back. Anything else it raises fails the step: the reference pipeline runs through the same wheel, so a broken wheel would fail that build too. A wheel without validate_build is asked with an empty conversion instead, and only its refusal of the empty input list (no GRIB files given, or a series-file source’s a <model> build takes one NetCDF series, …) counts as a yes.

The registry document

The native encoder holds no table of variables, bundles or sources. It reads the registry document (registry.md) — the one JSON document the Python tables author and xue registry prints — and builds from that: every codebook, every GRIB band rule, every unit conversion, every bundle’s members and derivation, every source’s inputs and grid come out of the document (rust/xue/src/encode/registry.rs parses it, units.rs and inspect.rs implement its rule names). No code path in rust/xue/src/encode/ selects behaviour by matching a variable or bundle id; what an id means is what its entry says.

The document reaches the encoder two ways:

  • the wheel’s convert_bin(..., registry=...) takes it as a required keyword argument carrying the JSON text, and xuebuild/native.py passes xuebuild.registry.document_json() on every call, and validate_build(registry=...) takes it the same way; xue.quantize takes the same registry= keyword, since a codebook is a block of the document;
  • xue-encode convert-bin takes --registry <path>, and without one reads the snapshot embedded at build time, rust/xue/registry.json, which xue registry --output rust/xue/registry.json regenerates and tests/test_registry.py holds to the Python tables.

The encoder validates the document it is handed before any input is read (registry.md §Validation) and refuses it with the field and value named when it carries a registrySchema, a rule, a derivation or a codebook type the encoder does not implement; a key it does not know it ignores. A build hands it only its own source’s part (registry.source_document_json), so a rule a wheel lacks stops the sources that use it and no others. So a table change — a new source, a new bundle, another level of a known family, a changed codebook, a changed set of inputs — is a commit to main and needs no release: the next build hands the new document to the wheel already installed. A release is still needed for what the document cannot say: a new rule name under conversion or match.gdal, a new derivation.kind or codebook type, a new ingest path (a file shape the converter does not read), or a registrySchema bump, each of which the installed wheel refuses, for the sources that use it, until the wheel that implements it ships. A seriesQuantization is the exception that is not refused: a wheel that predates it ignores the key and writes the series store on byte codes, so a codebook enters SERIES_CODEBOOKS only once the wheel the builds run writes sixteen-bit series stores.

The native encoder writes the Zarr stores’ arrays itself, straight from its codes (rust/xue/src/encode/zarrstore.rs, the counterpart of zarrstore.write_bundle_arrays over a CodesSource), with the series stores for the bundles the caller names (SourceSpec.series_bundle_ids, passed in by native.py). A series store’s widened variables (zarr-profile.md, “Series store”) follow the reference’s rule over the same document: every variable of those bundles (of bundle_ids alone on a restricted build) whose registry entry carries a seriesQuantization is quantized a second time in the per-file stage, from the float plane its byte codes come from, with the same round-half-up and clamp, into sixteen-bit codes. Those go to a spool, one file per variable in a scratch directory of the build’s own under the system temporary directory (xue-series-<pid>-<n>; the wheel takes no work directory, and the output is never used, since a publish uploads it), frame-major and little-endian, by positioned writes as each file finishes; the series writer reads them back one block row (every frame of eight grid rows) at a time, writes the variable as a uint16 array under the series metadata (the bundle’s, the block as that variable’s quantization), and deletes the variable’s file once its store is written; the directory goes when the build returns, failed or not (only a process killed outright leaves it, in the temporary directory). Every other variable of a series store, and every map store, container and tier, keeps its byte codes exactly. The wheel’s write_store takes uint16 planes for such a variable too, which is what tests/_support.py::native_writes_wide_series asks before a parity test over widened series stores runs. It does not write two artifacts, and xuebuild/native.py supplies them:

  • The shared stores’ group documents. See “Shared stores” below.

  • The live pointer. It carries the manifest’s CRC32, and stamping the shared stores’ CRCs in changes the manifest, so the native encoder has no pointer writer: it writes the manifest alone and the pointer is written afterwards, from the finished bytes. The wheel’s convert_bin still accepts latest_path and run_id and ignores them.

tests/test_native.py holds the two together: one build through each encoder into identically shaped directories, then every artifact compared byte for byte (stores, containers where written, reduced-resolution variants, posters, manifest.json, and the live pointer), and one fanned-out job’s arrays, parts and partial manifest the same way. tests/test_zarr.py also holds the two one-bundle store writers to the same bytes directly (xue.write_store).

Shared stores

A run’s map stores are shared (zarr-profile.md, profile 2): every bundle of one tier in bundles[.<tier>].zarr. The call boundary is the partial group document. For every build, whole or one job of a fan-out, the wheel writes into each tier’s shared store:

  • every bundle’s variable arrays, as a one-bundle store’s but with attributes.xue.bundle leading the block and the bundle’s dimension names (discover.store_dimensions: time_<bundle id> for a published scalar in analysis_optional_ids or a static first variable, latitude_<family> / longitude_<family>, <family> the id bundle_grid_family returns, for a bundle off the primary grid);
  • every coordinate array those names call for, the same bytes whichever bundle writes it;
  • one partial group document, zarr.part.<first bundle id>.json — the profile’s group document (zarrstore.group_document, same key orders, same serializer as zarrstore._dump_json) over the bundles this build wrote, in manifest order — and no zarr.json;

and names each store in its manifest entries with the entry’s byteLength (its arrays and the coordinates it uses) and the part’s CRC-32 as crc32, writing the manifest where native.py asks (.<manifest>.native, beside the real one). native.py then, unless the build is a fan-out job (partial=True), calls zarrstore.finalize_store on each store — the reference’s own merge, which writes zarr.json and removes the part — and stamps the group document’s CRC-32 on every entry naming the store as it writes the real manifest. A fan-out job keeps the part and the part’s CRC; assemble-run does the rest, as for the reference.

This keeps byte identity to what the native side writes anyway (arrays, coordinates, and one JSON document per store in the profile’s serializer) and gives the group document, the merge with parts and live documents and the CRC stamping one implementation, the reference’s. The wheel’s own store reader opens a profile-2 group by bundle id (zarr::parse_group_metadata_for(text, bundle_id)), which the encoder’s read-back self-check uses.

Column stores

A run’s column store (zarr-profile.md, “Column store”) is cut after the run is finished, from its map stores, so it is a call of its own rather than part of a conversion: xue.write_columns (rust/xue/src/encode/columns.rs), the counterpart of columns.write_column_store. It is data processing alone. It takes no registry document and knows no source; it takes a plan, the one document both writers are called with, as JSON text:

{
  "columnsPlan": 1,
  "arrays": [
    { "id": "tmp", "predictor": "previous",        // or "raw"
      "levels": [1000, 975],                       // levelled arrays only
      "members": [
        { "bundle": "tmp1000", "variable": "tmp1000", "store": "bundles.zarr" },
        { "bundle": "tmp975", "variable": "tmp975", "store": "bundles.zarr" } ] },
    { "id": "orog", "predictor": "previous",
      "members": [ { "bundle": "orog", "variable": "orog", "store": "bundles.zarr" } ] }
  ]
}

store is relative to the run directory. The metadata, grid, axis, codebooks, codes and tiling are read from the stores named, of either profile: of each, the group document, whose consolidated metadata holds every array’s, and each member’s shard. A columnsPlan, key or predictor this writer does not implement is refused, and so is what a column store cannot hold: members of one array that differ in axis or nodata code, members of one store that differ in run, profile or grid (1 and 1.0 differ, as they are spelled apart in a document), a projected grid. The Python side makes the plan from the source’s column_arrays, the registry and the manifest.

The unit of work is one shard of one array: a band of 96 rows, every level over the whole axis, held uncompressed. A worker seeks to the inner chunks of the map shards that overlap its band and decodes them one at a time, and writes each payload as it is compressed, so memory is one band per worker: for twenty-one levels of a 161-frame axis on the 0.25° global grid, 467 MB each. The shards run in a pool of jobs threads and the bytes do not depend on how many. The level is 6, not the grid stores’ 15 (zarr-profile.md). Every chunk is decompressed again and compared with what went in, and the group document is parsed by the decoder’s reader (column::ColumnGroup) twice: before the cut, so that what a reader would refuse is refused at once, and as it is written. It is written last, by rename; a cut that fails removes its directory, and an output that exists is an error.

xuebuild/encoder.py picks the writer by XUE_ENCODER as it picks a conversion’s: under auto a wheel without write_columns falls back to Python, under native it is an error. tests/test_columns_native.py holds the two to the same directory, byte for byte, over the committed fixture and over synthetic stores, at one worker and at four.

Python bindings

rust/xue-py/ is a thin PyO3 + rust-numpy wrapper, published as the xuepy distribution and imported as xue. It carries both halves of the crate.

The decoder is Bundle, the same reader the browser runs through wasm. Planes come back as uint8 NumPy arrays of quantized codes:

import xue

bundle = xue.Bundle.open("web/public/data/gfs.2026082006/tmp2m.xue")
plane = bundle.decode(variable_id=1, frame_offset=24)  # uint8, width * height
codebook = bundle.metadata["variables"][0]["quantization"]
celsius = codebook["offset"] + plane * codebook["scale"]

The encoder is convert_bin, which runs the whole native conversion and returns the same report dictionary the Python pipeline returns, plus quantize / encode_residual / decimate / encode_poster, which take and return NumPy arrays so individual stages can be compared against xuebuild/quantize.py and xuebuild/temporal.py without running a build, write_store, which writes one bundle’s one-bundle (profile 1) Zarr store from codes handed in as NumPy arrays, and write_columns, which cuts a run’s column store (“Column stores” above):

report = xue.convert_bin(["data/raw/gfs.2026082006"], "out/", model="gfs")
# out/bundles.zarr, out/bundles.half.zarr with their parts (native.py writes
# the group documents); and the .xue containers too:
report = xue.convert_bin(["data/raw/gfs.2026082006"], "out/", model="gfs", container=True)

convert_bin writes the Zarr stores alone by default (zarr=True, container=False), as every live run publishes; container=True adds each bundle’s .xue beside the stores, from the same codes, and zarr=False, container=True writes the containers alone.

Installing

pip install xuepy

The wheel carries its own GDAL, so nothing else has to be installed and no environment variable has to be set. The wheel is abi3-py314: one per platform, not one per Python minor version. Linux wheels are manylinux_2_39, tagged with the glibc of the ubuntu-24.04 runner that built them, which means Ubuntu 24.04 and later, Debian 13 and later; broader coverage would mean building inside a manylinux_2_28 container. macOS is arm64 only.

Building a wheel

make encoder-wheel          # minimal GDAL, then the wheel, then repair it

scripts/build-gdal-minimal.sh builds libaec, OpenJPEG, HDF5, netCDF, PROJ and GDAL from source into build/gdal-minimal, and scripts/build-encoder-wheel.sh stages GDAL’s and PROJ’s data directories plus every licence text into the package, runs maturin, and lets delocate (macOS) or auditwheel (Linux) move the shared libraries in. zlib and sqlite3 come from the platform and are not bundled.

Why a bundled GDAL, and why a minimal one

The wheel has to carry GDAL, because the GRIB driver will not read a band without GDAL’s own data directory: with GDAL_DATA unset it reports Cannot find grib2_center.csv and then matches zero records, so record matching fails outright rather than degrading.

A distribution GDAL is not suitable to carry. A package-manager build pulls a 318 MB closure of 227 shared libraries (Arrow, TileDB, OpenBLAS, libicu, x265), of which the encoder uses none. It also includes Poppler (GPL-2/3), x265 (GPL-2), libde265 (LGPL-3), libspatialite and mariadb-connector-c (LGPL), whose obligations a redistributed binary would have to answer for.

Built here with the GRIB and netCDF drivers, plus the JP2OpenJPEG driver the GRIB driver decodes JPEG 2000-packed records through (WAVEWATCH III packs the GFS-Wave files that way, DRS template 5.40), and nothing else, the whole closure is eight libraries:

16.4 MBlibgdal
4.2 MBlibproj
3.9 MBlibhdf5
1.2 MBlibnetcdf
0.4 MBlibopenjp2
libhdf5_hl, libaec, libsz

plus 10.2 MB of proj.db and 3 MB of GDAL’s data tables: a 12 MB wheel. zlib, sqlite3, libSystem and libc++ come from the platform.

Everything bundled is permissive and allows binary redistribution with attribution: GDAL and PROJ (MIT), HDF5, libaec and OpenJPEG (BSD), netCDF (MIT-style), and zlib and sqlite3 from the platform. Several ask explicitly for their notice to travel with a binary, so the wheel carries them in xue/licenses/.

Build problems and their fixes

Each is commented where it happens:

  • Enumerating the codecs to disable does not work. GDAL probes several through pkg-config, which has its own search path; a machine with Homebrew ends up linking libjxl and Brotli into a build with no driver able to use them, and because those were built for a newer macOS, the wheel comes out tagged macosx_26_0 instead of macosx_11_0. GDAL_USE_EXTERNAL_LIBS=OFF plus the three dependencies by name is the reliable form, and for OpenJPEG the library’s path as well: GDAL’s probe goes through pkg-config, CMake caches what it found the first time the tree was configured, and a developer machine linked Homebrew’s libopenjp2 into a wheel meant to carry its own.
  • CMake will compile against one copy of a library and link another. With Homebrew’s HDF5 2.1 headers ahead of the 1.14 built here, netCDF built cleanly and then failed at run time on every netCDF-4 file with H5Pset_libver_bounds(): high bound is not valid, an enum value that only exists in the newer library. CMAKE_IGNORE_PREFIX_PATH keeps the prefix and the platform SDK the only things in scope.
  • delocate cannot vendor what it cannot resolve. The extension links libgdal by its @rpath install name, so the build passes -C link-arg=-Wl,-rpath,<prefix>/lib; delocate strips the rpath again once the libraries are copied in.

Equivalence

make encoder-rust-test runs the crate’s unit tests plus a golden test that encodes tests/fixtures/gfs.2026081406.f000.crop.grib2 and demands the exact bytes tests/prepare_bin_fixture.py produced with the Python encoder.

Four places needed care to reach that:

  • The geotransform is what gdalinfo -json prints, on both sides. GDAL writes each coefficient in fixed notation with sixteen decimals, then its intelliround cuts a trailing 00000x or 99999x as binary noise (the same code in 3.8 and 3.13), so a netCDF axis’s 0.012500000000000292 reads as 0.0125. The native encoder reads the doubles through the C API and passes them through the same formatting (gdalio::as_gdalinfo_json), which is also what the wheel’s gdal_info reports, so the Python encoder sees one geotransform whichever GDAL it inspects through. A grid the snaps in grid.rs clean (whole thousandths or arc-minutes, a global width) never noticed the difference; the CWA radar’s 0.0125° grid does.
  • flate2 links stock libz, not zlib-rs. zlib-rs is a port of zlib-ng, whose deflate output differs from the zlib CPython uses, which would change every poster payload.
  • The manifest’s embedded metadata strings are json.dumps at its defaults. A bundle stores its metadata compact and in raw UTF-8; the metadataJson a manifest carries for a poster is the same object written with a space after every separator and every non-ASCII character escaped, so the degree sign in the temperature unit reaches the manifest as °. pyjson::dumps_default does both.
  • Compression is one-shot on both sides. The Python encoder calls compression.zstd.compress, which records the pledged source size in the frame header. The streaming encoder does not, and picks different window parameters (about 5 % larger payloads and different bytes), so zstd_compress here calls ZSTD_compress2 one-shot as well.

The reference compresses through compression.zstd (Python 3.14, the floor of xuebuild), so both encoders run one-shot libzstd. The byte comparisons still skip when the two link different libzstd versions (require_comparable_compression in tests/_support.py).

Native grids

A model on its own grid (docs/bundle.md, “Projected Sources”, “Gaussian rows”) adds three pieces of arithmetic on top of what a regular grid does. The operation order is normative: both encoders land on the same doubles. On the native side rust/xue/src/projection.rs holds the projection and the Gaussian iteration, encode/reproject.rs the published grid, the rotation and the crs array’s text, and encode/grid.rs the window and the rows.

Reading the grid. round3 of the geotransform’s origin and steps, then half a step in: x0 = round3(gt0) + dx / 2, y0 = round3(gt3) + dy / 2, dy < 0. A file on a projection is only accepted for a source with grid_relative_winds, and that source only accepts such a file. Its dimensions are y / x by the same flag (discover.store_dimensions).

Winds. After the extraction (fill, unit conversion, crop) and before any derivation and quantization, each vector bundle’s pair on a grid_relative_winds source is turned, on the plane the published window describes. No libm call runs per cell. ρ0 is the projection’s origin_radius, computed once:

x     = x0 + column × dx
apex  = ρ0 − (y0 + row × dy)
ρ     = copysign(1, n) × sqrt(apex × apex + x × x)
sin α = x / ρ
cos α = apex / ρ
u_e   = cos α × u + sin α × v
v_e   = −sin α × u + cos α × v

The sign is the cone’s, as in the inverse projection; it changes nothing on a northern cone. Decimation works on the codes of the turned planes, so a tier keeps sample sites and rotation. A derived vector bundle on such a source is refused (binconvert._grid_relative_vectors, convert::grid_relative_vectors), and so is clear-air turbulence on any projected grid.

A box on a projected grid. crop_grid walks each edge of (west, south, east, north) in 64 points, ends included, with latitudes clamped to ±89.9: longitude = west + (east − west) × i / 63.0, latitude = south + (north − south) × i / 63.0, each edge’s fixed side as given. A point goes through LambertConformal.forward_wrapped, then column = (x − x0) / dx, row = (y − y0) / dy. The window is floor(min + 1e-9) to ceil(max − 1e-9) on each axis, clamped to the grid, the rule a regular crop has. Empty is an error, and so is a box whose east is west of its west. The window’s x0 is x0 + column_start × dx and its y0 likewise, unrounded. A tier doubles dx and dy, keeps x0 and y0, and takes (n + 1) // 2 on each axis.

Gaussian rows. A source with gaussian_n writes the gaussian block on its primary grid, not on a grid family of its own: firstRow = floor((90 − first latitude) × (2n + 0.5) / 180 − 0.25), the inverse of the iteration’s first guess, rounded, rowStride 1. A file whose first latitude is more than a quarter of a row from that row, whose rows run off the grid, or whose step is more than 1 % from 180 / 2n is refused. A crop adds its row_start to firstRow; a tier doubles rowStride. The regular fields are computed as ever. The column roll moves columns only. The store’s latitude coordinate is the iteration of docs/zarr-profile.md, “Coordinates”, one row at a time.

Grid families

One source publishes its inputs on two grids: CFSv2 writes the surface series on the model’s T126 Gaussian grid and the pressure-level and sea level pressure series on a regular 1° one. GDAL cannot read a GRIB whose messages disagree on the grid — it exposes the later bands at the first message’s size, warns that the data access may be incomplete and returns a different checksum than reading that record alone — so the second grid cannot simply be appended to the frame. It is a grid family: sources.CompanionFile with a production_grid and a tile of its own.

What both encoders do with one:

  • Layout. A family’s records of a frame live in a sibling file of the same name under a directory named by the family id — cfs.2026091912/pgb/cfs.2026091912.f006.grib2 beside cfs.2026091912/cfs.2026091912.f006.grib2 (sources.family_frame_path, the one place the rule is written down). Listing a run directory lists files, not directories, so the frame list is unchanged; a build narrowed to one family’s bundles writes no primary file at all, and then the frames are listed from that family’s directory and named by the primary path they would have had.
  • Inspection and extraction. A family’s variables are inspected and extracted from its own file, and a frame’s answers are merged into the one frame dictionary the rest of the converter reads. A missing family file is an error, not a fall-back.
  • Grid. Each family gets its own GridInfo, read from its own file by the same rules (the global longitude snap, the regional step snap, the column roll). A complete build checks each family’s grid against that family’s production_grid, and --bbox crops each family separately.
  • Bundles. A bundle is built on the family every one of its inputs is read from — the vapour flux at 850 hPa reads the specific humidity and the wind pair there, all from the same family — and a bundle whose inputs would span two grids is refused outright. Its grid, its tile, its resolution ladder, its poster and its metadata are that family’s.
  • What stays the primary family’s. The build report’s run-level grid, and therefore the STAC Item’s bbox and spatial dimensions, which are read off the core scalars’ poster metadata. The manifest has no run-level grid and the frontend opens one grid per session, so nothing in the delivery contract changes.

A companion family without a production_grid is unchanged in every respect: GFS-Wave and the ECMWF wave stream are still appended to the frame’s GRIB after the primary file’s records, on the source’s own grid.

Not covered

Fetching (xue fetch), the showcase driver and build-bin stay in Python.

Verified against

Every source, on real runs, with every artifact compared byte for byte:

SourceWhat it exercises
GFSthe plain path, the two-variable wind bundles, the derived vapour flux and the derived 850 hPa equivalent potential temperature (exp / ln / pow on both sides), the surface diagnostics, and the ocean fields: the wave records’ bitmap fill and, on a whole frame, the WAVEWATCH III grid snapped to the exact 0.25° grid
ECMWFde-accumulating tp, and the shorter prate axis that follows; the records that arrive under another identity than GFS’s (the interval-maximum gust on the 10 m surface and its own analysis-less axis, the cloud cover as a local parameter in a 0–1 fraction, the most-unstable CAPE on surface type 17, the skin temperature as 0/0/17, the ice thickness with a bitmap, the wave period and direction under neighbouring parameter numbers), each matched both by the GRIB2 header index and by GDAL’s band metadata; the ensemble products appended by the fetch (template 4.2 spreads as code-table-4.7 code 2 and the sea-level pressure’s as 0/3/0, template 4.9 probabilities on 0/1/52 with an unscaled limit), matched by the extra template-ensemble rules of the CMA ids and published under the registry’s identity; the probabilities’ twelve-hourly axis from +24 h (variable_step_hours, a time_<id> axis thinned from the run’s) (tests/test_ecmwf.py, on the Kara Sea fixture)
ECMWF 0.1° (ifs)the ECMWF row’s work on the model’s full 0.1° grid (3600 × 1801), with the IFS HRES tile (90 × 95) and two-rung ladder; the split sfc / pl objects are reassembled by the fetch stage, so the encoder reads one GRIB per frame as for ECMWF (tests/test_ifs.py, on a Kara Sea crop)
GFS-SFLUXde-averaging prate_ave, the Gaussian grid and its gaussian block, the -180 column roll, dswrf
RRFSthe mass-density-to-micrograms rule, and HRRR’s projection on a frame from two file families (tests/test_rrfs.py)
WOOF-NAMa second Lambert conformal grid, NCEP 218 (tangent at 25°N), and a precipitation total that restarts every twelve hours, differenced within its window into the rate (tests/test_woofnam.py)
HRRRa projected source: the Lambert conformal grid read out of GDAL’s WKT and published as it is, schemaVersion 4, the y / x coordinates and the crs array, the winds turned to east and north (exact IEEE arithmetic per cell; tests/test_hrrr.py), and the MSLMA / REFC aliases
GEFS-AEROSOLSGRIB2 product definition template 4.48: the aerosol type and the size and wavelength intervals parsed out of the template by the header index and out of GDAL’s GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES by the band matcher, compared whole with the registered AerosolIdentity (a dozen AOTK records per frame share the parameter and surface), written as the metadata’s aerosol block; the log1p codebooks on fields other than precipitation, NCEP’s local PMTF / PMTC numbers in µg/m³ as GDAL reports them (tests/test_aerosol.py, on the Saharan fixture)
CFSv2a seasonal run on two grids: the T126 Gaussian surface grid, its column roll, its gaussian block and the true latitudes of its store coordinate, the 1° pressure-level grid family beside it (its own frame file, its own GridInfo, its own tile and ladder, and the vapour flux derived on it), NCEP’s local “entire atmosphere” surface (type 200) accepted under the pgrb2 total cloud cover’s identity, the 9999 ice-thickness fill, and an axis that begins at a step rather than at the analysis (first_hour 6, so every bundle carries firstFrameOffset: 6) with the three flux fields’ typeOfStatisticalProcessing written into metadata although the records are the instantaneous template (tests/test_cfs.py, on the East Asian fixture)
ICON-EUa regional regular grid at a power-of-two step (0.0625°) that the regional snap leaves as it is, DWD’s encodings under the existing alternates (the run-total TOT_PREC as AIFS’s WMO 0/1/52 in kg/m², VMAX_10M as ECMWF’s interval-maximum gust on the 10 m surface, CLCT as AIFS’s 0/6/1 in percent on the ground surface, HSURF as the orography’s 0/3/6 geometric-height alternate in metres), de-accumulation from an analysis total, the gust’s analysis-less axis (tests/test_iconeu.py, on the Alpine fixture)
ARPEGEthe ICON-EU encodings on the 0.25° global grid, with the analysis precipitation total the fetch writes as a zero record (the package has none), so the first hour’s rate is that hour’s total (tests/test_arpege.py, on the western Mediterranean fixture)
GSMthe GFS identities on a 1.25° global grid with no ladder; the isobaric surfaces scaled by -2 in sign-and-magnitude, which the header index reads as GDAL does; 10 hPa, whose 1000-ISBL the isobaric rule tells from 1000 hPa by the assembled template; the relative vorticity under the per-second-to-1e-5 rule; the run-total precipitation as the WMO 0/1/8 accumulated from the analysis (the accumulation-from-start rule and tp’s 0/1/8 alternate), with the analysis record the fetch writes as a zero record in pure Python (tests/test_gsm.py, on the Japan fixture)
CMA-GEPSa global grid without its pole rows (1440 × 720, first centre 89.875°N); ensemble products read as CMA writes them (templates 4.2, 4.6, 4.9, 4.10), matched by template-ensemble rules in the header index and the band matcher alike and written as the metadata’s ensemble block — the centre under the deterministic ids with the block the source names (ensembles), the quartiles, spreads and probabilities under ids of their own; the interval precipitation path on GRIB frames (the six-hour median apcp total divided by the step) and its pairs (interval_precipitation_pairs: the quartile totals into prateq25 / prateq75 the same way); bundles that start past the analysis at an hour of their own (variable_first_hours: the 24-hour probabilities from +24 h, on a time_<id> axis, left out with a warning by a build that ends before it) (tests/test_cmageps.py, on the Japan fixture’s five frames)
WOOF-WRFthe series-file forecast path on a source with no feed: one CF NetCDF per variable from the wrf-series tool, an axis from f001 (first_hour 1, so every bundle carries firstFrameOffset: 1) with the hour’s precipitation total on every frame (interval_precipitation, nothing analysis-optional), a regional 0.005° grid that one tile covers and no ladder (variant_factors empty), a sea level pressure series in pascals turned into hectopascals like a GRIB record, the wind80m pair read as two series, the cloud3d volume bundle (24 clw<m> levels from 250 m to 12 km MSL, cloud water mixing ratio 0/1/22 on surface 102 at the level in metres, g/kg on the linear 0.01 g/kg codebook, a level under the model terrain filled as 0 g/kg), and fetched() false — require_complete is refused and the source is built from a dataset directory by a showcase case alone (tests/test_woof.py, on the Fuji fixture)
EFAS-v5, EFAS-v5-WBthe series-file forecast path again, with no feed: one CF NetCDF per variable from the efas-series tool, an axis of six-hour means from f006 to f120 (first_hour 6, firstFrameOffset: 6) with dis06 declared a mean (typeOfStatisticalProcessing 0), the file’s declared _FillValue of -9999 and the registry’s fill_values both folded to the bottom of the range (zero discharge, zero area, return-period class 0 “not evaluated”), log1p codebooks on the discharge and the upstream area, a class codebook on disrp, the xue producer version read off the disrp and upstream series, the 1/60° European grid with no ladder, and fetched() false (tests/test_efas.py, on the Valencia fixtures)
ERA5the series-file forecast path with no feed, for a reanalysis: one CF NetCDF per variable from the era5-series tool, the window’s first hour as the run (any hour, cycle_hours 1), an hourly axis from f000 to at most f1440 with every frame an analysis, the temperatures already in degrees Celsius, gust declared a maximum over the hour (typeOfStatisticalProcessing 2), the 0.25° grid cropped to the case with no ladder, and fetched() false (tests/test_era5.py)
CAMSthe same path for an aerosol analysis: one CF NetCDF per variable from the cams-series tool, the window’s first hour as the run (any 3 h mark, cycle_hours 3), a three-hourly axis from f000 to at most f1440, PM2.5 already in µg/m³, the 0.4° grid cropped to the case with no ladder, and fetched() false (tests/test_cams.py)
GFS, cropped--bbox with --bundles, and manifest.json
CMA-RADARthe NetCDF observation path: unscaling, the fill value, a unitSeconds: 360 axis listing its offsets around archive gaps, --hours; since 0.17 a fetched window like JMA’s, read out of its archive with the window’s first hour as the run (tests/test_cma.py); the id is cma since then, radar being the local-file shape the wheels before 0.17 know
JMA-HRPNSa fetched observation that arrives as a NetCDF series (series_file), the way the CMA file does, with a cadence: the five-minute times snapped to their slots and the window’s first hour taken as the run (unitSeconds: 300, firstFrameOffset: 1, offsets listed around a gap), a byte-packed rate unscaled through scale_factor 0.5 with the 255 fill folded to the codebook bottom, and a run directory holding exactly one series (tests/test_jma.py)
NOAA-MRMSa fetched observation: one GRIB per two-minute frame, each its own reference time, re-keyed onto the window’s axis (unitSeconds: 120, the observation times snapped to the mark, the first hour as the run); the MRMS-local identities (discipline 209) under cref and prate through the registry’s alternates and rqi (209/8/0) under its own, a rate already in mm/h, the -999 / -99 / -3 / -1 sentinels folded to the codebook bottom (for rqi a tenth below an index of 0); a regional grid described on its round step; and the 2 x 2 block-maximum thinning onto 0.02° (tests/test_mrms.py)
NOAA-MRMS3Dthe same bucket’s 3D mosaic: the 33 constant-altitude levels of MergedReflectivityQC (209/9/0 on surface type 102, 0.5–19 km) read from one GRIB per ten-minute frame, every level matched on its altitude rather than on the element the levels share (by the assembled template 4.0, or GDAL’s <metres>-GPML short name), published as the one refl3d volume bundle in level order (unitSeconds: 600), each level RAW with the composite’s codebook, and thinned 5 x 5 by block maximum onto 0.05° (tests/test_mrms3d.py)
SWPC-AURORAa fetched observation that arrives as a NetCDF series (series_file) like JMA’s but grown from a frame cache, since the live feed carries only the newest grid: xuebuild/aurora.py parses the OVATION JSON, snaps its valid time to the five-minute mark and writes one small NetCDF per slot; the fetch assembles the window’s cached frames, the window’s first hour being the run (unitSeconds: 300); a linear 0–100 % codebook on a 1° global grid, and a window that is a sequence of successive forecasts, not one run’s lead times (tests/test_aurora.py)

One condition the reference never met: GDAL’s netCDF driver is not thread-safe, and reading one file from several threads fails with netCDF chunk fetch failed: NetCDF: HDF error. Every extraction was its own gdal_translate process in Python. encode::gdalio::netcdf_guard serializes those reads; GRIB stays parallel.


Part of the Xue specification, licensed under CC BY 4.0.

6 - The STAC catalog

The shell reads the JSON it always has: a run’s manifest.json (schema v5), the per-model live pointer (schema v1), showcase.json. None of that changes here. Beside them the encoder derives a static SpatioTemporal Asset Catalog (STAC 1.1.0), so the Zarr stores can be found the way that ecosystem finds data: pystac walks the catalog, xpystac / odc-stac open an Item’s application/vnd.zarr asset into xarray, and a STAC browser lists the runs. This document is the contract: the layout, what each document carries, and where it comes from.

The catalog is derived, not authoritative. Every document is a pure function of a manifest, a point product’s index.json, a showcase.json row and the source registry (xuebuild/stac.py), with no timestamps and no host names, which lets a run built whole and a run built in pieces write the same bytes (tests/test_assemble.py) and lets any document be regenerated from what is on disk. The manifest stays what the shell validates and opens; a field the catalog has and the manifest lacks is a summary. Should the manifest itself become a STAC Item (a possible schema v6), this layer is what it would become.

Layout

At the data root (https://dataset.ringsaturn.me/xue/), beside the pointers:

PathSTAC objectMutableWritten by
catalog.jsonthe root Catalog: one child per source with a live feed, one per point product a pipeline publishes (all but nexrad), one for the showcaseyes (a pure function of the registry)every publish, showcase catalog
<source>/collection.jsonone Collection per source (gfs, ecmwf, ifs, aifs, sflux, hrrr, mrms, jma, cma), the STAC face of the live pointeryesbuild-bin (whole run), assemble-run
<source>/item.jsonthe live Item: the run’s Item relocated to a path that never changesyes, replaced by every publishsame
<source>.<run>/item.jsonone Item per published run, beside its manifestrewritten in place by a top-up, like the manifestbuild-bin (whole run), assemble-run
<product>/collection.jsonone Collection per point product (sounding, airport, synop, tc, nexrad, fire, aq, alerts), the STAC face of its live pointer; nexrad has no scheduled pipeline (the shell reads the public bucket), so its Collection is written only by a hand build and the root catalog does not name ityesthe product’s build, xue stac --product
<product>/item.jsonthe live Item: the newest issue’s Item relocated to a path that never changesyes, replaced by every issuesame
<product>.<issue>/item.jsonone Item per issue, beside its index.jsonnosame
showcase/collection.jsonthe Collection of the historical casesyesshowcase build / refresh / catalog
showcase/<case>/item.jsonone Item per case, beside its manifestrewritten by showcase refreshsame
index.htmlnot a STAC object: the root’s landing page for a reader arriving in a browser, naming catalog.json and these documents, listing every Collection with its licence (xuebuild/stacindex.py, from the registry and the prose, so a pure function like the catalog); the live run and extent are read from each Collection in the browseryes (with the catalog)wherever the catalog is, uploaded with it

Mutable documents are served no-cache, like the pointer; an Item is too, since a STAC client fetches it by its plain name rather than under a ?v= and a top-up rewrites it. Links are relative (../catalog.json, ../gfs/collection.json, bundles.zarr), so a client resolves them against whichever origin it read the document from, and no document names a host. There are no self links for the same reason.

The point products’ documents are the same three shapes over an index.json instead of a manifest; §“Point products” below.

Only the newest run per source is kept on the bucket (prune-r2), an hour for HRRR and minutes for an MRMS round, so a link into <source>.<run>/ stops resolving when the run is pruned, and a client that bookmarked one, or held a Collection in its cache, would get a 404. The Collection therefore lists one Item at a stable path: <source>/item.json, the run’s Item with every relative href rewritten to reach into the run directory (../gfs.2026091512/bundles.zarr) and nothing else changed (relocate_item). Its item and latest-version links both name it; an alternate link names the run’s own copy beside its manifest (a round of a rolling window has none: below). A client that wants the live run follows item; one that wants the pointer’s own fields follows xue:pointer (../latest.json, ../latest-<source>.json). The live Item’s assets still name objects that are deleted when the run is superseded, so a client holds it no longer than the source’s cadence, the way the shell polls the pointer.

The run Item

<source>.<run>/item.json, derived from manifest.json in the same directory and nothing else. Id: the directory with / as . (gfs.2026091512, mrms.2026091509.1455). Extensions declared: forecast v0.2.0 (forecast sources only), datacube v2.3.0, file v2.1.0.

Time. The Item covers the run’s whole axis: start_datetime / end_datetime are the union of every axis the manifest’s bundle metadata carries (a rate that starts at the first step widens nothing; f240 is the end), and datetime repeats the start so a client that sorts on it can. The time dimension carries step when the axis is uniform and values (the exact instants, the datacube extension’s spelling) when it is not — GFS is hourly to F120 and 3-hourly after, which one step cannot state — so a client reads the whole axis off the Item. forecast:reference_datetime is the cycle (runTime), forecast:horizon the longest lead as an ISO 8601 duration (PT240H), forecast:perturbed false, since every published run is a deterministic control. An observation (MRMS) declares no forecast fields; its xue:observation is true.

Space. Every bundle entry carries the bundle’s own full grid as grid — the same block a store’s attributes.xue.grid holds — so the Item reads an exact grid and states it again, verbatim, as xue:grid, for a client that wants the origin and steps without parsing cube:dimensions. A manifest written before the field falls back to the bundle metadata a run’s core scalars always carry: the retired H.264 companion’s on a run published with one (the full grid), else a poster’s, which is the grid decimated two to one (GridInfo.decimated: same origin, doubled step), whose steps are halved back — the origin is then exact and a regional far edge is right to within one full cell. A wrapping grid is [-180, -90, 180, 90]. bbox and geometry follow (two polygons when a window crosses the antimeridian). On a grid on a map projection the block has no origin and steps in degrees: bbox is the extremes of longitude and latitude its boundary cell centers reach (over a rectangle its trapezoid does not fill), cube:dimensions x and y are the grid’s own axes in metres with its WKT2 as reference_system, and the Item uses the projection extension: proj:code null, proj:wkt2, proj:shape [height, width], and proj:bbox and proj:transform over the cells’ outer edges. The store’s own attributes.xue stays the decode-time authority; a manifest with no metadata at all (only the synthetic ones in tests) gets a null geometry and a time dimension alone.

Variables. cube:variables has one entry per array the run publishes: a scalar bundle is one, a vector bundle its two components (ugrd10m / vgrd10m under wind10m, marked xue:bundle), each with the registry’s label and unit, and with the variable’s codebook as xue:quantization (the same block a store’s attributes.xue.variables[].quantization carries), so a client turns a stored code into a value without opening the store. A bundle the registry does not know (a manifest admits any well-formed name) is listed by name alone.

Assets. One per artifact, keyed by bundle:

KeyWhattyperoles
manifestmanifest.json?v=<crc32>, the manifest under the ?v= a viewer fetches it withapplication/jsonmetadata
<bundle>the Zarr store the bundle is in (the run’s shared bundles.zarr, <bundle>.zarr on a run published before shared stores), or the .xue container when the entry ships no storeapplication/vnd.zarr / application/octet-streamdata
<bundle>-seriesthe series companion (<bundle>.series.zarr) when the run publishes one, marked xue:series: true (docs/zarr-profile.md, “Series store”)application/vnd.zarrdata
columnsthe run’s column store (columns.zarr, docs/zarr-profile.md, “Column store”) when the manifest names one, marked xue:columns: true; its xue:kind is store, xue:tier full, and xue:crc32 its group document’s CRC-32 (which carries every shard’s CRC-32), and file:size the sum of the store’s objects. It is absent from the Item until the run’s columns job has attached itapplication/vnd.zarrdata
<bundle>-xuethe container, when it ships beside a storeapplication/octet-streamdata
<bundle>-<tier>, -<tier>-xueeach reduced-resolution tier, likewise: -half on every source, -quarter too on the satellite disks and the 0.1° grids (SourceSpec.variant_factors), -eighth on a run published with itdata, overview
<bundle>-posterthe first-frame poster (.poster.bin)application/octet-streamoverview
<bundle>-video, -video-indexthe retired H.264 companion and its index, on a run published with them (docs/format.md, “Retired artifacts readers still accept”)video/H264, application/jsondata, metadata

A store and a container beside it are not alternates in the alternate-assets sense (different bytes, different checksums), so each is an asset of its own. Every asset carries xue:kind (store, container, poster, video, video-index, manifest), data assets xue:tier (full, or the rung’s name half / quarter / eighth, read off the variant’s file suffix; the manifest lists a bundle’s rungs in ascending factor order), and reduced ones xue:grid (width, height). A shared store (bundles[.<tier>].zarr, or a segment of one) is the href of every bundle’s asset of its tier, one asset per bundle as before; each such asset carries xue:bundle, the bundle id a reader selects in the group’s xue_bundles (docs/zarr-profile.md, “Reading”). Sizes and checksums use the file extension: file:size is the manifest’s byteLength (for a store, the bundle’s share of its objects: its arrays and the coordinates it uses), and file:checksum is the manifest’s crc32 as a multihash: the multicodec table gives CRC-32 the code 0x0132, so the value is b20204 + the eight hex digits. A store is many objects and its crc32 is that of its root zarr.json (the same on every asset naming a shared store), so it gets no file:checksum; the bare xue:crc32 on every asset is the artifact’s ?v=.

application/vnd.zarr is the media type pystac 1.14 registers for a Zarr store (MediaType.VND_ZARR); the application/vnd+zarr spelling older catalogs carry is the same thing.

The source Collection

<source>/collection.json. Id: the source id. title, description, license (an SPDX id, CC-BY-4.0 for ECMWF, or other with a license link, the NOAA open data policy) and providers come from a table in xuebuild/stac.py; keywords name the kind (forecast / observation) and the model. extent is the live run’s: its bbox, its [start_datetime, end_datetime]. A forecast source’s summaries carry forecast:reference_datetime. Links: root and parent to the catalog, item and latest-version to the live Item beside it, alternate to the run’s own Item, xue:pointer to the live pointer, license. A round of a rolling window (build-bin --round: MRMS, JMA, the radars, the satellites) writes no Item beside its manifest, so its Collection has no alternate: a round lives minutes, nothing reads its own copy, and on a feed that publishes every few minutes the object would be one more bucket write per round. The live Item is still the round’s Item, relocated (its id <source>.<run>.<HHMM>). xue:live repeats the Item id and xue:pointer the pointer’s file name.

Point products

Eight products beside the runs have no run manifest: the radiosonde soundings (docs/sounding.md), the airport reports (docs/airport.md), the surface station observations (docs/synop.md), the tropical cyclone tracks (docs/tc.md), the single-site radar (docs/nexrad.md), whose data are polar Zarr stores but whose index is a window manifest, and the active fire detections (docs/fire.md), the air-quality stations (docs/aq.md) and the weather warnings (docs/alerts.md). Each publishes a mutable latest-<product>.json naming an immutable <product>.<issue>/index.json, and each gets the same three documents a source does — a Collection, a live Item, an Item per issue — derived from that index.json alone and from nothing else.

<product>/collection.json. Id: the product id. title, description, license, keywords and providers come from the pointProducts entry in xuebuild/stac_prose.json; none of them has an SPDX identifier to name, so all are other with the terms linked: the WMO Unified Data Policy (Resolution 1, Cg-Ext(2021)) for the soundings, with the Licence Ouverte 2.0 beside it for Météo-France’s, the NWS disclaimer for the airport caches (a work of the US government is in the public domain, which is not CC0), each network’s terms for the surface stations (JMA’s website terms, the Public Data License v1.0, for AMeDAS), NOAA Open Data Dissemination (attribution requested, no endorsement) for the radar, NASA’s Earth science data use guidance (no restriction, the FIRMS acknowledgement requested, which the description carries in full) for the fires, and both of the first two plus CC BY 4.0 for the tracks, whose sources are several agencies at once; the AirNow Data Exchange Guidelines and the DATA.GOV.HK terms for the air-quality stations, and the NWS disclaimer, JMA’s website terms, the Public Data License 1.0 (with a via link to the agency’s GIS data page, whose credit and survey approval notice the JMA provider’s description carries for the warning area boundaries) and the Open Government Licence – Canada for the warnings. extent is the whole world and [[null, null]]: every issue is a rolling window whose start moves, so a Collection stating the live issue’s bounds would be wrong as soon as the next one lands, and the description says so. Links: root and parent to the catalog, item and latest-version to the live Item beside it, alternate to the issue’s own copy, xue:pointer to the live pointer, describedby to the product’s document, and the license links. xue:live repeats the Item id and xue:pointer the pointer’s file name.

the issue directory’s item.json: sounding/2026/09/14/sounding.2026091402/, tc/2026/09/13/tc.2026091301/, airport/2026/09/16/airport.202609161430/, synop/2026/10/05/synop.202610050010/, aq/2026/10/31/aq.202610311545/, alerts/2026/11/01/alerts.202611010005/, nexrad.202610050805/, fire.202610120500/ (the NEXRAD and fire rounds stay flat; an issue published before its product’s archive tree sits flat too). Id: the directory’s own name (sounding.2026091402, aq.202610311545, alerts.202611010005, airport.202609161430, synop.202610050010, nexrad.202610050805, fire.202610120500, tc.2026091301). Extensions: file v2.1.0 alone — a point product is a set of stations, not a cube, and declares no cube:dimensions and no forecast fields.

Space. geometry and bbox are the box around the stations the index lists: the soundings’, the airports’ and the surface stations’ own positions, the radars’ antennas in the window’s site table, a storm’s headline position. It is the plain minimum and maximum over those points, so two storms either side of the Pacific make a box the long way round rather than one across the antimeridian. A fire index carries no positions — the detections are wherever something burns — so a fire round with any detection is the whole world, [-180, -90, 180, 90], and one without is null. A warnings round is the union of its index rows’ boxes (each warning’s polygon, or its area codes’ boxes from the boundary set, docs/alerts.md §5); a round whose warnings have no box at all is the whole world, and one with no warning null. The air-quality stations, like the surface stations from synop schema v2, keep their positions in the per-network stations files, which the Item is built from with the index. An index whose storms have nothing observed has no positions at all, and then geometry is null with no bbox, which STAC allows.

Time. datetime is the issue (issued), what a client sorts on, and the period it covers is in the two bounds: for a sounding issue the oldest nominal time any station still carries to the newest ascent in it, for an airport, synop or aq round the 24 hours of history it holds (issued − 24 h to the newest observation), for a warnings round the oldest sent of a warning still in force to the round, for a nexrad round the first to the newest sweep the window holds, for a fire round its window.start to the newest acquisition any sensor carries, for a tc issue the earliest and latest headline position. An empty index is the instant it was issued.

Properties. xue:product, xue:schemaVersion, xue:issued, xue:stations (xue:storms for the tracks; the window’s sites for the radar; xue:detections, the detections in the window, for the fires; xue:alerts, the warnings in force, for the warnings) and xue:sources, the index’s own sources[] reduced to {id, ok} so a client sees which gateway or centre was down without reading the index. A sounding issue also carries xue:watermark, the product’s account per source of how current it is.

Assets. One per file the issue publishes, each under the ?v=<crc32> a reader fetches it with, with file:size and file:checksum (the crc32 as a multihash, as a run’s artifacts carry):

KeyWhattyperoles
indexindex.json?v=<crc32>, under the CRC the pointer carriesapplication/jsonmetadata
soundings / historythe product’s one NDJSON fileapplication/x-ndjsondata
<network id>a synop or aq round’s NDJSON file per network, with xue:networkapplication/x-ndjsondata
<network id>.stationsa synop (schema v2) or aq round’s stations file per network, xue:kind stations, with xue:network and xue:stationsapplication/jsondata
<network id>an alerts round’s NDJSON file per network, one warning per line, xue:kind alerts, with xue:networkapplication/x-ndjsondata
<network id>.areasthe boundary set an alerts network’s area codes resolve against, outside the round (../alerts-areas/<set>.<version>.pmtiles), xue:kind areasapplication/vnd.pmtilesdata
<sensor id>a fire round’s NDJSON file per sensor, one UTC hour per line, with xue:sensorapplication/x-ndjsondata
<storm id>one JSON file per system a tc issue listsapplication/jsondata
n0b / n0ga nexrad round’s own polar store per product (n0b.zarr), xue:kind store; file:size is the root document and the shard, and the store carries xue:crc32 (its root document’s, the ?v=) rather than file:checksum, as a run’s stores doapplication/vnd.zarrdata

The NDJSON asset’s description states the addressing rule, which is the point of the layout: one station per line, sorted by id, and a station’s offset and length in the index are the byte span of its line’s object (the newline excluded), so one station is one Range request and the whole file still streams. A fire sensor file is one hour per line instead, and one sensor’s hours are consecutive, so a span of hours is one Range request. A nexrad round’s Item names only that round’s stores: the older rounds of the window are their own Items, and the index asset — the window manifest — spans them all. Assets carry xue:kind (index, series, store, storm), and a storm’s also xue:level and xue:basin.

The live Item at <product>/item.json is that Item relocated (relocate_item), every href reaching into the issue directory, so the URL a client bookmarks still resolves after the issue it named is pruned — seven days for the soundings and the tracks, three hours for the airport, synop and nexrad rounds, six hours for the fire rounds. An issue whose build withheld the pointer (no source contributed, both observation sources failed, no FIRMS file arrived) gets its own Item and nothing else: the Collection and the live Item follow the pointer, as a source’s do.

The showcase

showcase/collection.json lists one item link per case in showcase.json’s order (newest event first); its extent is the union of theirs (first) followed by each case’s own, and its license is other because the cases come from several sources; each Item states its own under license. showcase/<case>/item.json derives from the case’s showcase.json row and its manifest: id is the case id; bbox is the row’s dataBbox (exact); datetime is the eventTime, what a search should find the case by, with the period in start_datetime / end_datetime; title and description are the English strings, and the whole thirteen-locale maps sit under xue:title / xue:summary, with xue:tags, xue:credit, xue:defaultVariable, xue:eventTime. A forecast case declares the forecast fields like a run; an observation case does not. Assets are the same per-bundle set as a run’s.

Producing it

xuebuild build-bin for a whole run and xuebuild assemble-run for one built in pieces write the run’s Item, the live Item, the Collection and the catalog right after the manifest and the pointer (the report’s stac names the four files); a piece of a fanned-out publish (build-bin --bundles) writes none, since an Item describes a whole run. showcase build, refresh and catalog write the cases’ documents whenever they rewrite showcase.json. make upload-r2 / upload-r2-manifest copy the run’s Item with the manifest, make upload-r2-pointer copies the live Item, the Collection and the catalog with the pointer (the Item first, so the Collection never names a live Item that is not there yet), and make upload-r2-showcase the showcase’s, all through the same targets the scheduled workflows call. A publish that predates this document has no Item, and that is not an error.

A point product’s build (xue sounding-build, airport-build, tc-build) writes the same four documents right after its index and pointer, from the index on disk, and reports them the same way; xue stac --product sounding|airport|tc --issue <YYYYMMDDHH|YYYYMMDDHHMM> rewrites them for an issue already built. make upload-r2-sounding, upload-r2-airport and upload-r2-tc copy the issue’s Item with its index (no-cache, application/geo+json, held out of the immutable sync), then the pointer, then the live Item, the Collection and the catalog through upload-r2-stac-collection STAC_DIR=<product> — the same target and the same order as a run’s.

Every document is validated on write against a structural contract (validate_item / validate_collection / validate_catalog in xuebuild/stac.py: the required fields, the link rels, a bbox in range, the checksum matching the crc); the published JSON Schemas are not fetched in the pipeline. tests/test_stac.py holds the shapes above and, when pystac is installed, round-trips them through it.

Reading it

import pystac, xarray as xr

catalog = pystac.Catalog.from_file("https://dataset.ringsaturn.me/xue/catalog.json")
gfs = catalog.get_child("gfs")
run = next(gfs.get_items())  # the live Item, …/gfs/item.json
asset = run.assets["tmp2m"]
store = asset.get_absolute_href()  # …/gfs.<run>/bundles.zarr, every bundle of the run
ds = xr.open_zarr(store)  # the profile in docs/zarr-profile.md
tmp2m = ds["tmp2m"]  # arrays are named by variable; xue:bundle names the bundle

run.properties["cube:variables"] says what else the run carries and in which unit; run.assets["manifest"].href is the manifest under its ?v=, for a client that wants the shell’s own view of the same run.


Part of the Xue specification, licensed under CC BY 4.0.

7 - Sources

What each source publishes, and the one home of those facts: the README’s table summarises it with live run badges, llms.txt lists the ids, and the engineering notes (fetch stages, quirks) are in contribution/sources.md. Every source is an independent dataset under <model>.<run>/ on the data root, taken live by its pointer (latest.json for GFS, latest-<model>.json for the rest). The id in each heading is the --model value and, for a live source, the viewer path (/<id>). Time axes with mixed steps are listed outright in the bundle metadata (bundle.md, schema v3).

The geostationary mosaic (/geo) is a view, not a dataset: the viewer opens whichever imager runs answer, clips each disk at the midpoints between sub-satellite longitudes and plays them on one timeline by valid time.

Twenty-one levels of the isobaric families are registered (1000 / 975 / 950 / 925 / 900 / 850 / 800 / 750 / 700 / 650 / 600 / 550 / 500 / 450 / 400 / 350 / 300 / 250 / 200 / 150 / 100 hPa); which of them a source publishes is its own table, and publishing one more is a source-table change, not a format change.

Forecasts

NOAA GFS (gfs)

In the viewer: /gfs.

0.25° global, hourly to F120 and 3-hourly to F240, four cycles a day.

  • 2 m temperature, precipitation rate, categorical precipitation type (derived from the rain / freezing-rain / ice-pellet / snow flags), 10 m and 100 m wind.
  • Surface diagnostics: gust, total / low / middle / high cloud cover, CAPE and CIN, visibility, 2 m dew point, apparent temperature, precipitable water, boundary layer height, the model orography (one static frame).
  • Vertical velocity at 850 / 700 / 500 hPa, 850 hPa equivalent potential temperature (derived).
  • Ocean: skin temperature, sea ice cover and thickness, significant wave height and primary period (GFS-Wave), and a derived wave vector (height laid along the direction of travel); the same height, period and vector for the wind sea and for the first swell partition.
  • Soil: temperature (tsoil1–tsoil4) and total volumetric water (soilw1–soilw4) in the Noah land model’s four layers, 0–10, 10–40, 40–100 and 100–200 cm below ground; no soil (code 0) over open water, and for the water content over sea ice too (the temperature there is the ice’s; the water content is 1 over the ice sheets).
  • Mean sea level pressure; geopotential height, temperature, relative humidity and wind on all twenty-one isobaric surfaces; 850 hPa water vapour flux (q·V/g, derived).

ECMWF IFS open data (ecmwf)

In the viewer: /ecmwf.

0.25° global, 3-hourly to F144 and 6-hourly to F240. The subset of the GFS set that open data carries, under the same identities so a model switch keeps the layer. tp is differenced into an interval-mean rate and the gust is an interval maximum, so both series start at F003. The soil layers are HTESSEL’s, under the GFS layer ids: tsoil1–tsoil4 and soilw1–soilw4 span 0–7, 7–28, 28–100 and 100–289 cm, not GFS’s depths; the open data carries no bitmap, so the sea holds the model’s soil temperature and a water content of 0. The isobaric fields are GFS’s on twelve surfaces: the open data has no 975, 950, 900, 800, 750, 650, 550, 450 or 350 hPa record, so those nine are GFS’s alone and a model switch on one of them leaves the layer. Not available: layer cloud covers, visibility, sea ice cover, apparent temperature.

ECMWF IFS open data 0.1° (ifs)

In the viewer: /ifs.

The same cycle’s records as ecmwf on the model’s full 0.1° regular grid (3600 × 1801), the bundle set, pressure levels and waves included, on the same axis, landing about two hours later. It is a separate source with its own pointer.

ECMWF AIFS Single (aifs)

In the viewer: /aifs.

0.25° global, 6-hourly to F360 from every cycle, landing about 5.5 h after it. ECMWF’s data-driven model from the same open data service, including the layer clouds IFS open data lacks. Soil in the IFS’s top two layers only (tsoil1, tsoil2, soilw1, soilw2: 0–7 and 7–28 cm), the water content masked over the sea (code 0). No isobaric relative humidity, gust, CAPE, ice thickness or wave period.

ECMWF IFS HRES via Open-Meteo (ifshres, aliases hres, ifs9km)

In the viewer: /ifshres.

0.1° global, hourly to F090, 3-hourly to F144, 6-hourly to F360, from the 00Z and 12Z cycles only (complete about 6.5 h after the cycle). ECMWF’s ~9 km operational forecast as Open-Meteo forwards it, resampled once from the reduced Gaussian O1280 grid (nearest neighbour) by om2nc. Fifteen surface bundles with the GFS ids and charts: 2 m temperature and dew point, precipitation, 10 m wind, shortwave radiation, sea level pressure, gust, four cloud covers, CAPE, visibility, skin temperature, sea ice thickness. No isobaric levels, no waves. Precipitation, radiation and gust have no analysis frame.

GFS surface flux (sflux)

In the viewer: /sflux.

~13 km Gaussian global (T1534, gaussian block n 768), the GFS axis. 2 m temperature, precipitation (de-averaged from window means, from F001), 10 m wind and instantaneous downward shortwave radiation.

NOAA HRRR (hrrr)

In the viewer: /hrrr.

3 km Lambert conformal over the contiguous US (the model’s own grid, 1799 × 1059), hourly to F18, a cycle every hour; the 00 / 06 / 12 / 18 UTC cycles run to F48, which a local build may request but the published runs do not. The core pair, sea level pressure, 850 / 700 / 500 hPa heights, 925 / 850 / 500 hPa temperature, 10 m / 80 m (wind80m, the hub-height pair) / 925 / 850 / 250 hPa winds, the surface diagnostics and forecast composite reflectivity (cref). Nothing is resampled; the winds are turned from the model’s grid-relative components to east and north. Runs published earlier are on a regular 0.03° grid (2441 × 1051), and the viewer clips those to the model’s footprint.

NOAA RRFS (rrfs)

In the viewer: /rrfs.

3 km Lambert conformal over the contiguous US, HRRR’s grid to the last digit, nothing resampled and the winds turned to east and north. Hourly to F84 from the 00 / 06 / 12 / 18 UTC cycles, complete about 3.5 h after the cycle (the other hourly cycles stop at F18 and are not published). HRRR’s grid and field set plus 250 hPa height, and the smoke and dust the model carries inline (RRFS-SD): near-surface smoke, fine dust (under 2.5 µm) and coarse dust (2.5–10 µm), 8 m above the ground in µg/m³ (smokesfc, dustfine, dustcoarse), and the column optical thickness (aotk), whose record names no species or wavelength, so it is not aod. Its sea level pressure is the model’s only one, NCEP’s Shuell reduction (MSLET), published as prmsl. The viewer clips to the model’s footprint.

WOOF-NAM by Recast (woofnam)

In the viewer: /woofnam.

12.19 km Lambert conformal over North America, NCEP grid 218 (614 × 428), nothing resampled and the winds turned to east and north. Hourly to F84 from the 00 / 06 / 12 / 18 UTC cycles, complete about 4 h 20 min after the cycle. A GPU port of the NAM (NMMB) that NOAA retired, run by Recast from the GFS analysis of the same cycle, in NOAA’s NAM awphys layout; not an official forecast of NOAA or the National Weather Service. 2 m temperature and dew point, precipitation, sea level pressure, 850 / 700 / 500 / 250 hPa heights, 925 / 850 / 500 hPa temperature, 10 m / 80 m / 925 / 850 / 250 hPa winds, gust, total cloud cover, CAPE, visibility, composite reflectivity, the freezing level and the terrain. The files carry no precipitation rate: the published one is the mean over each hour, differenced from the model’s totals, which restart every 12 hours, and it starts at F001. No layer cloud. Data: WOOF-NAM by Recast, CC BY 4.0.

NOAA GEFS-Aerosols (gefsaero)

In the viewer: /gefsaero.

0.25° global, 3-hourly to F120, complete about 6 h after the cycle. Aerosol optical depth at 550 nm in total (aod) and for dust, sea salt, sulphate, organic and black carbon (aoddust, aodsalt, aodsulf, aodorg, aodbc), and surface PM2.5, PM10 and dust PM10 in µg/m³ (pm25, pm10, pm10dust). The aerosol type and size / wavelength intervals are written as the aerosol block of the bundle metadata.

CMA-CW/DUST sand and dust forecast (cmadust)

In the viewer: /cmadust.

0.15° over Asia (835 × 301 cells, 25°E–150.1°E, 15°N–60°N; the model’s own grid, nothing resampled), hourly to F072 and 3-hourly to F168 from the 00Z and 12Z cycles, complete about 7.25 h after the cycle. The China Meteorological Administration’s CMA-CW v1.0/DUST forecast for the WMO SDS-WAS Asian Center, read from the WMO WIS2 global caches. Two bundles: the surface dust concentration (dustsfc, µg/m³ to 50,000, every particle size the model carries — not pm10dust, GEFS-Aerosols’ dust under 10 µm; WMO 0/20/0 on the ground with a dust aerosol block of no size interval) and the dust optical depth at 550 nm (aoddust, GEFS-Aerosols’ identity and codebook to 5; a storm core’s optical depth often exceeds 5 and takes the overflow code, drawn at the top colour, null at a point). Negative model concentrations are coded 0. Data: China Meteorological Administration, WMO core data under the WMO Unified Data Policy (free and unrestricted).

FMI SILAM global air quality (silam)

In the viewer: /silam.

0.2° global (1800 × 897 cells, 180°W–179.8°E, 89.6°S–89.6°N; the model’s own grid, nothing resampled), hourly from F001 to F072 and 3-hourly to F120 from the 00Z cycle, complete about five hours after the cycle. The Finnish Meteorological Institute’s SILAM v6.1 atmospheric composition and air-quality forecast, read from FMI’s open data on AWS. Two bundles on the GEFS-Aerosols identities and codebooks: the surface PM2.5 (pm25, the core) and PM10 (pm10) concentrations in µg/m³, each the total of every aerosol the model carries (dust, sea salt, sulphate, nitrate, carbon, fire smoke, secondary organics). Every value is the mean over the hour ending at its time, a 3-hourly frame included; the bucket carries no analysis, so the run starts at F001. Data: Finnish Meteorological Institute, SILAM, CC BY 4.0.

NCEP CFSv2 (cfs)

In the viewer: /cfs.

Seasonal: ensemble member 01 of the 00Z and 12Z cycles, 6-hourly from F6 to F6552 (39 weeks, 1092 frames), landing about 11:30Z and 23:25Z. Surface fields on the T126 Gaussian grid (0.9375°, gaussian block n 95): the core pair, total cloud cover, shortwave radiation, surface temperature, two sea ice fields and 10 m wind. Upper air on a regular 1° grid: sea level pressure, height, temperature, 500 hPa vertical velocity, wind at seven levels and water vapour flux at four. Precipitation, radiation and cloud cover are six-hour means ending at the frame (typeOfStatisticalProcessing 0 in the metadata).

DWD ICON-EU (iconeu)

In the viewer: /iconeu.

0.0625° regular grid over Europe (23.5°W–62.5°E, 29.5°N–70.5°N), hourly to F78 and 3-hourly to F120 from the 00 / 06 / 12 / 18 UTC cycles, landing about 3.5 h after the cycle. A basic set: the core pair, sea level pressure, gust (the maximum over the step ending at the frame, from F001), total cloud cover, 10 m wind and the model terrain. Precipitation is de-accumulated from the run total, from F001. Data: Deutscher Wetterdienst, CC BY 4.0 (“Source: Deutscher Wetterdienst”).

Météo-France ARPEGE (arpege)

In the viewer: /arpege.

0.25° global, hourly to F48 and 3-hourly to F102 from the 00 / 06 / 12 / 18 UTC cycles, from the surface packages of the data.gouv.fr ARPEGE 0.25° dataset; the 00/12 UTC cycles land about 3–4 h after the cycle, the 06/18 UTC ones about 5 h. The same basic set as iconeu; the gust is the maximum over the hour ending at the frame. Data: Météo-France, Licence Ouverte / Etalab 2.0.

JMA GSM (gsm)

In the viewer: /gsm.

1.25° global (288 × 145 cells, pole to pole), 6-hourly to F132 and 12-hourly to F264 from the 00 / 12 UTC cycles: the Japan Meteorological Agency’s Global Spectral Model at the resolution JMA exchanges through WMO, from the open data directory of GISC Tokyo. A run is complete about 6.5 h after the cycle, when the second object (F144 to F264) lands. Published: tmp2m, prate, prmsl, the 2 m relative humidity rh2m, the vector pair wind10m, and on seventeen isobaric surfaces (1000, 925, 850, 700, 600, 500, 400, 300, 250, 200, 150, 100, 70, 50, 30, 20 and 10 hPa) the geopotential height (hgt<level>), temperature (tmp<level>) and wind (wind<level>), with the relative humidity (rh<level>) and the vertical velocity (vvel<level>) on the eight from 1000 to 300 hPa and the relative vorticity (relv<level>, in 10⁻⁵ s⁻¹) on 925, 700, 500 and 250 hPa. prate is de-accumulated from the run total, the mean rate over the six or twelve hours ending at the frame, and has no analysis frame. The objects also carry the divergence, stream function and velocity potential, none of them published. JMA’s higher-resolution GSM products are not open and are not used. Data: Japan Meteorological Agency, via GISC Tokyo, essential data under the WMO data policy.

CMA GRAPES GEPS ensemble products (cmageps)

In the viewer: /cmageps.

0.25° global without the pole rows (1440 × 720 cells, centres 89.875°N to 89.875°S), 6-hourly to F360 from the 00 / 12 UTC cycles. Not a member and not a deterministic run: statistics of the ensemble (CMA GRAPES GEPS v1.3, 30 perturbed members and the control), which is all CMA exchanges. Every field carries an ensemble block saying which statistic it is (docs/bundle.md, “Ensemble”).

  • The centre, under the ids and identities the deterministic sources use, so it compares with them directly: the ensemble mean of the 500 hPa geopotential height (hgt500) and the mean sea level pressure (prmsl), the only centre CMA publishes of those two, and the ensemble median (50th percentile) of 2 m and 850 hPa temperature (tmp2m, tmp850), precipitation rate (prate: the median of the total over the six hours ending at the frame, divided by six; from F006), 10 m gust (gust, the instantaneous gust, published under GFS’s gust identity; from F006), total cloud cover (tcdc, from F006, since the analysis file’s is a field of zeros) and CAPE (cape). A median is smoother than any member, and a precipitation median is drier than the mean wherever only some members rain.
  • The quartiles of each median field, in its unit and on its codebook: tmp2mq25 / tmp2mq75, tmp850q25 / tmp850q75, prateq25 / prateq75 (the 25th and 75th percentile six-hour totals divided by six), gustq25 / gustq75, tcdcq25 / tcdcq75, capeq25 / capeq75. Half the members lie between them.
  • The spread of the two mean fields: prmslsd (hPa, 0.1 hPa steps to 25 hPa) and hgt500sd (m, 1 m steps to 250 m).
  • The probabilities of more than 1, 5, 10, 25, 50 and 100 mm of precipitation in the 24 hours ending at the frame (apcp24gt1 … apcp24gt100): the percentage of members past the threshold, at 0.5 % steps, from F024.

No wind components (CMA exchanges only speeds). Nothing else of the model is exchanged: no member fields, no deterministic CMA-GFS run, no isobaric level beyond the 850 hPa temperature and wind speed, the 500 hPa height and the 250 hPa wind speed, and no humidity. The National Meteorological Centre’s website draws more of the same ensemble over China (stamp maps of the 31 members, spaghetti plots, the extreme forecast index), but as images whose reuse needs CMA’s permission, so they are not a source. A run is complete on the caches about 18–20 UTC the same day for both cycles. Data: China Meteorological Administration (CMA), via WMO WIS2, core data under the WMO Unified Data Policy, free and unrestricted.

Observations (rolling windows)

A rolling window is rebuilt every few minutes; each build is a round under <model>.<run>/<HHMM>/.

NOAA MRMS radar (mrms)

In the viewer: /mrms.

0.02° contiguous US, every 2 min, a 4 h window. Composite reflectivity (cref), radar precipitation rate (prate) and the radar quality index (rqi), thinned two to one by block maximum. rqi is MRMS’s estimate, 0 to 1 in tenths, of how far the reflectivity near the ground can be trusted (falling with range from the radars, under beam blockage and in the melting layer); its code 0 marks cells outside radar coverage, which cref code 0 does not tell from “no echo”. The block maximum keeps the best cell of each block.

JMA precipitation nowcast (jma)

In the viewer: /jma.

0.005° over Japan (121–149°E, 20.5–45.5°N), every 5 min, a 3 h window. The agency’s high-resolution precipitation nowcast (高解像度降水ナウキャスト) publishes intensity classes, not reflectivity, so it ships prate alone at each class’s representative rate (0.5, 3, 7.5, 15, 25, 40, 65, 100 mm/h). Fetched through jma-radar.

HKO rainfall nowcast (hkonowcast)

In the viewer: /hkonowcast.

0.019° × 0.018° over Hong Kong and the Pearl River Delta (112.955–115.292°E, 21.33–23.49°N, 124 × 121), one issue every twelve minutes or so. The Hong Kong Observatory’s gridded rainfall nowcast: four half-hourly accumulations ending 30, 60, 90 and 120 minutes after the issue, published as prate, the mean rate over each half hour (typeOfStatisticalProcessing 0). A window is the newest issue alone, under the hour its first frame falls in, and every frame of it lies ahead of the clock; there is no archive, so a missed issue is not published. The Observatory’s points are evenly spaced in Mercator, not in latitude, and are sampled onto the regular grid by nearest point. No reduced tier. Attribution: Hong Kong Observatory (DATA.GOV.HK).

CWA radar composite (cwa)

In the viewer: /cwa.

0.0125° over Taiwan and its seas (921 × 881 cells, centres 115.0081–126.5081°E, 17.9982–28.9982°N), every 10 min, a 3 h window. The Central Weather Administration’s (中央氣象署) composite reflectivity of its seven radars, dataset O-A0059-001, read from the agency’s anonymous open-data bucket and published as cref (dBZ). The bucket keeps about two weeks of mosaics, so a window is whole from its first round, and a slot the agency never wrote is absent from the time axis. The agency publishes the grid on TWD67, from 115.0°E 18.0°N; it is moved onto WGS84 by one offset, 0.0081° east and 0.0018° south (the mean over the agency’s station tables, which give both datums), not resampled, so every value keeps its cell. Points with no echo and points outside radar coverage are both missing, the codebook bottom. One reduced tier, at half resolution. Licence: Taiwan’s Open Government Data License, version 1.0; attribution: Central Weather Administration.

Geostationary imagers (himawari, himawarijp, goeseast, goeswest, meteosat)

In the viewer: /himawari, /himawarijp, /goeseast, /goeswest, /meteosat.

SourceSpacecraftDiskCadence and window
himawariHimawari-9 at 140.7°E (NOAA noaa-himawari9)80.7–200.7°E10 min, 6 h
himawarijpHimawari-9, the same files, the tiles over Japan only122–148°E, 24–46°N at 0.01°10 min, 3 h
goeseastGOES-19 at 75.2°W (noaa-goes19)135.2°W–15.2°W10 min, 6 h
goeswestGOES-18 at 137°W (noaa-goes18)163–283°E10 min, 6 h
meteosatMeteosat-12 at 0° (EUMETSAT Data Store)60°W–60°Ehourly, 24 h

The disks are on a 0.04° plate carrée grid, 60°S–60°N; himawarijp is Himawari-9 over a box around Japan at 0.01° (about 1.1 km, where the visible bands’ 0.5–1 km sampling shows), built from the six of the disk’s 88 tiles that reach the box. All have half and quarter reduced tiers. Each publishes:

  • ir104: 10.4 µm brightness temperature (180–332 K at 0.6 K; shown in °C).
  • ir039: 3.9 µm brightness temperature (180–407.7 K at 0.9 K), the warmest 2 km pixel under each cell and, in the reduced tiers, the warmest code around each site, so a fire’s hot spot survives the grid. See satellite.md.
  • dustrgb: the Dust RGB composite (red 12.3 − 10.4 µm, green 11.2 − 8.6 µm, blue 10.4 µm), computed per scan by shachen; dust reads pink to magenta, day and night. Code 0 means no data in every gun. FCI has no 11.2 µm channel, so Meteosat’s green gun is 10.5 − 8.7 µm.
  • dustcf (not Meteosat or himawarijp): the DEBRA dust confidence (Miller et al. 2017), 0–1, over water and inside staged emissivity regions (the Gobi through Japan, the US Southwest, the Saharan corridor). See satellite.md.
  • zhouye (not Meteosat or himawarijp): the ZHOUYE dust confidence, shachen’s day-and-night scheme on the same chain: DEBRA’s by day, and after dark a reading at the day’s level instead of a fading one. Same grid, coverage and scale as dustcf; a second product, not a replacement.
  • truecolor: one picture day and night. By day the visible picture — the 0.64, 0.51 and 0.47 µm reflectances (0.444 µm on Meteosat) as red, green and blue, each divided by the cosine of the solar zenith, the molecular sky’s scattering taken out (an analytic Rayleigh correction, faded out towards the terminator and the limb) and put through one brightness curve, the green a hybrid with the 0.86 µm band (synthesized from blue, red and 0.86 µm on the ABI, which has no green band). After dark white cloud over a dark ground: the 10.4 µm window from 280 K (clear) to 220 K (white) and, for fog and low cloud, the 10.4 − 3.9 µm difference as a softer grey. The two blend across solar zenith 80–90°. Code 0 is no data in every gun (outside the disk, or an input missing). Xue’s own recipe (producer xue, version the recipe’s). See satellite.md.

The live windows end 15–20 min behind real time. Meteosat publishes only the cycle on each hour: EUMETSAT releases that cycle under CC BY 4.0 and the cycles between under terms that do not allow this use. Building it needs EUMETSAT_CONSUMER_KEY / EUMETSAT_CONSUMER_SECRET (free at https://api.eumetsat.int/api-key).

NOAA SWPC aurora (aurora)

In the viewer: /aurora.

1° global (360 × 181), every 5 min, a 12 h window. The OVATION model’s probability (percent) that aurora is visible overhead. A frame’s valid time is the model’s forecast time, about an hour after the solar-wind observation driving it, so the window is a sequence of successive forecasts. The feed carries only its newest grid, so the window grows from a frame cache.

Cases only

These have no live pointer and no place in the model switch; a showcase case (showcase/README.md) opens them.

Recast WOOF-WRF (woof)

Case: /showcase/fuji-woof-2026-10-10.

A WRF-ARW nest at 500 m over Mount Fuji: a regular 0.005° grid of 79 × 61 cells, 138.54°E–138.93°E and 35.22°N–35.52°N, every cell inside the model domain, hourly from F1 with no analysis frame. volume=cloud3d draws its cloud water in 3D.

Copernicus EFAS river discharge (efas, efaswb)

Cases: /showcase/valencia-2024-efas and /showcase/valencia-2024-efaswb.

EFAS v5 (LISFLOOD) discharge on its 1-arcmin regular grid over Europe (4530 × 2970 cells, 25.25°W–50.25°E and 22.75°N–72.25°N; a case ships a crop), six-hourly from +6 to +120 h. efas is the forecast forced by the ECMWF HRES; efaswb is the water-balance run forced by observations, the analysis the forecast starts from, on the same grid and axis. A case opens them on the return-period class.

ECMWF ERA5 (era5)

Cases: /showcase/sumatra-haze-2026-era5 and /showcase/arxan-fire-2026.

The reanalysis (reanalysis-single-levels), hourly on the 0.25° grid over a window of up to 1440 hours from any hour; every frame is an analysis. A case ships a crop of the 2 m temperature and dew point, the 10 m wind and the hourly gust maximum.

Copernicus CAMS aerosol analyses (cams)

Case: /showcase/sumatra-haze-2026-cams.

The global composition analyses (global-composition-analysis) on the 0.4° grid, three-hourly over a window of up to 1440 hours; each frame is a 00Z or 12Z cycle’s analysis or its +3/+6/+9 h step. Total and organic optical depth (aod, aodorg) and surface PM2.5 (pm25).

NOAA MRMS 3D reflectivity (mrms3d)

Case: /showcase/rolling-fork-2023-3d.

The MRMS mosaic’s 33 constant-altitude levels, 0.5 to 19 km above mean sea level (every 0.25 km to 3 km, 0.5 km to 9 km, 1 km above), one frame every ten minutes from the scan at each mark, thinned by block maximum to 0.05°, all in one refl3d bundle (refl500 … refl19000, dBZ, GRIB2 209/9/0 on surface 102 at the altitude in metres). The viewer draws it as a raymarched volume (?vexag= sets the vertical exaggeration). The live window is paused: its scheduled publish is disabled, and the volume is published through showcase cases.

Point products

Not runs, but published beside them and drawn as marks in the viewer: tropical cyclone tracks (tc.md, hourly), airport METAR / TAF (airport.md, every ten minutes) and radiosonde soundings (sounding.md, hourly).

Archive depth

A showcase case can only be cut where the upstream archive reaches: GFS and sflux to about 2021-01, ECMWF open data to about 2024-02, Himawari-9’s ISatSS tiles to 2022-12. See showcase/README.md.


Part of the Xue specification, licensed under CC BY 4.0.

8 - Run metrics

In the viewer: /metrics draws this file.

metrics/latency.json at the data root records when each forecast run went live, for the last 30 days, measured rather than promised. It is the data behind the metrics page; Xue makes no availability commitment.

It is built by xuebuild metrics-latency (.github/workflows/metrics.yml, every six hours) from the GitHub Actions records of the forecast publish workflows. Nothing in a manifest or a pointer carries a publication time, and nothing there changes for this file.

What is measured

Every forecast source publishes through publish.yml. Its finalize job is named finalize <model> <run>, and its step Upload the manifest and take the run live writes the live pointer.

  • Landed: that step succeeded and the publish was not a dry run (a dry run skips Verify the live pointer). landedAt is the step’s completion time, the moment the pointer was written.
  • Latency: landedAt minus the run’s cycle time, in minutes. It includes the upstream model’s own production time: a run cannot be published before its last input file exists. A source that ships a column store lands when the store is ready, later by the cut (at most 30 minutes; a run goes live without the store past that).
  • A cycle written live more than once (a top-up, a forced rebuild) arrives at its first write.
  • Cadence: the commonest gap, in hours, between consecutive cycles that arrived in the window. It is measured, not declared, so a source that publishes two of its upstream’s four daily cycles is not counted as missing the other two.
  • Missing: cycles on that cadence, strictly between the window’s first and last arrival, that never arrived.
  • Deadlines: for each whole local day in the window, the newest cycle live at a fixed local clock time, and its age then in hours. The one deadline listed is the ERCOT day-ahead market close, 10:00 US Central (America/Chicago, so 15:00 UTC in summer and 16:00 UTC in winter).

Workflow runs whose finalize job is named without the run (before the naming existed) take the run from their publish-report-<model> artifact while it is retained, otherwise run is null and the arrival is not counted.

The file

One JSON object, schemaVersion 1, served no-cache:

FieldMeaning
schemaVersion1
generatedAtWhen the file was built, ISO 8601 UTC
windowDaysDays the summaries cover (30)
repositoryThe repository whose workflow runs were read
sourcesOne object per forecast source id, below

Per source:

FieldMeaning
workflowThe caller of publish.yml, e.g. publish-gfs.yml
cadenceHoursInteger, or null with fewer than two arrivals
landedArrivals in the window
missingThe missing cycles, YYYYMMDDHH, oldest first
outcomesWorkflow runs started in the window, counted by outcome
latencyMinutes{median, p90, max} over the window’s arrivals, or null
latestThe newest arrival, as in arrivals, or null
deadlines[{id, label, timeZone, localTime, days: [{date, cutoff, run, ageHours}]}]; run is null (and ageHours absent) when nothing had arrived by cutoff
arrivals[{run, landedAt, latencyMinutes}], oldest first
backlogWorkflow runs not yet read because the build’s API budget ran out; the next build reads them
workflowRunsEvery workflow run read, [{id, event, conclusion, startedAt, outcome, run, landedAt}], oldest first; outcome is landed, skipped (the bucket already served the newest cycle), dry-run or failed

workflowRuns keeps one day beyond the window, so the first day’s deadline sees the run live before it. It is also the next build’s state: a build fetches job records only for workflow runs it does not list.

Observation windows (radar, satellite) and point products are not covered yet.


Part of the Xue specification, licensed under CC BY 4.0.

9 - The tropical cyclone product

In the viewer: the storm map /typhoon, one page per archived storm under /tc/, and the live tracks drawn over any layer by default (?tc=<storm id> focuses one).

The .xue container is a raster container. A storm track (a few dozen points from each centre, a few thousand from an ensemble) is not a raster, so tropical cyclones are a second, smaller product published beside the runs: plain JSON, a few hundred kilobytes an hour, aggregated by xue tc-build (xuebuild/tc/) from the agencies’ and the models’ own track files, and taken live by the same pointer → immutable directory contract the runs use. This document is the normative description of that product, schema v1. The design it implements (the sources, the three notions of an impact area, the phases) is in the project’s private notes; what is here is the contract a reader can hold the publisher to.

1. Delivery

Everything is a static file under the data root, the same root as the run pointers (latest.json, latest-<model>.json) and showcase.json.

  • latest-tc.json is the one mutable object. Fetch it with caching disabled. It names the newest issue directory and the index inside it:

    {"schemaVersion": 1, "product": "tc", "issued": "2026-09-13T01:00:00Z",
     "path": "tc/2026/09/13/tc.2026091301/index.json", "byteLength": 15930, "crc32": "5ca38836"}

    path is relative to the pointer and always tc/<YYYY>/<MM>/<DD>/tc.<issued hour>/index.json, the date being the issued hour’s. A pointer written before that layout names the flat tc.<issued hour>/index.json, and a reader accepts both. byteLength and crc32 (zlib CRC32 of the file’s bytes, eight lowercase hex digits) are the index’s, so it can be requested as <path>?v=<crc32> through an immutable cache.

  • tc/<YYYY>/<MM>/<DD>/tc.<YYYYMMDDHH>/ is one immutable directory per issue, filed under its UTC day so the archive can be kept for years without any listing level growing past a few dozen prefixes. The hour is the UTC hour the product was aggregated at, not any centre’s issue time. It holds index.json and one <storm id>.json per system, and beside them item.json, the issue’s STAC Item — a pure function of the index, read by a catalog client and by nothing in the product (docs/stac.md §“Point products”). Once the pointer names it nothing in it changes; a manual rebuild of an hour (tc-build --issue … --force) writes the directory again, and every file is addressed by its CRC, so a cache never serves one hour’s bytes under another’s key. Directories are pruned after a year (make prune-r2-tc).

  • Paths inside index.json are file names beside it; request each as <name>?v=<crc32> with the CRC the index carries.

The publisher builds every hour at twenty past (publish-tc.yml). A source that is late or unreachable is recorded (see sources) and the hour publishes without it. The pointer is withheld only when no agency and no model contributed at all, in which case the previous hour stays live. An hour the pointer already names is finished: a run that resolves to it (a dispatch landed in the same hour, or the schedule ran late) builds nothing, and the workflow’s force input is the manual rebuild.

Deployment is one-sided: the product is new files under a new pointer, so a shell that does not know it never asks for it. A schemaVersion bump follows the runs’ rule (ship the shell first); an added optional field does not bump the version.

2. Units and conventions

SI throughout, converted at the parser:

quantityunitnote
wind (vmax, gust)m/son whatever averaging the source uses: one-minute for NHC and JTWC, ten-minute for JMA, the Hong Kong Observatory and the other RSMCs, the model’s own for a model
pressure (pmin)hPa
radii (radii, rmw, cone, alert halfWidth)km
positiondegrees, longitude in (−180, 180]a track crossing the antimeridian is split by the reader, not the file
timeISO 8601, UTC, Z suffix
leadsecondsfrom the forecast’s base

Wind radii are keyed by the threshold in knots the centres name them by ("34", "50", "64") as four quadrant values [ne, se, sw, nw] in km. A quadrant not reported is null; a quadrant reported as zero means no such wind there. A threshold a source never reports is absent from the object; a point with no radii at all has radii: null. ECMWF reports at 18 / 26 / 33 m/s, the same three thresholds to within a knot, and is keyed the same way.

class is the source’s own intensity string, verbatim (TS, HU, TY, JMA’s grade digit, CMA’s category…). A reader colours it by the source’s own scale (registry.py names the scale per agency) and never converts between scales. The Hong Kong Observatory spells its categories out; its six tropical cyclone categories are written as the abbreviations IBTrACS carries for it (TD, TS, STS, T, ST, SuperT), so every hko track speaks one vocabulary, and Low Pressure Area and Extratropical Low, which have none, stay verbatim.

Numbers are JSON numbers; a value not reported is null. The files are written compactly with ASCII escaping, and a file’s identity is its bytes: the CRC32 in the index is of the file exactly as served.

3. Identity

A system has one id for its whole life in the product:

  • A-level, numbered: the ATCF id, basin, two-digit number, season (EP142026). JTWC, NHC, the NCEP tracker, ECMWF (14E ⇔ EP14) and IBTrACS (USA_ATCF_ID) all carry it; nothing is inferred. The season is the calendar year, except in the southern hemisphere, whose season runs July to June and is named after the year it ends in (SH022027 in October 2026). The NCEP tracker’s sub-basin codes are read as the basin JTWC numbers in: AA and BB as IO, SI and SP as SH. ECMWF’s storm numbers are JTWC’s and NHC’s except in the western Pacific and the southern hemisphere, where they are its own (its 36W was JTWC’s WP29, its 06S JTWC’s SH12): an ECMWF system in those basins is therefore placed by position, as a C-level one is, and never names a storm.
  • B-level, an unnumbered disturbance a centre tracks (an invest, a tropical depression under a formation alert): a synthetic id x-<basin>-<first seen YYYYMMDDHH>-<n> (basin lowercase, n from 1). The invest number (EP97) is an alias with a validity window, because the numbers are reused within a season; the same alias seen again within 48 hours is the same system.
  • C-level, a potential system only a model has found: the same synthetic shape, named after the run that first found it. ECMWF numbers such systems afresh every run (70W, 71W…), so those names never carry across; a model’s system is attached to a known system when it lies within 333 km (three degrees of arc) of that system’s position nearest in time, and otherwise stands alone, matched the same way to the previous hour’s C-level systems so its id holds while the model keeps finding it.
  • A centre’s own number that is not an ATCF id (the Hong Kong Observatory’s four-digit TCID, 2206) is placed by position the same way and kept as the alias hko:<TCID>. Unlike a model’s it names one system for its whole life, so a sighting near no current system finds the previous hour’s system carrying that alias (within 48 hours), and a system only a centre tracks is B-level, not C.

When an invest is numbered, its B-level system merges into the A-level storm: the previous hour’s B or C system that no source names any more, whose last position lies within 333 km and 48 hours of a current A-level storm, becomes an alias of it, and index.json’s crosswalk maps the old id to the new for as long as the new one is published. A reader holding an old id follows the crosswalk before giving up.

Only positions are compared, never intensities. Binary cyclones within 333 km at the same hour would be merged; the ATCF key takes precedence wherever any source supplies it, which keeps that rare.

4. index.json

The shape — every field, its type and range — is schemas/tc-index.schema.json; the pointer’s is schemas/pointer.schema.json. This section says what the fields mean and the rules across them.

{
  "schemaVersion": 1,
  "issued": "2026-09-13T01:00:00Z",
  "generated": "2026-09-13T01:54:00Z",
  "storms": [
    {
      "id": "EP142026", "level": "A", "basin": "EP", "name": "NORBERT",
      "path": "EP142026.json", "byteLength": 75212, "crc32": "a0cd91de",
      "aliases": {"ecmwf:70E": {"from": "2026-09-12T18:00:00Z", "to": "2026-09-12T18:00:00Z"}},
      "position": {"time": "2026-09-13T00:00:00Z", "lat": 17.8, "lon": -130.0},
      "vmax": 23.1, "pmin": 1000.0, "class": "TS", "classAgency": "nhc",
      "agencies": ["jtwc", "nhc"], "models": ["gfs", "gefs", "ecmwf", "ecmwfens"], "best": ["usa"]
    }
  ],
  "crosswalk": {"x-ep-2026091012-1": "EP152026"},
  "sources": [ … ]
}
  • issued is the aggregation hour, generated when the build ran.
  • storms[] is sorted by level, basin, id. level is A, B or C (§3); basin an ATCF basin (AL, EP, CP, WP, IO, SH); name the name the newest source gives, or null.
  • position, vmax, pmin, class, classAgency are the headline: the last point of a best track when there is one, else the first point of an agency forecast, else of a model’s; classAgency says whose. position may be null for a system with nothing observed.
  • agencies, models, best list the keys present in the storm file, so a reader can decide what to fetch before fetching.
  • sources[] is the same list every storm file carries (§6).

5. <storm id>.json

The shape is schemas/tc-storm.schema.json.

{
  schemaVersion: 1,
  id, level, basin, name,
  sid:   IBTrACS storm id ("2026251N13251") | null,
  intl:  the international (RSMC Tokyo) number | null,    — reserved, null in v1
  aliases: { alias: {from, to} },
  best:     { <agency key>: Track },
  agencies: { <agency id>: Forecast },
  models:   { <model id>: Forecast | Ensemble },
  impact:   { },                                           — reserved for the impact areas
  alert:    { time, line: [[lat, lon], [lat, lon]] | null, halfWidth: km | null, center: [lat, lon] | null } | null,
  sources:  [ … ]
}

Point    = { time, lead?, lat, lon, vmax, pmin, radii, class, rmw, gust, cone }
Forecast = { issued, base, run?, number?, points: Point[] }
Track    = { source, provisional, points: Point[] }
Ensemble = { issued, base, run?, leads: int[], members: int[], lat: int[], lon: int[], vmax: int[], pmin: int[], mean: Forecast | null }

Forecast. base is the time the leads count from: a model’s cycle, or a centre’s synoptic time (NHC’s 03Z advisory forecasts from the 00Z position, its first point at lead 3 h). issued is when it was released, equal to base where a source does not say. A point’s valid time is base + lead, also written as time; leads are strictly increasing. A reader aligns tracks with the raster’s playhead by valid time, never by base or issued. run (YYYYMMDDHH) is present on a model’s forecast and is what the raster manifest calls run; number is a centre’s advisory or warning number, verbatim.

Track. A best track: points by time, strictly increasing, no leads. source says where it came from: ibtracs, or the centre whose working file it is (nhc for its b-deck, jtwc for a warning’s history block, hko for the past positions and analysis of its track information); provisional is true for every working track of a live storm. Keys of best are IBTrACS’ agency keys: usa (the NHC / JTWC joint best track), jma, cma, hko, kma, imd, mfr, bom, fms, mnz. When more than one source supplies the same key, the fresher working file is taken (nhc, then jtwc, then ibtracs; hko, then ibtracs).

Ensemble. A member set on one lead axis, as fixed-point integer arrays flattened member-major: index = member position × len(leads) + lead position. lat and lon are degrees × 100, vmax m/s × 10, pmin hPa × 10; −32768 is missing (a member that has not found, or has lost, the system). members lists the member ids in array order (GEFS: 0 for the control, 1–30; ECMWF ENS: 1–51 as the BUFR numbers them). mean is the ensemble mean track when the source publishes one (GEFS’ AEMN), else null.

Keys. Agency and model ids are ^[a-z][a-z0-9]*$ and are admitted structurally: a key the reader’s registry does not know is drawn in a neutral colour, not rejected. The ids the publisher writes today are xuebuild/tc/registry.py’s, which the frontend reads out of the shell’s registry (web/src/data/registry.ts, generated by xue registry --shell).

Alert. JTWC’s tropical cyclone formation alert, when one is in force for a B-level system: the formation line’s two ends, its half-width and the estimated centre.

6. sources[]

One entry per source the build was asked for, in build order:

{"id": "ecmwfens", "ok": true, "fetched": "2026-09-13T01:53:53Z",
 "url": "https://…/20260912180000-144h-enfo-tf.bufr", "cycle": "2026091218", "systems": 42}
{"id": "nhc", "ok": false, "fetched": "2026-09-13T01:53:45Z", "error": "request failed for …: HTTP Error 503"}

ok: false always carries error. A source’s counts say what it contributed: products the JTWC products read, storms the systems NHC listed, members the GEFS member files read, systems the systems the build took from it. cycle is the model run a model source was read from; the ensemble’s cycle lagging the deterministic one (ECMWF’s enfo lands later than oper) is the normal state. The list is repeated in every storm file so a storm can be read on its own.

Source ids in v1: jtwc (JMV 3.0 warnings and formation alerts, via the RSS feed), nhc (CurrentStorms.json, the a-deck’s OFCL lines, the b-deck), hko (the Hong Kong Observatory’s tropical cyclone track information, below), gfs (the NCEP tracker’s avno file), gefs (its ac00, ap01–ap30 members and the aemn mean), ecmwf (open data oper tf BUFR), ecmwfens (enfo tf BUFR), ibtracs (the v04r01 active list).

hko is the DATA.GOV.HK dataset hk-hko-rss-tc-track-info, reused under the DATA.GOV.HK terms of use with the attribution “Hong Kong Observatory (DATA.GOV.HK)”. tc_list.xml names the systems the Observatory issues forecast tracks for (storms counts them), each with a hko_tctrack_<TCID>.xml, which maps onto a storm file as:

feedproduct
BulletinTime (Hong Kong time)agencies.hko.issued, in UTC
AnalysisInformationagencies.hko.base and its point at lead 0; the last point of best.hko
ForecastInformation with a Timethe forecast’s later points; an entry without one is a position interpolated for the Observatory’s own map and is skipped
PastInformationbest.hko before the analysis (source: "hko", provisional: true)
MaximumWind (145km/h, ten-minute mean)vmax in m/s; -- is null
Intensityclass, as §2 says
TropicalCycloneNamename, null while it is a category

The feed gives no pressure, radii or advisory number: pmin, radii and number are null or absent. Every system it tracks is filed under WP. A bulletin with no position past its analysis (the last, on a system that has weakened or turned extratropical) contributes its best track and no forecast.

7. Validation

The JSON Schemas of §4 and §5 are normative for shape: a file that does not match them is not a tc file. tests/test_schemas.py holds the committed golden (tests/fixtures/tc/expected/, a build from the fetched fixture tests/fixtures/tc/tc.2026091206/ by tests/prepare_tc_golden.py) to them, and the shell’s validators are generated from them (web/src/schema/generated/). xuebuild/tc/schema.py validates every file as it is written, and tests/test_tc.py holds the build to the golden. What a schema cannot say is each reader’s own check: unique storms and file names, an A-level storm’s ATCF id, the alias keys and their windows’ order, the radii thresholds, a forecast point’s lead and its time as base + lead, leads and best-track times strictly increasing, an ensemble’s members unique and its arrays one value per member and lead, and a crosswalk entry naming two different storms. A reader rejects a schemaVersion above the one it implements.

8. The archive

The hourly directories are the live view. The archive is the record: every distinct forecast of a numbered system, once, filed by month, and every season’s best tracks — what a track-error score is computed from. It is a separate tree under the data root, written every six hours (archive-tc.yml, xue tc-archive) and never pruned.

8.1 Layout

tc/archive/catalog.json                   the one mutable name: every month and season
tc/archive/<YYYY>/<MM>/forecasts.jsonl    the month's forecasts, one per line
tc/archive/<YYYY>/<MM>/index.json         each storm's byte span in that file
tc/archive/<YYYY>/best.jsonl              the season's best tracks, one storm per line
tc/archive/<YYYY>/index.json              each storm's byte span in that file, and its months
tc/archive/<YYYY>/overview.json           every storm's track, small enough for a picture of the season
  • catalog.json is fetched with caching disabled. Each entry names an index by path (relative to the catalog), byteLength and crc32; each index names its .jsonl the same way. Every file but the catalog is requested as <path>?v=<crc32>.
  • A month is the UTC month of a forecast’s base. A season is the ATCF season of the storm id (its last four digits): the calendar year, except that the southern hemisphere’s season runs July to June and is named after the year it ends in (SH012026 forms after 1 July 2025).
  • A month or season file is rewritten in place when a record reaches it (the month in progress daily, an earlier one by a late arrival or a backfill), and its CRC32 changes with it. Nothing in the files records when they were built: the same records give the same bytes.
  • Lines are sorted by storm, then source, then base, so one storm’s records in a month are one byte span — one Range request.

8.2 Records

A line of forecasts.jsonl:

{"storm": "WP302026", "basin": "WP", "name": "FUNG-WONG", "source": "jtwc", "kind": "agency",
 "origin": "live", "forecast": { … }}
  • storm is the ATCF id. Only numbered systems are archived; a system the product first carried under a synthetic id (§3) is filed under the ATCF id the crosswalk later gave it, forecasts before numbering included. A system never numbered is not archived.
  • source is an agency or model id (§5); kind is agency, model or ensemble; forecast is a §5 Forecast, or an Ensemble when kind is ensemble. name is the name the source gave, or null.
  • origin says where the record came from: live (the hourly product), nhc-atcf (NHC’s a-deck archive), ucar-atcf (the UCAR RAL mirror of the ATCF a-decks), ecmwf-aws (ECMWF open data’s tf BUFR as kept on AWS).
  • A record is identified by (storm, source, base). Of two records under one key the later replaces the earlier, except that a live record is never replaced by a backfilled one.
  • Ensemble member ids are the origin’s own: in a backfilled a-deck the control is 0 and a perturbed member its tech number (AP07 → 7, EE12 → 12); ECMWF’s BUFR numbers 1–51.

A line of best.jsonl holds one storm:

{"storm": "WP302026", "basin": "WP", "name": "FUNG-WONG", "sid": "2026290N10140",
 "atcf": ["WP302026"], "best": {"usa": Track, "jma": Track, …}}

atcf lists every ATCF id the storm carried (one that crossed into another basin’s numbering has two). For each agency key the archive keeps IBTrACS’ track once it is final, and until then whichever of IBTrACS’ and the centre’s working file (§5 Track.source) reaches later.

A season’s best tracks may also hold what IBTrACS’ backfill brings and the centres never numbered, most of the storms before the satellite era. Such a storm’s id is a history id, <basin>-<SID>-<season> (WP-1951123N10140-1951): the ATCF basin (IBTrACS’ NA as AL, NI as IO, SI, SP and SA as SH), IBTrACS’ SID, and its SEASON, which follows the same southern July-to-June rule. Like an ATCF id it opens on the basin and ends on the season. Its atcf is empty, it has no forecasts, and a branch IBTrACS marks as a spur of another storm is not kept. A storm no agency holds has one track, under the key ibtracs: IBTrACS’ merged position (source: "ibtracs"), vmax and pmin from WMO_WIND and WMO_PRES, class its NATURE. Early winds and pressures are mostly null, and centres’ methods changed over the record, so the positions and intensities of different eras are not of equal quality. IBTrACS lists as a known issue that some storms before 1950 were not correctly matched, so one storm can appear as several and those seasons’ counts run high; the archive keeps them as IBTrACS has them. The history page says both on a season before 1980, the start of what IBTrACS calls the modern era of satellite observations.

A storm IBTrACS does not hold can be reconstructed by hand from primary sources and kept in xuebuild/tc/curated.json, backfilled as curated. Its id is <basin>-<NAME>-<season> (WP-COBRA-1944), its one track has the key and source curated, and its record adds provenance: each source’s publisher, title, url and use (position, pressure or check), shown on the history page. Its points carry their sources’ own times, without interpolation, and what the sources do not measure stays null. Typhoon Cobra has seven positions, from the Weather Bureau’s daily charts and two ships’ war diaries that bracket the centre, one measured pressure and no wind.

A storm IBTrACS does hold keeps its id and its agency tracks when the primary sources contradict them for a stretch of its life: only that stretch goes under curated, beside them. CONNIE (WP031945), the Navy’s Viper, has five points around the fleet’s passage through the centre on 5 June 1945 (local time), whose 958.3 hPa and 80 kt the US track, at 43 kt then, does not hold. A source’s use can also be wind.

8.3 Indexes

A month’s index.json:

{"archiveSchemaVersion": 1, "product": "tc", "month": "2026-10",
 "forecasts": {"path": "forecasts.jsonl", "byteLength": 812345, "crc32": "…"},
 "storms": [{"id": "WP302026", "basin": "WP", "name": "FUNG-WONG",
             "offset": 0, "length": 40312, "records": 56, "sources": ["ecmwf", "gfs", "jtwc"]}]}

A season’s index.json carries season, best (the file) and storms, each with id, basin, name, sid, atcf, its span in best.jsonl (offset and length, both null for a storm with forecasts but no best track yet), the agency keys of its tracks (best), the first and last time any of them places it (first, last) and its peak wind (vmax, m/s, on the usa track when there is one, else on the first key that has a wind, raised by a curated track that observed more; all three null without a best track or wind), the months it has forecasts in and the sources of those forecasts. It names overview (path, byteLength, crc32; absent from an index written before it): {archiveSchemaVersion, product, season, storms: [{id, track: [[lon×10, lat×10, class], …]}]}, each storm’s US best track (else the first with points) at its synoptic times, longitudes and latitudes in tenths of a degree, class the Saffir–Simpson class of its wind from 0 (TD, below 34 kt) through 1 (TS) and 2–6 (H1–H5, from 64, 83, 96, 113 and 137 kt), −1 where it has none. catalog.json lists months (month, path, byteLength, crc32, storms, records) and seasons (season, path, byteLength, crc32, storms). Storms and entries are sorted and unique; the spans tile their file exactly. A reader rejects an archiveSchemaVersion above the one it implements.

The shapes are normative in schemas/tc-archive-catalog.schema.json, tc-archive-month-index, tc-archive-season-index, tc-archive-overview and, for a line of §8.2’s files, tc-archive-forecast-line and tc-archive-best-line; tests/test_schemas.py holds an archive it builds to them, and the shell’s readers run the validators generated from them (§7). What they cannot say, the order, uniqueness and tiling above and a storm’s season, is each reader’s own check.

8.4 Producers

  • The harvest (every six hours) reads the last 48 hourly issues from the data origin, follows their crosswalk, and for every system it renames reads back ten days for the forecasts it carried before it was numbered; hourly directories are therefore kept at least that long. The 00:50 UTC run then merges IBTrACS’ last three years into the seasons; the other three pass --no-ibtracs.
  • The backfill (xue tc-archive --backfill <sources> --from YYYY-MM) reads nhc (OFCL → nhc, AVNO → gfs, AC00/AP01–AP30/AEMN → gefs, EMX → ecmwf, EC00/EE01–EE50/EEMN → ecmwfens, GDMN → gdm; AL, EP, CP), ucar (AVNO, or AVNX where it is alone, → gfs, and the GEFS techs; WP, IO, SH), ecmwf (oper/scda and enfo tf BUFR from 2023-01-18) and ibtracs (every storm of the seasons named by the years of --from and --to; since1980, or ALL before 1980, or a copy on disk with --ibtracs-csv, since the whole list is hundreds of megabytes served slowly). hko reads the Hong Kong Observatory’s last bulletin on each system of those seasons (hko_tctrack_<TCID>.xml, which it keeps serving after the system is gone, for the current season only) and adds its past positions as the storm’s hko track, provisional, on the archived storm that most of its synoptic positions lie within 333 km of; the Observatory’s number and name are not used, and a system the archive does not hold is left out. The harvest adds numbered storms only, so a history id appears only where the backfill was run. gdm is Google DeepMind’s experimental model (the ensemble mean NHC files from 2025). Its data is CC BY 4.0 only for times past and under Google’s real-time terms for anything ahead, so it never enters the hourly product, and a track is archived only once its last valid time is 48 hours past; a weekly run of the nhc backfill over the last two months brings each in. Wherever it is shown or distributed it carries: “Contains experimental research data produced by © 2023-25 Google LLC, whose machine learning models were used to create the experimental data, under a Creative Commons Attribution 4.0 International (CC BY 4.0) Licence. The data is intended for research modelling only and is not intended, validated, or approved for real world use.” An ECMWF system whose number is not JTWC’s or NHC’s (every western Pacific and southern hemisphere one, and every 7x) is filed under the season’s best-track storm whose synoptic position at the forecast’s start lies within 333 km of the start — the nearest when two do — or not at all; a storm’s ECMWF forecasts from before it was numbered are kept this way. --rekey --from --to applies the same placement to the ECMWF records of those two basins already archived, dropping those that start on no storm. JTWC’s and the Asian centres’ forecasts have no public archive: they exist from the day the live harvest kept them.

9. Track-error scores

Each season of the archive with forecasts carries their errors against its best tracks, written by the same run (xue tc-archive, which scores every such season whose inputs changed; --rescore forces one):

tc/archive/<YYYY>/scores.json    the season's summary, and each storm's span in errors.jsonl
tc/archive/<YYYY>/errors.jsonl   one storm per line: every verified (forecast, lead)

catalog.json names them under scores (season, path, byteLength, crc32, from). from is what they were computed from — the season index’s CRC32 and that of every month its storms appear in — so a reader can tell scores that lag the archive, and a run knows which to redo.

9.1 Verification

  • Truth is a best track of the season record (§8.2), each key scored on its own: usa in every basin, jma and cma in the western Pacific. They are never mixed, and intensity errors against jma and cma compare a source’s winds with ten-minute ones.
  • Only the best track’s synoptic points (00, 06, 12, 18 UTC) are truth. A forecast is verified at a lead when the best track has a point both at its base and at base + lead, and the system is a tropical or subtropical cyclone at both: usa status TD, TS, TY, ST, STY, TC, HU, HR, MH, SD or SS; JMA grade 2–5 or 9; CMA category 1–6; and where a point carries no class, a wind of at least 25 kt.
  • Leads are 0, 12, 24, 36, 48, 72, 96, 120, 144, 168, 192, 216 and 240 h; a forecast point verifies only at exactly these. A forecast with no point past its start — a system the model lost, which ECMWF still writes, often at a stale position — is not verified.
  • An ensemble is verified by its mean position: the centroid of the members that carry the system at that lead, only where they are at least half of the members. Members not following the system the others follow (within 333 km at their first position) are left out.
  • Errors: track, the great-circle distance in km; along and cross, its components along the best track’s motion through the verifying time (positive ahead) and across it (positive to the right); vmax and pmin, forecast minus truth, null where either is missing.

9.2 scores.json

{"scoreSchemaVersion": 1, "product": "tc", "season": 2026,
 "from": {"season": "…", "months": {"2026-10": "…"}},
 "leads": [0, 12, …, 240],
 "errors": {"path": "errors.jsonl", "byteLength": 123456, "crc32": "…"},
 "storms": [{"id": "WP302026", "offset": 0, "length": 9876}],
 "summary": [{"basin": "WP", "truth": "usa", "source": "jtwc", "lead": 48, "n": 31,
              "track": 92.4, "trackMedian": 81.0, "along": -12.3, "cross": 8.1,
              "nVmax": 31, "vmaxBias": 1.2, "vmaxMae": 5.6, "nPmin": 30, "pminBias": -2.1, "pminMae": 6.0}],
 "homogeneous": [{"basin": "WP", "truth": "usa", "reference": "jtwc", "source": "ecmwf", "lead": 48,
                  "n": 28, "track": 95.0, "referenceTrack": 90.1, "skill": -0.054}]}

summary is every source on its own sample; homogeneous compares each source with a basin’s references — the official forecast (nhc in AL, EP, CP; jtwc in WP, IO, SH) and ecmwf — on exactly the (storm, base, lead) cases both verified, with skill = 1 − track ÷ reference track. A line of errors.jsonl is {storm, basin, truths: {<truth>: {<source>: {base: [], lead: [], track: [], along: [], cross: [], vmax: [], pmin: []}}}}, one column per field and one row per verified case, lead in hours. The shapes are normative in schemas/tc-scores.schema.json and schemas/tc-errors-line.schema.json, held as §8.3’s are.

The official forecasts are compared with the models of the same base, which ran with the same data but finished after the official forecast was written; the centres’ own verification compares them with the previous cycle’s models instead, so these skills favour the models.

10. Pictures

The static storm and season pages show each track on a map. The pictures are drawn from the archive (xue tc-images, xuebuild/tc/images.py, run by archive-tc.yml after the archive is uploaded) and live beside it, never inside tc/archive/:

tc-images/index.json                                    the one mutable name
tc-images/<YYYY>/<STORM_ID>/{light,dark}-<crc32>.webp   a storm, for the page
tc-images/<YYYY>/<STORM_ID>/card-<crc32>.png            its share card
tc-images/<YYYY>/season/{light,dark}-<crc32>.webp       a season's tracks
tc-images/<YYYY>/season/card-<crc32>.png
  • Every picture is 1200 × 630: the page’s light and dark WebP, chosen by prefers-color-scheme, and the dark PNG as the page’s og:image (PNG, for scrapers that read no WebP). The track is the page’s own (§8.2’s best track, usa first, synoptic times), on Natural Earth 1:50m land, in the storm map’s Saffir–Simpson colours.
  • A file’s name carries the CRC32 of its bytes, so it is immutable (max-age=31536000, immutable) and a redrawn picture is a new name. index.json is fetched with caching disabled and uploaded last.
  • index.json: product ("tc-images"), style, width, height, storms by storm id and seasons by season, each entry season, source and light / dark / card as {path, byteLength} with path relative to the index. source is <style>:<crc32> of what the picture was drawn from (the storm’s best.jsonl line, or the season’s best.jsonl): a run draws again only what changed, or everything when style moves. Storms with fewer than two synoptic points have none.
  • A file the index no longer names is deleted once it is 30 days old (prune-r2-tc-images): pages built before the index moved, cached share cards and image searches still ask for it until then.

Part of the Xue specification, licensed under CC BY 4.0.

10 - The airport product

In the viewer: one page per airport under /airports/ (e.g. /airports/rjtt), the stations over the map with ?stations=apt (/gfs?stations=apt), and the nearest airport’s reports under a pinned point and in /compare.

An airport’s weather is a line of text: a METAR every half hour, a TAF every six. Five thousand of them are a few megabytes of JSON, not a raster, so the airports are a third product published beside the runs and beside the tropical cyclones (docs/tc.md) — aggregated every ten minutes by xue airport-build (xuebuild/airport/) from the NOAA Aviation Weather Center’s decoded cache files, and taken live by the same pointer → immutable directory contract the runs use. This document is the normative description of that product, schema v1. The design it implements is in the project’s private notes; what is here is the contract a reader can hold the publisher to.

1. Delivery

Everything is a static file under the data root, the same root as the run pointers (latest.json, latest-<model>.json), latest-tc.json and showcase.json.

  • latest-airport.json is the one mutable object. Fetch it with caching disabled. It names the newest round’s directory and the index inside it:

    {"schemaVersion": 1, "product": "airport", "issued": "2026-09-16T14:40:00Z",
     "path": "airport/2026/09/16/airport.202609161440/index.json", "byteLength": 594322, "crc32": "9d70a57b"}

    path is relative to the pointer and always airport/<YYYY>/<MM>/<DD>/airport.<round>/index.json, the date being the round’s. A pointer written before that layout names the flat airport.<round>/index.json, and a reader accepts both. byteLength and crc32 (zlib CRC32 of the file’s bytes, eight lowercase hex digits) are the index’s, so it can be requested as <path>?v=<crc32> through an immutable cache.

  • airport/<YYYY>/<MM>/<DD>/airport.<YYYYMMDDHHMM>/ is one immutable directory per round, filed under its UTC day so the data root does not carry a prefix per round: the UTC minute the product was aggregated at, always a multiple of ten. It holds index.json (§4) and history.jsonl (§5) — and beside them item.json, the round’s STAC Item, a pure function of the index read by a catalog client and by nothing in the product (docs/stac.md §“Point products”) — and nothing in it changes once the pointer names it. Every file is addressed by its CRC, so a cache never serves one round’s bytes under another’s key. Directories are pruned after three hours (make prune-r2-airport, AIRPORT_KEEP=18); nothing reads an older round, because each round carries the whole history.

  • Paths inside index.json are file names beside it; request each as <name>?v=<crc32> with the CRC the index carries.

Two ways to read the history, which is why it is one file:

  • One airport. Take the station’s row in the index, which ends in the byte offset and length of its line, and issue GET <round directory>/history.jsonl?v=<crc32> with Range: bytes=<offset>-<offset + length - 1>. The bytes that come back are that station’s JSON object exactly — the span stops before the newline — so they parse on their own. One request, a few kilobytes.
  • Everything. Fetch history.jsonl and read it line by line: one station per line, sorted by ICAO id, each a complete JSON object. No listing, no thousand small objects, and the file streams.

The publisher builds every ten minutes (publish-airport.yml). A source that is late or unreachable is recorded (see sources) and the round publishes without it. The pointer is withheld only when both the METARs and the TAFs failed, in which case the previous round stays live. A round the pointer already names is finished: a run that resolves to it (a dispatch landed in the same ten minutes, or the schedule drifted) builds nothing, and the workflow’s force input is the manual rebuild.

Deployment is one-sided: the product is new files under a new pointer, so a shell that does not know it never asks for it. A schemaVersion bump follows the runs’ rule (ship the shell first); an added optional field does not bump the version.

2. Units and conventions

SI throughout, converted at the parser:

quantityunitnote
temperature, dew point (t, td)°C, to a tenthas the service decodes them
wind speed and gust (ws, gust)m/s, to a tenthknots × 0.514444
wind direction (wd)degrees true, 0–360integer; null when the direction is variable
visibility (vis)metres, to a hundredstatute miles × 1609.344
pressure (qnh, slp)hPa, to a tenthqnh is the altimeter setting, inHg × 33.8639; slp the reported sea-level pressure
cloud base (cloud)metres above ground, to tenfeet × 0.3048
elevation (elev)metresfrom the station table where there is one
timeISO 8601, UTC, Z suffix

vis has one convention: the service codes “ten kilometres or more” as 6+, 10+ or P6SM rather than a distance, and all of those are written as exactly 10000. A vis of 10000 therefore means at least ten kilometres, not ten kilometres. Every other value is the reported distance converted, which is why a report of 7 statute miles reads 11300 — a measured 11.3 km, not the coded ceiling.

wd has one too. A variable direction (VRB04KT, and a TAF group’s VRB) is null with the speed kept: the direction is not known, and writing the zero the CSV decodes it to would publish a north wind. wd: 0 therefore means due north, and wd: 0 with ws: 0 is calm.

qnh comes from the altimeter setting in inches of mercury, which is itself a conversion of the Qnnnn hectopascals most of the world reports; it can differ from the hectopascals in raw by a tenth. raw is the report verbatim and is the authority.

cloud is [[cover, base], …] in the order reported, at most four layers, with cover the three-letter code as it arrives (FEW, SCT, BKN, OVC, OVX, and in a TAF also NSC, SKC, CAVOK). A layer that reports no base — the sky-clear and no-significant-cloud codes, and an obscured sky whose vertical visibility is in raw — has base: null.

Numbers are JSON numbers; a value not reported is null. A value outside the range the contract admits is also null: the service codes some unknowns as numbers (-99.99 for a position it does not have), and one bad cell must not cost a round. A report with no usable position at all is not published, since the product could not place it.

The files are written compactly with ASCII escaping — a history line is one such object and carries no whitespace of its own — and a file’s identity is its bytes: the CRC32 in the index, and the pointer’s, is of the file exactly as served. Given the same inputs, a round is byte-identical; nothing in it is a function of when the build ran except the index’s generated.

3. Identity

A station is its ICAO id, uppercase (RJTT, KABQ, ZBAA). Nothing is inferred: a station the station table does not know still enters the product under the id its report carries, with a null name and the report’s own position. The id is the key everywhere — the index’s rows and the history’s lines are both sorted by it, and each history line repeats it as icao so a slice read by range identifies itself.

4. index.json

The shape — every field, its type and range — is schemas/airport-index.schema.json; the pointer’s is schemas/pointer.schema.json. This section says what the fields mean and the rules across them.

{
  "schemaVersion": 1,
  "issued": "2026-09-16T14:40:00Z",
  "generated": "2026-09-16T14:46:20Z",
  "history": {"path": "history.jsonl", "byteLength": 114742, "crc32": "c34fab6d"},
  "columns": ["icao", "lat", "lon", "elev", "obsTime", "t", "td", "wd",
              "ws", "gust", "vis", "qnh", "category", "tafPresent", "offset", "length"],
  "stations": [
    ["RJTT", 35.553, 139.781, 5.0, "2026-09-16T14:30:00Z", 21.0, 20.0, 20, 6.7, null, 7000, 1016.9, "MVFR", 1, 76142, 1633]
  ],
  "sources": [ … ]
}
  • issued is the round, generated when the build ran.

  • history names the file beside the index, its length and the CRC32 of the whole file — the ?v= a reader requests it under.

  • columns names the rows’ columns, and a reader finds a column by its name there. In v1 it is always the order below, so a reader that indexes by position reads it too. It is optional: rounds published before it (every airport round up to 2026-11-04) do not carry it, and a reader takes such an index’s rows in the order below.

  • stations[] is one compact row per station, sorted by ICAO id and unique, in this order:

    01234567
    icaolatlonelevobsTimettdwd
    89101112131415
    wsgustvisqnhcategorytafPresentoffsetlength

    The values from index 4 to 12 are the station’s newest observation; the whole of it, and its 23 hours of predecessors, are in the history file. category is the service’s flight category (VFR, MVFR, IFR, LIFR) or null; tafPresent is 1 when the station has a current TAF, else 0. offset and length are the byte span of the station’s line in history.jsonl, the JSON object alone: the spans are in row order, they do not overlap, and each lies inside history.byteLength.

  • sources[] is §6.

The index is what a map layer reads: about 600 KB for five thousand stations, every position and current condition, and no history.

5. history.jsonl

Each line’s shape is schemas/airport-line.schema.json. One line per station, sorted by ICAO id, each the compact JSON object below followed by \n:

{"icao": "RJTT", "name": "Tokyo/Haneda Intl" | null,
 "lat": 35.553, "lon": 139.781, "elev": 5.0,
 "iata": "HND" | null, "wmo": "47671" | null,
 "metars": [ Metar, … ],          — the last 24 hours, newest first
 "taf":    Taf | null}            — the current forecast

Metar  = { time, raw, t, td, wd, ws, gust, vis, qnh, slp, wx, cloud, category, auto, type }
Taf    = { issued, from, to, raw, amended, periods: [ Period, … ] }
Period = { from, to, change, prob, wd, ws, gust, vis, wx, cloud }

Metar. time is the observation time, and the entries are strictly decreasing in it: metars[0] is the newest. raw is the report as transmitted. wx is the present-weather string verbatim (-SHRA BR) or null; auto says the report came from an automatic station; type is METAR or SPECI (an off-schedule special). A station in the product has at least one observation in the window; when its last one falls out of the 24 hours, the station leaves the index and the history until it reports again.

Taf. issued is the bulletin’s issue time, from and to its validity, amended true for an amendment or a correction (AMD or COR in the bulletin’s remarks). periods are the decoded groups sorted by from and then to. change is the group’s change indicator — FM, BECMG, TEMPO, PROB — and is null on the forecast’s first, prevailing group; a PROB40 TEMPO group is change: "TEMPO" with prob: 40. A period carries only what its group states: a field the group does not restate is null and the reader inherits it from the prevailing group, as the TAF itself is read. The BECMG completion time is not carried in v1.

A station’s history is a merge, not a snapshot. Each round lays that round’s observations over the previous round’s history keyed by (station, observation time), the newer report winning — so a correction replaces what it corrects — and drops what is older than 24 hours before the round. A station that did not report keeps its history untouched.

Only stations that have observed are in the product: a TAF for a station with no observation in the window is not published, since there would be nothing to hang it on.

6. sources[]

One entry per source, in build order:

{"id": "awc-metars", "ok": true, "fetched": "2026-09-16T14:45:32Z",
 "url": "https://aviationweather.gov/data/cache/metars.cache.csv.gz", "reports": 5189}
{"id": "awc-tafs", "ok": false, "fetched": "2026-09-16T14:45:32Z", "error": "request failed for …: HTTP Error 503"}

ok: false always carries error. reports is what the source contributed: METARs read, TAFs read, stations in the table. bytes is the size of the file the source served; cached: true, with the table’s modified (its Last-Modified, verbatim), marks a station table kept from an earlier fetch.

Source ids in v1, all from the Aviation Weather Center’s cache (https://aviationweather.gov/data/cache/), a work of the United States government and in the public domain:

  • awc-metars — metars.cache.csv.gz, the world’s decoded METARs of the last ninety minutes, rewritten every minute.
  • awc-tafs — tafs.cache.xml.gz, every current TAF, rewritten every ten minutes.
  • awc-stations — stations.cache.json, the station table (name, IATA and WMO identifiers, position, elevation), rewritten daily and fetched at most once a day with If-Modified-Since. When the request fails over a copy already on disk the source stays ok with the error noted: a day-old table names the same airports.

The service asks for at most a hundred requests a minute and a custom User-Agent on every request; the publisher sends xue/<version> (+https://github.com/ringsaturn/xue) and makes three requests per round. The observations themselves are the world’s meteorological services’, exchanged under WMO arrangements and redistributed by NOAA/NWS; attribution names both.

7. Validation

The JSON Schemas of §4 and §5 are normative for shape: a file that does not match them is not an airport file. tests/test_schemas.py holds the committed golden (tests/fixtures/airport/expected/, two consecutive rounds built from the fetched fixture tests/fixtures/airport/airport.202609161430/ and …1440/, the raw rounds, which stay flat under the raw root, by tests/prepare_airport_golden.py) to them, and the shell’s validators are generated from them (web/src/schema/generated/). xuebuild/airport/schema.py validates every file as it is written, and tests/test_airport.py holds the build to the golden and checks every index row’s span against the history file it addresses. What a schema cannot say is each reader’s own check: the history file’s name, columns the v1 order, every row sixteen values, the rows sorted by id and unique, the spans in row order inside history.jsonl, the METARs newest first, and a TAF and its periods not ending before they start. Admission is structural: a station id, a sky cover or a weather string a reader has never seen is not an error. A reader rejects a schemaVersion above the one it implements.

8. Share cards

Each airport page’s og:image is a card drawn from the pages’ checked-in list (web/tooling/airports.json), not from the product: xue airport-images (xuebuild/airport/images.py, run by airport-images.yml when the list or the drawing changes) writes them beside the product, never inside airport/:

airport-images/index.json                  the one mutable name
airport-images/<ICAO>/card-<crc32>.png     an airport's card
  • A card is a 1200 × 630 PNG on the storm pictures’ dark map (docs/tc.md §10): Natural Earth 1:50m land around the airport, its mark and ICAO id, the other listed airports in the frame as dots, the airport’s English name, its codes and city.
  • A file’s name carries the CRC32 of its bytes, so it is immutable (max-age=31536000, immutable) and a redrawn card is a new name. index.json is fetched with caching disabled and uploaded last.
  • index.json: product ("airport-images"), style, width, height and airports by ICAO id, each entry source and card as {path, byteLength} with path relative to the index. source is <style>:<crc32> of what the card shows (the airport’s codes, name, city and position, and the positions of the listed airports in its frame): a run draws again only the cards that changed, or all of them when style moves. An airport dropped from the list drops from the index.
  • A file the index no longer names is deleted once it is 30 days old (prune-r2-airport-images). A page whose airport the index lacks, or a build that cannot read the index, keeps the site’s card.

Part of the Xue specification, licensed under CC BY 4.0.

11 - The radiosonde sounding product

In the viewer: the stations over the map with ?stations=snd (/gfs?stations=snd), the nearest ascent as a skew-T under a pinned point, and the model’s own sounding beside it in /workbench.

The .xue container is a raster container. A radiosonde ascent — a few hundred levels of pressure, height, temperature, dew point and wind at one point — is not a raster, so soundings are another, smaller product published beside the runs: plain JSON, a few megabytes an hour, aggregated by xue sounding-build (xuebuild/sounding/) from the TEMP bulletins the world’s weather services exchange, and taken live by the same pointer → immutable directory contract the runs and the tropical cyclone product use. This document is the normative description of that product, schema v1. The design it implements is in the project’s private notes; what is here is the contract a reader can hold the publisher to.

1. Delivery

Everything is a static file under the data root, the same root as the run pointers (latest.json, latest-<model>.json), latest-tc.json and showcase.json.

  • latest-sounding.json is the one mutable object. Fetch it with caching disabled. It names the newest issue directory and the index inside it:

    {"schemaVersion": 1, "product": "sounding", "issued": "2026-09-14T02:00:00Z",
     "path": "sounding/2026/09/14/sounding.2026091402/index.json", "byteLength": 6569, "crc32": "c07d6fe2"}

    path is relative to the pointer and always sounding/<YYYY>/<MM>/<DD>/sounding.<issued hour>/index.json, the date being the issued hour’s. A pointer written before that layout names the flat sounding.<issued hour>/index.json, and a reader accepts both. byteLength and crc32 (zlib CRC32 of the file’s bytes, eight lowercase hex digits) are the index’s, so it can be requested as <path>?v=<crc32> through an immutable cache.

  • sounding/<YYYY>/<MM>/<DD>/sounding.<YYYYMMDDHH>/ is one immutable directory per issue, filed under its UTC day so the archive can be kept for years without any listing level growing past a few dozen prefixes. The hour is the UTC hour the product was aggregated at, not any sounding’s nominal time. It holds the product’s two files, index.json and soundings.jsonl, and beside them item.json, the issue’s STAC Item — a pure function of the index, read by a catalog client and by nothing in the product (docs/stac.md §“Point products”). Once the pointer names it nothing in it changes; a manual rebuild of an hour (sounding-build --issue … --force) writes the directory again, and both files are addressed by their CRC, so a cache never serves one hour’s bytes under another’s key. Directories are pruned after seven days (make prune-r2-sounding).

  • soundings.jsonl is every station’s soundings, one JSON object per line, sorted by station id. index.json spans it: the soundings descriptor gives the whole file’s byteLength and crc32, and each stations[] row gives the offset and length of that station’s object. So there are two ways to read the product and both are cheap:

    • one station, the way the viewer reads it — fetch soundings.jsonl?v=<crc32> with Range: bytes=<offset>-<offset+length-1>. The span excludes the trailing newline, so what comes back parses as JSON on its own.
    • all of it, the way an analyst reads it — fetch the one file and stream it line by line. No directory traversal, no thousand small objects.

    One file per issue rather than one per station is deliberate: a bucket full of small objects is slow and expensive to traverse for anyone doing statistics over the archive, and it bills per object.

The publisher builds every hour at a quarter past (publish-sounding.yml). A station with no new ascent this hour is carried forward from the previous issue’s soundings.jsonl, so its content is unchanged even though the file around it is rewritten. A source that is late or unreachable is recorded (see sources) and the hour publishes without it. The pointer is withheld only when no source contributed and there was nothing to carry forward, in which case the previous hour stays live. An hour the pointer already names is finished: a run that resolves to it builds nothing, and the workflow’s force input is the manual rebuild.

Deployment is one-sided: the product is new files under a new pointer, so a shell that does not know it never asks for it. A schemaVersion bump follows the runs’ rule (ship the shell first); an added optional field does not bump the version.

2. Units and fixed point

The scalar fields are SI, converted at the parser. The level arrays are fixed-point integers — a sounding is a few hundred levels and JSON floats would double the file for no precision — with -32768 for a value the bulletin does not report:

arrayquantityunit
ppressurePa
zgeopotential heightgpm
ttemperatureK × 100
tddew-point temperatureK × 100
wdwind direction, the direction the wind comes fromdegrees
wswind speedm/s × 10
sigextendedVerticalSoundingSignificancethe BUFR flag word, verbatim

The seven arrays are parallel and all of length n. -32768 is the missing value in every one of them, including sig; it is a JSON number, not a 16-bit field, so a height of 35 000 gpm is written out in full.

Scaling is half-up on the magnitude (-0.5 and 0.5 both round away from zero), so a second implementation does not have to know one language’s rounding rule.

p is the vertical axis: it is present on every level, strictly descending, and the levels are ordered by it. A level the bulletin reports without a pressure has no place on that axis and is not published; two levels reported at one pressure (a significant temperature level and a significant wind level at the same height, as a few centres file them) are folded into one, the first keeping its values, taking what it is missing from the second, and the two sig words or-ed together.

sig is BUFR flag table 0 08 042, an 18-bit field numbered left to right, so bit 1 is 1 << 17. The bits a reader is likely to want:

bitvaluemeaning
1131072surface
265536standard level
332768tropopause level
416384maximum wind level
58192significant temperature level
64096significant humidity level
72048significant wind level

Thinning. The product publishes the classical TEMP set, not every sample. A modern sonde reports every second — seven thousand levels of an ascent whose mandatory-and-significant set is forty to a hundred and fifty — which is detail no skew-T or model-profile comparison draws, at two orders of magnitude of bytes. After the levels are ordered and levels at one pressure folded, a level is published when:

  • its sig has any of bits 1–7 set (surface, standard, tropopause, maximum wind, significant temperature, significant humidity, significant wind); or
  • the source sends its ascents unflagged (Météo-France, §6) and it is the level nearest one of the standard surfaces — 1000, 925, 850, 700, 500, 400, 300, 250, 200, 150, 100, 70, 50, 30, 20 and 10 hPa — within one hectopascal of it. It is kept as measured, at its own pressure, and its sig stays -32768: it is not a level the station reported as standard; or
  • it is the lowest or the highest level of the ascent; or
  • its pressure is at least 3 % below the last published level’s pressure — p_last_published / p >= 1.03, walking upward, the last published level being whichever was kept, flagged or not.

A sig of -32768 counts as unflagged. A properly flagged ascent passes through untouched; an unflagged run is capped at about 150 levels between 1000 and 10 hPa. n is the published level count and reported beside it is what the bulletin held before thinning, so a reader can always see what was left out — and the three sample bulletins in the fixture lose one level between them.

Times are ISO 8601, UTC, Z suffix. Numbers outside the level arrays are JSON numbers, and a value not reported is null. The files are written compactly with ASCII escaping, and a file’s identity is its bytes: the CRC32 in the index is of the file exactly as served.

3. Identity

A station has one id for its whole life in the product, and it is a WIGOS identifier: <series>-<issuer>-<issue number>-<local identifier>, written out, which is digits and hyphens and needs no escaping in a URL. It is what soundings.jsonl is sorted by and what the index’s rows key on.

  • Two soundings are the same station when they carry the same five-digit WMO number, block × 1000 + station. That number is the identity key, because a station that has migrated to a native WIGOS identifier is still filed under its WMO number by the centres that have not.
  • The published id is the station’s native WIGOS identifier once any bulletin has carried one (China’s stations do: 0-20001-0-51463), and otherwise the legacy form of the WMO number, 0-20000-0-<wmo>. Sources disagree over it, so the identifier a previous issue published is kept through an hour whose bulletins carry only the legacy form, and the soundings published under either are one station’s.
  • wmo carries the five-digit number whenever it is known, whichever form the id took.
  • A subset with neither a WMO number nor a usable WIGOS identifier — a ship, a mobile station, a WIGOS local identifier that is not URL-safe — is dropped and counted in its source’s dropped.

Names. TEMP bulletins name no station (no subset of any source carries stationOrSiteName), so name comes from xuebuild/sounding/stations.json: WMO number → name, built from NOAA NCEI’s IGRA2 station list (igra2-station-list.txt, the file’s date in the table) for the WMO-numbered stations reporting since 2020. It is checked in, not fetched, so no outage can cost an issue its names. The list’s names are the WMO station records in capitals, cut at 30 characters; the table title-cases them (acronyms such as AFB and Roman numerals kept, particles such as de and na lowered), drops the index annotations ((47418-0)), the station-type tags ((RS), (AERO), a Canadian UA) and a trailing US state or Canadian or Mexican province code, and drops the last word of a name the 30-character cut may have broken. Nothing is translated or added. name is a function of wmo alone, applied to carried-forward lines too, and is null for a station the table lacks, a WIGOS-only station among them.

A sounding’s nominal time is the synoptic hour it is filed under: the <ddhhmm> of the bulletin’s WMO file name, dated by the month the gateway’s arrival stamp puts it nearest. A national node’s object carries no heading, so its subsets are filed by their own clock instead: the six-hourly hour at or before three hours after it, which puts a launch from 21:00 to 02:59 on the 00Z ascent (and a TEMP converted from text, whose clock is the nominal hour, on itself). Météo-France’s files are filed the same way, by their launch time: the hour in a file’s name is its publication batch, and an 18Z ascent from Rapa is in the next day’s 00 file. It is not the launch time. The launch time is the subset’s own clock (timeSignificance 18) and is published as launched when it lies between 90 minutes before the nominal hour and an hour after it — the window that covers both the Chinese stations releasing at 23:15 for 00Z and the Japanese ones at 00:16. Anything outside is a clock the product does not trust, and launched is null.

Descents. A message whose template is Table D 3 09 056, the radiosonde descent, is not a sounding of this product: its levels run down from the burst, and its clock and position are the burst’s. It is left out whole and counted in its source’s descents. Météo-France’s node publishes only descents, and the gateways carry none of mainland France’s ascents; those come from Météo-France’s own files (§6). A Météo-France file holds an ascent and a descent side by side, each labelled with its direction, but the label is not relied on: an object is an ascent when the level at its lowest pressure was measured later after launch than the level at its highest, and a descent otherwise, and only an object whose levels cannot say (a single level, no clock column) falls back on the label. An object of fewer than two levels is no sounding and is counted in dropped.

Deduplication. The same station-hour arrives more than once: the sources carry overlapping sets, a station may be filed in more than one bulletin, and corrections (CCA, RRA…) repeat a bulletin outright. One sounding survives per (station, nominal time): the one with the most temperatures, then the most levels, and on a tie the one that arrived last, which is the correction. The sounding a previous issue published for the hour competes on the same terms.

Parts. Many centres send an ascent as the parts of a TEMP, or as its two halves: A the standard levels and their heights up to 100 hPa (or the whole ascent that far), B the significant levels of the same reach, C and D the same two above it. They come under headings that do not say which they are, some in IUK and some in IUS bulletins, so a part is told by its levels: none above 100 hPa is A or B, none below it C or D, and of each pair the one that reports a height on a level other than the surface is A or C.

The parts of one station and nominal time, whatever source they came by, are merged, and the merged ascent competes with the others; it wins only with more temperatures or, at as many, more levels. Of each part the best by the rule above counts. B is left out when A reports a height off the standard surfaces, since A is then the full ascent to 100 hPa. A part whose launch clock is more than 30 minutes from the lowest part’s is of another flight and is left out, unless either clock is the nominal hour itself, which is a converter’s stand-in. The levels are laid on one pressure axis, where two at one pressure become one by the rule of §2, A first. reported is the merged count plus what the parts’ own thinning dropped, and bulletin names every part’s, joined by +.

In any sounding, a level under the surface level with no temperature, dew point or wind on it is left out: A gives every standard surface down to 1000 hPa a height, those under the ground included.

The parts go out over an hour and a half, across issues. A part that arrives later is merged onto what the previous issue published, where that was a part or was itself merged. C and D with neither A nor B are no ascent and are not published.

The United States’ node names each part’s object, TEMP_AA_<wmo>_… to TEMP_DD_<wmo>_…. Part D’s pressures are tenths of a hectopascal in the text, and it writes them as whole hectopascals, ten times too large. A part D holding any pressure above 100 hPa, which none can have measured, is read with every pressure divided by ten; one that holds none is taken as it is.

4. index.json

The shape — every field, its type and range — is schemas/sounding-index.schema.json; the pointer’s is schemas/pointer.schema.json. This section says what the fields mean and the rules across them.

{
  "schemaVersion": 1,
  "issued": "2026-09-14T02:00:00Z",
  "generated": "2026-09-14T02:05:00Z",
  "watermark": {"jp-jma-gts-to-wis2": "2026-09-14T02:34:41Z", "de-dwd-gts-to-wis2": null},
  "soundings": {"path": "soundings.jsonl", "byteLength": 105657, "crc32": "…"},
  "stations": [
    {
      "id": "0-20000-0-47401", "wmo": "47401", "name": "Wakkanai",
      "lat": 45.415, "lon": 141.679, "elev": 2.9,
      "offset": 0, "length": 1531,
      "latest": "2026-09-14T00:00:00Z",
      "times": ["2026-09-14T00:00:00Z", "2026-09-13T12:00:00Z"],
      "headline": {"t500": -13.7, "td500": -40.7, "freezingLevel": 3292, "pw": 26.3, "levels": 15}
    }
  ],
  "sources": [ … ]
}
  • issued is the aggregation hour, generated when the build ran.
  • watermark is per source: the newest object modification time that source’s listing held when the issue was built, which is where the next hour’s fetch starts. null means the source has never been listed successfully. It is published because it is the product’s own account of how current it is; a reader may ignore it.
  • soundings describes the file beside the index: path is always soundings.jsonl, byteLength its length and crc32 the zlib CRC32 of its bytes, which is its ?v=.
  • stations[] is sorted by id, and so is soundings.jsonl. offset and length are the byte span of that station’s object in the file, excluding the newline after it. The spans are strictly increasing, do not overlap, and tile the file exactly: Σ(length + 1) == byteLength.
  • lat, lon and elev come from the newest sounding. elev is metres above mean sea level, the first of three heights the subset may carry, in this order: the ground under the station (heightOfStationGroundAboveMeanSeaLevel), the BUFR height of station (height), the barometer’s height; null when the bulletin gives none. name is the station’s name (§3, Names), null when it has none.
  • latest is the newest nominal time and equals times[0]; times lists the nominal times the station’s line carries, newest first, at most four.
  • headline summarises the newest sounding for a marker layer that has not fetched the soundings file: t500 and td500 are the 500 hPa temperature and dew point in °C to a tenth (null when that level is absent), freezingLevel and pw repeat the derived values (§7), and levels is that sounding’s n.
  • sources[] is the build’s account of its sources (§6).

A station whose newest sounding is more than 48 hours older than the issue hour is not carried forward any further: it has stopped reporting, or its identifier has changed.

5. soundings.jsonl

Each line’s shape is schemas/sounding-line.schema.json. One line per station, sorted by station id, each line the compact JSON object below followed by \n. It carries no schemaVersion and no sources: the index it hangs off has both, and repeating them once per station would cost more than the stations do.

{
  id, wmo, name, lat, lon, elev,
  soundings: [                        — the newest four nominal times, newest first
    {
      time:      the nominal (synoptic) time,
      launched:  the launch time | null,
      sondeType: BUFR code table 0 02 011 | null,
      bulletin:  "IUSC01 RJTD 140000" (plus " CCA" on a correction), or a node's object name,
                 or a Météo-France file name,
      gateway:   the source id the bytes came from,
      arrived:   when the source published the bulletin,
      n:        the published level count,
      reported: the levels the bulletin held before thinning (§2),
      p, z, t, td, wd, ws, sig:  n integers each (§2),
      derived: {freezingLevel, pw, lapse850_500, tropopause}   — §7
    }
  ]
}

soundings is in strictly decreasing time, newest first, and holds at most four nominal times — two days of the twice-daily cycle. Each hour’s build merges what arrived into what the previous issue published for the station, under the same rule §3 gives: for one nominal time, the most levels wins, then the latest arrival. A station with nothing new this hour is carried forward from the previous issue’s file, its line re-encoded unchanged; the file around it is rewritten every hour, which at this size costs nothing worth saving. A part C or D an earlier issue published alone is the exception: it is not carried forward.

bulletin is the WMO abbreviated heading of the bulletin the sounding was decoded from, verbatim, and arrived the gateway’s own timestamp for it. A national node’s object has no heading: bulletin is its object name (WIGOS_0-20000-0-82022_20261104T233000.bufr4) and arrived its LastModified; a Météo-France sounding’s bulletin is its file name (07145.2026111100.json) and arrived the modification time its directory index gives. An ascent merged from its parts (§3) has the parts' object names in bulletin, in the order A to D with a space between, and the latest of their times in arrived. Together they say exactly which message a value came from.

Size. Measured over one issue of the live feed, 491 stations: the newest ascent held a median of 504 reported levels and a maximum of 7 553, of which the thinning rule (§2) publishes a median of 169 and a maximum of 383 — 9.7 % of the samples. The median station line is 23 KB and the largest 46 KB; the issue is 10.6 MB behind a 160 KB index, in two objects. A client that wants a marker layer reads the index alone; opening one station costs one range request of its length.

6. sources[]

One entry per source the build was asked for, in build order:

{"id": "jp-jma-gts-to-wis2", "ok": true, "fetched": "2026-09-14T02:04:00Z",
 "url": "https://wis2globalcache.s3.us-east-1.amazonaws.com/data/jp-jma-gts-to-wis2/data/core/I/U/",
 "watermark": "2026-09-14T02:34:41Z", "listed": 1808, "objects": 47, "reused": 0,
 "bytes": 2310221, "bulletins": 47, "unreadable": 0, "subsets": 214, "dropped": 0, "soundings": 214}
{"id": "de-dwd-gts-to-wis2", "ok": false, "fetched": "2026-09-14T02:04:00Z",
 "watermark": null, "error": "request failed for …: HTTP Error 503"}

ok: false always carries error. listed is how many objects the source’s listing held, objects how many were downloaded (the ones newer than the previous watermark), reused how many were carried over from the previous issue’s download instead, failed how many the cache would not serve, bytes how many bytes the objects held, bulletins how many decoded, nil how many were plain-text NIL bulletins, descents how many were descent profiles (§3) and left out, unreadable how many did not decode, subsets how many station subsets they held, dropped how many of those carried no usable station identity and soundings how many soundings the source contributed. The list lives in the index alone: a station’s line does not repeat it, so it always describes the issue the reader is holding, even for a station whose soundings were carried forward from an earlier one.

A source’s watermark only advances when its bulletins were read. A listing that failed, and a download not one bulletin of which decoded, both leave the previous hour’s watermark in place, so the next hour sees those objects again rather than stepping past them for good.

Source ids are of four kinds. The first two are directories of the WMO WIS2 Global Cache, a public bucket that lists without credentials.

  • The two GTS→WIS2 gateways, which keep an object for 24 hours: jp-jma-gts-to-wis2 (run by the Japan Meteorological Agency) and de-dwd-gts-to-wis2 (run by the Deutscher Wetterdienst). Each republishes every country’s GTS bulletins under the WMO abbreviated heading tree, and the two carry different sets, which is why both are read. Two branches of the tree are: I/U/S/, and I/U/K/, the soundings up to 100 hPa, where the lower halves are.
  • wis2:<centre>, a national WIS2 node’s TEMP topic, data/<centre>/data/core/weather/surface-based-observations/temp/. A centre that runs its own node stops sending its soundings to the gateways, so these are read too. The nodes are discovered every hour by listing the cache’s data/ (the gateways and the discovery catalogues excepted), and a node whose topic is empty is not a source of that issue: it has no entry in sources[], and its watermark entry, once it has one, is kept. A node with no watermark is taken back 48 hours, the staleness limit, since its objects outlive the gateways’ day. Objects named as the parts of a TEMP (§3) modified in the last four hours are taken again behind the watermark, so that a part sent before the lower ones is there to be merged. A discovery that fails is the one entry wis2, with ok: false.
  • meteofrance, Météo-France’s own radiosonde files on data.gouv.fr (dataset radiosondages), https://files.data.gouv.fr/meteofrance/data/OBS/RS/<YYYY>/<MM>/<DD>/<wmo>.<YYYYMMDDHH>.json: every ascent of its fifteen stations, mainland France, overseas and the TAAF, at full resolution with no significance flags (§2). The days the last 48 hours touch are listed each hour from their directory index, and the files are kept for good, so the watermark is trusted however old it is. Files go out in two batches a day, at about 01:40 and 13:40 UTC.
  • nws-tgftp, TEMP as text (FM 35) from the US National Weather Service’s gateway, https://tgftp.nws.noaa.gov/data/raw/: the parts A to D of Canada’s and India’s stations under us/, uk/, ul/ and ue/. Canada’s WIS2 node publishes no TEMP and India’s a part of its stations. A heading has one file there, overwritten by its next bulletin, so the parts modified in the last four hours are taken again behind the watermark.

The text form holds less than the BUFR, and is published so:

  • Each report is a part (§3, Parts), with the flags of its levels: the surface, the standard surfaces, the tropopauses and the levels of maximum wind in A and C, the significant temperatures and winds in B and D. Pressures are whole hectopascals (tenths in C and D), dew-point depressions whole degrees above 5 °C, directions multiples of 5°.
  • Heights are the standard surfaces’ alone, in tens of metres from 500 hPa up, and the surface’s, which is the station’s elevation.
  • It is filed by the report’s own day and hour, by the rule a node’s clock is; one later than the file’s modification time is mistyped, and the heading’s is taken. launched and sondeType are null.
  • A report has no position. It comes with the elevation from xuebuild/sounding/positions.json, from the same IGRA2 list as the names, except for the stations its bulletins lists, whose own BUFR gave it. A station that is not there is counted in dropped.
  • A part is read up to the first level out of order (a height below the one under it, a pressure above), and a part A with fewer than four temperatures is no ascent and is counted in dropped.

bulletin is the report’s heading (USCN01 CYEV 250000), and arrived the file’s modification time, to the minute.

The data is WMO core data under the WMO Unified Data Policy: free and unrestricted, with attribution of the original source requested. The originating national meteorological and hydrological services are the source of every sounding; the WIS2 Global Cache, its two gateways and the national nodes are the distribution. Météo-France’s files are published by Météo-France under the Licence Ouverte 2.0 (Etalab), which asks that the source and the date of its last update be named: a sounding whose gateway is meteofrance is Météo-France’s, and its arrived is that date. The text bulletins are of the GTS, distributed by the US National Weather Service. Station names (§3) and the positions of the text bulletins' stations are from the Integrated Global Radiosonde Archive (IGRA) version 2 station list, NOAA National Centers for Environmental Information, a US Government work in the public domain.

7. Derived quantities

derived holds four numbers computed from the published levels — not from the BUFR floats — in a fixed operation order, so a second implementation reading <station>.json reproduces them exactly. Heights are rounded to whole geopotential metres, the other two to a tenth. Any of them is null when the sounding does not support it.

A derived height is a published z, interpolated or picked out, so it carries z’s range and may be negative: stations below sea level report negative geopotential heights, and a bulletin that flags a tropopause at one is reporting a bad height rather than breaking the contract. A reader sanity-checks derived values; the product does not silently drop them.

freezingLevel (gpm). Walking up from the surface, the first pair of consecutive levels that both carry a temperature and a height and that straddle 273.15 K with the lower one at or above it. The height is linear in temperature across that pair: z = z_lower + (273.15 − t_lower) / (t_upper − t_lower) × (z_upper − z_lower). null when the lowest level with a temperature is already below freezing (there is no warm layer to leave) or when the profile never crosses.

pw (mm). The depth of the water-vapour column. Only levels carrying both a pressure and a dew point take part, in descending pressure, up to the last one at or above 300 hPa; the integral is not extrapolated to exactly 300 hPa, so a sounding that stops early reports what it measured. Per level, with p in hPa and the dew point in °C:

e = 6.112 × exp(17.67 × td / (td + 243.5))      Bolton (1980) eq. 10, hPa
w = 0.622 × e / (p − e)                          mixing ratio
q = w / (1 + w)                                  specific humidity

and the column is the trapezoidal integral of q over pressure in pascals, summed from the surface upwards, divided by standard gravity 9.80665 m/s². null when fewer than two levels qualify. (Worked example: two levels at 1000 and 900 hPa with a 10 °C dew point give e = 12.271696 hPa, q = 0.00766857 and 0.00852504, and pw = 8.3 mm.)

lapse850_500 (K/km, positive when the temperature falls with height). (t850 − t500) / ((z500 − z850) / 1000), where the 850 and 500 hPa levels are levels the sounding actually reports, within one hectopascal of their nominal pressure, each carrying a temperature and a height. The product never interpolates a standard level that was not reported, so null here means the ascent did not report one of them — a high station whose surface is above 850 hPa, or a bulletin that carries only significant levels.

tropopause (gpm). The height of the first level, in descending pressure, whose sig has bit 3 (32768) set and which carries a height. A sounding may flag a secondary tropopause above the first; the lowest is published. null when no level is flagged (Météo-France’s ascents never are), or when the flagged level reports no height — which several centres’ bulletins do.

8. Validation

The JSON Schemas of §4 and §5 are normative for shape: a file that does not match them is not a sounding file. tests/test_schemas.py holds the committed golden (tests/fixtures/sounding/expected/, a build from the fetched fixture tests/fixtures/sounding/sounding.2026091402/ by tests/prepare_sounding_golden.py) to them, and the shell’s validators are generated from them (web/src/schema/generated/). xuebuild/sounding/schema.py validates every file as it is written, and tests/test_sounding.py holds the build to the golden. A reader rejects a schemaVersion above the one it implements.

Admission is structural, in the posture the manifests take: a station identifier the reader has never seen, a radiosonde type code it does not know and a source id that is not one of today’s two are all admitted. What is checked is shape — the id pattern, coordinate ranges, the level arrays’ ranges, timestamps in UTC, CRC32s, which the schemas carry — and what a schema cannot say: the soundings descriptor’s name, the stations sorted and unique, every level array n long, reported at least n, pressure strictly descending, the times newest first with latest the first of them, and the stations’ byte spans: in order, not overlapping, and tiling soundings.jsonl exactly. Every line is validated as it is written, so a span the index advertises always slices out something that parses.


Part of the Xue specification, licensed under CC BY 4.0.

12 - The synop product

In the viewer: the stations over the map with ?stations=syn (/gfs?type=temp&stations=syn), and the nearest station’s record on a pinned point’s temperature, wind and pressure rows.

A weather station’s record is a short table of numbers every ten minutes to every hour. A national network is a few hundred to a few thousand such stations, a few megabytes a day — not a raster — so surface stations are a point product published beside the runs, the airports (docs/airport.md) and the soundings (docs/sounding.md). synop is the name for surface weather observations in general, not only the WMO FM-12 SYNOP code: each national network enters through an adapter that reads it into one set of elements and SI units, and the product carries every network in the same shape. The networks are aggregated every ten minutes by xue synop-build (xuebuild/synop/) and taken live by the same pointer → immutable directory contract the other point products use. This document is the normative description of that product, index schema v2.

1. Delivery

Everything is a static file under the data root, beside the run pointers and the other point products’ pointers.

  • latest-synop.json is the one mutable object. Request it with Cache-Control: no-cache (in a browser, fetch(url, {cache: "no-cache"})): without it a browser cache may answer with a pointer up to four hours old. It names the newest round’s directory and the index inside it:

    {"schemaVersion": 1, "product": "synop", "issued": "2026-10-05T00:10:00Z",
     "path": "synop/2026/10/05/synop.202610050010/index.json", "byteLength": 4312, "crc32": "1c0ffee5"}

    path is relative to the pointer and always synop/<YYYY>/<MM>/<DD>/synop.<round>/index.json, the date being the round’s. A pointer written before that layout names the flat synop.<round>/index.json, and a reader accepts both. byteLength and crc32 (zlib CRC32 of the file’s bytes, eight lowercase hex digits) are the index’s, so it can be requested as <path>?v=<crc32> through an immutable cache. The pointer’s schemaVersion is its own and stays 1; the index’s is §4’s.

  • synop/<YYYY>/<MM>/<DD>/synop.<YYYYMMDDHHMM>/ is one immutable directory per round, filed under its UTC day so the data root does not carry a prefix per round: the UTC minute the product was aggregated at, always a multiple of ten. It holds index.json (§4), per network a <network>.stations.json (§5) and a <network>.jsonl (§6), and item.json, the round’s STAC Item (docs/stac.md §“Point products”). Nothing in it changes once the pointer names it. Each round carries the whole window and lives three hours (make prune-r2-synop, SYNOP_KEEP=18).

  • Paths inside index.json are file names beside it; request each as <name>?v=<crc32> with the CRC the index carries.

Three ways to read a network:

  • A map. Fetch the index, then the stations file of each network to be shown: every station’s position and current values, a few hundred kilobytes for a thousand stations.
  • One station. Take the station’s row in its network’s stations file, which ends in the byte offset and length of its line in the network’s .jsonl, and issue GET <round directory>/<network>.jsonl?v=<crc32> with Range: bytes=<offset>-<offset + length - 1>. The bytes are that station’s JSON object exactly, without the newline, so they parse on their own.
  • A whole network. Fetch <network>.jsonl and read it line by line: one station per line, sorted by id.

The publisher builds every ten minutes (publish-synop.yml). Each network is asked for what it holds after its newest time in the previous round’s index, so a network that was unreachable catches up, on its next answer, as far back as its own retention reaches. A network that fails is recorded (§7) and keeps its history; the round publishes with the rest. The pointer is withheld only when no network’s observations arrived, in which case the previous round stays live. A round the pointer already names is finished; the workflow’s force input is the manual rebuild.

Upload order is every <network>.jsonl, then every <network>.stations.json, then index.json and item.json, and the pointer last, once R2 reports the size of every file (make upload-r2-synop). make live-synop-index pulls the live index and both files of every network, checking each against the CRC32 the index states.

Deployment is one-sided: the product is new files under a new pointer, so a shell that does not know it never asks for it. A new network is a new entry in the index and two new files, which a reader of this schema admits (§8); an index schemaVersion bump follows the runs’ rule (ship the shell first).

2. Elements and units

Every network is converted to one table of elements, SI throughout, at the adapter. The index lists them in this order (elements):

keyquantityunittype
tair temperature°C, to a tenthnumber, −100 … 70
tddew point°C, to a tenthnumber, −100 … 60
rhrelative humidity%integer, 0 … 100
pstation pressurehPa, to a tenthnumber, 300 … 1100
slpsea-level pressurehPa, to a tenthnumber, 800 … 1100
wdwind directiondegrees trueinteger, 0 … 360; null when calm or variable
wsmean wind speedm/s, to a tenthnumber, 0 … 150
gustgustm/s, to a tenthnumber, 0 … 150
prprecipitation over the network’s prPeriod ending at the timemm, to a tenthnumber, 0 … 1000
pr1hprecipitation over the hour ending at the timemm, to a tenthnumber, 0 … 1000
sunsunshine over the network’s prPeriod ending at the timeminutesnumber, 0 … 60
snowsnow depthcminteger, 0 … 2000
visvisibilitymetresinteger, ≥ 0; each network’s ceiling in §9
tidewater level at a tide gauge, above the network’s chart datumm, to a hundredthnumber, −2 … 20
  • A network publishes the elements it measures and leaves the others null; nothing is derived — no dew point from temperature and humidity, no humidity from dew point, no sea-level reduction. Observations only. td appears where the network reports a dew point.
  • wd: 0 never occurs; north is 360. With ws: 0, wd is null.
  • pr and sun are totals over the period the network reports at, which is the network’s prPeriod in seconds (§4); pr1h is the network’s own hourly total, published where the network states one, because adding up shorter periods across a gap would understate it.
  • A value the network marks as doubtful, missing or suspended, or one outside the range above, is null. So is a snow depth the network codes as negative (BUFR’s −0.01 m “a little” and −0.02 m “patchy” are not depths). Each network’s section (§9) says which of its quality flags are kept.
  • tide is the height of the sea surface at a tide gauge above the chart datum the network states (§9) — the zero of its tide tables and nautical charts, near the lowest astronomical tide — not above mean sea level and not a surge residual: the astronomical tide is in it. Datums differ between networks, so two networks’ values are not comparable without the offsets §9 gives. The range admits the largest tidal ranges on Earth above such a datum.
  • Times in the network files are epoch seconds, UTC; times in the index and the stations files are ISO 8601 UTC with a Z suffix.
  • Positions are decimal degrees to four places; elev is metres above sea level of the ground at the station, from the network’s station table, or null.

The index carries this table as elementTable (§4), so a reader need not hard-code it.

The files are written compactly with ASCII escaping, and a file’s identity is its bytes: the CRC32 in the index, and the pointer’s, is of the file exactly as served. Given the same inputs a round is byte-identical; only the index’s generated, the sources’ fetched and the builder’s revision depend on when and from what the build ran.

3. Identity

A station is <network>:<the network's own station identifier> (amedas:50066 is Mt. Fuji). The network id is lowercase, ^[a-z][a-z0-9]*(-[a-z0-9]+)*$; the station part is the network’s own identifier, unchanged, of the characters [0-9A-Za-z_.-]. The id is the key everywhere: the stations files’ rows are sorted by it, each network file’s lines are sorted by it, and every line repeats it as id so a slice read by range identifies itself. A WMO station number, where the network gives one, is carried as wmo but is not the key — most national-network stations have none.

4. index.json

The shape — every field, its type and range — is schemas/synop-index.schema.json (v1, §8: schemas/synop-index-v1.schema.json); the pointer’s is schemas/pointer.schema.json. This section says what the fields mean and the rules across them.

{
  "schemaVersion": 2,
  "issued": "2026-10-05T00:10:00Z",
  "generated": "2026-10-05T00:15:30Z",
  "networks": [
    {"id": "amedas", "name": "JMA AMeDAS", "cadence": 600, "prPeriod": 600, "wsPeriod": 600,
     "attribution": "出典:気象庁ホームページ (Japan Meteorological Agency)",
     "license": "PDL-1.0", "licenseUrl": "https://www.jma.go.jp/jma/kishou/info/coment.html",
     "url": "https://www.jma.go.jp/bosai/amedas/",
     "latest": "2026-10-05T00:10:00Z",
     "file": {"path": "amedas.jsonl", "byteLength": 6779928, "crc32": "3b0b746f"},
     "stations": {"path": "amedas.stations.json", "byteLength": 182000, "crc32": "0a1b2c3d", "count": 1286}}
  ],
  "elements": ["t", "td", "rh", "p", "slp", "wd", "ws", "gust", "pr", "pr1h", "sun", "snow", "vis", "tide"],
  "elementTable": {"t": {"unit": "°C", "cell": "point", "period": null}, …,
                   "pr": {"unit": "mm", "cell": "sum", "period": "network"}, …},
  "sources": [ … ],
  "builder": {"name": "xuebuild", "revision": "56ea0e8"}
}
  • issued is the round, generated when the build ran.
  • networks[] is one entry per network that has a station in the window, in the publisher’s order (amedas, dwd, hko): its id and display name; cadence, the seconds between a station’s reports; prPeriod, the seconds pr and sun accumulate over (or null); wsPeriod (optional), the seconds ws and wd are means over; the attribution a display must show, the license the network’s data is reused under, licenseUrl (optional), the terms page that licence string names (§9), and the network’s url; latest, the newest observation time in the network’s files; file, the network file’s name (always <id>.jsonl), length and CRC32; and stations, the stations file’s name (always <id>.stations.json), length, CRC32 and count, the number of rows in it.
  • elements is the element order of the stations files’ rows. It is authoritative: each stations file repeats it and must be equal.
  • elementTable (optional) describes each of elements, one entry per element in the same order: unit, the unit of §2’s table; cell, how the value stands for its time — point (an instantaneous reading), mean, sum, max or min; and period, the seconds the value covers, ending at its time — a number, "network" where it is the network entry’s field (wsPeriod for ws and wd, prPeriod for pr and sun), or null for an instantaneous value. gust is the max of a window that varies by network and report (§9), so its period is null. A reader that finds no entry for an element falls back to §2.
  • sources[] is §7.
  • builder (optional) names the code that built the round: {"name": "xuebuild", "revision": <commit hash or null>}. The publisher sets the commit (XUE_BUILD_REVISION); an offline build leaves it null.

The index carries no stations: a map reads the stations files of the networks it shows.

5. <network>.stations.json

The shape is schemas/synop-stations.schema.json.

{"schemaVersion": 2, "network": "amedas", "issued": "2026-10-05T00:10:00Z",
 "elements": ["t", "td", "rh", "p", "slp", "wd", "ws", "gust", "pr", "pr1h", "sun", "snow", "vis", "tide"],
 "columns": ["id", "lat", "lon", "elev", "rank", "name", "obsTime", "t", "td", "rh", "p", "slp",
             "wd", "ws", "gust", "pr", "pr1h", "sun", "snow", "vis", "tide", "offset", "length"],
 "stations": [
   ["amedas:50066", 35.36, 138.7267, 3775.0, 0, "Mt. Fuji", "2026-10-05T00:10:00Z",
    5.8, null, 98, 646.7, null, null, null, null, null, null, null, null, null, null, 3563, 283]
 ]}
  • schemaVersion, issued and elements are the index’s; network is the network’s id.

  • columns names the rows’ columns, and a reader finds a column by its name there. In v2 it is always the layout below — the seven leading columns, the elements in their order, then offset and length — so a reader that indexes by position reads it too. It is optional: rounds published before it (every synop round up to 2026-11-04) do not carry it, and a reader takes such a file’s rows in the layout below.

  • stations[] is one compact row per station of the network, sorted by id and unique, as many as the index’s stations.count:

    01234567 …last two
    idlatlonelevranknameobsTimeone value per elementsoffset, length

    Every id’s prefix is the file’s network. rank is how prominent the station is, which a map thins by: 0 a principal station (a staffed office, a summit, a remote island, a WMO station), 1 a multi-element automatic station, 2 a single-purpose gauge: one that measures precipitation alone, or the tide alone. name is the station’s name in Latin script, or null. obsTime is the station’s newest time. The element values are the station’s current values: for each element, its newest non-null value no more than an hour before obsTime — some elements arrive less often than the station reports (AMeDAS sends Mt. Fuji’s humidity and pressure on the hour only) — except that pr and sun, which are totals over a period ending at their time, are only ever taken at obsTime, and pr1h, a rolling hour, no more than 20 minutes before it (a network may stamp its rain gauges on another beat than its other sensors, §9.3). offset and length are the byte span of the station’s line in <network>.jsonl, the JSON object alone; the spans are in row order, do not overlap, and lie inside that file’s byteLength.

6. <network>.jsonl

Each line’s shape is schemas/synop-line.schema.json, in v1 and v2 alike. One line per station of that network, sorted by id, each the compact JSON object below followed by \n:

{"id": "amedas:50066", "name": "Mt. Fuji" | null,
 "names": {"ja": "富士山", "ja-Kana": "フジサン"} | null,
 "lat": 35.36, "lon": 138.7267, "elev": 3775.0 | null, "wmo": null,
 "wigos": "0-20000-0-10393",              — optional, where the network gives one
 "rank": 0,
 "time": [1791158400, 1791159000, …],     — epoch seconds UTC, strictly increasing
 "obs": {"t": [5.5, 5.8, …], "rh": [98, null, …], "p": [646.7, null, …]},
 "qc": {"rh": [1, 6, …]}}                 — optional, where the network has quality codes
  • names maps BCP 47 language tags to the network’s own spellings; a display picks the viewer’s language and falls back to name.
  • time is the station’s window, oldest first: every time in the last 24 hours before the round at which the station reported anything.
  • obs holds one array per element the station reported at least once in the window, each as long as time, null where that element was not reported at that time. An element the station never reported in the window is absent, and reads as all null.
  • wigos (optional) is the station’s WIGOS identifier (<series>-<issuer>-<issue number>-<local identifier>), present where the network’s reports state one (dwd, §9.2). It is not the key (§3).
  • qc (optional) carries the network’s own quality code of each value, for a network that has them (amedas, §9.1): per element an array as long as time, the code as the network gives it, null where there was no reading. obs keeps its rule — a value whose code the network says is not good is null there (§2) — and qc says why. A column is written only where it says more than obs does: an element without one had code 0 wherever its value is not null and no reading where it is, and a line with nothing to add has no qc. An element can have a qc column and no obs column (suspended all day).

A station’s window is a merge, not a snapshot. Each round lays the network’s new observations over the previous round’s file keyed by (station, time) — a network that revises a value is believed — and drops what is older than 24 hours before the round. For most networks a new report replaces the old one at that time whole. A network whose report for one time arrives in pieces — several messages, several files, several rounds (dwd, hko) — is merged element by element instead: a value the new piece carries replaces the old one, and an element it leaves out keeps what an earlier piece said. A station that did not report keeps its history; one with nothing left in the window leaves the files until it reports again. Station metadata comes from the network’s current table each round (for dwd, the reports themselves). A network with no station left is not listed.

7. sources[]

One entry per source, every network’s in turn, in build order:

{"id": "jma-amedas-map", "ok": true, "fetched": "2026-10-05T00:13:34Z",
 "url": "https://www.jma.go.jp/bosai/amedas/data/map", "snapshots": 1, "missing": 0, "reports": 1284}
{"id": "dwd-synop-bufr", "ok": true, "fetched": "2026-10-05T00:13:36Z",
 "url": "https://opendata.dwd.de/weather/weather_reports/synoptic/germany/", "files": 2, "missing": 0,
 "reports": 2310, "unplaced": 7}

sha256 (optional) is the SHA-256, lowercase hex, of the raw bytes the build read from the source, file after file in the order they were fetched, so a round can be traced to its input; it is absent when the source contributed no bytes. ok: false always carries error. reports is what the source contributed — observations read (one per station and time), stations in a table. files is how many files were read, missing how many were gone when asked for, unplaced how many reports named no station the network can place. A network’s own fields are described in its section.

8. Validation and versions

The JSON Schemas of §4–§6 are normative for shape: a file that does not match them is not a synop file. tests/test_schemas.py holds the committed golden (tests/fixtures/synop/expected/, two consecutive rounds built from the fetched fixture tests/fixtures/synop/synop.202610050000/ and …0010/, the raw rounds, which stay flat under the raw root, by tests/prepare_synop_golden.py) and the v1 rounds of tests/fixtures/synop/v1/ to them, and the shell’s validators are generated from them (web/src/schema/generated/). xuebuild/synop/schema.py validates every file as it is written, and tests/test_synop.py holds the build to the golden and checks every stations-file row’s span against the network file it addresses. What a schema cannot say is each reader’s own check: file names, unique networks and elements, the element table in the elements’ order, a stations file’s network, issued, elements and columns against its index, its row width and count, rows sorted under the network’s prefix, each element of §2 in its range in a row (a line’s obs carries the ranges in its schema), the spans in row order inside the network file, and a line’s strictly increasing time with every obs and qc array as long. Admission is structural: a network, a station or an element key a reader has never seen is not an error — the row width follows the elements list. A reader rejects an index schemaVersion above the one it implements.

Schema v1, the first, kept every station in the index: an index stations[] of rows [id, network, lat, lon, elev, rank, name, obsTime, …values, offset, length], network being the position in networks[], and no stations block in a network entry; its elements had no td. The network files were the same. Readers keep reading v1 — the live round at the switch is one, and the first v2 round merges onto its network files.

9. Networks

9.1 amedas — JMA AMeDAS

The Japan Meteorological Agency’s Automated Meteorological Data Acquisition System: about 1 300 stations over Japan and its islands, every ten minutes. cadence, prPeriod and wsPeriod (wind is the ten-minute mean) are 600.

Source. The JSON the agency’s own AMeDAS map page reads; there is no published API and no service commitment.

  • jma-amedas-table — https://www.jma.go.jp/bosai/amedas/const/amedastable.json, the station table (position in degrees and minutes, altitude, type, names in kanji, kana and English), fetched at most once a day with If-Modified-Since. A failure over a copy already on disk stays ok with the error noted.
  • jma-amedas-map — https://www.jma.go.jp/bosai/amedas/data/latest_time.txt for the newest time, then data/map/<YYYYMMDDHHmm>00.json (a JST minute) for every ten-minute time after the network’s previous latest, at most the 144 times of the window and none after the round. The agency keeps about seven days of these. snapshots is how many were read, missing how many were already gone (HTTP 404).

Reading. Each value arrives as [value, quality]. A value is kept when its quality is 0 (normal) or 1 (quasi-normal) and it is not null — the agency’s own page’s rule; 2–4 (insufficient data), 5 (suspended) and 6 (missing) become null. Each line’s qc (§6) carries these codes as they arrive, per element, for the key below that element is read from: 0 normal, 1 quasi-normal, 2–4 insufficient data, 5 suspended, 6 missing; a code outside 0–255 or not an integer is null. The elements:

AMeDAS keyelementconversion
tempt—
humidityrh—
pressurep—
normalPressureslp—
windDirectionwd16-point code × 22.5, rounded half up; code 0 (静穏, calm) is null
windws—
precipitation10mpr—
precipitation1hpr1h—
sun10msunminutes
snowsnow—
visibilityvismetres

td and gust are not in the snapshots and stay null. vis reaches 20 000 m and no further in the snapshots examined: read 20 000 as “20 km or more”. The hourly snapshot (on the hour) carries more than the others: several stations, Mt. Fuji among them, report humidity and pressure only then, and snow depth and the present-weather code appear only then (the weather code is not published).

Station identity: amedas:<the five-digit AMeDAS number>; name is the table’s English name, names its kanji (ja) and kana (ja-Kana). rank is 0 for the table’s types A, B, D, E, F and G (staffed offices, special stations, and single sites such as Mt. Fuji and Minamitorishima), 2 for a type-C station whose element mask has neither temperature nor wind (a precipitation gauge), and 1 otherwise. A snapshot entry for a station the table does not list is dropped.

Terms. The agency’s website content is reusable, commercially included, under the Public Data License v1.0 (the licenseUrl below) with the source credited — 「出典:気象庁ホームページ」 — and, for edited content, a statement that it was edited; it must not be presented as the agency’s own publication (https://www.jma.go.jp/jma/kishou/info/coment.html). The attribution string carries the credit, and a display shows it with the data.

9.2 dwd — Deutscher Wetterdienst national SYNOP

Deutscher Wetterdienst’s national ten-minute SYNOP reports in BUFR: about 1 000 German stations — some 220 WMO stations, about 300 national stations with the full set of elements and about 470 that measure precipitation alone. cadence, prPeriod and wsPeriod are 600 (ws and wd are the −10 min means). The network is partial (§6).

Source. dwd-synop-bufr — https://opendata.dwd.de/weather/weather_reports/synoptic/germany/, a directory of BUFR batches named Z__C_EDZW_<yyyymmddHHMMSS>_bda01,synop_bufr_GER_999999_999999__MW_<seq>.bin, about eight an hour, kept about 48 hours (a …_latest_…MW_XXX.bin copy of the newest batch is not read). The sequence number cannot be predicted, so each round reads the directory page and fetches every batch stamped after the network’s previous latest and not after the round — at most the 24-hour window. A batch holds nothing newer than its stamp, so everything new is in these, and values for older times that arrive late arrive in later batches. files is how many batches were read, missing how many were gone between the listing and the request. The batches are decoded with eccodes’ bufr_dump -j f.

Arrival. A batch mixes observation times and templates: ten-minute values come in half-hourly batches 20–35 minutes late; the batch on the hour (~700 KB) adds an hourly SYNOP template for the WMO stations and an hourly national template; the half-hour batch adds a thirty-minute summary. One station at one time is therefore spread over several subsets, in different batches and different rounds — the reason the network is merged element by element. Within a round, the subsets of one station and time are merged the same way; where two carry the same element, the gust over the shorter period wins, then the ten-minute MOR over the observer’s visibility, then the later subset.

Reading. Values are picked by their BUFR key and the timePeriod or sensor height the template states before them, never by position in a template:

BUFR keyconditionelementconversion
airTemperaturesensor ≥ 1 m above ground (the 5 cm one is the grass minimum)tK − 273.15
dewpointTemperaturesensor ≥ 1 mtdK − 273.15
relativeHumidity—rhrounded half up
nonCoordinatePressure—pPa / 100
pressureReducedToMeanSeaLevel—slpPa / 100
windSpeed, windDirectiontimePeriod −10 minws, wddirection 0 (calm) and any direction at ws 0 are null
maximumWindGustSpeedthe shortest timePeriod given, up to −60 mingustm/s
totalPrecipitationOrTotalWaterEquivalenttimePeriod −10 minprkg m⁻² = mm
totalPrecipitationOrTotalWaterEquivalenttimePeriod −60 min (or −1 h)pr1hmm
sunshineOverPeriodSpecifiedtimePeriod −10 minsunminutes
totalSnowDepth—snowm × 100; negative codes null
meteorologicalOpticalRange—vism (DWD’s ten-minute MOR); the largest value in the batches examined is 75 000
horizontalVisibilitywhen no MORvism (the hourly SYNOP template)

The one-minute precipitation series, the 3, 6, 12 and 24-hour totals and the hourly and daily sunshine are not elements. pr1h is the hourly batch’s own one-hour total: the hourly national template states it (timePeriod −60 min; 921 stations in the 2026-10-31 14:00 batch), while the ten-minute template carries none and the WMO SYNOP template’s own one-hour total was empty in the batches examined. Nothing is summed.

Quality. The reports carry no quality flags: a missing value is null, and a value outside its §2 range is null. A subset that names no station or no time — the NIL reports of stations that sent nothing — is counted in unplaced and dropped.

Station identity: dwd:<DWD's station identifier>, the Kennung column of DWD’s station list (https://opendata.dwd.de/weather/weather_reports/stationlist_synoptic_germany.csv). The BUFR carries it as shortStationName for a national station (WIGOS 0-276-<n>-<local>, e.g. dwd:M031, Ellrich-Werna) and as the WMO block and station number for a WMO station (WIGOS 0-20000-0-<wmo>, e.g. dwd:10393, Lindenberg) and for the few national stations DWD numbers in the WMO style (dwd:10271, Neuruppin, WIGOS 0-276-2-96); checked against the station list on 2026-10-31. wmo is the block and station number where the BUFR carries one, and wigos the WIGOS identifier its 3 01 150 sequence states (wigosIdentifierSeries, wigosIssuerOfIdentifier, wigosIssueNumber, wigosLocalIdentifierCharacter), as given. Position, elevation (ground) and name (stationOrSiteName) come from the newest subset that places the station; names is null. rank is 0 for a station with a WMO number, 2 for one whose reports in the round were precipitation and nothing else, 1 otherwise.

Terms. DWD’s open data is licensed under CC BY 4.0 (https://www.dwd.de/copyright, the licenseUrl); the source is credited as “Source: Deutscher Wetterdienst” (https://www.dwd.de/EN/service/legal_notice/templates_dwd_as_source.html), which is the attribution string.

9.3 hko — Hong Kong Observatory

The Hong Kong Observatory’s regional weather — about fifty manned, automatic, buoy and wind stations every ten minutes — with the hourly rainfall of its automatic weather stations and the water level of the tide gauges around Hong Kong. cadence is 600; wsPeriod is 600 (the ten-minute mean wind); prPeriod is null: there is no pr, and rainfall is pr1h alone. The network is partial (§6): each element comes from its own file, and the files of one round need not name the same minute — the rainfall is stamped on the quarter hour and the tide on five minutes, so a station’s rainfall and its regional readings usually sit at different times of its line.

Source. Three sources, each its own entry of §7 so that one failing does not take the others with it. files is how many of a source’s files were read. Only the latest reading of each is served, so there is no backfill: a round that does not run loses that time for good.

  • hko-regional-weather — five CSVs under https://data.weather.gov.hk/weatherAPI/hko_data/regional-weather/: latest_1min_temperature.csv, latest_1min_humidity.csv, latest_1min_pressure.csv, latest_10min_wind.csv and latest_10min_visibility.csv, each row a time (HKT, YYYYMMDDHHMM), a station name and the values.
  • hko-hourly-rainfall — https://data.weather.gov.hk/weatherAPI/opendata/hourlyRainfall.php?lang=en, the open-data API’s “rainfall in the past hour from automatic weather station” (renewed every fifteen minutes): one obsTime (ISO 8601 with +08:00) and per station its name, an identifier local to this dataset (RF001…, or a GEO raingauge number such as N12), the value and the unit (mm). The value is the total over the hour ending at obsTime, in whole millimetres, or M while the system is under maintenance. The Observatory calls the data provisional, with limited validation, and notes that its own station’s figure here is not its official rainfall.
  • hko-tide — https://data.weather.gov.hk/weatherAPI/hko_data/tide/ALL_en.csv, the latest five-minute water level of each tide gauge (UTF-8 with a byte order mark): Tide Station,Date,Time,Height(m), date and time HKT (2026-11-12,20:35), the height in metres to a centimetre, or dashes when there is none. The gauges are the Observatory’s (Quarry Bay, Shek Pik, Tsim Bei Tsui, Tai Miu Wan, Tai Po Kau, Waglan Island) and the Drainage Services Department’s at Tai O; the Observatory states that the real-time tide data are not quality-controlled.

Reading. Missing values are N/A or empty in the regional CSVs, M in the rainfall and dashes in the tide file. There are no quality flags.

filefieldelementconversion
regionalAir Temperature (°C)t—
regionalRelative Humidity (%)rh—
regionalMean Sea Level Pressure (hPa)slp— (no station pressure: p stays null)
regional10-Minute Mean Wind Directionwdeight compass points, North = 360, Northeast = 45, …; Calm and Variable have no direction
regional10-Minute Mean Speed (km/h)ws÷ 3.6; Calm is 0
regional10-Minute Maximum Gust (km/h)gust÷ 3.6
regional10 minute mean visibilityvis18 km → 18000; whole kilometres, no ceiling stated (35 km is the largest in the fixture)
rainfallvalue at obsTimepr1hmm, as given
tideHeight(m)tidem above Hong Kong Chart Datum, as given

The tide file’s heights are “in metre (m) above the Chart Datum, which is 0.146 m below the Hong Kong Principal Datum” (the file layout, https://data.weather.gov.hk/weatherAPI/hko_data/tide/File_layout_for_latest_tides_en.pdf); the Observatory’s real-time tide page labels the same values “metres above Chart Datum (mCD)”. The Observatory gives the 1995–2014 average annual mean sea level at Quarry Bay as 1.45 m above Hong Kong Chart Datum (https://www.hko.gov.hk/en/climate_change/proj_hk_msl_med_conf_info.htm), so a tide there of about 1.45 is mean sea level.

Stations. None of the files carries a station number or a position, so positions come from xuebuild/synop/hko_stations.json, built (2026-10-31) from the Observatory’s station page https://www.hko.gov.hk/en/cis/stn.htm and its Chinese twin /tc/cis/stn.htm: code, English and Chinese (names: {"zh-Hant": …}) name, position and ground elevation of every current manned and automatic weather station, buoy and wind station. The page gives the wind stations’ anemometer height rather than the ground’s, so their elev is null. To it were added (2026-11-12) the gauges the rainfall and tide feeds name that are not among those stations — each with elev null, since the page gives a raingauge’s height above sea level and nothing for a tide gauge, and rank 2:

codenamefrom
R23Tai Po Wong Shiu Chi Secondary School (大埔王肇枝中學)the station page’s automatic rainfall section
N12Shui Pin Wai (水邊圍)GEO raingauge N12
K02Broadcast Drive (廣播道)GEO raingauge K02
K09San Po Kong (新蒲崗)GEO raingauge K09
H17Magazine Gap (馬己仙峽)GEO raingauge H17
QUBQuarry Bay (鰂魚涌)the station page’s tide gauge section
SPWShek Pik (石壁)the station page’s tide gauge section
TBTTsim Bei Tsui (尖鼻咀)the station page’s tide gauge section
TMWTai Miu Wan (大廟灣)the station page’s tide gauge section
TAOTai O (tide gauge) (大澳(潮汐站))the Observatory’s real-time tide page (https://www.hko.gov.hk/en/tide/marine/realtide.htm, its station list TAO)

The GEO raingauges are the Civil Engineering and Development Department’s Geotechnical Engineering Office’s, numbered as the rainfall feed numbers them; their positions are those of the “GEO Raingauge Data” dataset on the CSDI portal (cedd_rcd_1636517963140_47030, records of 2025–2026), their names the feed’s English and Chinese ones. The station page lists the two remaining tide gauges, Tai Po Kau and Waglan Island, under the codes of existing stations, TPK (the wind station, at the same position) and WGL (the weather station, about 100 m away), so their water level joins those stations’ lines.

A file’s station name resolves to the table’s English name, or to an alias the table lists, after a typographic apostrophe is read as ' (the rainfall feed spells King’s Park):

namefilestation
Chek Lap KokallHKA Hong Kong International Airport
HK ObservatoryallHKO Hong Kong Observatory
HK ParkallHKP Hong Kong Park
Pak Tam ChungallTYW Pak Tam Chung (Tsak Yue Wu)
Star FerryallSF Star Ferry (Kowloon)
Tai PoallYCT Tai Po (Yuen Chau Tsai Park)
Tsuen Wan Ho KoonallTWN Tsuen Wan
Tsing Yitemperature, humidity, pressureTY1 New Tsing Yi Station
Tsing YiwindSHL Shell Oil Depot
Tuen Muntemperature, humidity, pressure, rainfallTU1 Tuen Mun Children and Juvenile Home
Tuen MunwindTUN Tuen Mun Government Offices
Tap MunwindTME Tap Mun East
Cheung ChingrainfallCPH Ching Pak House (Tsing Yi)
Tai Po MarketrainfallR23 Tai Po Wong Shiu Chi Secondary School
Tai OtideTAO Tai O (tide gauge)

The aliases were resolved by hand: by the name and address in the Observatory’s “Network of weather stations in Hong Kong” dataset on the CSDI portal (which spells Tsing Yi, Tuen Mun, Pak Tam Chung and Tsuen Wan Ho Koon the CSV’s way), by the station page’s own remarks (the Tai Po station moved to Yuen Chau Tsai Park in 2022; the Tap Mun East wind station replaced the Tap Mun one in 2017), and, where one name covers two stations, by which of them the station page says measures the file’s element (New Tsing Yi Station has no anemometer, the Shell Oil Depot station is one; of the two Tuen Mun stations only the Children and Juvenile Home has a raingauge). For the rainfall: Ching Pak House is a block of Cheung Ching Estate and the station page’s only raingauge there (CPH measures rainfall alone); Tai Po Market is the town centre of Tai Po, where the only raingauge the station page lists is the one at Wong Shiu Chi Secondary School (R23) — the Yuen Chau Tsai Park station has none. Tai O is the drainage department’s gauge rather than the Observatory’s wind station TO of the same name, about a kilometre away.

Some rainfall names match an Observatory station whose station page row has no raingauge: the feed’s numbering says these are GEO raingauges near it — N15 Sai Kung (SKG, about 0.9 km away), K03 Kwun Tong (KTG, at the same position), H15 Stanley (STY, about 0.3 km) and H24 Wong Chuk Hang (HKS, about 0.4 km) — and RF013 Ngong Ping (NGP) is most likely the Ngong Ping Fresh Water Reservoir raingauge 0.4 km away. Their rainfall is placed at the station of the same name. Three regional names have no station in either source — Hong Kong Sea School (wind), Central and Sai Wan Ho (visibility) — and are dropped, counted in unplaced.

Station identity: hko:<the Observatory's station code> (hko:HKO, hko:HKA, hko:WGL), or the GEO raingauge number for a GEO gauge (hko:K02); name is the station page’s English name, or the feed’s for a GEO gauge. rank is 0 for the two manned stations (HKO, HKA), 2 for a gauge that measures rainfall or the tide alone (CPH and the stations added above), and 1 for every other. The station page gives no WMO numbers, so wmo is null.

Terms. DATA.GOV.HK’s terms of use (https://data.gov.hk/en/terms-and-conditions, the licenseUrl) allow reuse, commercial included, on condition that the source is identified and the Government’s and the Observatory’s ownership acknowledged, with proper attribution to them and to DATA.GOV.HK. The attribution string, “Hong Kong Observatory (DATA.GOV.HK)”, is what a display shows.


Part of the Xue specification, licensed under CC BY 4.0.

13 - The aq product

In the viewer: the stations over the map with ?stations=aq, over the SILAM air-quality forecast (/silam?stations=aq) or any other layer.

An air-quality monitoring station reports an hourly mean of a handful of pollutants. A national network is a few dozen to a few thousand such stations, a megabyte or two a day — not a raster — so air quality is a point product published beside the runs, the surface stations (docs/synop.md), the airports (docs/airport.md) and the soundings (docs/sounding.md). Each network enters through an adapter that reads it into one set of elements and units, and the product carries every network in the same shape. The networks are aggregated twice an hour by xue aq-build (xuebuild/aq/) and taken live by the same pointer → immutable directory contract the other point products use. This document is the normative description of that product, schema v1.

1. Delivery

Everything is a static file under the data root, beside the run pointers and the other point products’ pointers.

  • latest-aq.json is the one mutable object. Request it with Cache-Control: no-cache (in a browser, fetch(url, {cache: "no-cache"})): without it a browser cache may answer with a pointer up to four hours old. It names the newest round’s directory and the index inside it:

    {"schemaVersion": 1, "product": "aq", "issued": "2026-10-31T15:45:00Z",
     "path": "aq/2026/10/31/aq.202610311545/index.json", "byteLength": 1311, "crc32": "1c0ffee5"}

    path is relative to the pointer and always aq/<YYYY>/<MM>/<DD>/aq.<round>/index.json, the date being the round’s. A pointer written before that layout names the flat aq.<round>/index.json, and a reader accepts both. byteLength and crc32 (zlib CRC32 of the file’s bytes, eight lowercase hex digits) are the index’s, so it can be requested as <path>?v=<crc32> through an immutable cache.

  • aq/<YYYY>/<MM>/<DD>/aq.<YYYYMMDDHHMM>/ is one immutable directory per round, filed under its UTC day so the data root does not carry a prefix per round: the UTC minute the product was aggregated at, always a multiple of five. It holds index.json (§4), per network a <network>.stations.json (§5) and a <network>.jsonl (§6), and item.json, the round’s STAC Item (docs/stac.md §“Point products”). Nothing in it changes once the pointer names it. Each round carries the whole window and lives three hours (make prune-r2-aq, AQ_KEEP=6).

  • Paths inside index.json are file names beside it; request each as <name>?v=<crc32> with the CRC the index carries.

Three ways to read:

  • A map. Fetch the index, then the <network>.stations.json of each network to show: every station’s position, agency and current values, no history.
  • One station. Take the station’s row in its network’s stations file, which ends in the byte offset and length of its line in the network’s .jsonl, and issue GET <round directory>/<network>.jsonl?v=<crc32> with Range: bytes=<offset>-<offset + length - 1>. The bytes are that station’s JSON object exactly, without the newline, so they parse on their own.
  • A whole network. Fetch <network>.jsonl and read it line by line: one station per line, sorted by id.

The publisher builds at a quarter past and a quarter to each hour (publish-aq.yml): the networks post an hour between ten and fifty-five minutes after it ends. Each network is asked for what it holds after its newest time in the previous round’s index, so a network that was unreachable catches up, on its next answer, as far back as its own retention reaches. A network that fails is recorded (§7) and keeps its history; the round publishes with the rest. The pointer is withheld only when no network’s observations arrived, in which case the previous round stays live. A round the pointer already names is finished; the workflow’s force input is the manual rebuild.

Deployment is one-sided: the product is new files under a new pointer, so a shell that does not know it never asks for it. A new network is a new entry in the index and two new files, which a v1 reader admits (§8); a schemaVersion bump follows the runs’ rule (ship the shell first).

2. Elements and units

Every value is an hourly mean, and its time is the end of the hour it averages. Every network is converted to one table of elements at the adapter. The index lists them in this order (elements):

keyquantityunittype
pm25PM2.5 mass concentrationµg/m³, to a tenthnumber, −5 … 10000
pm10PM10 mass concentrationµg/m³, to a tenthnumber, −5 … 10000
o3ozoneppb, to a tenthnumber, −5 … 1000
no2nitrogen dioxideppb, to a tenthnumber, −5 … 2000
so2sulphur dioxideppb, to a tenthnumber, −5 … 5000
cocarbon monoxideppm, to a hundredthnumber, −0.5 … 100
  • Gases are mixing ratios, particles mass concentrations. A network that reports a gas as a mass concentration is converted at the reference conditions it states its gases at — its gasReference (§4). Hong Kong’s EPD states 293 K and 101.325 kPa (§9.2), where the molar volume is 24.04 L/mol:

    ppb = µg/m³ × 24.04 / M          M: O3 48.00, NO2 46.01, SO2 64.07 g/mol
    ppm (co) = µg/m³ × 24.04 / (28.01 × 1000)

    then rounded to the element’s precision. A network that reports in the product’s units is published as reported, and its gasReference is null.

  • Small negative values are kept. An analyser near zero drifts below it, and a network that publishes such an hour (AirNow does) is not corrected; below the range’s floor a value is null.

  • A network publishes the elements it measures and leaves the others null. Nothing is derived: no AQI, AQHI or other index, no 8-hour or 24-hour averages — a reader computes those from the 24-hour window with the scale of its choice. Observations only.

  • A value the network marks missing, one in a unit other than the one expected, or one outside the range above, is null.

  • Times in the network files are epoch seconds, UTC; times in the index and the stations files are ISO 8601 UTC with a Z suffix.

  • Positions are decimal degrees to four places; elev is metres above sea level, or null where the network does not give it.

The index carries this table as elementTable (§4), so a reader need not hard-code it.

The files are written compactly with ASCII escaping, and a file’s identity is its bytes: the CRC32 in the index, and the pointer’s, is of the file exactly as served. Given the same inputs a round is byte-identical; only the index’s generated, the sources’ fetched and the builder’s revision depend on when and from what the build ran.

3. Identity

A station is <network>:<the network's own station identifier> (airnow:060371103 is Los Angeles – N. Main Street, hkepd:15 the Causeway Bay roadside station). The network id is lowercase, ^[a-z][a-z0-9]*(-[a-z0-9]+)*$; the station part matches [0-9A-Za-z_.-]+. The id is the key everywhere: each stations file’s rows are sorted by it, each network file’s lines are sorted by it, and every line repeats it as id so a slice read by range identifies itself.

4. index.json

The shape — every field, its type and range — is schemas/aq-index.schema.json; the pointer’s is schemas/pointer.schema.json. This section says what the fields mean and the rules across them.

{
  "schemaVersion": 1,
  "issued": "2026-10-31T15:45:00Z",
  "generated": "2026-10-31T15:46:10Z",
  "networks": [
    {"id": "airnow", "name": "AirNow", "cadence": 3600, "avgPeriod": 3600, "preliminary": true,
     "gasReference": null,
     "attribution": "AirNow (U.S. EPA) and the reporting agencies; preliminary data",
     "license": "AirNow-DEG", "licenseUrl": "https://docs.airnowapi.org/docs/DataUseGuidelines.pdf",
     "url": "https://www.airnow.gov/",
     "latest": "2026-10-31T15:00:00Z",
     "file":     {"path": "airnow.jsonl",         "byteLength": 1296859, "crc32": "9f060241"},
     "stations": {"path": "airnow.stations.json", "byteLength": 334561,  "crc32": "3a1401de", "count": 2028}}
  ],
  "elements": ["pm25", "pm10", "o3", "no2", "so2", "co"],
  "elementTable": {"pm25": {"unit": "µg/m³", "cell": "mean", "period": "network"}, …,
                   "co": {"unit": "ppm", "cell": "mean", "period": "network"}},
  "sources": [ … ],
  "builder": {"name": "xuebuild", "revision": "56ea0e8"}
}
  • issued is the round, generated when the build ran.
  • networks[] is one entry per network that has a station in the window, in the publisher’s order: its id and display name; cadence, the seconds between a station’s reports; avgPeriod, the seconds each value averages over, ending at its time; preliminary, true when the network publishes unvalidated data, which a display must then say; gasReference (optional), {"temperature": <K>, "pressure": <Pa>}, the reference conditions the network’s gases were converted from µg/m³ at (§2), or null for a network published in its own mixing ratios; the attribution a display must show, the license the network’s data is reused under (§9 spells out each), licenseUrl (optional), the terms that licence string names, and the network’s url; latest, the newest observation time in the network’s file; file, the network file’s name (always <id>.jsonl), length and CRC32; and stations, the stations file’s name (always <id>.stations.json), length, CRC32 and row count.
  • elements is the element order of every stations file’s rows, which repeats it.
  • elementTable (optional) describes each of elements, one entry per element in the same order: unit, the unit of §2’s table; cell, how the value stands for its time — point, mean, sum, max or min; and period, the seconds the value covers, ending at its time — a number, "network" where it is the network entry’s avgPeriod, or null for an instantaneous value. Every v1 element is a mean over "network". A reader that finds no entry for an element falls back to §2.
  • sources[] is §7.
  • builder (optional) names the code that built the round: {"name": "xuebuild", "revision": <commit hash or null>}. The publisher sets the commit (XUE_BUILD_REVISION); an offline build leaves it null.

5. <network>.stations.json

The shape is schemas/aq-stations.schema.json.

{"schemaVersion": 1, "network": "airnow", "issued": "2026-10-31T15:45:00Z",
 "elements": ["pm25", "pm10", "o3", "no2", "so2", "co"],
 "columns": ["id", "lat", "lon", "elev", "rank", "name", "agency", "obsTime",
             "pm25", "pm10", "o3", "no2", "so2", "co", "offset", "length"],
 "stations": [
   ["airnow:060371103", 34.0664, -118.2268, 30.5, 1, "Los Angeles - N. Main Street",
    "South Coast AQMD", "2026-10-31T15:00:00Z", 5.3, 14.0, 13.0, 11.0, 0.2, 0.3, 4180, 902]
 ]}

issued and elements equal the index’s. columns names the rows' columns, and a reader finds a column by its name there. In v1 it is always the layout below — the eight leading columns, the elements in their order, then offset and length — so a reader that indexes by position reads it too. It is optional: rounds published before it (every aq round up to 2026-11-04) do not carry it, and a reader takes such a file’s rows in the layout below. stations[] is one compact row per station, sorted by id and unique, count of them:

012345678 …last two
idlatlonelevranknameagencyobsTimeone value per elementsoffset, length
  • Every id’s prefix is the file’s network.
  • rank is how prominent the station is, which a map thins by: 0 a principal or background station, 1 a general station, 2 a roadside station.
  • name is the station’s name in Latin script, or null. agency is the agency that operates the station and owns its data, or null; where the network’s terms ask for the agency to be credited (AirNow), a display shows it with the station’s values.
  • obsTime is the end of the station’s newest hour.
  • The element values are the station’s current values: for each element, its newest non-null value no more than an hour before obsTime. A network’s newest hour arrives a little short and fills in over the next hours, and a station’s analysers do not always report together; the hour of grace keeps a late element from blinking out.
  • offset and length are the byte span of the station’s line in <network>.jsonl, the JSON object alone. The spans are in row order, do not overlap, and lie inside that file’s byteLength.

6. <network>.jsonl

Each line’s shape is schemas/aq-line.schema.json. One line per station of that network, sorted by id, each the compact JSON object below followed by \n:

{"id": "hkepd:15", "name": "Causeway Bay" | null,
 "names": {"zh-Hant": "銅鑼灣"} | null,
 "lat": 22.2801, "lon": 114.1851, "elev": null, "rank": 2, "agency": "EPD" | null,
 "time": [1793376000, 1793379600, …],     — epoch seconds UTC, the end of each hour, strictly increasing
 "obs": {"pm25": [33.7, 31.7, …], "co": [0.33, null, …]}}
  • names maps BCP 47 language tags to the network’s own spellings; a display picks the viewer’s language and falls back to name.
  • time is the station’s window, oldest first: every hour ending in the 24 hours up to the round at which the station reported anything.
  • obs holds one array per element the station reported at least once in the window, each as long as time, null where that element was not reported in that hour. An element the station never reported in the window is absent, and reads as all null.

A station’s window is a merge, not a snapshot. Each round lays the network’s new hours over the previous round’s file keyed by (station, time), the new one replacing the old whole — a network that revises an hour, as AirNow does for days afterwards, is believed, and an hour it rewrites without a value withdraws the value — and drops what ended more than 24 hours before the round. A station that did not report keeps its history; one with nothing left in the window leaves the files until it reports again. Station metadata is the newest the network gave. A network with no station left is not listed.

7. sources[]

One entry per source, every network’s in turn, in build order:

{"id": "airnow-hourly", "ok": true, "fetched": "2026-10-31T15:46:01Z",
 "url": "https://files.airnowtech.org/airnow", "files": 3, "missing": 0, "reports": 5980, "unplaced": 6}
{"id": "epd-24pc", "ok": false, "fetched": "2026-10-31T15:46:02Z",
 "url": "https://www.aqhi.gov.hk/epd/ddata/html/out/24pc_Eng.xml", "error": "HTTP Error 503"}

sha256 (optional) is the SHA-256, lowercase hex, of the raw bytes the build read from the source, file after file in the order they were fetched, so a round can be traced to its input; it is absent when the source contributed no bytes. ok: false always carries error. reports is what the source contributed: station-hours with at least one value. unplaced is how many station-hours (AirNow) or station names (EPD) had no usable position or were not in the station table and were dropped. A network’s own fields are described in its section.

8. Validation

The JSON Schemas of §4–§6 are normative for shape: a file that does not match them is not an aq file. tests/test_schemas.py holds the committed golden (tests/fixtures/aq/expected/, two consecutive rounds built from the fetched fixture tests/fixtures/aq/aq.202610311515/ and …1545/, the raw rounds, which stay flat under the raw root, by tests/prepare_aq_golden.py) to them, and the shell’s validators are generated from them (web/src/schema/generated/). xuebuild/aq/schema.py checks, as every file is written and read, what a schema cannot say: file names, unique networks and elements, the element table in the elements' order, a stations file’s network, issued, elements and columns against its index, its row width and count, rows sorted under the network’s prefix, each element of §2 in its range, the spans in row order inside the network file, and a line’s strictly increasing time and obs arrays as long as it; tests/test_aq.py checks every span against the network file it addresses. Admission is structural: a network, a station or an element key a reader has never seen is not an error — the row width follows the index’s own elements. A reader validates the same on read and rejects a schemaVersion above the one it implements.

9. Networks

9.1 airnow — US EPA AirNow

The US Environmental Protection Agency’s AirNow: about 2 000 stations a given hour across the United States, Canada and Mexico, run by federal, state, local and tribal agencies and their Canadian and Mexican counterparts, and a handful of US diplomatic posts abroad. cadence and avgPeriod are 3600; preliminary is true; gasReference is null: the gases arrive as mixing ratios.

Source. airnow-hourly — https://files.airnowtech.org/airnow/<YYYY>/<YYYYMMDD>/HourlyAQObs_<YYYYMMDDHH>.dat, one quoted CSV per hour with a row per site, about 1 MB (the dated archive; the file is not under today/). The hour in the name and in ValidDate/ValidTime is the start of the averaging hour in UTC, so a value’s time is that plus 3600 s. AirNow posts an hour about 35 minutes after it ends and rewrites the files of the previous days every hour as late data arrive, so a round reads the newest three hours that have ended by the round every time, plus any older hour that ends after the network’s previous latest, at most the 24 hours of the window. files is how many hours were read, missing how many were not there yet (HTTP 404).

Reading. The file is decoded as UTF-8 (Latin-1 if it is not). Each row is a station-hour:

AirNow columnelementconversion
PM25pm25— (PM25_Unit must be UG/M3)
PM10pm10— (UG/M3)
OZONEo3— (PPB)
NO2no2— (PPB)
SO2so2— (PPB)
COco— (PPM)

These are the hourly concentrations, not AirNow’s NowCast; the *_AQI columns are not published. A blank cell, or a unit column that does not state the expected unit, is null. Values arrive to a tenth and are published unchanged.

Station identity: airnow:<AQSID> (nine characters, or twelve with a three-digit country prefix). name is SiteName, agency is DataSource, the reporting agency. lat, lon and elev are the row’s own; AirNow writes an elevation of 0.0 where it has none (half the stations, Baku’s at −28 m among them), so an exact zero is null. A row without a position, or at 0°, 0°, is dropped and counted as unplaced. The file has no station type, so every station is rank 1. Rows of sites that report no value (AirNow lists the Japanese Ministry of the Environment’s stations without data) leave no station in the product.

Terms. AirNow data carry no open licence; their use is governed by the EPA’s AirNow Data Exchange Guidelines (August 2025, https://docs.airnowapi.org/docs/DataUseGuidelines.pdf, the licenseUrl), named by the license string AirNow-DEG. The conditions this product and any display of it meet:

  • The observations are not fully verified or validated, are subject to change and are preliminary. A display or product built on them must say so (preliminary: true), and they are not for regulatory use, trends or decision-making; official regulatory data are in the EPA’s Air Quality System (AQS).
  • Credit goes first to the federal, state, local and tribal agencies that own the data, and to the EPA AirNow program. The attribution string carries the programme credit; each station’s agency names its owner, and a display shows it with the station’s values.
  • Values are not altered and are disseminated as received: no conversion, no correction, no clipping of small negatives.
  • Users of the data should receive the most current data available; the half-hourly round and the 24-hour rewrite window serve that.
  • Observed values should be shown in accordance with the AQI and its colours where an index is shown; v1 carries no index, and a display that derives one follows the EPA’s Technical Assistance Document.
  • Products relying on the data must be made known to the agencies and the AirNow program, and the user’s contact details kept current: whoever operates a deployment of this product returns the guidelines’ form to the AirNow Data Management Center.

9.2 hkepd — Hong Kong Environmental Protection Department

The Hong Kong Environmental Protection Department’s air quality monitoring network: 15 general and 3 roadside stations. cadence and avgPeriod are 3600; preliminary is true: this is the real-time feed, ahead of the department’s validated records. gasReference is {"temperature": 293, "pressure": 101325}.

Source. epd-24pc — https://www.aqhi.gov.hk/epd/ddata/html/out/24pc_Eng.xml, the past 24 hours of every station’s hourly concentrations, about 100 KB, rewritten about ten minutes after each hour. Every round reads the whole file, so a missed round costs nothing while the next one comes within a day; there is no other backfill.

Time. Each PollutantConcentration carries a DateTime in Hong Kong time (Sat, 31 Oct 2026 22:00:00 +0800). It is the end of the averaging hour: the file written at 22:10 HKT already lists 22:00 as its newest hour, which can only be the hour that has just ended (observed 2026-10-31: Last-Modified 14:10:15 UTC, newest DateTime 22:00 +0800 = 14:00 UTC). It is published as it stands, in UTC. lastBuildDate runs half an hour ahead of the file and is not an observation time.

Reading. Every concentration is in µg/m³, CO included; - is no value. The feed does not state the conditions its gases are expressed at; the department’s Air Quality Objectives do, for every gas measurement: “All measurements of the concentration of gaseous air pollutants, i.e., sulphur dioxide, nitrogen dioxide, ozone and carbon monoxide, are to be adjusted to a reference temperature of 293 Kelvin and a reference pressure of 101.325 kilopascal” (https://epd.gov.hk/epd/english/environmentinhk/air/air_quality_objectives/air_quality_objectives.html, checked 2026-11-01). The gases are turned back into mixing ratios at that reference, 24.04 L/mol:

EPD elementelementconversion
PM2.5pm25—
PM10pm10—
O3o3× 24.04 / 48.00
NO2no2× 24.04 / 46.01
SO2so2× 24.04 / 64.07
COco× 24.04 / 28 010

Station identity: hkepd:<mid>, the department’s own station number (hkepd:0 is Central/Western, hkepd:15 Causeway Bay). The XML carries names only; the number, like the position, comes from the committed table xuebuild/aq/hkepd_stations.json, keyed by those names and recorded once from the network’s CSDI WFS layer (csdi:AQMN, Air Quality Monitoring Network of Hong Kong) with the English names, traditional Chinese names (names["zh-Hant"]), positions, station types and the department’s station number (mid). Rounds of the first release named the stations by their English name, lower-cased with every run of other characters a hyphen (hkepd:central-western); the merge (§6) reads such a previous round under the numbers. The layer gives no elevation, so elev is null. Causeway Bay, Central and Mong Kok are roadside stations, rank 2; the others rank 1. agency is EPD. A station name the table does not know is dropped and counted as unplaced; a new station is a reviewed change to the table.

Terms. The file is a DATA.GOV.HK resource, reusable free of charge for commercial and non-commercial purposes under the DATA.GOV.HK Terms and Conditions (https://data.gov.hk/en/terms-and-conditions, the licenseUrl), named by the license string DATA.GOV.HK, on condition that the source is identified clearly, the Government’s and the department’s ownership of the intellectual property is acknowledged, and attribution is given to the Government, the department and DATA.GOV.HK — the attribution string Environmental Protection Department, HKSAR Government (DATA.GOV.HK), which a display shows with the data. The data are provided as is.


Part of the Xue specification, licensed under CC BY 4.0.

14 - The alerts product

In the viewer: the warnings in force over the map with ?stations=alerts (/gfs?stations=alerts).

A weather warning is a short record — who issued it, what hazard, how severe, where, until when — and a national service has a few dozen to a few thousand in force at once. That is not a raster, so warnings are a point product published beside the runs, the airports (docs/airport.md) and the stations (docs/synop.md). Each national warning service enters through an adapter that reads it into one shape — a closed list of categories, one five-level scale, the service’s own codes kept beside them, and every language the service publishes — and the product carries every service in that shape. The snapshot is taken every five minutes by xue alerts-build (xuebuild/alerts/) and taken live by the same pointer → immutable directory contract the other point products use. This document is the normative description of that product, schema v1.

1. Delivery

Everything is a static file under the data root, beside the run pointers and the other point products’ pointers.

  • latest-alerts.json is the one mutable object. Request it with Cache-Control: no-cache (in a browser, fetch(url, {cache: "no-cache"})): without it a browser cache may answer with a pointer up to four hours old. It names the newest round’s directory and the index inside it:

    {"schemaVersion": 1, "product": "alerts", "issued": "2026-11-01T00:05:00Z",
     "path": "alerts/2026/11/01/alerts.202611010005/index.json", "byteLength": 89205, "crc32": "1c0ffee5"}

    path is relative to the pointer and always alerts/<YYYY>/<MM>/<DD>/alerts.<round>/index.json, the date being the round’s. A pointer written before that layout names the flat alerts.<round>/index.json, and a reader accepts both. byteLength and crc32 (zlib CRC32 of the file’s bytes, eight lowercase hex digits) are the index’s, so it can be requested as <path>?v=<crc32> through an immutable cache.

  • alerts/<YYYY>/<MM>/<DD>/alerts.<YYYYMMDDHHMM>/ is one immutable directory per round, filed under its UTC day so the data root does not carry a prefix per round: the UTC minute the snapshot was taken at, always a multiple of five. It holds index.json (§5), one <network>.jsonl per network (§6) and item.json, the round’s STAC Item (docs/stac.md §“Point products”). Nothing in it changes once the pointer names it. A round is a snapshot, not a history, and lives three hours (make prune-r2-alerts, ALERTS_KEEP=36). The day directories sit beside alerts/archive/ (§12) and the product’s STAC Collection; only a four-digit year is a day tree.

  • alerts-areas/<set>.<version>.pmtiles are the boundary sets (§9): one file per upstream release, immutable under its versioned name and kept for as long as any round may name it, each with its codes’ boxes beside it in <set>.<version>.bbox.json. They are not part of a round and are never pruned with one.

  • Paths inside index.json are relative to it; request each as <path>?v=<crc32> with the CRC the index carries.

A round is a snapshot of what is in force at issued: what each network lists as current, less what has expired by the round’s minute. It carries no history; ended[] (§7) names what left since the previous round, for that round only. The history is the monthly archive under alerts/archive/ (§12).

Two ways to read an alert’s full record:

  • One alert. Take its row in the index, which ends in the byte offset and length of its line in its network’s file, and issue GET <round directory>/<network>.jsonl?v=<crc32> with Range: bytes=<offset>-<offset + length - 1>. The bytes are that alert’s JSON object exactly, without the newline, so they parse on their own.
  • A whole network. Fetch <network>.jsonl and read it line by line: one alert per line, sorted by id.

The publisher builds every five minutes (publish-alerts.yml). A network that fails is recorded (§8) and carries its previous round’s alerts over (§7); the round publishes with the rest. The pointer is withheld only when no network’s state arrived, in which case the previous round stays live. A round the pointer already names is finished; the workflow’s force input is the manual rebuild.

Deployment is one-sided: the product is new files under a new pointer, so a shell that does not know it never asks for it. A new network is new rows and a new file, which a v1 reader admits (§11); a schemaVersion bump follows the runs’ rule (ship the shell first).

2. Categories and levels

Every alert is filed under one category, from a closed list the index repeats in this order (categories):

keyhazard
rainheavy rain
floodriver, flash and snowmelt flooding
landslidelandslides and debris flows
windwind on land, tropical cyclones
thunderstormthunderstorms, tornadoes, lightning
snow-icesnow, blizzard, freezing rain, icing, avalanche
heatheat
coldcold, frost, freeze, wind chill
fogfog
dustdust and sand
firefire weather and dry air
airair quality, smoke, ashfall
coastalstorm surge, coastal and lakeshore flooding, surf, rip currents
marineconditions at sea: gales, seas, freezing spray, waves
tsunamitsunami
otheranything else, including non-weather civil alerts

and given one level, an integer 1 … 5 on a scale every network maps onto:

levelmeaningNWSJMAECCCMeteoAlarmCMAHKOCWA
1statement, informationStatement, Outlook, Message, Forecast—statement (no colour)——special announcement—
2advisory, be awareAdvisory, Watch注意報 (レベル2)yellow; advisory or watch (no colour)yellowblue, yellowamber rain, yellow fire, signals 1 and 3, the other warningsyellow; Minor or Moderate (no colour)
3warningWarning警報 (レベル3)orange; warning (no colour)orangeorangered rain, red fire, signal 8, landslip, tsunamiorange; Severe (no colour)
4dangerWarning with CAP severity Extreme危険警報 (レベル4)redredredblack rain, signals 9 and 10red, purple; Extreme (no colour)
5exceptional—特別警報 (レベル5)—————

Level 5 is JMA’s 特別警報 alone: no other network has a tier above its danger level, and folding it into 4 would lose the distinction the agency draws. The level and category are this product’s; the network’s own event name, code and level are kept beside them in the line’s native (§6), verbatim.

3. Mapping per network

The mappings are data, in xuebuild/alerts/tables.json, and this section is that file in prose. An event name, subject or code a table does not list is not an error: it is filed under other and levelled by its last word (NWS) or its colour and type (ECCC); a JMA code the table does not know is skipped and counted (§8), and so is a MeteoAlarm awareness level it does not list.

3.1 NWS

Level by event name, else by its last word:

last wordlevel
Statement, Outlook, Message, Forecast1
Advisory, Watch2
Warning3
anything else1

Named exceptions: 911 Telephone Outage and 911 Telephone Outage Emergency 1, Blue Alert 1, Air Quality Alert 2, Child Abduction Emergency 3, Civil Emergency Message 3, Extreme Fire Danger 3, Local Area Emergency 3, Evacuation Immediate 4. Then any event ending in Warning whose CAP severity is Extreme (a tornado emergency, a particularly dangerous situation, a tsunami or extreme wind warning) is raised to 4. Watches stay 2 at any severity: a watch says conditions are possible, not occurring.

Category by event name (every event api.weather.gov/alerts/types listed on 2026-10-31, and the names it retired that may still appear):

categoryNWS events
floodArroyo And Small Stream Flood Advisory, Flash Flood Statement, Flash Flood Warning, Flash Flood Watch, Flood Advisory, Flood Statement, Flood Warning, Flood Watch, Hydrologic Advisory, Hydrologic Outlook, Small Stream Flood Advisory, Urban And Small Stream Flood Advisory
windExtreme Wind Warning, High Wind Warning, High Wind Watch, Hurricane Local Statement, Hurricane Warning, Hurricane Watch, Lake Wind Advisory, Tropical Cyclone Local Statement, Tropical Depression Local Statement, Tropical Storm Local Statement, Tropical Storm Warning, Tropical Storm Watch, Typhoon Local Statement, Typhoon Warning, Typhoon Watch, Wind Advisory
thunderstormSevere Thunderstorm Warning, Severe Thunderstorm Watch, Severe Weather Statement, Tornado Warning, Tornado Watch
snow-iceAvalanche Advisory, Avalanche Warning, Avalanche Watch, Blizzard Warning, Blizzard Watch, Freezing Rain Advisory, Ice Storm Warning, Lake Effect Snow Advisory, Lake Effect Snow Warning, Lake Effect Snow Watch, Snow Squall Warning, Winter Storm Warning, Winter Storm Watch, Winter Weather Advisory
heatExcessive Heat Warning, Excessive Heat Watch, Extreme Heat Warning, Extreme Heat Watch, Heat Advisory
coldCold Weather Advisory, Extreme Cold Warning, Extreme Cold Watch, Freeze Warning, Freeze Watch, Frost Advisory, Hard Freeze Warning, Hard Freeze Watch, Wind Chill Advisory, Wind Chill Warning, Wind Chill Watch
fogDense Fog Advisory, Freezing Fog Advisory
dustBlowing Dust Advisory, Blowing Dust Warning, Dust Advisory, Dust Storm Warning
fireExtreme Fire Danger, Fire Warning, Fire Weather Watch, Red Flag Warning
airAir Quality Alert, Air Stagnation Advisory, Ashfall Advisory, Ashfall Warning, Dense Smoke Advisory
coastalBeach Hazards Statement, Coastal Flood Advisory, Coastal Flood Statement, Coastal Flood Warning, Coastal Flood Watch, High Surf Advisory, High Surf Warning, Lakeshore Flood Advisory, Lakeshore Flood Statement, Lakeshore Flood Warning, Lakeshore Flood Watch, Rip Current Statement, Storm Surge Warning, Storm Surge Watch
marineBrisk Wind Advisory, Freezing Spray Advisory, Gale Warning, Gale Watch, Hazardous Seas Warning, Hazardous Seas Watch, Heavy Freezing Spray Warning, Heavy Freezing Spray Watch, Hurricane Force Wind Warning, Hurricane Force Wind Watch, Low Water Advisory, Marine Weather Statement, Small Craft Advisory, Small Craft Advisory For Hazardous Seas, Small Craft Advisory For Rough Bar, Small Craft Advisory For Winds, Special Marine Warning, Storm Warning, Storm Watch
tsunamiTsunami Advisory, Tsunami Warning, Tsunami Watch
other911 Telephone Outage, 911 Telephone Outage Emergency, Administrative Message, Blue Alert, Child Abduction Emergency, Civil Danger Warning, Civil Emergency Message, Earthquake Warning, Evacuation Immediate, Hazardous Materials Warning, Hazardous Weather Outlook, Law Enforcement Warning, Local Area Emergency, Nuclear Power Plant Warning, Radiological Hazard Warning, Shelter In Place Warning, Short Term Forecast, Special Weather Statement, Volcano Warning

The NWS issues no rain-only or landslide product; heavy rain reaches the public as flood products. Storm Warning and Storm Watch are the marine storm-force products, hence marine.

3.2 JMA

By kind code of the r8 warning map (the code table of the agency’s own warning page). Level is the agency’s own レベル; the English names are the page’s translation table, published here for display, not in the files.

code種別Englishelementlevelcategory
10レベル2大雨注意報Heavy Rain Advisoryrain2rain
03レベル3大雨警報Heavy Rain Warningrain3rain
43レベル4大雨危険警報Heavy Rain Urgent Warningrain4rain
33レベル5大雨特別警報Heavy Rain Emergency Warningrain5rain
29レベル2土砂災害注意報Landslide Advisorylandslide2landslide
09レベル3土砂災害警報Landslide Warninglandslide3landslide
49レベル4土砂災害危険警報Landslide Urgent Warninglandslide4landslide
39レベル5土砂災害特別警報Landslide Emergency Warninglandslide5landslide
19レベル2高潮注意報Storm Surge Advisorytide2coastal
08レベル3高潮警報Storm Surge Warningtide3coastal
48レベル4高潮危険警報Storm Surge Urgent Warningtide4coastal
38レベル5高潮特別警報Storm Surge Emergency Warningtide5coastal
15強風注意報Gale Advisorywind2wind
05暴風警報Storm Warningwind3wind
35暴風特別警報Storm Emergency Warningwind5wind
13風雪注意報Gale and Snow Advisorywind_snow2snow-ice
02暴風雪警報Snowstorm Warningwind_snow3snow-ice
32暴風雪特別警報Snowstorm Emergency Warningwind_snow5snow-ice
12大雪注意報Heavy Snow Advisorysnow2snow-ice
06大雪警報Heavy Snow Warningsnow3snow-ice
36大雪特別警報Heavy Snow Emergency Warningsnow5snow-ice
16波浪注意報High Wave Advisorywave2marine
07波浪警報High Wave Warningwave3marine
37波浪特別警報High Wave Emergency Warningwave5marine
14雷注意報Thunder Storm Advisorythunder2thunderstorm
17融雪注意報Snow Melting Advisorysnow_melting2flood
20濃霧注意報Dense Fog Advisoryfog2fog
21乾燥注意報Dry Air Advisorydry2fire
22なだれ注意報Avalanche Advisoryavalanche2snow-ice
23低温注意報Low Temperature Advisorycold2cold
24霜注意報Frost Advisoryfrost2cold
25着氷注意報Ice Accretion Advisoryice_accretion2snow-ice
26着雪注意報Snow Accretion Advisorysnow_accretion2snow-ice

Wind, snow and wave have no 危険警報; the 土砂災害危険警報 (code 49) is what was the 土砂災害警戒情報 before May 2026. The designated-river flood warnings (氾濫注意報 … 氾濫特別警報, codes 20–22, 30–31, 40–41, 51, 53 in their own numbering) are published in a separate document and are not in v1.

3.3 ECCC

Level by the MSC risk colour where there is one, else by the alert type:

colourleveltype, no colourlevel
yellow2statement1
orange3advisory, watch2
red4warning3

ECCC’s own colour is the level, so a yellow warning is level 2: MSC uses yellow for its moderate-impact warnings, and the colour is the risk it states. Category by the subject of the alert’s short English name (alert_short_name_en less a trailing parenthesis, lower case: Fog (advisory) → fog):

categoryECCC subjects
rainrainfall
windhurricane, les suetes wind, les suêtes wind, tropical storm, wind, wreckhouse wind
thunderstormsevere thunderstorm, tornado
snow-iceblizzard, blowing snow, freezing drizzle, freezing rain, snow squall, snowfall, winter storm
heatheat
coldarctic outflow, extreme cold, flash freeze, frost
fogfog
dustdust storm
airair quality, smoke
coastalcoastal flooding, storm surge
tsunamitsunami
otherweather

3.4 MeteoAlarm

Level by the code that leads the MeteoAlarm CAP profile’s awareness_level parameter, its colour:

awareness_levellevel
2; yellow; Moderate2
3; orange; Severe3
4; red; Extreme4

Green (1; green; Minor) means no particular awareness is required: the profile uses it to stand a warning down, and it is not published (the message is skipped and counted, and the warning it stood down leaves the snapshot). The colour is the level, as ECCC’s is: MeteoAlarm’s yellow is “be aware”, orange “be prepared”, red “take action”, and none of the services has a tier above red.

Category by the code that leads awareness_type:

codeawareness typecategory
1Windwind
2snow-icesnow-ice
3Thunderstormthunderstorm
4Fogfog
5high-temperatureheat
6low-temperaturecold
7coastaleventcoastal
8forest-firefire
9avalanchessnow-ice
10Rainrain
12floodingflood
13rain-floodflood
14Marine-Hazardmarine
15Droughtother

The services spell the names in either case (1; Wind, 1; wind); only the code is read. Any other code is other.

3.5 CMA

Level by CAP severity, which the CMA profile ties to the signal’s colour (预警信号 blue Ⅳ/一般, yellow Ⅲ/较重, orange Ⅱ/严重, red Ⅰ/特别严重):

severitycolourlevel
Minorblue2
Moderateyellow2
Severeorange3
Extremered4

Blue and yellow share level 2: the scale has one “be aware” tier and CMA’s red is its highest, as MeteoAlarm’s is; the colour stays in native.colour. A severity the table does not list is level 2.

Category by the Chinese event name (the English names beside it are not spelt consistently: gale, Dense fog, Icy Road):

categoryCMA events
rain暴雨, 短时强降水
flood城市内涝, 渍涝风险, 山洪灾害气象风险, 中小河流洪水气象风险
landslide地质灾害气象风险
wind台风, 大风
thunderstorm雷电, 雷暴大风, 雷雨大风, 冰雹, 强对流
snow-ice暴雪, 大雪, 雪灾, 道路结冰, 道路冰雪, 电线积冰, 冰冻, 低温雨雪冰冻
heat高温, 干热风
cold寒潮, 低温, 持续低温, 霜冻, 降温
fog大雾
dust沙尘暴, 沙尘, 扬沙
fire森林火险, 草原火险, 森林(草原)火险
air霾, 臭氧, 空气污染, 重污染天气
coastal风暴潮
marine海上大风, 海上大雾, 海浪
other干旱, 气象干旱, 农业干旱

Any other event is other.

3.6 HKO

By the warning’s code, its signal or colour where it has several:

codewarninglevelcategory
TC1, TC3Standby Signal No. 1, Strong Wind Signal No. 32wind
TC8NE, TC8SE, TC8SW, TC8NWNo. 8 Gale or Storm Signal3wind
TC9, TC10Increasing Gale or Storm Signal No. 9, Hurricane Signal No. 104wind
WRAINA, WRAINR, WRAINBAmber, Red, Black Rainstorm Warning Signal2, 3, 4rain
WFNTSASpecial Announcement on Flooding in the northern New Territories1flood
WLLandslip Warning3landslide
WTSThunderstorm Warning2thunderstorm
WHOTVery Hot Weather Warning2heat
WCOLD, WFROSTCold Weather Warning, Frost Warning2cold
WMSGNLStrong Monsoon Signal2wind
WFIREY, WFIRERYellow, Red Fire Danger Warning2, 3fire
WTMWTsunami Warning3tsunami

Any other code is other at level 2.

3.7 CWA

Level by the tier’s colour, CAP parameter alert_color (the 燈號 of the strong wind, low and high temperature warnings; 大雨, 豪雨, 大豪雨 and 超大豪雨 for rain), else by CAP severity:

alert_colorcolourlevel
黃色yellow2
橙色orange3
紅色red4
紫色purple4

Without a colour: Minor and Moderate 2, Severe 3, Extreme 4, and any other severity 2. Red and purple share level 4, as CMA’s red does: the colour stays in native.colour.

Category by CAP event:

categoryCWA events
rain降雨
wind強風, 颱風
thunderstorm雷雨, 大雷雨
heat高溫
cold低溫
fog濃霧

Any other event is other.

4. Identity

An alert is <network>:<the network's own identifier>: the CAP identifier for NWS (nws:urn:oid:2.49.0.1.840.0.…) and MeteoAlarm (meteoalarm:2.49.0.0.276.0.DWD.PVW.…), the feature id for ECCC (eccc:<CAP identifier>_<region>), the CAP identifier for CMA (cma:12011541600000_20261111192247), jma:<office>-<kind> for JMA, whose map has no per-alert identifier (jma:130000-10 is Tokyo’s レベル2大雨注意報), hko:<code>-<issue time> for HKO, whose API has none either (hko:WRAINR-20261101T000200Z), and the CAP identifier for CWA (cwa:CWA-Weather_strong-wind_202612010432001), with /<colour> after it for each block of a message that holds several (cwa:CWA-Weather_heat_202610241424001/orange). The network id is lowercase, ^[a-z][a-z0-9]*(-[a-z0-9]+)*$; the rest is the upstream’s identifier unchanged and may itself contain :. The id is the key everywhere: the index’s rows are sorted by it, each network file’s lines are sorted by it, and every line repeats it so a slice read by range identifies itself.

An upstream that replaces an alert under a new identifier (an NWS Update; a JMA kind raised from 注意報 to 警報, or a 危険警報 lowered to 注意報, each a new kind code) produces a new id; the old one leaves the snapshot and is listed in ended[]. Where the network says which alert the new one replaces, the new line names it in replaces (§6) and the old one ends as replaced, naming its successor (§7), so a reader can chain an event’s messages across rounds.

5. index.json

The shape — every field, its type and range — is schemas/alerts-index.schema.json; the pointer’s is schemas/pointer.schema.json. This section says what the fields mean and the rules across them.

{
  "schemaVersion": 1,
  "issued": "2026-11-01T00:05:00Z",
  "generated": "2026-11-01T00:06:10Z",
  "networks": [
    {"id": "nws", "name": "US National Weather Service",
     "attribution": "US National Weather Service", "license": "public-domain",
     "licenseUrl": "https://www.weather.gov/disclaimer",
     "url": "https://www.weather.gov/", "latest": "2026-11-01T00:06:00Z",
     "file": {"path": "nws.jsonl", "byteLength": 578054, "crc32": "0a1b2c3d"},
     "areas": {"set": "nws-zones", "version": "20261102",
               "path": "../../../../../alerts-areas/nws-zones.20261102.pmtiles",
               "byteLength": 31023141, "crc32": "879ebf6c",
               "layers": ["zone", "county", "marine", "offshore", "fire"],
               "bbox": {"path": "../../../../../alerts-areas/nws-zones.20261102.bbox.json",
                        "byteLength": 524181, "crc32": "05a06972"}}},
    {"id": "jma", …, "areas": {"set": "jma-class20", "version": "20261102", …}},
    {"id": "eccc", …, "areas": null}
  ],
  "categories": ["rain", "flood", "landslide", "wind", "thunderstorm", "snow-ice", "heat", "cold",
                 "fog", "dust", "fire", "air", "coastal", "marine", "tsunami", "other"],
  "mapping": {"tables": "ebaf5daa"},
  "columns": ["id", "network", "category", "level", "event", "sent", "onset", "expires",
              "west", "south", "east", "north", "offset", "length"],
  "alerts": [
    ["nws:urn:oid:2.49.0.1.840.0.f65e…002.1", 0, "marine", 2, "Small Craft Advisory",
     "2026-10-31T23:40:00Z", "2026-11-01T00:00:00Z", "2026-11-01T12:00:00Z",
     null, null, null, null, 2671, 1662]
  ],
  "ended": [["nws:urn:oid:2.49.0.1.840.0.cad4…001.1", 0, "gone"]],
  "sources": [ … ],
  "builder": {"name": "xuebuild", "revision": "3dae963…"}
}
  • issued is the round, generated when the build ran.

  • networks[] is one entry per network that has a file this round (§7), in the publisher’s order (nws, jma, eccc, meteoalarm, cma, hko, cwa): its id and display name; the attribution a display must show, the license the network’s data is reused under, licenseUrl, the page stating those terms (optional), and the network’s url; latest, the upstream’s own time of the state the file holds (NWS updated, JMA latestControlDatetime, ECCC timeStamp, MeteoAlarm the newest sent of any message its feeds listed, CMA the SWIC listing’s lastUpdated, HKO the newest updateTime, CWA the newest sent of any CAP file the bucket holds; on a carry-over, the previous round’s); file, the network file’s name (always <id>.jsonl), length and CRC32 — an empty file when nothing is in force; and areas, the boundary set the network’s area codes resolve against (§9), or null. areas.path is relative to the index and climbs to the data root: ../../../../../alerts-areas/<set>.<version>.pmtiles from a round filed under its day, ../alerts-areas/… from a flat one published before that layout (a reader accepts both); layers are the layer names in that file; bbox (optional) is the set’s box file (§9), <the same climb>alerts-areas/<set>.<version>.bbox.json, with its length and CRC32.

  • categories is §2’s list, in that order.

  • mapping (optional) is {"tables": <crc32>}, the CRC32 of the bytes of xuebuild/alerts/tables.json, the mapping (§3) that filed this round’s categories and levels: two rounds with the same value were mapped alike, and a reader that wants the table itself reads it at the commit builder names.

  • columns (optional) names the columns of alerts[]’s rows, and a reader finds a column by its name there. In v1 it is always the layout below, so a reader that indexes by position reads it too; rounds published before it (every alerts round up to 2026-11-04) do not carry it, and a reader takes their rows in the layout below.

  • alerts[] is one compact row per alert in force, sorted by id and unique:

    012345678–1112, 13
    idnetworkcategoryleveleventsentonsetexpireswest, south, east, northoffset, length

    network is the index into networks[], and the id’s prefix is that network’s id. event is the network’s event name in its primary language (English for NWS, ECCC and HKO, Japanese for JMA, Chinese for CMA and CWA) — the line’s native.event. sent is when the network issued the alert’s current message; onset when the hazard begins and expires when the alert stops being in force, ISO 8601 UTC, or null where the network states none (JMA states neither: a Japanese warning is in force until lifted). The four bounds are the bounding box of the line’s geometry to four decimals (plain minimum and maximum of the coordinates); for an alert with no polygon of its own, the union of its areas codes’ boxes from the network’s boundary set (§9); four nulls when it has neither — no polygon and no boundary set, or a code the set does not hold (a box that left part of the area out would hide the alert from a reader asking about that part). A MeteoAlarm line can carry both, each for different parts of its area (§10.4): its box is the union of the polygon’s and the codes’ boxes, and null when a code has none. Like any plain minimum and maximum, the box of an area that crosses the antimeridian spans every longitude. offset and length are the byte span of the alert’s line in its network’s file, the JSON object alone; the spans of one network’s alerts are in row order, do not overlap, and lie inside that file’s byteLength.

  • ended[] is §7.

  • sources[] is §8.

  • builder (optional) is {"name": "xuebuild", "revision": <commit>}, the commit the round was built from (XUE_BUILD_REVISION, which the publisher sets), or null for a build that was not told (an offline build or the golden, which stays reproducible that way).

The index is what a map layer reads, and what a point or box query filters on: every alert’s category, level, times and box, about 90 KB (11 KB gzipped) for the 431 alerts in force on 2026-10-31 15:20 UTC, and no text.

6. <network>.jsonl

Each line’s shape is schemas/alerts-line.schema.json. One line per alert of that network in force, sorted by id, each the compact JSON object below followed by \n:

{"id": "nws:urn:oid:…", "network": "nws", "category": "marine", "level": 2,
 "native": {"event": "Small Craft Advisory", "code": "SCY", "level": "Minor", …},
 "sent": "2026-10-31T23:40:00Z", "onset": "2026-11-01T00:00:00Z" | null,
 "expires": "2026-11-01T12:00:00Z" | null, "status": "actual",
 "texts": {"en": {"headline": "…", "description": "…", "instruction": "…", "area": "…"}},
 "areas": ["ANZ639"] | [],
 "geometry": {"type": "MultiPolygon", "coordinates": …} | null,
 "url": "https://api.weather.gov/alerts/urn:oid:…" | null,
 "sender": "NWS Wakefield VA" | null,
 "replaces": ["nws:urn:oid:…"]}
  • network is the network’s id (the row carries its position instead).
  • native is the upstream’s own classification, verbatim: event (the event name, always), code (the network’s event code, or null) and level (the network’s own severity or level, or null), and the network’s further fields listed in its section (§10). A reader that wants the network’s own words reads these; the product’s category and level are derived from them by §3.
  • status is always actual: exercises, tests and drafts are not published.
  • texts maps BCP 47 language tags to that language’s texts, every language the network publishes, in full — never truncated. Each holds the fields the network has of headline, description, instruction and area (the network’s own description of the area, e.g. NWS areaDesc); a field the network leaves empty is absent.
  • areas lists the area codes the alert is in force in, in the network’s code space, which the network’s boundary set (§9) draws; empty for a network whose alerts carry their own polygons.
  • geometry is the alert’s own polygon where the network draws one (NWS storm-based warnings, every ECCC alert, the MeteoAlarm areas a service draws), as drawn with rounded coordinates (§9), else null. Where both are given, the polygon is the warned area and areas the zones it touches — except for MeteoAlarm, whose areas are the parts of the warned area the polygon does not draw (§10.4), so a display draws both.
  • url is the alert’s own page or document at the network, sender the issuing office, each null where the network has none.
  • replaces (optional, after sender) lists, sorted, the ids of the same network’s earlier alerts this one supersedes, where the network says so: NWS and MeteoAlarm CAP references on any message but a Cancel, JMA the office’s 危険警報 a 注意報 was lowered from. Absent when there are none (and for ECCC, whose collection carries no references). A replaced alert may already have left the snapshot rounds ago; only one that leaves in this round is listed in ended[] as replaced.

7. ended[] and carry-over

ended[] lists the alerts that were in the previous round’s index and are not in this one, sorted by id: [id, network, reason], or [id, network, "replaced", by], network being the position in this round’s networks[]. reason is the first of these that holds:

  • expired — the alert’s expires is at or before this round’s issued (whether the network still listed it or not);
  • replaced — an alert in force this round names it in replaces (§6); by is that alert’s id (of several, the first by id), always one of this round’s rows;
  • cancelled — the network withdrew it in so many words this round: an NWS Cancel message referencing it, a JMA kind whose status is 解除, an ECCC feature whose status is ended or cancelled, an HKO entry whose action is CANCEL, a CWA Cancel message naming it (or the message it updated);
  • gone — anything else: it is simply no longer listed (a JMA kind raised to another code, the network dropped it without a word).

The four-element form is the only one with a fourth element; a reader that predates replaced reads the first three.

ended[] is kept for one round. A reader that wants to animate a warning’s end compares nothing; a reader that missed a round has missed those ends, and reads the snapshot.

A network that does not deliver a new state — its fetch failed, its document did not parse, JMA’s map_time.json is stale (§10.2), or JMA says nothing changed — carries over: its file is the previous round’s lines, byte for byte, less those that have expired by this round, and its latest stays the previous round’s. Its sources[] entry says why (the “nothing changed” case stays ok: true, with unchanged: true). A carry-over has no end but its expiries, so a network that stays down shows its last known warnings with an old latest and a failed source, rather than none. A network with nothing to carry over (no previous round, or a previous file that cannot be read) is left out of the round.

A network read from several sources carries over per source: MeteoAlarm reads one feed per country, and a country whose feed failed keeps its previous round’s lines (by native.country), byte for byte, less the expired, beside the lines of the countries that arrived. The network carries over as a whole only when no country arrived. CMA reads one CAP file per message beside the listing, and a message the listing names whose file did not arrive keeps its previous line (by its url).

8. sources[]

One entry per source, every network’s in turn, in build order:

{"id": "nws-alerts", "ok": true, "fetched": "2026-11-01T00:06:00Z",
 "url": "https://api.weather.gov/alerts/active?status=actual", "reports": 380, "skipped": 0}
{"id": "jma-warning", "ok": false, "fetched": "2026-11-01T00:06:01Z",
 "url": "https://www.jma.go.jp/bosai/warning/data/r8/map.json",
 "error": "map_time.json has not advanced since 2026-10-31T23:30:00Z", "mapTime": "2026-10-31T23:30:00Z"}
{"id": "eccc-alerts", "ok": true, "fetched": "2026-11-01T00:06:03Z",
 "url": "https://api.weather.gc.ca/collections/weather-alerts/items?f=json&limit=1000",
 "pages": 1, "reports": 5, "skipped": 0}
{"id": "meteoalarm-germany", "ok": true, "fetched": "2026-11-01T00:06:00Z",
 "url": "https://feeds.meteoalarm.org/api/v1/warnings/feeds-germany", "reports": 62, "skipped": 59}

ok: false always carries error. An ok source carries sha256 (optional), the SHA-256 of the raw bytes the network was read from, in the order they were fetched: NWS active.json; JMA map_time.json, then map.json when it was fetched; ECCC every page in turn; a MeteoAlarm country its feed; CMA the listing, then each CAP file read in the listing’s order; HKO warnsum then warningInfo, each in English, Traditional and Simplified Chinese; CWA the bucket listing, then each CAP file in name order. A reader holding the upstream answer can tell whether a round was built from it. reports is how many upstream records the source held (features, JMA office reports); skipped how many of them were not published — a test or a cancel message, an ended ECCC feature, a JMA report from an office or a kind code the tables do not know, an expired or green MeteoAlarm message, an expired CMA message, an HKO entry cancelled or expired, a CWA file whose message is expired or a Cancel. A network’s own fields are described in its section.

9. Geometry and boundary sets

Inline polygons. An upstream polygon (GeoJSON Polygon or MultiPolygon) becomes a MultiPolygon as drawn, not simplified: coordinates rounded to four decimals (about 11 m), positions the rounding made repeat dropped, rings closed. A ring left with fewer than three distinct corners has no area: such a hole is dropped, such an outer ring drops its polygon, and an alert with no polygon left has geometry: null. Pure NumPy (xuebuild/alerts/geometry.py), so the build has no GEOS dependency.

Boundary sets. A network that names areas by code rather than drawing them has a boundary set: one PMTiles file of vector tiles per upstream release, each feature carrying one property, id, the code a line’s areas lists. Several features may share an id (an island county). A display joins a round’s codes to the set — e.g. MapLibre with promoteId: "id" and feature state, or a filter on ["get", "id"] — reading only the tiles in view by HTTP range. A set is named <set>.<version> by the day it was built, YYYYMMDD, with a letter after it for a second build that day (20261112b; the upstream release is named in its section); a new release or a new build recipe is a new file and a new pin in the network table, and older rounds keep naming the file they were built against, so a round and its boundaries never disagree.

Beside each set, <set>.<version>.bbox.json holds every code’s box:

{"set": "nws-zones", "version": "20261102",
 "layers": {"zone": {"AKZ317": [-143.8934, 58.8091, -137.4999, 60.5219], …}, "county": {…}, …}}

one object per layer in the set’s order, codes sorted, each box [west, south, east, north] over all of the code’s features as released (reprojected), rounded outward to four decimals so it holds the area. It is pinned by length and CRC32 in the network table like the tiles. The build reads it from the raw directory’s alerts-areas/, fetching it once from the public data origin under ?v=<crc32> when it is missing there; a build that cannot have it (an offline build without it, the origin down) leaves the boxes of the rows that need it null and publishes anyway. How a network’s codes resolve against the layers is in its section (§9.1 – §9.5).

Sets are built by hand, not by the five-minute build:

xue alerts-areas --set nws-zones --source <the downloaded release> --version 20261102 \
  --output web/public/data/alerts-areas
make upload-r2-alerts-areas SET=nws-zones VERSION=20261102

The tool runs ogr2ogr (reproject to EPSG:4326, keep the code attributes, five-decimal GeoJSONSeq; nothing simplified: ogr2ogr -simplify treats each polygon alone and pulls neighbours apart) and tippecanoe (zooms 0–11, --simplification=10 --low-detail=11 --detect-shared-borders --simplify-only-low-zooms, no tile size or feature limit, tiny polygons kept so every code can be hit): below z11 a line moves at most ten tile units, well under a screen pixel at the zoom the tile is drawn at, and a shared border is simplified once for both neighbours so they still meet; z11 holds the boundaries as released, so a map zoomed past it overzooms exact edges. A Python pass between the two builds each feature’s id and holds the county and fire-zone layers back to z6. tippecanoe runs on relative names inside a scratch directory, so the same release builds the same bytes and the pinned CRC32 can be reproduced. It writes the box file beside the tiles and prints both files’ lengths and CRC32s for the network table (xuebuild/alerts/networks.py); the upload sends both and refuses to replace an existing object of a different length.

Low-zoom thinning is tuned to two view budgets, measured with pmtiles extract <set> <out> --bbox=… --minzoom=z --maxzoom=z (the size of the extract, header and directories included):

viewbudgetmeasured
CONUS z4, -125,24,-66,50≤ 300 KB171 454 bytes
all Japan z5, 122,24,146,46≤ 200 KB82 446 bytes

With no simplification at any zoom (--no-line-simplification) the same views were 797 765 and 310 650 bytes and the files 65.5 MB and 26.9 MB.

9.1 nws-zones

The AWIPS shapefiles of https://www.weather.gov/gis/, which post the current and the next release side by side under their effective date:

layerreleaseidzoomsfeaturescodes
zonepublic forecast zones z_16ap26STATE + Z + ZONE (OKZ025)0–114 1574 080
countycounties c_16ap26STATE + C + last three digits of FIPS (OKC109)6–113 3523 269
marinecoastal marine zones mz16ap26ID (ANZ639)0–11569569
offshoreoffshore marine zones oz16ap26ID (PZZ900)0–11130130
firefire weather zones fz16ap26STATE + Z + ZONE6–113 6833 603

nws-zones.20261102.pmtiles: 31 023 141 bytes, CRC32 879ebf6c; nws-zones.20261102.bbox.json: 524 181 bytes, CRC32 05a06972. Other views: CONUS z3 150 322 bytes, the southern Plains at z6 (-104,33,-94,40) 55 243, a 1° box around Oklahoma City (-98,35,-97,36) at z9 4 576 and at z11 11 016.

Fire weather zones share the public zones’ Z code space but not their shapes: a code resolves against the fire layer for the fire-weather events (Red Flag Warning, Fire Weather Watch, Extreme Fire Danger, Fire Warning) and against zone, county, marine and offshore otherwise (the four do not share codes). The high seas areas (hz…) are not UGC-coded and not in the set. Boxes resolve the same way: a fire-weather event’s codes against fire, any other’s against zone, county, marine and offshore in that order. Three marine zones and an Aleutian county cross the antimeridian, so their boxes span every longitude.

9.2 jma-class20

The agency’s 予報区等GISデータ (https://www.data.jma.go.jp/developer/gis.html), 市町村等(気象警報等), release 20260226_AreaInformationCity_weather_GIS: one layer, class20, id regioncode (seven digits, the class20 codes of the warning map), zooms 0–11, 1 805 features and codes, read as JGD2011 (EPSG:6668; the release ships without a .prj). jma-class20.20261102.pmtiles: 12 593 916 bytes, CRC32 49385bc7; jma-class20.20261102.bbox.json: 82 289 bytes, CRC32 c1108b5b. Other views: all Japan z4 66 452 bytes, Kantō at z8 (138.5,35,140.5,36.5) 33 311, central Tokyo at z11 (139.6,35.6,139.9,35.8) 64 613. A line’s codes resolve against class20.

Terms. The release is reused under the agency’s website terms (the Public Data License v1.0, https://www.jma.go.jp/jma/kishou/info/coment.html). Wherever the set or a map drawn from it is shown or redistributed it carries:

  • 出典:気象庁「予報区等GISデータ」(https://www.data.jma.go.jp/developer/gis.html), 公共データ利用規約 第1.0版 (Public Data License 1.0, https://www.digital.go.jp/resources/open_data/public_data_license_v1.0);
  • 加工:PMTiles 化 by xue — the set is converted to vector tiles by xue, and is not published by the Japan Meteorological Agency;
  • the agency’s notice of the Geospatial Information Authority of Japan’s approval, as its GIS page gives it: この地図の作成に当たっては、国土地理院長の承認を得て、同院発行の数値地図25000(空間データ基盤)、数値地図(国土基本情報)、電子国土基本図(地図情報)を使用した。(承認番号 平30情使 第401号・令2情使 第125号・令3情使 第90号・令3情使 第123号・令3情使 第648号・令4情使 第437号・令5情使 第71号・令6情使 第382号・令7情使 第395号)

9.3 meteoalarm-areas

The MeteoAlarm areas named by a code whose boundaries are published under open terms, each feature’s id the code a line lists (<valueName>:<value>, §10.4). One set, several upstreams (fetched on 2026-11-01):

layerupstreamidfeatures
de_kreiseDWD GeoServer WFS dwd:Warngebiete_Kreise (counties and county parts)WARNCELLID: + WARNCELLID402
de_kuestedwd:Warngebiete_Kueste (coasts)WARNCELLID: + WARNCELLID8
de_binnenseendwd:Warngebiete_Binnenseen (lakes)WARNCELLID: + WARNCELLID23
fr_departementIGN Géoplateforme WFS ADMINEXPRESS-COG-CARTO.LATEST:departementNUTS3: + the NUTS 2013 code of code_insee101

The DWD layers are https://maps.dwd.de/geoserver/dwd/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=dwd:Warngebiete_<Kreise|Kueste|Binnenseen>&outputFormat=application/json&srsName=EPSG:4326 and hold every warn cell Germany’s MeteoAlarm warnings name (433 cells; the 11 214 municipality cells are not used by the feed). The IGN layer is https://data.geopf.fr/wfs/ows?service=WFS&version=2.0.0&request=GetFeature&typeNames=ADMINEXPRESS-COG-CARTO.LATEST:departement&outputFormat=application/json&srsName=CRS:84. Each is saved as <layer's upstream name>.geojson without its crs member (the coordinates are longitude, latitude) and passed to xue alerts-areas --set meteoalarm-areas, all zooms 0–11. Météo-France’s warnings carry NUTS 2013 codes (FR711 is Ain); the département codes are mapped to them by xuebuild/alerts/fr_nuts2013.json, the 101 level-3 codes of the NUTS 2013 classification (Commission Regulation (EU) No 1319/2013) matched by name to the départements’ INSEE codes.

meteoalarm-areas.20261102.pmtiles: 3 563 611 bytes, CRC32 25117c18; meteoalarm-areas.20261102.bbox.json: 28 815 bytes, CRC32 97b9b07f. Views: Germany and France at z4 (-6,41,16,56) 23 725 bytes, at z5 33 668; Germany at z6 (5,47,16,55) 40 610; a 1° box around Munich (11,47.6,12,48.6) at z11 17 860.

EMMA_ID codes are not in the set. MeteoAlarm’s Redistribution Hub (https://meteoalarm.org/en/live/page/redistribution-hub) links an official geocodes file and shapefiles for redistributors, but its terms grant reuse only of the warnings (“Information”); its downloadable data is “Content”, owned by EUMETNET and licensed to the Participants alone, so those boundaries are not redistributed here.

Terms. Wherever the set or a map drawn from it is shown or redistributed it carries:

9.4 cma-areas

China’s provinces, prefectures and counties, each feature’s id its six-digit administrative code (120115 宝坻区, 654200 塔城地区, 650000 新疆): the Amap outlines that cnmaps-data packages (https://github.com/cnmetlab/cnmaps-data, MIT, commit e2a1a346, 2026-04-02), one GeoJSON file per code under cnmaps_data/data/datasets/administrative/amap/land/. The set is built from a snapshot of that directory kept beside the raw rounds (data/raw/alerts-sources/cnmaps-data-e2a1a346/, the land files and the index database as the commit holds them):

xue alerts-areas --set cma-areas --source data/raw/alerts-sources/cnmaps-data-e2a1a346 \
  --version 20261112b --output web/public/data/alerts-areas

Before ogr2ogr, xuebuild/alerts/cnmaps.py turns every file from GCJ-02 (the mainland’s offset datum, which Amap draws in, a few hundred metres from WGS84) into WGS84 by fixed-point iteration on the published forward formula, and files it under the layer its code names:

layercodesfeatures
provincexx000034
prefecturexxxx00336
countyany other2 873

all zooms 0–11. 香港, 澳门 and 台湾 are one outline each under 810000, 820000 and 710000 (the release draws them at every level from the same file), and Hong Kong’s eighteen districts (810001 …) are counties. The national outline (100000) is not in the set. 沙湾市 is drawn under its code since 2021, 654203, beside the county code the release files it under (654223). 新林区 and 呼中区 (232703, 232704), 大兴安岭’s management districts, have no division in the release, which draws their land inside 呼玛县 (232721): both are drawn as 呼玛县’s outline under their own codes, so a warning for either lights about twice the district.

cma-areas.20261112b.pmtiles: 21 166 362 bytes, CRC32 c1f9f588; cma-areas.20261112b.bbox.json: 144 021 bytes, CRC32 7f44b60f. The 20261112 build before it lacked the two districts. Views (measured on 20261112, which differs only by the two districts): all China z3 (73,18,135,54) 127 303 bytes, z4 162 563, z5 209 112; the Pearl River Delta at z9 (113,22,114.5,23.5) 20 893; a 1° box around Beijing at z11 80 105.

Terms. Wherever the set or a map drawn from it is shown it carries “边界:高德地图 (Amap), via cnmaps-data; GCJ-02 → WGS84 and tiling by xue”. The outlines are a commercial map provider’s, packaged by cnmaps-data under its MIT licence without a licence from the provider for redistribution; they are boundaries to place warnings by.

9.5 tw-areas

Taiwan’s counties and special municipalities, each feature’s id its five-digit code (65000 新北市, 10013 屏東縣, 09020 金門縣), and its townships and districts by their eight digits (65000260 貢寮區, 10013040 恆春鎮): the Ministry of the Interior’s town boundaries (鄉鎮市區界線, TWD97 longitude and latitude), release 1120317 (2023-03-17), as the National Land Surveying and Mapping Center serves them (https://data.gov.tw/dataset/7441; the zip from https://maps.nlsc.gov.tw/download/鄉鎮市區界線(TWD97經緯度).zip, whose TOWN_MOI_1120317.shp the tool reads). The county release the same portal lists is served from TGOS, which answered 403 to a download on 2026-12-01; the towns carry COUNTYCODE, so the counties are dissolved from them instead (ogr2ogr -dialect sqlite, ST_Union by code), the same outlines without the town borders inside:

xue alerts-areas --set tw-areas --source <the unzipped release> \
  --version 20261201 --output web/public/data/alerts-areas
layercodesfeatures
countyCOUNTYCODE, five digits22
townTOWNCODE, eight digits368

all zooms 0–11. TWD97 is realised on ITRF and taken as WGS84, as GDAL does: no shift. The release draws 高雄市旗津區 with the islands of the South China Sea it administers, so 高雄市’s box and 旗津區’s reach 10°N.

tw-areas.20261201.pmtiles: 1 270 219 bytes, CRC32 2826bd6a; tw-areas.20261201.bbox.json: 18 168 bytes, CRC32 2637e6e0. Views: Taiwan z5 (114,10,125,27) 14 247 bytes, z7 (118,21.5,122.5,26.5) 22 419; Taipei at z11 (121.4,24.9,121.7,25.2) 108 253.

Terms. The boundaries are government open data under the Open Government Data License, Taiwan, version 1.0 (政府資料開放授權條款-第1版, https://data.gov.tw/license), which asks that the source be named. Wherever the set or a map drawn from it is shown it carries “界線:內政部國土測繪中心「鄉鎮市區界線」(政府資料開放授權條款第 1 版);縣市合併與切片 by xue”.

10. Networks

10.1 nws — US National Weather Service

Every alert the US National Weather Service has in force, from nws-alerts — https://api.weather.gov/alerts/active?status=actual, one GeoJSON FeatureCollection of CAP 1.2 alerts nationwide (about 1.7 MB, 115 KB gzipped, on 2026-10-31). The service requires a User-Agent that says who is asking and how to reach them; every request carries xue/<version> (+https://github.com/ringsaturn/xue). No rate limit is published; one request every five minutes is far inside what it expects.

Reading:

  • A feature whose status is not Actual, or whose messageType is Cancel, is not in force. The alerts a Cancel references end as cancelled; those any other message references (an Update’s predecessor) are its replaces and end as replaced.
  • expires is CAP ends (when the event ends) where the alert states one, else CAP expires. The API keeps listing an alert until its event ends, long after its last message expired — a third of the alerts on 2026-10-31 were marine and flood alerts whose message had expired days earlier — so filtering on the message’s expiry would drop alerts the service itself shows as in force. The message’s own expiry is in native.expires.
  • onset is CAP onset, else effective.
  • native: event; code, the NWS event code (eventCode.NationalWeatherService, e.g. SCY, TOW); level, CAP severity; urgency; certainty; vtec, the first P-VTEC string; expires, the message’s expiry.
  • texts.en: headline, description, instruction, and area (CAP areaDesc).
  • areas: geocode.UGC, in the service’s order — public zones, counties and marine zones, drawn by nws-zones (§9.1).
  • geometry: the storm-based polygon where there is one.
  • url: the alert’s API document (@id); sender: senderName.

latest is the collection’s updated.

Terms. Works of the US federal government; the API’s documentation describes its data as open data, free to use for any purpose. license public-domain, licenseUrl https://www.weather.gov/disclaimer, attribution US National Weather Service, url https://www.weather.gov/.

10.2 jma — Japan Meteorological Agency

The agency’s warnings and advisories (気象警報・注意報) as its own warning map reads them; there is no published API and no service commitment. jma-warning:

  • https://www.jma.go.jp/bosai/warning/data/r8/map_time.json — {"latestControlDatetime": …}, the time of the newest report. Recorded as mapTime.
  • https://www.jma.go.jp/bosai/warning/data/r8/map.json — every forecast office’s latest report per element group, nationwide (about 900 KB, 40 KB gzipped). Not fetched when mapTime equals the network’s latest in the previous round: the source is then ok with unchanged: true and the previous lines carry over (§7).

The r8 documents follow the warning system in force since late May 2026 (レベル2注意報 … レベル5特別警報, with the new レベル4危険警報); the earlier bosai/warning/data/warning/ documents stopped updating on 2026-05-28.

Health. If mapTime is more than six hours before the fetch, the source is ok: false with the error map_time.json has not advanced since … and the network carries over: the map has moved once already, and a frozen map must not pass for a calm country. The map only moves when a report changes, and quiet nights leave it still for well over half an hour, so the threshold is hours, not minutes.

Reading. A report lists, for each municipality-level area (class20, seven digits) of its office, the kinds in it with a status: 発表 (issued), 継続 (continued), 解除 (lifted), 危険警報から注意報 (a 危険警報 lowered to 注意報) or 発表警報・注意報はなし (none). A kind is in force in an area when it has a code and its status is anything but 解除; a kind whose status is 危険警報から注意報 is the 注意報 now in force, and its line replaces the office’s 危険警報 for the element (unless that is still in force elsewhere in the office). One alert is one (office, kind) in force anywhere, with every area it is in force in:

  • id jma:<office>-<kind>, the office being the forecast office’s area code (130000 Tokyo), matched by the report’s publishingOffice name in xuebuild/alerts/jma_offices.json — the offices level of the agency’s bosai/common/const/area.json, 58 entries, committed. A report from an office the table does not know is skipped and counted.
  • event and native.event: the agency’s own name with its レベル prefix where it has one (レベル2大雨注意報, 雷注意報); native.code the kind code; native.level the page’s level number (20, 30, 40, 50); native.element the page’s element name (rain, landslide, …).
  • sent: the report’s reportDatetime; onset and expires: null.
  • texts.ja.headline: the report’s headlineText, the only text the map carries (it covers the office’s whole report, not this kind alone).
  • areas: the class20 codes, sorted; drawn by jma-class20 (§9.2).
  • url: the office’s page on the warning map; sender: the publishingOffice.

latest is mapTime.

Terms. The agency’s website content is reusable, commercially included, under the Public Data License v1.0 with the source credited — 「出典:気象庁ホームページ」 — and, for edited content, a statement that it was edited; it must not be presented as the agency’s own publication (https://www.jma.go.jp/jma/kishou/info/coment.html). The lines are edited content (the agency’s map reorganised by office and kind). The boundary set the network names carries its own credit and the survey approval notice (§9.2). license PDL-1.0, licenseUrl https://www.jma.go.jp/jma/kishou/info/coment.html, attribution 出典:気象庁ホームページ (Japan Meteorological Agency), url https://www.jma.go.jp/bosai/warning/.

10.3 eccc — Environment and Climate Change Canada

Environment and Climate Change Canada’s public weather alerts, from eccc-alerts — the MSC GeoMet OGC API collection https://api.weather.gc.ca/collections/weather-alerts/items?f=json&limit=1000, following next links if there are any (pages). The collection is every alert in force nationwide, one feature per alert and forecast region, each with the region’s polygon and English and French texts.

Reading:

  • One feature is one alert, id eccc:<feature id> (the CAP identifier and the region), so the texts and the polygon stay together. A feature whose status_en is ended or cancelled is not in force and ends as cancelled.
  • event and native.event: alert_name_en (fog advisory).
  • native: code alert_code (FGA), level risk_colour_en, type alert_type, impact impact_en, confidence confidence_en, status status_en, province, ends event_end_datetime.
  • sent publication_datetime, onset validity_datetime, expires expiration_datetime.
  • texts.en and texts.fr: headline (alert_name_*), description (alert_text_*), area (feature_name_*).
  • areas is empty and geometry the region’s polygon: every alert draws its own area, so the network has no boundary set (areas: null).
  • url and sender: null; no replaces, since the collection’s features carry no references to earlier alerts.

latest is the collection’s timeStamp.

Terms. Open Government Licence – Canada (https://open.canada.ca/en/open-government-licence-canada). license OGL-Canada-2.0, licenseUrl the same page, attribution Contains information licensed under the Open Government Licence – Canada (Environment and Climate Change Canada), url https://weather.gc.ca/.

10.4 meteoalarm — EUMETNET – MeteoAlarm

The awareness warnings of Europe’s national meteorological and hydrological services (the MeteoAlarm Participants) as MeteoAlarm aggregates them, one JSON feed per country: https://feeds.meteoalarm.org/api/v1/warnings/feeds-<country>, CAP 1.2 under the MeteoAlarm CAP profile v2.0, one alert per warning and one info block per language. Each country is a source, meteoalarm-<country> (§8), for the 38 feeds of andorra, austria, belgium, bosnia-herzegovina, bulgaria, croatia, cyprus, czechia, denmark, estonia, finland, france, germany, greece, hungary, iceland, ireland, italy, latvia, lithuania, luxembourg, malta, moldova, montenegro, netherlands, norway, poland, portugal, republic-of-north-macedonia, romania, serbia, slovakia, slovenia, spain, sweden, switzerland, ukraine and united-kingdom. Israel’s feed is not read.

The feeds are uncompressed, carry no ETag or Last-Modified, and are slow (Germany’s 1.5 MB takes 20–30 s), so every round fetches every feed, eight at a time, each within two minutes, retries included; a feed that fails or is late fails alone and its country carries over (§7). On 2026-11-01 07:30 UTC the fetch took 10.0 MB in 54 s and under 90 MB resident.

Reading:

  • A feed lists messages that have expired; a message is in force while the latest expires of its info blocks is after the round. A cancelled warning is not in the feed at all (the profile keeps Cancel messages out of it), so it ends as gone; a message whose status is not Actual or whose msgType is Cancel is skipped all the same.
  • Green messages (awareness_level 1) are skipped (§3.4).
  • event and native.event: the first info block’s event, in the service’s first language (STURM, Avertissement vent). native: code the awareness_type and level the awareness_level, verbatim (7; coastalevent, 3; orange; Severe); CAP severity, urgency, certainty and msgType; country, the feed’s ISO 3166 code (DE).
  • sent the alert’s sent; onset the first block’s onset, else effective; expires the latest expires.
  • texts: every language’s block under its own language tag as the service gives it (de-DE, en, sr-Latn), with headline, description, instruction and area (the block’s areaDescs joined by ; ), verbatim. A tag that is not BCP 47-shaped is dropped.
  • Areas. An area with a polygon is drawn by it (unless the message sets use_polygon_over_geocode to False): geometry holds every such area’s polygon. An area without one is named by one of its geocodes as <valueName>:<value>: its DWD warn cell where it has one (WARNCELLID:501000005; Germany gives an EMMA_ID beside it), else its EMMA_ID (EMMA_ID:IT001), else its first geocode (France, Bulgaria, Romania and North Macedonia name NUTS 3 regions, NUTS3:FR711; Belgium and Hungary NUTS 2; Ireland FIPS). areas lists those codes. The two are disjoint parts of the warned area — a service may draw some areas and name others — so a display draws both and the row’s box covers both (§5). The codes resolve against meteoalarm-areas (§9.3), which holds Germany’s warn cells and France’s départements; any other code has no box yet, and its line’s row has four nulls.
  • url: the issuing service’s own warnings page, the first block’s CAP web; sender: its senderName, the issuing service.
  • replaces: CAP references, space-separated sender,identifier,sent triples, as meteoalarm:<identifier>.

latest is the newest sent of any message the feeds that arrived listed, expired ones included.

Terms. MeteoAlarm Terms and Conditions §5 (https://meteoalarm.org/en/live/page/terms-and-conditions): the warnings (“Information”) may be used and redistributed under terms equivalent to CC BY 4.0, with these further requirements, and the product and any display of it meets them so:

  • modified Information must be redistributed with the same Information unmodified — every line keeps every language’s texts and the profile’s awareness parameters verbatim beside the derived category and level;
  • Information that spans more than one country is credited “EUMETNET – MeteoAlarm” (the network’s attribution); Information for one country names its MeteoAlarm Participant — every line’s sender is the issuing service, and a display shows it with the warning;
  • the time of issue is included — every row and line carries sent, and a display shows it;
  • an internet application links to www.meteoalarm.org (https://meteoalarm.org/en/live/, the network’s url);
  • operational redistribution is real time: on average under five minutes and never more than ten behind MeteoAlarm. A round is built every five minutes and takes about a minute to fetch and publish, so a warning reaches the bucket about three and a half minutes after MeteoAlarm on average and under seven at most, while the publisher runs;
  • every redistributor publishes this disclaimer, which this document, the STAC Collection and the display carry: “Time delays between this website and the www.meteoalarm.org website are possible. For the most up-to-date awareness information as published by the participating National Meteorological and Hydrological Services, please refer to www.meteoalarm.org.”

license MeteoAlarm-Terms, licenseUrl the terms page, attribution EUMETNET – MeteoAlarm, url https://meteoalarm.org/en/live/.

10.5 cma — China Meteorological Administration

The warning signals (预警信号) China’s meteorological observatories issue, as far as the WMO Severe Weather Information Centre aggregates them. SWIC (https://severeweather.wmo.int/) is WMO’s centre for official CAP warnings, developed and run by the Hong Kong Observatory. The CMA’s own feed in the WMO Register of Alerting Authorities (http://www.12379.cn/rss/china_rss.xml) answered 404 on 2026-11-12, and the national release centre’s site (12379.cn) publishes no interface of its own (on 2026-11-14 its http site answered only a “系统升级中” page dated 2024-01-17, its https site did not connect).

Coverage is SWIC’s, not the CMA’s. Between 2026-11-12 and 2026-11-14 (1 166 messages) SWIC carried prefecture and county observatories from 21 provinces, but of the province-level offices only the municipalities Beijing (110000), Tianjin (120000) and Chongqing (500000), no provincial observatory and not the National Meteorological Centre. No message at all came from Inner Mongolia (15), Liaoning (21), Fujian (35), Henan (41), Hunan (43), Guangxi (45), Hainan (46), Sichuan (51), Shaanxi (61) or Gansu (62). The NMC’s own warning pages carry the provincial warnings but forbid download without authorisation, so they are not read. The credits say what is missing.

cma-swic:

  • https://severeweather.wmo.int/json/wmo_all.json — every alert SWIC has in force worldwide (1 802 on 2026-11-12, 903 KB), each with the path of its CAP file; China’s are those under cn-cma-xx/ (cn-cma-xx/YYYY/MM/DD/hh/mm/ss-<md5>.xml). Saved as fetched.
  • https://severeweather.wmo.int/v2/cap-alerts/<path> — one CAP 1.2 message per file, about 3.5 KB. A path carries the message’s digest, so a file never changes: fetched files are kept in <raw>/alerts-cache/cma/ while the listing names them, a round fetches only the ones it has not seen (eight at a time) and copies every listed file into its own cma/cap/ as YYYYMMDDhhmmss-<md5>.xml. The status records new, the files fetched this round, and missing, those that failed.

Reading:

  • A message whose status is not Actual or whose msgType is Cancel is not in force, nor one whose expires is at or before the round. SWIC lists no cancels: a lifted signal leaves the listing and ends as gone. An Update names the message it updates in references (sender,identifier,sent, the sender possibly holding a comma itself, so the identifier is read second from the end); that is its replaces.
  • The primary block is the zh-CN one. event and native.event: its event (大雾). native: code null; level CAP severity; colour the signal’s colour (blue, yellow, orange, red, §3.5); eventEn, the English block’s event (Dense fog); CAP urgency, certainty and msgType; geocodes, the area’s twelve-digit CPEAS codes as given.
  • sent the message’s sent; onset onset, else effective; expires expires.
  • texts: zh-CN and en-US, as given, with headline, description, instruction and area (areaDesc).
  • areas: the first six digits of each CPEAS Geographic Code (the administrative code of the county, prefecture or province), drawn by cma-areas (§9.4). A township’s code (its last six digits not zero) is drawn by its county, and native.geocodes keeps the twelve digits. A prefecture observatory often codes a city-wide warning to its seat county alone (Langfang’s 大雾 to 安次区 131002, its text saying 全市): when the identifier’s first six digits, the issuing office’s code, are a prefecture’s (XXYY00, not a province’s XX0000) and the message’s one code is a county of that prefecture, areas is the prefecture (131000). Several codes, or the prefecture’s own, are kept as given. geometry is null: the messages carry no polygon.
  • url: the message’s CAP file at SWIC; sender: CAP sender, its underscores as spaces (Nongan County Meteorological Observatory). The person named in senderName is not published.

latest is the listing’s lastUpdated (UTC, written without a zone).

Terms. SWIC’s notes to users (https://severeweather.wmo.int/note.html): the information “is free for re-use by media or other websites. When doing so, it should be indicated that they are issued by the respective … NMHSs.” Every line names its issuing observatory in sender, and the network’s attribution names the CMA and SWIC. license WMO-SWIC, licenseUrl the notes page, attribution China Meteorological Administration, via the WMO Severe Weather Information Centre, url https://www.12379.cn/.

10.6 hko — Hong Kong Observatory

The warnings and signals the Observatory has in force, from its open data API on DATA.GOV.HK. hko-warnings fetches six documents a round, https://data.weather.gov.hk/weatherAPI/opendata/weather.php?dataType=<kind>&lang=<lang> for warnsum (the summary: one entry per warning statement in force, its code, type, actionCode, issueTime, expireTime and updateTime) and warningInfo (each statement’s text), in en, tc and sc; a round reads them together, and any one failing fails the source.

Reading:

  • One entry of the English warnsum is one alert, id hko:<code>-<issueTime> (the issue time in UTC, YYYYMMDDThhmmssZ): the API has no identifier, and a warning issued again, or raised to another signal or colour (a new code), is a new alert; the one it follows ends as gone. An entry whose actionCode is CANCEL, or the tropical cyclone code CANCEL (all signals lowered), is not in force; the alert it names ends as cancelled.
  • event and native.event: the English name (Rainstorm Warning Signal). native: code the warning’s code (WRAINR, TC8NE), level the English type (Red, No. 8 North East) or null, statement the summary key (WRAIN), action actionCode.
  • sent updateTime, else issueTime; onset issueTime; expires expireTime, or null (most warnings stay in force until cancelled).
  • texts: en, zh-Hant (tc) and zh-Hans (sc); headline the language’s name, with its type in parentheses where there is one (暴雨警告信號 (黃色)); description the statement’s warningInfo contents, paragraphs joined by blank lines.
  • areas: ["810000"], the Hong Kong SAR’s code: every warning covers the territory, drawn by cma-areas (§9.4). geometry null.
  • url: the Observatory’s warnings page; sender: Hong Kong Observatory.

latest is the newest updateTime (or issueTime) of the English summary, null when nothing is in force.

The Observatory’s CAP feed (https://alerts.weather.gov.hk/V1/cap_atom.xml, registered with WMO) carries the same warnings with a polygon, but it is website material, whose commercial use needs the Observatory’s prior written authorisation; the API is a DATA.GOV.HK dataset.

Terms. DATA.GOV.HK terms and conditions of use (https://data.gov.hk/en/terms-and-conditions), with the source and its ownership acknowledged. license DATA.GOV.HK, licenseUrl the terms page, attribution Hong Kong Observatory, HKSAR Government (DATA.GOV.HK), url https://www.hko.gov.hk/en/wxinfo/dailywx/wxwarntoday.htm.

10.7 cwa — Central Weather Administration

The weather warnings (天氣特報: rain, strong wind, low and high temperature, dense fog …) and typhoon warnings Taiwan’s Central Weather Administration has issued, from its open data bucket. cwa-warning lists https://cwaopendata.s3.ap-northeast-1.amazonaws.com/?list-type=2&prefix=Warning/ (an anonymous S3 ListObjectsV2, saved as cwa/listing.xml) and fetches every Warning/W-C<4 digits>-<3 digits>.cap it names into cwa/cap/, about ten files of a few kilobytes; any one failing fails the source. The bucket keeps one file per warning product (W-C0033-003 rain, W-C0033-006 strong wind, W-C0034-001 typhoon …), the product’s latest message, overwritten in place by the next: most are an expired message or a Cancel. The REST interface of the same open data platform (opendata.cwa.gov.tw/api/…) needs a member’s key; the bucket does not.

Reading:

  • A message whose status is not Actual is skipped. A Cancel is not in force: the alerts its references name, and its own identifier, end as cancelled (each with every colour suffix, so a message of several blocks is lifted whole). Any other message names the messages it updates in references (sender,identifier,sent triples, newest first); that is its replaces.
  • Each info block in force (its expires after the round) is a line. All blocks are in zh-TW; a message holds several when the warning has several tiers at once (the heat information’s orange and yellow towns), and each block is then cwa:<identifier>/<colour>, its colour from alert_color (or its position, /2, without one), with replaces naming the same colour of the messages it references.
  • event and native.event: the block’s event (強風). native: code the eventCode value of the profile:CAP-TWP:Event:1.0 scheme (strongWind); level the severity_level parameter (強風黃色燈號), else CAP severity; colour the tier’s colour (yellow, orange, red, purple, §3.7) or null; CAP severity, urgency, certainty and msgType; geocodes, every geocode as given, <valueName>:<value>.
  • sent the message’s sent; onset onset, else effective; expires expires.
  • texts: zh-TW, with headline, description, instruction and area (the areaDescs, ; -joined).
  • areas: each geocode as the tw-areas code (§9.5) it is drawn by. Taiwan_Geocode_103 names a special municipality by two digits (65 → 65000), any other county by its five, and a town by seven: a municipality’s district is its two digits, 0, the district’s two and 00 (6502600 → 65000260), another county’s town is the county’s five and the town’s two (1001304 → 10013040). Taiwan_Geocode_112, in typhoon warnings, is the eight-digit town code, a county’s ending 000 (10017000 → 10017). A geocode of another form is kept in native.geocodes and drawn by nothing. geometry is null: the messages carry no polygon.
  • url: the block’s web, the CWA’s page for the warning, else the warnings overview; sender: senderName (中央氣象署).

latest is the newest sent of any CAP file the bucket holds, in force or not.

The same messages reach the National Science and Technology Center for Disaster Reduction’s CAP feed (https://alerts.ncdr.nat.gov.tw/RssAtomFeed.ashx, which also carries other agencies’ alerts and earthquakes); the bucket is read because it is the issuing agency’s own.

Terms. Open Government Data License, Taiwan, version 1.0 (https://data.gov.tw/license), with the CWA named as the source. license OGDL-Taiwan-1.0, licenseUrl that page, attribution 中央氣象署 (Central Weather Administration, Taiwan) open data, url https://www.cwa.gov.tw/V8/C/P/Warning/FIFOWS.html.

11. Validation

The JSON Schemas of §5 and §6 are normative for shape: a file that does not match them is not an alerts file. tests/test_schemas.py holds the committed golden to them, and the shell’s validators are generated from them (web/src/schema/generated/). xuebuild/alerts/schema.py checks, as every file is written and read, what a schema cannot say: file names and the boundary sets’ climb, unique networks, categories, area codes and replaces, columns against the v1 layout, the rows sorted under their network with a category the index lists, four bounds or none to four decimals and not inverted, the spans in row order inside the network file, the ended[] rules of §7, a line’s network that of its id and a category of §2, its language tags, and closed four-decimal rings. tests/test_alerts.py holds two consecutive rounds built from the fetched fixture (tests/fixtures/alerts/alerts.202611010000/ and …0005/, the raw rounds, which stay flat under the raw root, with the boundary sets’ box files in alerts-areas/) to the committed golden (tests/fixtures/alerts/expected/), regenerated by tests/prepare_alerts_golden.py. The second round exercises every ended[] reason (an NWS Update for replaced), an NWS cancel, a stale JMA map carried over, a failed ECCC fetch carried over with an expiry, a failed MeteoAlarm country carried over beside two that arrived, a CMA message whose file did not arrive carried over beside an Update (replaced), an expiry and a code the boundary set lacks, and an HKO rainstorm raised from amber to red (gone), a cancel and an expiry; every index row’s span is checked against the network file it addresses. Admission is structural: a network, an event or a native field a reader has never seen is not an error; the categories are the index’s own list, the levels 1 … 5, the times ISO 8601 UTC, the geometry closed four-decimal rings. A reader validates the same shapes on read and rejects a schemaVersion above the one it implements.

Sizes on a calm day (2026-10-31 15:20 UTC): nws.jsonl 380 alerts, 578 KB (61 KB gzipped); jma.jsonl 46, 33 KB (3 KB); eccc.jsonl 5, 31 KB (10 KB); index.json 89 KB (11 KB). A stormy day is five to ten times that, mostly NWS text and polygons. MeteoAlarm on 2026-11-01 07:30 UTC: 221 warnings in force (1 222 unexpired messages, 1 001 of them green), meteoalarm.jsonl about 450 KB (35 KB gzipped) — every language kept — and 38 source entries in the index. CMA on 2026-11-12 02:35 UTC: 152 warnings in force, cma.jsonl 391 KB (49 KB gzipped), Chinese and English kept; the round’s raw directory holds the 903 KB SWIC listing and 624 KB of CAP files, all but the new ones copied from the cache.

12. The archive

A round is a snapshot that lives three hours. The archive is the record: every alert that was in force in some round of a UTC month, once, as the last version of it a round of that month published, with when it ended and why. It is a separate tree under the data root, written by the publisher (xue alerts-archive) and never pruned.

12.1 Layout

alerts/archive/catalog.json               the one mutable name: every month
alerts/archive/<YYYY>/<MM>/alerts.jsonl   the month's alerts, one per line, sorted by id
alerts/archive/<YYYY>/<MM>/index.json     every alert's row and byte span in that file
  • catalog.json is requested with Cache-Control: no-cache, as the pointer is (§1). Each entry names a month’s index by path (relative to the catalog), byteLength and crc32; the index names its .jsonl the same way. Every file but the catalog is requested as <path>?v=<crc32>.
  • A month is the UTC month of a round. An alert in force across the turn of a month is in both months’ files, each holding the version that month last published.
  • The month in progress is rewritten in place at most once an hour (the first round of each hour folds in the rounds before it), and its CRC32 changes with it; a month is final once the first hour of the next has been folded in. Nothing in the files records when they were built: the same records give the same bytes.

12.2 Records

A line of alerts.jsonl:

{"id": "nws:urn:oid:…", "network": "nws", "first": "2026-11-01T00:05:00Z",
 "ended": {"time": "2026-11-01T03:10:00Z", "reason": "replaced", "by": "nws:urn:oid:…"},
 "alert": { … }}
  • id and network are the alert’s (§4), repeated so a slice read by range identifies itself.
  • alert is the alert’s line (§6) as the month’s last round that listed it published it, byte for byte the same object: a later version under the same id replaces an earlier one.
  • first is the first round of the month whose snapshot listed the alert (its issued): for an alert carried in from the month before, the month’s first round.
  • ended is null while the alert was still in force at the month’s last round (or, for the month in progress, at the last round folded in); else time, the round whose ended[] (§7) listed it, reason, and by for replaced, as that entry gave them. An alert listed again after it ended (a network carried over again) is in force once more and its ended is null. An end found in the first round of a month is recorded in the month the alert was last in force.

12.3 Indexes

A month’s index.json:

{"archiveSchemaVersion": 1, "product": "alerts", "month": "2026-11",
 "alerts": {"path": "alerts.jsonl", "byteLength": 41234567, "crc32": "…"},
 "networks": ["eccc", "jma", "nws"],
 "columns": ["id", "network", "category", "level", "event", "first", "ended", "reason", "offset", "length"],
 "rows": [["nws:urn:oid:…", 2, "marine", 2, "Small Craft Advisory",
           "2026-11-01T00:05:00Z", "2026-11-01T03:10:00Z", "replaced", 0, 1450]]}

networks are the ids of the networks the month holds, sorted. A row is [id, network, category, level, event, first, ended, reason, offset, length]: network the position in networks, category, level and event the alert’s (§5), first the record’s, ended and reason its ended.time and ended.reason or two nulls, and offset and length the byte span of the record’s JSON object in alerts.jsonl, without the newline. Rows are sorted by id and unique and their spans tile the file in order.

columns (optional) names the columns of rows, and a reader finds a column by its name there. In archive v1 it is always the layout above, so a reader that indexes by position reads it too; month indexes written before it (every month up to 2026-11-05) do not carry it, and a reader takes their rows in the layout above.

catalog.json:

{"archiveSchemaVersion": 1, "product": "alerts",
 "months": [{"month": "2026-11", "path": "2026/11/index.json", "byteLength": 1234567, "crc32": "…", "alerts": 23456}]}

months are sorted and unique. A reader rejects an archiveSchemaVersion above the one it implements.

The shapes are normative in schemas/alerts-archive-catalog.schema.json, alerts-archive-index and, for a line of §12.2’s files, alerts-archive-line, whose alert is alerts-line; tests/test_schemas.py holds an archive it folds from the committed rounds to them. What they cannot say, the order, uniqueness and tiling above, a row’s network position and its two nulls together, columns against the v1 layout, and by for replaced alone, is each reader’s own check.

12.4 The producer

The rounds on the bucket last three hours, so the archive is fed by the publisher as it goes, from the state it keeps on its own disk:

  • After each round is published, xue alerts-archive --round <round> compares the round with the one before it (the live round the build measured ended[] against): every line that is new or whose bytes changed, and every ended[] entry, is appended to a journal in the publisher’s state directory. A round with no round before it in the same month journals every line.
  • When the journal holds a round of an earlier hour than the current one (or with --compact), it is folded into the month files under the state directory, in journal order: a line replaces the record’s alert and clears its ended, first stays the earliest, an end sets ended. The month file is merged as a stream, so the journal, not the month, bounds the memory it takes. The files that differ from what the published catalog names are listed in the report, each before the file naming it, the catalog last, and uploaded in that order (make upload-r2-alerts-archive); a failed upload is listed again by the next fold.
  • A month the state directory lacks but the published catalog names is pulled from the data origin first (CRC32 checked), so a new host or a lost disk continues the published record rather than restarting it. A catalog the origin cannot serve (other than not existing) stops the fold, and the journal waits for the next one.
  • Months before the previous one that the published catalog already holds as they are on disk are removed from the state directory.

What a reader cannot learn from the archive: the versions of an alert between the first and the last of a month (an NWS Update is a new id and so a new record; a change under the same id keeps only the last version), and anything that happened in a round the publisher missed.


Part of the Xue specification, licensed under CC BY 4.0.

15 - The nexrad product

In the viewer: the WSR-88D sites over the MRMS mosaic (/mrms?type=radar&radar=on), one site’s sweep with ?radar=<site>, and the Rolling Fork case /showcase/rolling-fork-2023.

A single weather radar sees what no mosaic shows: the wind along its own beams, and the reflectivity close to the antenna at a quarter of a kilometre. The US WSR-88D network publishes both for every site as Level 3 products, and nexrad carries two of them for every site — the lowest sweep’s reflectivity (n0b) and radial velocity (n0g) — as a rolling three-hour window of polar stores, one immutable store per product per five-minute round. Reflectivity mosaics stay the mrms source’s; velocity cannot be mosaicked at all, since each radar measures it along its own beams. This document is the normative description of the product, schema v1.

The shell’s live view does not read those stores: it reads the source’s own Level 3 objects straight out of the source bucket (§7), so nothing is built for a site nobody opens. The stores are what xue nexrad-build writes and what a showcase case keeps.

1. Delivery

Everything is a static file under the data root, beside the run pointers and the point products.

  • latest-nexrad.json is the one mutable object; fetch it with caching disabled. It names the newest round’s window manifest:

    {"schemaVersion": 1, "product": "nexrad", "issued": "2026-10-05T08:05:00Z",
     "path": "nexrad.202610050805/index.json", "byteLength": 61234, "crc32": "1c0ffee5"}

    The shape and the ?v=<crc32> rule are the point products’ pointer (tc.md §1); path is always nexrad.<round>/index.json.

  • nexrad.<YYYYMMDDHHMM>/ is one immutable directory per round: the UTC minute the round was built for, a multiple of five. It holds one polar store per product, n0b.zarr/ and n0g.zarr/, the round’s index.json (§4) and its STAC item.json. Nothing in it changes once the pointer has named it. Rounds are flat under the data root.

  • A round’s stores hold the sweeps that became available since the previous round (§3), not the whole window: a round is written once and never rebuilt, and the window is the list of rounds its manifest names. Rounds older than the window are pruned after the pointer has moved past them.

Deployment is one-sided: a new pointer and new directories, which a shell that does not know the product never requests.

A showcase case is a closed window, rebuilt never: it is written as one window store per product for the whole case instead of one round store per round, beside one window manifest: showcase/<id>/radar/n0b.zarr/, n0g.zarr/ and index.json. The rounds are the same rounds (§3), replayed over the case’s interval with a window as long as the case; only where their sweeps are stored differs (§4). A case has no pointer and no per-round directories or STAC items: the showcase catalog names its index.json.

2. Products, codes and geometry

productsourcequantityunitbeams × gatesquantizationreserved codes
n0bLevel 3 N0B (153)base reflectivity, lowest sweepdBZ720 × 1840linear, scale 0.5, offset −33.0, codes 2–255 (−32.0 … 94.5 dBZ)0 below threshold, 1 range folded
n0gLevel 3 N0G (154)base radial velocity, lowest sweepm/s720 × 1200linear, scale 0.5, offset −64.5, codes 2–255 (−63.5 … 63.0 m/s)0 below threshold, 1 range folded
  • The codes are the source’s own: the product’s data levels are copied byte for byte, so the codebook above is the source’s (value = −32.0 + 0.5 × (code − 2) for N0B, −63.5 + 0.5 × (code − 2) for N0G, written as code × scale + offset). A file whose threshold header describes any other codebook is refused rather than requantized.
  • Velocity sign: positive is motion away from the radar (signConvention: "positive_away"). The source’s velocity is already dealiased; range-folded gates keep code 1.
  • Geometry: beams every 0.5° from 0° (true north, clockwise), each source radial binned by its centre azimuth; gates every 0.25 km of slant range from the antenna, the first gate starting at 0. N0B therefore reaches 460 km and N0G 300 km.
  • scan_time is the sweep’s own start time from the product header. For a supplemental low-level sweep (SAILS / MESO-SAILS) it is that sweep’s start, not the volume’s, so every sweep of a site has a distinct time; it equals the time in the source object’s key.
  • elevation is the sweep’s elevation angle from the product header (nominally 0.5°).

3. Rounds

A round R (UTC, minute divisible by five) takes, per site and product, every source sweep with scan_time ≤ R that no earlier round of the window carries — the window manifest records each site’s newest sweep, and the next round starts after it. A sweep that arrives late therefore lands in the next round rather than being lost, and no sweep is in two rounds. n0b and n0g are assembled independently; a site may have a sweep in one product’s store and not yet in the other’s.

A round’s store lists only the sites with at least one sweep in it, in the order of the window’s site table (§4). A round in which no site has a new sweep for a product writes no store for it.

4. index.json, the window manifest

A round’s index.json is the window manifest: a read accelerator over the round stores, which are complete without it. It takes the place a point product’s index takes, so the pointer is the point products’ exactly.

{
  "schemaVersion": 1,
  "issued": "2026-10-05T08:05:00Z",
  "generated": "2026-10-05T08:06:41Z",
  "windowSeconds": 10800,
  "sites": [["TLX", "KTLX", 35.33306, -97.27750, 384.0], …],
  "rounds": [
    {"round": "2026-10-05T05:10:00Z", "path": "../nexrad.202610050510/",
     "n0b": {"group": {"byteLength": 2104, "crc32": "…"},
             "shard": {"byteLength": 52114096, "crc32": "…"},
             "chunks": [[0, 0, 604642, 2], [3, 604642, 598210, 1], …],
             "scans": [[0, [1791133536, 1791133692]], [3, [1791133701]], …]},
     "n0g": { … }},
    …
  ],
  "sources": [ … ]
}
  • sites is the window’s site table: [id, icao, latitude, longitude, height], the source’s three-letter id, the four-letter ICAO, the antenna’s WGS84 position and its height above mean sea level in metres. Every index below is a position in it.
  • rounds is oldest first, every round inside windowSeconds before issued. path is the directory holding the round’s stores, relative to this manifest: ../nexrad.<round>/ for a round store, ./ for a window store beside the manifest (a case, §1).
  • Per product: group measures the store’s root zarr.json (its ?v=), shard the data array’s one shard object (<product>/c/0/0/0/0), and chunks gives one [site, offset, length, sweeps] per site the store holds, in store order: the byte span of that site’s inner chunk in the shard and how many of its scan slots are real sweeps. A reader fetches [offset, offset + length) of the shard directly, without the shard index, decompresses it to depth × 720 × gates bytes and keeps the first sweeps slots. depth is the store’s inner chunk depth: in a round store the largest sweeps of the round’s rows; in a window store the product block says it as "depth": 3, the same in every round, since the store’s chunk is padded to its busiest site’s busiest round. In a window store every round’s group and shard measure the same two objects, and a round’s chunks are spans in that one shard.
  • scans gives, per site in the store, the sweeps’ start times (Unix seconds UTC, ascending) — the store’s scan_time row without its padding, so a player builds a site’s timeline from the manifest alone. It is per product, since the two products of a round are assembled independently (§3).
  • A product with no store in a round (no site had a new sweep) is absent from that round’s entry.
  • sources is the point products’ sources[] (tc.md §1): one entry per source with ok, error where not ok, and reports (sweeps read).

Reading one site’s window: the pointer, the manifest, then one range per round per product — 37 requests for three hours of one product at a five-minute cadence, about 7 MB of n0b for a typical site.

5. Sources

unidata-nexrad-level3 (AWS Open Data, us-east-1, maintained by Unidata), keys <SITE>_<PRODUCT>_<YYYY>_<MM>_<DD>_<HH>_<MM>_<SS>: the source id unidata-n0b / unidata-n0g. Only the WSR-88D sites are read: the terminal Doppler radars share the bucket under airport codes and never publish N0B or N0G. Sites and positions come from the NCEI station list (nexrad-stations.txt, station type NEXRAD); the product header’s own position is used where the list has none.

Terms: NOAA data disseminated through the NOAA Open Data Dissemination program, open to the public with attribution requested and no endorsement implied (https://registry.opendata.aws/noaa-nexrad/). Attribution: “NOAA / NWS NEXRAD Level III via Unidata”.

6. Validation

The builder validates every store against the polar store rules and every manifest against §4 as it writes them; a reader validates the same shapes on read, refuses a schemaVersion or xue_polar version above the one it implements, and treats an unknown site id or source id as data, not an error.

7. The live view

The shell’s live single-site view reads the source (§5) directly; no pointer, round or store is published for it.

  • Sites. The marks are a static table in the shell, web/src/products/radar/sites.json: the window manifest’s site rows (§4) for every station in NCEI’s table that published N0B on the day before xue nexrad-sites wrote it. Rerun it when the network changes. They are offered only while the field on screen is the reflectivity cref; a case’s radar stays on whatever field is up.
  • Timeline. An open site lists <SITE>_<PRODUCT>_<YYYY_MM_DD_HH> for every UTC hour of the newest three hours — the current hour first, the rest together — then once a minute from its newest key on (start-after); its newest sweep is read before any other, then the rest outward from the playhead; a hidden page skips the minute and catches up when shown. A sweep’s time is its key’s (§2); a sweep older than three hours leaves the timeline. Only the product shown is listed.
  • Sweeps. Each sweep is one object read whole and decoded by the WASM decodeLevel3, a port of the builder’s reader (level3.py) held to it by a pinned digest of the fixture’s sweeps (tests/fixtures/nexrad/expected/level3.json). It yields the same codes on the same beam grid a polar store holds, so §2 applies unchanged.
  • Cross-origin. The bucket answers objects, listings and Range preflights with Access-Control-Allow-Origin: *. Should it stop, the bucket URL in web/src/products/radar/live.ts is the one place a pass-through proxy would go.

Part of the Xue specification, licensed under CC BY 4.0.

16 - The fire product

In the viewer: the last day’s detections over the map with ?stations=fire (/gfs?stations=fire), and a case’s own fire round in /showcase/arxan-fire-2026.

An active fire is a point: a satellite pixel hotter than its surroundings, with a position, a time and a radiative power. A day of the world’s fires is about 180 000 such points from the polar orbiters — a few megabytes, not a raster — so active fires are a point product published beside the runs and the station products (docs/synop.md). The detections are NASA FIRMS’s near-real-time VIIRS and MODIS products, aggregated every hour by xue fire-build (xuebuild/fire/) into a seven-day window and taken live by the same pointer → immutable directory contract the other point products use. Xue retrieves nothing itself: no fire detection, no FRP, no re-gridding. This document is the normative description of that product, schema v1.

1. Delivery

Everything is a static file under the data root, beside the run pointers and the other point products’ pointers.

  • latest-fire.json is the one mutable object. Fetch it with caching disabled. It names the newest round’s directory and the index inside it:

    {"schemaVersion": 1, "product": "fire", "issued": "2026-10-12T05:00:00Z",
     "path": "fire.202610120500/index.json", "byteLength": 61234, "crc32": "1c0ffee5"}

    path is relative to the pointer and always fire.<round>/index.json; byteLength and crc32 (zlib CRC32 of the file’s bytes, eight lowercase hex digits) are the index’s, so it can be requested as <path>?v=<crc32> through an immutable cache.

  • fire.<YYYYMMDDHHMM>/ is one immutable directory per round: the UTC hour the product was aggregated at, so the minute is always 00. It holds index.json (§4), one <sensor>.jsonl per sensor (§5) and item.json, the round’s STAC Item (docs/stac.md §“Point products”). Nothing in it changes once the pointer names it. The rounds sit flat under the root: each carries the whole window and lives six hours (make prune-r2-fire, FIRE_KEEP=6).

  • Paths inside index.json are file names beside it; request each as <name>?v=<crc32> with the CRC the index carries.

Two ways to read a sensor:

  • A time span. The index’s hours[] rows (§4) are sorted by sensor, then hour, and each ends in the byte offset and length of that sensor-hour’s line. The rows of one sensor address consecutive lines, so any span of hours of one sensor is one request: GET fire.<round>/<sensor>.jsonl?v=<crc32> with Range: bytes=<first offset>-<last offset + last length - 1>. The bytes are the lines of that span, separated by \n and without the last one.
  • A whole sensor. Fetch <sensor>.jsonl and read it line by line: one UTC hour per line, oldest first.

The publisher builds every hour (publish-fire.yml). FIRMS refreshes its files as granules arrive, about three hours after the overpass, so every round fetches only the last-24-hour files and merges them into the previous round’s window (§5). A source that fails is recorded (§6) and its sensors keep their history; the round publishes with the rest. The pointer is withheld only when no source answered, in which case the previous round stays live. A round the pointer already names is finished; the workflow’s force input is the manual rebuild.

Deployment is one-sided: the product is new files under a new pointer, so a shell that does not know it never asks for it. A new sensor is a new entry and a new file, which a v1 reader admits (§7); a schemaVersion bump follows the runs’ rule (ship the shell first).

2. Detections

Every sensor is converted to one set of per-detection fields:

keyquantityencodingrange
tacquisition timeseconds after the line’s hour, a multiple of 600 … 3540
latpixel centre latitudeinteger, 1e-4 degrees−900000 … 900000
lonpixel centre longitudeinteger, 1e-4 degrees−1800000 … 1800000
frpfire radiative powerinteger, 0.1 MW≥ 0
btbrightness temperature of the fire channel (VIIRS I4 3.74 µm, MODIS band 21/22 3.96 µm)integer, 0.1 K2000 … 6000
confdetection confidenceone character: l low, n nominal, h high
dnday or night overpassone character: D or N
  • VIIRS confidence is FIRMS’s own class. MODIS confidence is FIRMS’s 0–100 percentage, classed as FIRMS’s documentation does: below 30 l, 30–79 n, 80 and above h.
  • The acquisition time is FIRMS’s acq_date + acq_time (UTC, to the minute), the start of the granule, not the pixel’s own time.
  • A row whose position, time or day/night flag does not parse, or whose value falls outside the ranges above, is dropped and counted (§6, rejected). An frp or bt that is missing in the CSV drops the row.
  • Times in the index are ISO 8601 UTC with a Z suffix; times in the sensor files are epoch seconds, UTC.

The files are written compactly with ASCII escaping, and a file’s identity is its bytes: the CRC32 in the index, and the pointer’s, is of the file exactly as served. Given the same inputs a round is byte-identical; only the index’s generated and the sources’ fetched depend on when the build ran.

3. Sensors

A sensor is one instrument on one platform. The id is lowercase, ^[a-z][a-z0-9]*(-[a-z0-9]+)*$. v1 publishes five, in this order:

idnameFIRMS filesatellite columnresolution
viirs-snppVIIRS S-NPPsuomi-npp-viirs-c2/csv/SUOMI_VIIRS_C2_Global_24h.csvN375 m
viirs-noaa20VIIRS NOAA-20noaa-20-viirs-c2/csv/J1_VIIRS_C2_Global_24h.csvN20375 m
viirs-noaa21VIIRS NOAA-21noaa-21-viirs-c2/csv/J2_VIIRS_C2_Global_24h.csvN21375 m
modis-terraMODIS Terramodis-c6.1/csv/MODIS_C6_1_Global_24h.csvT1000 m
modis-aquaMODIS Aquathe same fileA1000 m

All files are under https://firms.modaps.eosdis.nasa.gov/data/active_fire/ and need no key. The VIIRS columns are latitude,longitude,bright_ti4,scan,track,acq_date,acq_time,satellite,confidence,version,bright_ti5,frp,daynight; MODIS names the fire channel brightness and the background bright_t31, and gives confidence as a number. A row whose satellite is not the sensor’s is dropped and counted. A sensor with no detection in the window is not listed.

4. index.json

The shape — every field, its type and range — is schemas/fire-index.schema.json; the pointer’s is schemas/pointer.schema.json. This section says what the fields mean and the rules across them.

{
  "schemaVersion": 1,
  "issued": "2026-10-12T05:00:00Z",
  "generated": "2026-10-12T05:23:40Z",
  "window": {"start": "2026-10-05T05:00:00Z", "end": "2026-10-12T05:00:00Z"},
  "sensors": [
    {"id": "viirs-noaa20", "name": "VIIRS NOAA-20", "resolution": 375,
     "attribution": "NASA FIRMS (LANCE NRT), VIIRS 375 m C2",
     "license": "NASA-open-data", "url": "https://firms.modaps.eosdis.nasa.gov/",
     "latest": "2026-10-12T02:24:00Z", "count": 381204,
     "file": {"path": "viirs-noaa20.jsonl", "byteLength": 8913420, "crc32": "3b0b746f"}}
  ],
  "hours": [
    [0, "2026-10-05T05:00:00Z", 1834, 412.6, 0, 41377]
  ],
  "sources": [ … ]
}
  • issued is the round, generated when the build ran.

  • window is the span the files hold: start is seven days before issued (longer for a showcase case’s round, built to hold its whole event; readers take the window as written). A detection is kept when its acquisition time is at or after start; nothing later is cut, so a granule acquired before the build ran but after the round’s hour is published.

  • sensors[] is one entry per sensor with a detection in the window, in §3’s order: its id, display name and nominal resolution in metres; the attribution a display must show, the license the data is reused under and the product url; latest, the newest acquisition time in the file; count, its number of detections; and file, the sensor file’s name (always <id>.jsonl), length and CRC32.

  • hours[] is one row per sensor-hour that has a detection, sorted by sensor (its position in sensors[]), then hour:

    012345
    sensorhourcountfrpMaxoffsetlength

    sensor is the index into sensors[]; hour the UTC hour the line covers; count its detections; frpMax the largest FRP among them in MW, to a tenth; offset and length the byte span of the line in the sensor’s file, the JSON object alone. The spans of one sensor are in row order, consecutive (each starts one byte — the newline — after the previous ends), and lie inside the file’s byteLength.

  • sources[] is §6.

The index is a few tens of kilobytes: enough for a reader to pick the hours it wants and draw a per-hour activity strip without touching the detections.

5. <sensor>.jsonl

Each line’s shape is schemas/fire-line.schema.json. One line per UTC hour with at least one detection, oldest first, each the compact JSON object below followed by \n:

{"sensor": "viirs-noaa20", "hour": 1791090000, "n": 3,
 "t": [1440, 1440, 1500], "lat": [480123, 480131, 471002], "lon": [1191250, 1191262, 1203310],
 "frp": [52, 118, 9], "bt": [3401, 3672, 3104], "conf": "nhl", "dn": "DDD"}
  • hour is epoch seconds of the hour, n the number of detections; every array and both strings are n long, one position per detection.
  • Detections are sorted by (t, lat, lon), and unique on that key.
  • A line repeats sensor and hour so a slice read by range identifies itself.

A sensor’s window is a merge, not a snapshot. Each round lays the newest 24-hour file’s detections over the previous round’s file, keyed by (sensor, acquisition time, lat, lon) in the integer encoding of §2, the new one replacing the old whole — FIRMS revising a detection is believed — and drops what is before the window’s start. The previous round’s file is read only when its CRC32 matches the previous index; a mismatch starts that sensor’s window from the new file alone.

6. sources[]

One entry per FIRMS file, in §3’s order:

{"id": "firms-noaa-20-viirs-c2", "ok": true, "fetched": "2026-10-12T05:23:12Z",
 "url": "https://firms.modaps.eosdis.nasa.gov/data/active_fire/noaa-20-viirs-c2/csv/J1_VIIRS_C2_Global_24h.csv",
 "reports": 54730, "rejected": 0}
{"id": "firms-modis-c6-1", "ok": false, "fetched": "2026-10-12T05:23:12Z", "error": "request failed for …: HTTP Error 503"}

A source’s id is firms- and FIRMS’s directory name with any dot spelt as a hyphen (modis-c6.1 → firms-modis-c6-1), since a source id is ^[a-z][a-z0-9-]*$. ok: false always carries error. reports is the rows read, rejected the rows dropped by §2 and §3.

7. Validation

The JSON Schemas of §4 and §5 are normative for shape: a file that does not match them is not a fire file. tests/test_schemas.py holds the committed golden (tests/fixtures/fire/expected/, two consecutive rounds built from the fetched fixture tests/fixtures/fire/fire.202610120400/ and …0500/ by tests/prepare_fire_golden.py) to them, and the shell’s validators are generated from them (web/src/schema/generated/). xuebuild/fire/schema.py checks, as every file is written and read, what a schema cannot say: each sensor file is <id>.jsonl and listed once; the hours[] rows are sorted by sensor then hour, lie in the window, and each sensor’s spans are consecutive and end exactly at its file’s byteLength; each sensor’s count is the sum of its rows’; every column of a line is n long and its detections sorted and unique on (t, lat, lon); and tests/test_fire.py checks every span against the sensor file it addresses. Admission is structural: a sensor a reader has never seen is not an error. A reader validates the same on read and rejects a schemaVersion above the one it implements.

8. Terms

FIRMS data are NASA Earth science data, free to use and redistribute without restriction (NASA Earth Science Data and Information Policy). NASA asks for the acknowledgement: “We acknowledge the use of data and imagery from LANCE FIRMS operated by NASA’s Earth Science Data and Information System (ESDIS) with funding provided by NASA Headquarters.” The attribution string carries the short form, which a display shows with the data; the STAC Collection carries the full acknowledgement. Near-real-time detections are not the science-quality archive and are not replaced by it here.


Part of the Xue specification, licensed under CC BY 4.0.

17 - Geostationary satellite imagery

In the viewer: /himawari, /himawarijp, /goeseast, /goeswest and /meteosat; a composite through ?type=, e.g. /himawari?type=dustrgb.

How a geostationary imager’s channels become Xue bundles: the himawari, goeseast, goeswest and meteosat sources, the himawarijp box over Japan, their Dust RGB and true colour composites and dust confidences, and the seams a further satellite, a second channel and another composite product go through. The bundle format is unchanged (bundle.md); what this document fixes is the fetch stage, xuebuild/satellite/, and the metadata a satellite variable carries.

Shape

A satellite source is a series_file observation source, the shape of the JMA nowcast and the CMA mosaic: the fetch stage writes one NetCDF series per window on a regular latitude/longitude grid, and the converter downstream — cropping, quantization, temporal grouping, the container, the Zarr store, the manifest — is the observation path unchanged in both encoders. What the fetch stage does is:

  1. list the scan’s files on the agency’s public bucket or data store (a slot: one scan of one channel);
  2. fetch them when the slot is complete (every tile has landed);
  3. open them as one GDAL dataset on the geostationary projection;
  4. warp that dataset onto the published grid, once, into a cached frame;
  5. run each producer on the slot’s warped channels, once, into cached frames of its own;
  6. stack the window’s frames into one series per variable.

The geostationary projection is implemented once, in GDAL, on the fetch side. Neither encoder learns the sweep angle or the ellipsoid; the native encoder reads the series the Python stage wrote, and tests/test_native.py holds the two byte-identical from there.

The platform registry

xuebuild/satellite/platforms.py is one row per spacecraft at an orbital slot:

FieldHimawari-9GOES-19GOES-18Meteosat-12Meteosat-9
role (the source id)himawarigoeseastgoeswestmeteosatmeteosatiodc
spacecraftHimawari-9GOES-19GOES-18Meteosat-12 (MTG-I1)Meteosat-9 (MSG2)
satellite_number (WMO C-5)1742732727156
instrument / instrument_type (WMO C-8)AHI / 297ABI / 617ABI / 617FCI / 210SEVIRI / 207
sub_longitude140.7−75.2−137.00.045.5
sweep_axisyxxyy
channelsthe sixteen AHI bandsthe sixteen ABI channelsthe sixteen ABI channelsthe sixteen FCI channelsthe twelve SEVIRI channels
readerisatsscmipfcmipffciseviri (none)
bucket / prefixnoaa-himawari9 / AHI-L2-FLDK-ISatSSnoaa-goes19 / ABI-L2-CMIPFnoaa-goes18 / ABI-L2-CMIPFapi.eumetsat.int / EO:EUM:DAT:0662api.eumetsat.int / EO:EUM:DAT:MSG:HRSEVIRI-IODC
tile_count8811401
cadence_seconds (the scans')600600600600900
region (west … east)80.7 … 200.7−135.2 … −15.2163 … 283−60 … 60−14.5 … 105.5

A source is named by the orbital role, never by the spacecraft: the pointer (latest-himawari.json, latest-goeseast.json, latest-meteosat.json), the run directories (himawari.<run>/) and the manifest model (HIMAWARI, GOES-EAST, GOES-WEST, METEOSAT) outlive a handover. When Himawari-10 takes the slot, or GOES-19 hands East to its successor, the platform row changes (spacecraft, satellite_number, bucket) and nothing published does; the spacecraft is in each file, as the band block below. The reference_channel (ir104, which every imager here has) is the one a listing walks to find a bucket’s slots. bucket and prefix name where the files are in the terms of the reader: a public bucket and a key prefix, or a data store’s host and a collection id. Meteosat-9 at 45.5°E (the Indian Ocean service) is a row and nothing more: its SEVIRI Level 1.5 native file has no reader yet (GDAL’s MSGN driver gives radiances and the brightness temperatures would be a Planck fit per channel, as for FCI below), and no source names it.

Platform.region is 60° either side of the sub-satellite longitude and ±60° of latitude. A disk that crosses the antimeridian is spelled with the west edge inside −180 … 180 and the east edge past 180 — Himawari’s 80.7 … 200.7, GOES-West’s 163 … 283 — the one shape the encoders’ crop_grid and the shell’s viewport arithmetic take; GOES-East stays on negative longitudes like the regional radar grids; Meteosat’s −60 … 60 sits on the prime meridian. The four sources publish the same core variables (ir104, ir039 and dustrgb; the ABI composite takes the Quick Guide’s stretches, FCI has no 11.2 µm window and its green gun reads the 10.5 µm one) and the true colour composite, the three NOAA-hosted ones the dust confidences besides, and every seam below is shared: what differs between them is the platform row and the reader — and, for Meteosat, the cadence the source publishes at, which the data policy sets (§“Rounds”).

A channel is a bundle. Its id is the nominal wavelength, instrument-neutral: ir104 is AHI band 13 and ABI channel 13 alike, an infrared window at 10.4 µm; the exact central wave number is in the band block. The registry carries every channel the instrument has; sources.py says which a source publishes (bundle_scalar_ids) and carries their band blocks (bands, from Platform.bands). The three NOAA-hosted sources fetch six infrared windows and the solar bands (four on AHI, three on ABI) and publish ir104, ir039, the Dust RGB, the dust confidences and the true colour; Meteosat fetches four windows and the four solar channels and publishes ir104, ir039, the Dust RGB and the true colour (§“The dust confidences” says why not the confidences).

idwavelengthAHIABIFCIquantitycodebook
ir10410.4 µm (FCI 10.5)131314 (IR 10.5)brightness temperature, K (the shell reads it in °C)180–331.8 at 0.6
ir086, ir112, ir1238.6, 11.2, 12.3 µm (FCI 8.7, —, 12.3)11, 14, 1511, 14, 1512, —, 15brightness temperature; fetched for the Dust RGB (and, but for 11.2 µm, for the dust confidence), registered variables, not published by any source180–331.8 at 0.6
ir0393.9 µm (FCI 3.8)779brightness temperature, published to show fires (§“The 3.9 µm window”); also read by the dust confidence’s cloud mask and the true colour’s night side180–407.7 at 0.9
wv0626.2 µm (FCI 6.3)8810brightness temperature; fetched for the dust confidence’s cloud mask, a registered variable, not published by any source180–331.8 at 0.6
vis047, vis051, vis064, nir0860.47, 0.51, 0.64, 0.86 µm (FCI 0.44, 0.51, 0.64, 0.87)1, 2, 3, 41, —, 2, 31, 2, 3, 4top-of-atmosphere reflectance factor, 0–1 (the product’s, not yet divided by the cosine of the solar zenith); fetched for the true colour composite, registered variables (GRIB2 3/0/1, the satellite-image albedo, with the band block), not published by any source−0.01–1.255 at 0.005
ir096, ir1339.6, 13.3 µm12, 1612, 1613, 16brightness temperatureregistered on the platform; not yet a variable
wv069, wv0736.9, 7.3 µm9, 109, 10—, 11brightness temperaturesame
nir161, nir226, …1.61, 2.26 µm5, 65, 67, 8reflectancesame

An FCI channel takes the id of the window it is nearest to (IR 10.5 is ir104, IR 8.7 ir086; the exact wave number is in the band block, and the shell classifies by it), so the Dust RGB’s inputs keep their ids across the three imagers.

Adding a channel is: a VariableSpec in variables.py and its entry in the registry document (parameter block, codebook, label), the id in the source’s input_variable_ids and bundle_scalar_ids, the regenerated registry snapshots (xue registry --output rust/xue/registry.json --shell web/src/data/registry.ts), and a row of the shell’s variable table with a palette. Nothing in the fetch stage, the converter or the format changes: the fetch warps every channel a source lists, and the ingest reads one series file per variable. A channel is warped by its kind (fetch.resampling_for): a brightness temperature bilinearly, a reflectance — delivered at 0.5 or 1 km, four to eight times finer than the grid — as the block mean, so a cloud edge is the mean the eye sees from orbit and not a speckle of the four source pixels a bilinear sample would pick out of sixty-four. The frame’s record says which.

The 3.9 µm window

ir039 is published to show where it burns. A fire is a few hundred metres across and lifts one 2 km pixel tens of kelvin above its neighbours, up to AHI band 7’s saturation near 400 K; three choices keep that pixel in the bundle:

  • Its own codebook, 180–407.7 K at 0.9 K (compact: to 406.8 K at 1.8 K), where the other windows stop at 331.8 K. Linear like theirs, so no reader learns a new codebook type; a hot spot is tens of kelvin, and the coarser step costs it nothing.
  • A peak frame. The published series is warped with GDAL’s max (fetch.PEAK_RESAMPLING) — the warmest source pixel under each 0.04° cell — instead of the bilinear sample, which spreads a 2 km hot spot over four cells and loses most of its contrast. The composites read the channel as a radiance field and keep the bilinear frame: a source that publishes ir039 (fetch.PEAK_CHANNEL_IDS ∩ bundle_scalar_ids) warps the slot’s downloaded tiles twice and caches the second frame beside the first as the variable ir039peak, and only the series is stacked from it. The composites’ inputs, and so their bytes, are what they were.
  • A peak-keeping ladder. The reduced tiers keep, at each decimated site, the largest code within factor / 2 rows and columns of it (ladder.decimate_peak_codes, mirrored in ladder.rs), not the site’s own: a one-cell hot spot lies on a kept row and column one time in four at the half. The windows overlap by a row and a column, so every cell reaches a site and a peak moves at most half a reduced cell. The other variables keep the plain decimation.

Which pixel is a fire is the shell’s decision, not the encoder’s: it has ir039 and ir104 on one grid and compares them per cell.

The Dust RGB

dustrgb is the classic Dust RGB (Lensky and Rosenfeld 2008, as EUMeTrain’s recipe compilation and the GOES-R Quick Guide fix it): three stretches of the infrared windows, no ancillary data, no cloud mask — lofted mineral dust reads pink to magenta over dark blue-green surfaces, day and night; thick ice cloud dark red, thin cirrus near black, mid-level cloud ochre.

gunrecipestretch (AHI and FCI: the SEVIRI set)stretch (ABI: the Quick Guide’s)
dustrBT 12.3 − BT 10.4 µm−4 … +2 K, γ 1−6.7 … +2.6 K
dustgBT 11.2 − BT 8.6 µm (FCI: BT 10.5 − BT 8.7, the imager has no 11.2 µm window; the original SEVIRI IR10.8 − IR8.7)0 … +15 K, γ 2.5−0.5 … +20 K, γ 2.5
dustbBT 10.4 µm261 … 289 K, γ 1261.2 … 288.7 K

Which channels a platform feeds the recipe is Producer.inputs_for (DustRGBProducer: the four windows, or three where 11.2 µm is missing and 10.4 µm stands in for it); bundle_input_ids asks it for the source’s platform, so a --bundles dustrgb build and the workflow fetch what that imager has.

Each gun is a number in 0–1 and the three are one bundle, variables 1, 2 and 3 in that order (bundles.COMPOSITE_BUNDLES, SourceSpec.bundle_composite_ids). A composite has no GRIB2 parameter: each gun takes a local-use one — discipline 3 (space products), category 192, parameter number 1, 2 or 3, on surface 8 — that means nothing without the producer block beside it, {"id": "shachen", "version": …}. The id is registered on the variable (VariableSpec.producer_id, in the registry document); the version is whatever ran, stamped on the series by the fetch stage and copied into the metadata by whichever encoder converts, so a shachen upgrade changes the files it produces and no registry.

The codebook is one for every profile: linear, offset −0.004, step 0.004, codes 0–251, so code 1 is 0.0, code 251 is 1.0 and code 0 — one step below zero — is “no data”: a cell the disk does not cover, or one an input channel lacked, is code 0 in all three guns at once, and black (0, 0, 0) stays a value at code 1. The shell paints nothing where any gun is code 0 and otherwise shows the three guns straight as the pixel’s colour; there is no palette. The composite has no poster; it has the reduced-resolution variants and the Zarr store (three arrays) like a vector bundle. A satellite source publishes two rungs where most sources publish one (SourceSpec.variant_factors (2, 4)): .half and .quarter (1500 and 750 cells a side, tiles 32 and 16), each decimated from the full plane — every f-th row and column from the origin, the poster’s own sampling — because the half of a 3000 × 3000 disk is still twice a full GFS plane and a shell with a frame budget needs a rung it can hold. There is no .eighth: it was a quarter of a disk’s objects on the bucket, and the trade is that the coarsest zoom (and a constrained connection) now downloads the quarter, four times the bytes of the eighth. The shell reads whichever tiers a manifest lists, so a window published with an eighth plays to the end of its life.

The true colour

truecolor is one picture by day and by night: the visible picture — the 0.64, 0.51 and 0.47 µm reflectances of a slot as red, green and blue — where the sun is up, white cloud from two infrared windows over a dark ground where it is down, blended across the terminator. It is this pipeline’s own recipe (TrueColorProducer, no package behind it), in a fixed order that the tests hold step by step:

  1. every input reflectance clipped at 0 from below (the products carry small negative values in the dark);
  2. the cosine of the solar zenith on every cell at the slot’s start (pyorbital, on the grid’s own coordinates), and the zenith θ from it;
  3. each reflectance divided by max(cos θ, cos 85°) — the products are the reflectance factor, not yet normalised for the sun, and the floor keeps the last degrees of a day from amplifying noise; 3a. the molecular sky taken out of each reflectance at its band’s own wavelength λ (rayleigh_corrected): (ρ − ρ_R) / T, with the single scattering path reflectance over a black surface, lifted for the light scattered more than once, ρ_R = 0.75 (1 + cos² Θ) / (4 (μs + μv)) × (1 − exp(−τ m)) × (1 + 0.25 τ m), the air mass m = 1/μs + 1/μv, the optical depth τ = f × 0.008569 λ⁻⁴ (1 + 0.0113 λ⁻² + 0.00013 λ⁻⁴) (Hansen and Travis 1974; 0.19 at 0.47 µm, 0.05 at 0.64 µm) times the share f of the column above the cell (rayleigh_column_fraction): 1 up to a sun-normalised 0.64 µm reflectance of 0.2, 0 from 1.0, linear between, since a cloud top hides the air beneath it (pyspectral’s red-band reduction). The attenuated form saturates where the slant path is optically thick; the thin limit τ P / (4 μs μv) takes out several times the sky near the terminator and the limb and strips cloud of its blue, and single scattering alone leaves a blue haze; the lift of 0.25 keeps the sea navy and the cloud white to the limb. The scattering angle is cos Θ = −μs μv − sin θs sin θv cos(φs − φv) from the sun and the satellite as seen from the cell (pyorbital; the satellite over the platform’s sub-satellite longitude at 35 786 km), and the two-way transmittance is T = exp(−τ m / 2), both cosines floored at 85°; faded out linearly between 70° and 88° of the larger of the two zeniths, where single scattering overestimates the sky and the picture falls back to the uncorrected reflectance;
  4. the green: 0.93 × 0.51 µm + 0.07 × 0.86 µm on an imager with a green band (AHI, FCI; the hybrid green that lifts vegetation to the colour the eye expects, Miller et al. 2016), or 0.45 × 0.47 µm + 0.45 × 0.64 µm + 0.10 × 0.86 µm on the ABI, which has no green band (the CIMSS blend);
  5. the day guns: red, green and blue through one brightness curve — reflectance 0–1.1 spread over 0–255, knots 0, 30, 60, 120, 190, 255 to 0, 110, 160, 210, 240, 255, linear between, NASA Worldview’s corrected-reflectance stretch — clamped to 0–1;
  6. the night guns: ground + (1 − ground) × w on each, with the ground (0.03, 0.035, 0.05) and the cloud whiteness w = max(w_ir, w_low): w_ir = clip((280 K − T₁₀.₄) / 60 K, 0, 1)^0.75 and w_low = 0.7 × clip((T₁₀.₄ − T₃.₉ − 2 K) / 5 K, 0, 1);
  7. a × day + (1 − a) × night, with the day weight a = clip((90° − θ) / 10°, 0, 1) — 1 to a zenith of 80°, 0 from 90°, linear between — clamped to 0–1;
  8. no data in all three guns wherever a side that carries weight lacked an input: a reflectance where a > 0, the 10.4 or 3.9 µm window where a < 1.
gunday, AHI and FCIday, ABInight
truer0.64 µm0.64 µm0.03 + 0.97 w
trueg0.93 × 0.51 µm + 0.07 × 0.86 µm0.45 × 0.47 µm + 0.45 × 0.64 µm + 0.10 × 0.86 µm0.035 + 0.965 w
trueb0.47 µm0.47 µm0.05 + 0.95 w

The night constants are named in producers.py and are one set for every imager, so the disks of the geo mosaic meet without a seam after dark (AHI, ABI and FCI read their own 10.4/10.3/10.5 and 3.9/3.9/3.8 µm channels under the family ids ir104 and ir039); only the day side’s green differs by imager:

constantvaluewhy
TRUE_COLOR_TERMINATOR_DEG80°, 90°the day picture alone to 80°, the night alone once the sun is down; about the span GeoColor fades its layers over
TRUE_COLOR_NIGHT_GROUND0.03, 0.035, 0.05near black with a faint cool cast: a clear night reads as night, not as missing data (code 0), and cloud stands out on it
TRUE_COLOR_CLOUD_TEMPERATURE_K280 K → 0, 220 K → 1warmer than 280 K is the ground or the warmest low cloud, colder than 220 K a deep or high top; about the range of GeoColor’s night-side infrared cloud
TRUE_COLOR_CLOUD_EXPONENT0.75below 1, so mid-level cloud is already light grey and high cloud white rather than a flat linear grey
TRUE_COLOR_LOW_CLOUD_DIFFERENCE_K2 K → 0, 7 K → 1small droplets emit poorly at 3.9 µm, so fog and stratus, as warm as the ground and invisible at 10.4 µm alone, read several kelvin colder there; clear sea and vegetated land stay under 2 K (the fog products’ threshold)
TRUE_COLOR_LOW_CLOUD_WHITE0.7low cloud a softer grey than high cloud, so the two stay apart as on GeoColor’s night side

The missing-input rule follows the weight: on the full day side (a = 1) a missing infrared window costs nothing and the day picture stays; on the full night side (a = 0) the reflectances are not read; in the terminator band both sides’ inputs must be there. Outside the disk every input is missing, so code 0 there as before.

The Rayleigh correction is what makes the ground readable. Under a morning sun near backscatter the sky’s own path reflectance at 0.47 µm is 0.15–0.18, most of what a forest or the sea returns at the top of the atmosphere; left in, every surface sits under the same blue-grey veil and a city barely parts from the fields around it. Taken out, sea and vegetation sit at a few per cent and a city at ten to fifteen, which is why the brightness curve has a steep foot (a cloud-oriented curve such as CIRA’s leaves that range near black). The correction is analytic, not a lookup table, so no package or downloaded table stands behind the recipe; inside the fade it is within a few thousandths of reflectance of the tabulated corrections, below what the curve resolves. Aerosol is not corrected: a hazy day stays hazy. The night side reads the infrared alone, so it has known failures it does not try to fix: a cold clear surface (a winter continent, the ice sheets near the disk’s edge) is colder than 280 K and reads as thin grey cloud; a desert at night, whose quartz emits poorly at 3.9 µm, can show a 10.4 − 3.9 µm difference of several kelvin and a grey low-cloud veil; and the 3.9 µm window’s noise over very cold tops is hidden by the infrared ramp, which is already white there. Which channels a platform feeds the recipe is TrueColorProducer.inputs_for (the four solar bands, or three without the 0.51 µm one, then ir039 and ir104), mirrored by convert.rs::composite_input_ids the way the Dust RGB’s missing 11.2 µm window is.

The guns are the Dust RGB’s shape: three variables of one composite bundle, local-use parameters 3 / 192 / 7, 8, 9 on surface 8, the guns’ codebook (code 0 no data, 0.0 at code 1, 1.0 at code 251), no poster, the three-rung ladder. The producer block beside each is {"id": "xue", "version": "5"}: the id names this pipeline, and the version is the recipe’s (producers.TRUE_COLOR_VERSION), bumped when a constant above changes and never with the package, since a cached slot is recomposed when the version it was composed under differs. Numbers 10, 11 and 12 under xue are left unused: earlier windows carried a night microphysics composite (nightmicro) there, which readers now treat as an unknown bundle.

What it costs: the solar bands are the big ones. An AHI slot’s 0.5 km red band is 390 MB of tiles by day and 230 at night, the three 1 km bands 100 MB each; an ABI slot’s 0.5 km red file is 430 MB by day and 200 at night, the two 1 km ones 100 MB. A Himawari round therefore downloads some 700 MB of tiles against the windows’ 140, a GOES round some 630 against 140, warps the 0.5 km band (22 000 × 22 000 cells) once, and caches the frames like any channel’s. The night side reads two windows every source already fetches, so it costs no download. On Meteosat the solar channels cost no download (an FCI chunk carries every channel); the reader turns their radiances into the same reflectance factor the NOAA products carry, π L d² / E_sun (§“The FCI reader”), FCI’s own 0.51 µm band takes the AHI’s hybrid green, and the hourly 24-hour window holds some twelve sunlit frames. FCI’s blue band is 0.444 µm, bluer than the AHI’s 0.47, under the family id vis047 (the band block carries its wave number); the recipe is not changed for it.

The dust confidences

dustcf is DEBRA (Miller et al. 2017, doi:10.1002/2017JD027365 — the Dynamic Enhancement Background Reduction Algorithm for dust), Eqs. 1–22 as the shachen package implements them: an infrared cloud mask, three dust tests against a clear-sky background, and a confidence factor in 0–1 blended across the terminator, which reads high where lofted mineral dust is likely and 0 where nothing suggests it. zhouye is ZHOUYE (昼夜, “day and night”), the diurnally consistent scheme the same package builds on that chain (§“The ZHOUYE scheme” below): the same confidence by day, and at night a reading that stays at the day’s level instead of fading. They are two products — two bundles of one variable each — from one pass of the producer seam (DebraProducer), computed per slot in the fetch stage like the guns and brought into these stores as scalar fields the shell paints with one ramp.

inputwhat it feeds
ir039, wv062the cloud mask’s night thin-cirrus and deep-convection tests (Eqs. 4, 6)
ir086, ir104, ir123the mask’s split-window tests and restorals, the dust tests DT1 (12.3 − 10.4 µm) and DT2 (8.6 − 10.4 µm) against the background, the thermal contrast DT3
a skin temperatureCM1 and DT3 (how cold the window reads against the ground), and the Planck curve of the background
an infrared emissivitythe background: BT_bg = B⁻¹(ε · B(T_skin)) per window, whose differences are what DT1 and DT2 measure against

The ZHOUYE scheme. DEBRA’s three confidence sums (Eqs. 16–18, day, terminator and night) are normalized (Eq. 19) and blended by solar zenith (Eqs. 20–22). ZHOUYE (shachen.constants.ZHOUYE, shachen.pipeline.run_zhouye) changes three things, all in the terminator and night sums and none in the daytime one: DT2 is read on a fixed (−0.5, +1.5) K interval of the 8.6 − 10.4 µm difference instead of Eq. 14’s dynamic one, so the clear-sky side of the signal that Eq. 14 clips away — where most of the night-time ranking lives — is kept; the thermal-contrast test DT3 needs corroboration from a split-window test, so a cell lit by DT3 alone (mid-level cloud, or a skin-temperature error, far more often than dust) contributes nothing; and the two sums' Eq. 19 intervals are fitted so that lit dust reads at night and across the terminator as it does by day. The daytime sum and its interval are DEBRA’s ABI retune, on every imager. Below a solar zenith of 75° the Eq. 20 weight is 1 and the two confidences are one, bit for bit; the scheme is a night-side extension that blends into DEBRA across 75–90°, built so that one dust reads one confidence around the clock — no fading at dusk, no brightening after dark. What it costs, on 30 no-dust days: the night false-alarm rate at confidence 0.2 doubles (0.0029 → 0.0054); over quartz sand seas it is on the miss side. The numbers and the ground truth are shachen’s, and the paper in preparation that describes them. The two are kept as separate products because they are different claims: dustcf is the published algorithm as retuned, with a known night; zhouye is a new scheme whose night is its own.

The two ancillary fields are not what the algorithm was built against (MERRA-2 skin temperature, which lands weeks late, and the CAMEL climatology behind Earthdata credentials), so ancillary.py takes two stand-ins, in the same shape:

  • Skin temperature is GFS TMP:surface, the one record of NOAA’s 0.25° file nearest the slot’s whole hour, located through the file’s .idx and fetched by byte range (a megabyte) from the newest cycle that reaches the hour, walking back over the cycles the bucket does not have yet (a cycle lands some four hours after its analysis, so the walk back is the normal path). Cached under data/raw/ancillary/gfs/gfs_tmpsfc_<cycle>_f<hhh>.grib2; a later slot of the same hour asks nothing. Read through GDAL with the unit left in kelvin (GRIB_NORMALIZE_UNITS=NO; GDAL would hand the field back in Celsius) and the raster shifted onto −180 … 180 as GDAL does itself.
  • Emissivity is the CAMEL monthly climatology (CAM5K30EM V003), staged on this bucket by xuebuild/satellite/staging.py (§“Staging the emissivity”): one NetCDF per region and operational month, already interpolated to the DEBRA band centres (emis_tir_86 … emis_tir_123), cropped to the region’s box with a degree of margin, named for the month it serves (the record ends in 2023; the file’s source_month says which year’s same calendar month it carries). make pull-r2-ancillary mirrors that prefix whole into data/raw/ancillary/camel/<region>/<YYYYMM>.nc (the rounds script does it before the first build under ANCILLARY=true); a round touches neither Earthdata nor the staging prefix. A region with no file for the slot’s month is served by its newest staged month with a warning — the product is a climatology, and a region dropping out at a month’s turn would be the worse failure; a region with nothing staged is not a region; nothing staged at all is an error, since the confidence over water alone is not the product.

Both are put on the target grid by one bilinear interpolation (ancillary.regrid) done in the grid’s own copy of the world: a global field is re-based column by column onto a grid that runs past 180° and wrapped (its first column repeated a turn later), a regional file is moved whole by the turn that lays it over the grid, and nothing is extrapolated. The chain is composed here from shachen’s per-equation modules (background_signals, cloud_mask, dust_tests, confidence, blend_confidence) rather than through shachen.pipeline.run_debra / run_zhouye, because those entry points take a pyresample area and do the regrid, the sun and the land mask themselves; on these grids those three are this module’s (the regrid above, pyorbital’s zenith on the grid’s own coordinates, the land mask on wrapped ones), and tests/test_debra.py holds the composition equal to both pipelines on a plate carrée area cell for cell. The background, the mask and the tests are computed once per slot and both confidences read them (the ZHOUYE dust-test constants differ from the ABI retune’s only by the second DT2 reading they add, which DEBRA’s sums are not shown); the constants are shachen’s ABI retune on every imager (the Eq. 19 daytime floor at 0.40 rather than the printed 0.25, which keeps clear-sky DT3 noise over vegetation from colouring, and the night branch on an interval of its own), as the former operational pipeline ran both AHI and ABI.

Where the confidence is defined. A cell is computed wherever every input channel and the skin temperature have data and the ground is either water — DEBRA takes the water surface’s emissivity as unity and needs no climatology there — or inside the extent of a staged CAMEL file. Land no staged file reaches is no data (code 0), never a confidence computed against an emissivity that was never read: staging a region is what extends the product over it, and a whole-disk staging would fill the disk with no code change. Today the staged regions are three — the Gobi and Taklamakan through the North China Plain to Japan (Himawari), the Chihuahuan Desert and the US Southwest (GOES-East and GOES-West both see it), and the Saharan transport corridor from the Cape Verde longitudes to the Caribbean and the Gulf (GOES-East) — plus every sea the three disks cover. Meteosat publishes no confidence: no staged region lies on its disk, the Sahara itself is exactly what a climatology is for, and its window is hourly besides.

The gate. What is published as dustcf is cf_comb with the split-window gate applied (producers.split_window_gate): a cell where neither split-window test responded (dt1 = dt2 = 0) reads 0, since cloud has no split-window signal and dust nearly always does. The failure it removes is mid-level cloud too warm for CM1 and too thin for CM3, which the thermal-contrast test alone reads as dust; on 42 dust days of East Asian station data it costs a daytime detection rate at confidence 0.1 of 0.411 → 0.373 for a false-alarm ratio of 0.422 → 0.23. It is not part of DEBRA (Eqs. 1–29) and not in shachen. zhouye takes the same gate on its normalized day factor alone, then shachen’s Eq. 22 blend again (Eq. 19 maps a zero sum to 0 on the day interval, so gating the factor is gating the sum): ZHOUYE’s own corroboration rule already acts on the terminator and night sums with its DT2 reading, and gating the blended ZHOUYE on Eq. 14’s DT2 — which is 0 over nearly all clear ground at night — would erase the night it was built for. A second gate on the 0.64 µm reflectance is not applied to either: it would cost a 0.5 km visible channel per slot for a false-alarm ratio of 0.23 → 0.21, and there is no reflectance at night.

The result is two bundles of one variable each, dustcf and zhouye, on the channel’s axis and grid: composite bundles in the encoders' terms (bundles.COMPOSITE_BUNDLES, SourceSpec.bundle_composite_ids) — produced in the fetch stage, read off the series with their producer stamp, never derived by a converter — whose one component is the bundle itself. Their identity is the guns’ pattern: a local-use parameter, discipline 3, category 192, number 4 for dustcf and number 6 for zhouye, on surface 8, meaningful only with the producer block beside it ({"id": "shachen", "version": …}, the id registered on the variable, the version whatever ran), no band. Their codebook is the guns’ (linear, offset −0.004, step 0.004, codes 0–251, code 0 no data, 0.0 at code 1, 1.0 at code 251), the same ladder, no poster. A produced frame’s record names, beside the producer and the input frames, the ancillary it was computed against (the staged directory and the GFS record by name, whose name is the cycle and forecast hour). Like every produced frame it is composed once: a slot’s confidence is the first computation’s, and a GFS cycle landing later for the same hour does not recompute a cached slot.

Staging the emissivity

xuebuild/satellite/staging.py writes the CAMEL months §“The dust confidence” reads, and stage-ancillary.yml is the one job that holds Earthdata credentials: at 03:00 UTC on the 25th it stages the month in progress and the next for every region in the module’s table (the 1st is the retry), and pushes them with make push-r2-ancillary (a --size-only sync, so an unchanged file costs nothing). A month is cut from the granule shachen.io.emissivity.fetch_emissivity serves for it — the record ends in 2023-12, so the same calendar month of the newest year that has one, never a different month — interpolated to the DEBRA band centres by load_band_emissivity, sorted ascending on both coordinates (CAMEL stores latitude north to south, and a slice against a descending coordinate selects nothing, silently), cropped to the region’s box plus MARGIN_DEG (1°, so the bilinear regrid never extrapolates at the box’s edge), cast back to float32 and written zlib-compressed with the attributes the reader keys on (region, month, source_month, source, bbox, margin_deg). An empty crop is an error; an existing file is overwritten, since restaging is how a bad subset is fixed. The regions are a table (a key, a box, a description) rather than a derivation from the disks, because staging a region is a decision about where the product is defined over land. The table holds one row, global, the whole granule: the confidence is defined over every disk’s land, and the reader wraps a global field across the antimeridian itself. A margin past the granule’s edge selects nothing extra. Locally, make stage-ancillary MONTHS="2026-11" REGIONS="global" does the same against your own ~/.netrc (the staging dependency group; no GDAL), and tests/test_staging.py holds the crop, the month resolution and a staged file’s read-back through ancillary.py on a synthetic granule, never the network.

Regional boxes

A disk at 0.04° (4.4 km at the equator) is limited by the grid, not the sensor: AHI samples 0.64 µm at 0.5 km, the other solar bands at 1 km and the infrared at 2 km at the sub-satellite point, some 0.7–1 km and 2.8 km effective over Japan at its 42° viewing angle. The whole disk at 0.01° would be 144 M cells a plane; a box is a few million. So a finer grid is a source of its own on the same platform — a regional source, the way hrrr sits beside gfs — and not a finer rung of the disk’s ladder, since a variant is the same extent decimated.

SourceSpec.region is the box as (west, south, east, north), edges on whole cells of grid_step; the fetch warps onto it instead of Platform.region, and production_grid must be the box at the step. himawarijp is the one such source today:

himawarijp
platformhimawari (the same files, band blocks and producers)
box24–46°N, 122–148°E (whole degrees: the JMA nowcast’s 0.005° cells nest 2:1)
grid0.01°, 2600 × 2200, tile 64 × 64 (0.64°, 1435 a plane), ladder 0.02 / 0.04 / 0.08°
fetchedir039, ir086, ir104, ir112, ir123, vis047, vis051, vis064, nir086
publishedir104, ir039, dustrgb, truecolor (no confidences: their CAMEL months are staged on the disk grids)
window600 s, 3 h

The ISatSS reader narrows a slot to the box (ISatSSReader.tiles_covering). A tile’s position on the disk’s 10 × 10 grid of tiles is a fixed table (ISATSS_TILE_ROWS: rows of 6, 8, 10 × 6, 8, 6 tiles, the twelve corners that hold no Earth left out; T020 is row 2, column 5, as its own tile_row_offset / tile_column_offset say), and its footprint is the box around a 56 × 56 lattice of its scan angles put through PROJ’s ellipsoidal geos inverse (geostationary_lonlat), with the tiles' own projection constants. Over a whole slot of real tiles the footprints match those computed from each tile’s own geotransform to 1e-10°, and the fixture tiles’ corners as GDAL reads them to 0.01°. A tile is needed when its footprint, widened by 0.1° (more than a 2 km pixel wherever a box is useful, so a bilinear sample at the edge finds its neighbours), overlaps the box: for Japan, six of the 88 (T009–T011, T018–T020). Only those make a slot complete, are downloaded and are mosaicked — some 60 MB a slot over the eight channels other than 3.9 µm by day and 35 MB by night (2026-10-11 03:00 and 2026-10-10 15:00 UTC), against 870 and 500 MB for the disk’s ten; the 3.9 µm window the true colour’s night side reads adds one more 2 km channel’s six tiles. A CMIPF slot is one file and an FCI download already crops its chunks to the disk’s rows, so those readers do not narrow (tiles_covering is None).

The frame cache is keyed by the source, <source>-frames, since the box and the disk warp the same slot onto two grids; a disk’s source id is its platform’s role, so the disks’ caches kept their names. A slot of the box is eighteen frames of 3–7 MB (some 95 MB). Measured on one sunlit hour (2026-10-11 03:00–04:00 UTC, seven slots, under true colour recipe 1): the stores are 8.4 MB of ir104, 35 MB of dustrgb and 65 MB of truecolor at full resolution and a third more for the ladder, some 170 MB, near 0.5 GB for a sunlit three-hour round; that is why the window is three hours and not the disks’ six. The true colour’s night side is white cloud over a flat dark ground, smoother than the sunlit picture, so a night hour costs less than a sunlit one but no longer next to nothing.

Metadata

A satellite variable’s identity is its parameter block, brightness temperature at the nominal top of the atmosphere (GRIB2 0 / 4 / 4 on surface 8), which every infrared band of every imager shares, plus the band block beside it (bundle.md §“Band, Producer and Aerosol”), template 4.31’s five fields:

"band": {
  "satelliteSeries": 0,
  "satelliteNumber": 174,
  "instrumentType": 297,
  "scaleFactorOfCentralWaveNumber": 0,
  "scaledValueOfCentralWaveNumber": 96086
}

The shell classifies a channel by the band’s central wave number (10–11 µm is the infrared window, ir104), never by the spacecraft, so GOES-19’s 10.35 µm channel and Himawari-9’s 10.41 µm one draw with one palette. A brightness temperature with no band, or in a band the shell has no chart for, renders generically.

Cells the disk never covers arrive as the product’s fill (-32767) and become the bottom of the codebook, 180 K — below any cloud top a 10 µm channel reports — which the shell paints as nothing, the way the radar mosaics’ no-coverage cells are handled. The format carries no bitmap.

The fetch stage

Reader

A reader (readers.py, Reader) lists a platform’s slots and a slot’s objects, downloads them, and opens them as one thing GDAL can open: a dataset on the geostationary CRS whose values are the physical quantity or carry a scale and offset to it. Its responsibility ends there.

ISatSSReader is NOAA’s ISatSS product: each channel of each scan as 88 Sectorized CMI NetCDF tiles (550 × 550 at 2 km) under AHI-L2-FLDK-ISatSS/YYYY/MM/DD/HHMM/, named OR_HFD-<res>-B<bits>-M1C<channel>-T<tile>_GH9_s<start>_c<created>.nc. The bit-depth field varies by channel (B11 for most, B12 for channels 10–15, B14 for channel 7), so the listing prefix spells the channel’s own and never guesses. The tiles are already calibrated (Sectorized_CMI, Int16 with scale_factor 0.064208984375 and add_offset 69, kelvin) on the CF geostationary projection with x/y in microradians; GDAL warns about the unit and computes the geotransform from them faithfully. The coordinates themselves are one pixel off: a tile’s first pixel centre is written half a pixel west of the edge its tile_column_offset names, where it belongs half a pixel east of it (T020 of the 0.5 km band starts at x = −500 m where the offset says 0), and half a pixel north of its row edge the same way, in every band at that band’s own pixel. Read as written, the 0.5, 1 and 2 km bands of one slot land 0.5, 1 and 2 km north-west of their ground and up to 1.5 km apart from each other (measured on a clear Korean coast against the coastline: 0.85 grid cells at 0.01° between the 1 km bands and the 0.64 µm band, 2 cells for the infrared), which fringes every edge of the true colour with cyan and red. The reader moves its mosaic back one pixel east and one south (_shift_one_pixel_south_east), after which the bands agree to 0.02 cells. A day’s slots are the directory listing (delimiter=/), a slot’s tiles one listing under the channel’s prefix, a reissued tile the later c stamp. The slot opens as a gdalbuildvrt mosaic of the tiles by georeference. For a source with a region of its own the reader also says which tiles reach into it (tiles_covering, §“Regional boxes”); only those make the slot complete, are fetched and are mosaicked.

CMIPFReader is NOAA’s ABI-L2-CMIPF product, the GOES-R full disk: each channel of each scan as one netCDF-4 file under ABI-L2-CMIPF/YYYY/DDD/HH/ (year, day of year, hour), named OR_ABI-L2-CMIPF-M<mode>C<channel>_G<nn>_s<start>_e<end>_c<created>.nc with YYYYDDDHHMMSSs stamps. CMI is unsigned 16-bit, 5424 × 5424 at 2 km for the infrared channels, with the band’s own scale and offset to kelvin (C13: 0.06145332 and 89.62) and 65535 where the disk is not; the goes_imager_projection is the CF geostationary mapping with sweep x and x/y in radians, which GDAL turns into a metre geotransform on its own (its warning about the radian axis unit concerns the SRS’s axis, not the georeference). A scan in mode 6 starts twenty seconds past every ten-minute mark and its slot is that mark (the start floored to the cadence); the listing accepts any mode digit. A slot is complete once its file is listed (tile_count 1), the file lands some ten minutes after the scan starts, and a reissue is the later c stamp. The slot opens as a one-source VRT over the CMI variable, so the no-data floor is applied the way it is to a mosaic. Listing is per hour directory: list_hours reads a day’s hour prefixes in one request, list_hour one hour’s files for a channel, and recent_slots walks the hours newest first and stops once it has the few slots latest_slot asks about — two or three requests a round rather than a whole day’s twenty-four. The DQF quality flags are not read (99.9996 % of a sampled disk is flag 0).

FCIReader is EUMETSAT’s MTG FCI Level 1c full-disk product (FDHSI, the Data Store collection EO:EUM:DAT:0662): one product per ten-minute repeat cycle, cut into forty netCDF-4 chunk files, each a strip of some 140 rows of the 5568 × 5568 2 km grid carrying every channel as 12-bit radiance codes with a scale and offset (/data/<channel>/measured/effective_radiance, mW m⁻² sr⁻¹ (cm⁻¹)⁻¹, fill 65535). Three things stop GDAL opening a chunk as the other readers' files are opened, and the reader does them itself:

  • the chunks are compressed with an HDF5 filter (JPEG-LS, filter 32018) a stock GDAL cannot decode: the plugin comes with the hdf5plugin distribution (the satellite dependency group) and is handed to each GDAL subprocess the reader runs as HDF5_PLUGIN_PATH (hdf5_plugin_environment; an environment that already names one is left alone);
  • the values are radiances: the reader reads the channel’s codes with gdal_translate, unpacks them, and converts them by the channel’s kind. An infrared channel takes its own Planck coefficients, scalar variables of its measured group read through gdalmdiminfo — BT = (c2 ν / ln(1 + c1 ν³ / L) − b) / a, the conversion the product documents — into an Int16 strip in steps of 1/128 K above 100 K (FCI_BT_SCALE / FCI_BT_OFFSET; IR 3.8, which reads past 356 K over a sunlit desert, about 200 K instead). A solar channel takes its effective solar irradiance at 1 AU (channel_effective_solar_irradiance in the same group, mW m⁻² (cm⁻¹)⁻¹) and the mean Earth–Sun distance of the chunk’s rows (/state/celestial/earth_sun_distance, km, over 1.495978707e8 for AU): reflectance_factor = π L d² / E_sun, not divided by the cosine of the solar zenith (the ISatSS and CMIPF reflectances are not either; the true colour producer divides), into an Int16 strip in steps of 1/4096 from zero (FCI_REFL_SCALE; −0.01 … 1.26 is codes −41 … 5161). Either way a raw file and a VRT that carries the packing and the unit (K or 1), and the frame’s record carries the channel’s kind. The steps are binary fractions on purpose: a decimal one such as 0.01 K puts some values an ulp either side of a codebook half-step depending on whether a platform fuses code × scale + offset, and the two encoders then disagree by one code on one cell. A solar channel’s group carries the Planck variables too, holding their fill value, so asking it for Planck coefficients is an error (“not an infrared channel?”), as is asking an infrared group for a solar irradiance;
  • the grid mapping (/data/mtg_geos_projection: sweep y, height 35786400 m, WGS84, longitude 0) sits in a parent group GDAL does not connect to the variable, so the strip’s VRT carries the geostationary SRS built from those fields and an extent in scan angles (radians, a column or row number packed with a scale and offset) times the height. East to west the extent comes from the file’s own column packing: column i, from 1, is the scan angle offset + step × i, and the product measures that angle positive towards the west, the negative of PROJ’s geos x (offset +0.156 rad, a negative step, column 1 the western limb). Taken at face value, as GDAL’s geotransform takes it, the disk comes out mirrored about the sub-satellite meridian — every Meteosat frame until reader version 3 did, Arabia over the Atlantic. North to south GDAL’s row origin is the chunk’s, its row step checked against the grid. The strip is written west to east and north to south whichever way the file runs. A frame’s record names the reader version that placed it (frameVersion, 3 for FCI), and a cached frame of another version is warped again, its slot’s composites recomposed. The infrared channels are on a 2 km grid (5568 columns, row step 5.5887e-5 rad), the solar ones on a 1 km grid (11 136 columns, half the step, the same disk); a chunk is a fortieth of the rows of either. The reader checks the packing of the rows and columns and the grid’s width against the constants of the grid the channel’s resolution_km names (FCI_GRIDS), and plans chunks with them, so a product change is an error.

The strips of a channel are mosaicked with gdalbuildvrt; the projector warps that. A chunk carries every channel, so a slot’s files are shared by its channels (Reader.files_per_channel is false: fetch_frame puts them under the slot’s directory rather than a channel’s, and the window removes the directory once the slot’s channels are done), and only the chunks whose rows reach into ±60° of latitude are downloaded (needed_chunks: 60° on the sub-satellite meridian is seen 0.1402 rad up from the disk’s centre, against the disk’s 0.1556, so the outermost two chunks at either end — 2 through 39 remain — are never fetched, some 900 MB a cycle). A slot is complete when the product lists all forty chunks; a cycle’s slot is its sensing start floored to the ten-minute cadence (15:20:07 is 15:20).

The store is eumetsat.py: search is the anonymous OpenSearch query (…/search-products/1.0.0/os?format=json&pi=<collection>&dtstart=…&dtend=…, each product’s date interval, updated stamp and sip-entries — one link per file, entry?name=<file>), list_slots one search over a day, recent_slots one search back over six hours, list_slot one over the cycle. download_bytes fetches one file with a bearer token minted by POST https://api.eumetsat.int/token from a registered account’s consumer key and secret — EUMETSAT_CONSUMER_KEY / EUMETSAT_CONSUMER_SECRET in the environment, the workflow’s secrets of the same names — renewing it when the store refuses it, waiting out a rate limit as the store’s retryAfter asks (capped at two minutes), and failing by name when the two variables are unset, so a build without an account stops at the first download. The listing gives no file sizes; a file present on disk at all is taken as complete, since a download lands under a .part name until it is.

A further reader would be HSDReader, for the raw Himawari Standard Data segments should the ISatSS product ever stop, or SEVIRIReader for Meteosat-9’s Level 1.5 native file.

Projector

A projector (projector.py, Projector) writes the reader’s dataset resampled onto a TargetGrid — edges and step, cell centres half a step inside, longitudes allowed past 180 — as an Int16 GeoTIFF with the source’s nodata, scale and offset on the band. GdalWarpProjector is gdalwarp -t_srs EPSG:4326 -te … -tr … -r bilinear (average for a reflectance, max for a peak frame), deterministic for one GDAL version, multithreaded. A NumPy projector with a cached lookup table (for parallax correction, or exact alignment with a producer’s grid) is the same interface.

The published grid is the platform’s region at the source’s grid_step: 60° either side of the sub-satellite longitude and ±60° of latitude, past which the view is too oblique to read. For Himawari that is 80.7°E to 200.7°E at 0.04°, 3000 × 3000 cells, first cell centre 80.72°E, 59.98°N — a grid that crosses the antimeridian, which the encoders’ crop_grid and the shell’s viewport arithmetic take in the grid’s own copy of the world (a box spelled -170 is at 190 on it); GOES-West’s is 163°E to 283°E the same way (first cell centre 163.02°E), GOES-East’s 135.2°W to 15.2°W (first cell centre 135.18°W). A scene that lies wholly outside the grid is refused rather than written blank, since a blank warp is also what a lost projection produces.

Frames and the cache

A frame is one slot of one variable on the target grid, at data/raw/<source>-frames/<variable>/<variable>_<YYYYMMDDHHMMSS>.tif (keyed by the source, since two sources of one platform warp the same slot onto two grids; a full-disk source’s id is its platform’s role): a channel’s, warped by the projector, or a produced one, written by assemble.write_frame (Int16 at 1e-4 with the same fill, through an ENVI header and gdal_translate, no raster library). Inside every frame is its record, one JSON object in the GeoTIFF’s XUE_FRAME metadata item (GDAL’s default domain, the GDAL_METADATA tag) — the scale, offset and unit the frame’s codes mean, read off the source tile before the warp for a channel, the tiles and reader version it came from, and for a produced frame also the producer’s id and version and its inputs — so a frame is one object on the bucket. gdalwarp takes no metadata option, so the projector warps to an uncompressed scratch file and gdal_translate writes the frame from it with the item. Frames cached before the record moved inside carry it in a <variable>_<YYYYMMDDHHMMSS>.json sidecar; assemble.frame_record reads the embedded item first and the sidecar only when there is none, so both kinds meet in one window until the old ones are pruned. A slot is warped once and composed once: the rounds script pulls the window’s hours of frames from the bucket before the first build and pushes new ones after every upload (make pull-r2-frames / push-r2-frames / prune-r2-frames, MODEL=himawari; the targets take every variable directory), so a round downloads one slot’s tiles (26 MB per channel) and runs the producers on one slot whatever the window’s length. A channel’s frame is a pure function of its tiles and the GDAL version, a produced one of its input frames, its ancillary and the producer’s version (produce_frames recomposes a cached slot whose record names another version); a GDAL upgrade may resample the next frame differently, and the cached older frames stay as they are, each under its own ?v= once published. A producer’s ancillary fields live beside the frames under data/raw/ancillary/ (the staged CAMEL months, mirrored from the bucket by make pull-r2-ancillary; the GFS records the dust confidence producer fetches per slot, never mirrored), which _fetch_satellite_run hands to fetch_window as the ancillary root.

The series

assemble.write_series stacks one variable’s frames into its series file of the window, <stem>.<variable>.nc (himawari.2026091703.ir104.nc, ….dustr.nc, …): a VRT over the frames carrying the netCDF driver’s extra-dimension metadata (NETCDF_DIM_EXTRA={time}, NETCDF_DIM_time_DEF, NETCDF_DIM_time_VALUES, one NETCDF_DIM_time per band, NETCDF_VARNAME=<variable>), translated with gdal_translate -of netCDF into <variable>(time, lat, lon), packed Int16 with the frames’ own scale and offset and fill, time in seconds since the run, units the registry’s (K, or 1 for a gun), and on a produced variable the producer_id and producer_version attributes (the band metadata keys of the VRT become the variable’s attributes). One file per variable because the netCDF driver stacks a VRT’s bands into one extra-dimensioned variable only when the bands are exactly that axis; given two variables’ bands it writes one variable per band instead. Every series of a window carries the same axis: a slot is in the window only when every channel landed whole, and every producer’s outputs exist exactly when its inputs do. The reference pipeline needs no NetCDF library; GDAL writes the file, and the same GDAL reads it back through xuebuild/observation.py (series_files resolves a run directory to a file per variable, or to the one file the radar sources write; inspect_observation reads each variable with its own packing and fill, holds the axes equal, returns the producer stamps), which snaps each time to its 600 s slot and takes the first slot’s hour as the run. The converter reads only the variables the requested bundles carry: the five unpublished channels are never quantized.

Rounds

fetch.fetch_window walks every slot from the run’s hour through hours past it at the source’s cadence: a cached frame is read back, a complete slot on the bucket is fetched and warped, an incomplete or absent slot is left out (the axis allows the gap, and the next round takes it if it lands). The live window’s end is the newest slot whose tiles have all landed (latest_slot: the reader’s recent_slots — a day’s slot directories at once for ISatSS, the newest hour directory for CMIPF, one search for FCI, yesterday’s as well around midnight — then the newest three slots asked for their tiles, the rest trusted). resolve_run("latest") is the six whole hours (window_hours) ending with that slot’s hour, as for MRMS and JMA with their own lengths.

Meteosat is hourly. The imager scans every ten minutes and the store lists every cycle, but the meteosat source’s cadence_seconds is 3600 against the platform’s 600, its window 24 hours (25 frames), and window_slots and latest_slot keep the slots on the source’s cadence: the cycle on each hour alone. The reason is the EUMETSAT data policy (2025): the Level 1 repeat cycle referenced to each clock hour is Core data, released under CC-BY-4.0 and redistributable at any latency; the cycles between are licensed data whose operational use within an hour of sensing is not free and whose numbers may not be redistributed after it. A store with hourly frames is what that policy allows this site to publish. The attribution it requires (“Contains modified EUMETSAT Meteosat data [year of publication or distribution]”) is in the shell’s credit, the year stamped at render time, and in the catalog prose, the year of the run’s first frame filled in when the Collection is written. The tiles of a Himawari scan are generated about eight minutes after it starts and listed some fifteen after, a GOES file lands some ten minutes after its scan starts; a round is a listing, one scan’s files, one warp per channel, one composition, one stack per variable and a conversion, three to four minutes, so the live window ends fifteen to twenty minutes behind real time; an FCI cycle is in the store some five minutes after its sensing ends, and its round downloads 900 MB and converts 38 strips per channel for eight channels — the four solar ones on the 1 km grid, which read no slower than an infrared one, since a strip’s time is opening the chunk — some ten to fifteen minutes once an hour. .github/workflows/publish-himawari.yml, publish-goeseast.yml, publish-goeswest.yml and publish-meteosat.yml each run one round per job on a half-hour cron (a round fetches every slot its frame cache lacks, so the window keeps its ten-minute step) and install gdal-bin whichever encoder converts, since the wheel’s GDAL is a library with no GeoTIFF driver; the three NOAA ones pull the staged CAMEL months before the first build (ANCILLARY=true in the rounds script, make pull-r2-ancillary); the Meteosat one also proves the runner’s GDAL loads the JPEG-LS plugin on the fixture chunk before a round spends a download, and warns and builds nothing when the two EUMETSAT_* secrets are absent.

Producers

A composite product (a dust index, a split-window difference, an RGB) is a Producer (producers.py): its input is one slot’s channels, already warped — float planes in the channel’s unit with NaN where no data — plus the ancillary fields it names (ancillaries, resolved and fetched per slot by ancillary_for(platform, slot, root) under the fetch’s ancillary root), the slot and the grid, its output one or more new planes on the same grid, each written as a frame of its own and cached beside the channels’ (fetch.produce_frames), so a round composes the slot it warped and reads the rest back. It never touches quantization, the container, the store or the manifest: its outputs are stacked into series like channels and the converter reads them as the components of one composite bundle. Two kinds share the interface: an in-process NumPy function with a fixed operation order, which can be held to a golden, and an external one that runs elsewhere and writes to the shared bucket, read back the way the CMA archive is. A produced variable’s identity is a local-use GRIB2 parameter with the producer block beside it, the id registered on the variable, the version taken from the frames the producer wrote.

DustRGBProducer is the first: id shachen, bundle_id dustrgb, inputs ir086, ir104, ir112, ir123 (inputs_for(platform): the three without ir112 on an imager that lacks it), outputs dustr, dustg, dustb, no ancillaries, version the installed shachen distribution’s. It builds an xarray scene of the planes (the 10.4 µm one standing in for 11.2 µm where there is none) and calls shachen.dustrgb.dust_rgb with the stretch set the platform’s instrument takes (DUST_RGB for AHI and FCI, DUST_RGB_ABI for ABI — the rule shachen applies by satpy reader, made here by Platform.instrument), then marks every cell any input lacked as no data in all three guns.

DebraProducer is the second (§“The dust confidences”): id shachen, bundle_ids dustcf and zhouye (bundle_id is the first, what the logs name it by), inputs ir039, wv062, ir086, ir104, ir123 (all five required; no stand-in), outputs dustcf and zhouye in that order, ancillaries camel (the staged months’ directory) and skin (the slot’s GFS record, fetched by ancillary_for when not cached), version shachen’s. run regrids the two fields, finds the sun and the ground, composes shachen’s per-equation modules once, takes the DEBRA confidence gated and the ZHOUYE confidence with its day factor gated and re-blended, and leaves NaN wherever the confidence is not defined. A producer’s outputs may be the components of more than one bundle: PRODUCERS lists it under each, the fetch runs it once for all of them (dict.fromkeys over the source’s listed composites) and caches every output frame, so a source listing one of its bundles still composes both. PRODUCERS is keyed by the bundle produced; SourceSpec.bundle_composite_ids lists what a source publishes, and _fetch_satellite_run runs every listed producer whose channels the window fetches (asked for the Dust RGB’s four alone, it composes that and not the confidence). TrueColorProducer is this pipeline’s own (id xue, the version the recipe’s constant): §“The true colour”. shachen is the satellite dependency group (uv sync --group satellite), imported inside the producers and nowhere else.

Fixtures and tests

tests/fixtures/himawari/ is forty real tiles — T020 and T021 of two consecutive scans in bands 7, 8, 11, 13, 14 and 15, untouched, and the same tiles in bands 1–4 cut to their north-west corner (tests/prepare_himawari_fixture.py: a sixteenth of each, since a 1 km tile is 1.3 MB and the 0.5 km one 4.7) — and tests/test_satellite.py runs them through the whole stage — listing, completeness, download, mosaic, warp (the solar bands as block means, the record saying so), cache, the producers (the Dust RGB held cell for cell to shachen.dustrgb.dust_rgb called directly, the true colour’s day side to its recipe written out step by step, its night side to the night recipe on the fixture’s windows — ground and white cloud, never no data, a cold top whiter than a warm one, fog lit by the 10.4 − 3.9 µm difference — and the terminator blend held monotone and continuous with the missing-input rule on each side), series, ingest, conversion on the production grid with every composite bundle, a crop past the antimeridian, a --bundles build that reads one series alone — against a stand-in for the bucket, then through both encoders. tests/fixtures/debra/ is two crops of a staged CAMEL month (the Gobi, land; a box of water south of Japan inside the tiles’ grid) and four crops of one cached GFS record, and tests/test_debra.py holds the ancillary readers, the regrid across 180°, the GFS candidate walk and byte-range fetch against fakes, the composed chain equal to shachen.pipeline.run_debra and run_zhouye on the same grid (and the two confidences one by day), the definition and gate rules, and the producer in the fetch stage (composed once, the record naming its ancillary); the satellite and GOES suites stage the same fixtures under the raw root (stage_ancillary) so no test reaches the GFS bucket. The registry document (rust/xue/registry.json, and its trimmed shell copy web/src/data/registry.ts) holds each channel’s and gun’s label, unit, parameter block, band block or producer id and codebooks, and each composite’s components in order, identical across the Python encoder, the Rust encoder and the shell (docs/registry.md).

tests/fixtures/goes/ is eighteen windows cut from real GOES-19 CMIPF files (tests/prepare_goes_fixture.py: the six dust channels and the three solar bands of two consecutive scans, 220 × 220 cells at 2 km and the same ground at each band’s own resolution, cut with gdal_translate -of netCDF -srcwin, which keeps the geostationary mapping, the band’s packing and fill — the Venezuelan coast and Trinidad, 66–62°W, 7–11°N), and tests/test_goes.py runs them the same way under the goeseast source: the hour-directory listing and its request count, the slot rule, the reissue rule, the single-file download, the warp, the Dust RGB with the ABI stretches (and that they differ from the SEVIRI set on the scene), the true colour with the synthetic green, the series, the ingest, the conversion on the East disk with the ABI band block, and the native encoder byte for byte. GOES-West is the same reader on its own bucket and grid; its tests are the registry’s.

tests/fixtures/meteosat/ is one real FCI chunk (chunk 20 of a full-disk cycle from EUMETSAT’s public MTG test data, the spectrally representative FDHSI cycle of May 2022: simulated 2017 radiances in the operational format, rows 2645–2784 of the grid, the strip from the equator to 2.5°S) and a trimmed real search response, and tests/test_meteosat.py runs them under the meteosat source with the chunk standing for every chunk of every slot (the reader’s needed_chunks narrowed to it): the store’s own response parsed, the token minted, refused and renewed and a rate limit waited out against a fake opener, the chunk names, the cycle’s slot, the needed chunks and the elevation angle behind them, the Planck conversion against the formula, the strip’s footprint and its numbers read back through GDAL’s own unscaling, the vis_06 strip on the 1 km grid held to π L d² / E_sun off the file’s own constants cell for cell (the algorithm, not the 2017 test product’s absolute values), the solar frames and the true colour composed from them by day, the IR 3.8 strip in kelvin and the true colour’s night side composed from it and IR 10.5, the producer with three inputs held to dust_rgb with the 10.5 µm plane as the green minuend, the hourly slots against a store that lists ten-minute cycles, the series, the ingest, the conversion with the FCI band block and the hourly axis, and the native encoder byte for byte when the wheel knows the source. The GDAL-backed cases skip without hdf5plugin.


Part of the Xue specification, licensed under CC BY 4.0.

18 - River flow in a showcase case

In the viewer: the network case /showcase/guadalupe-2025 and the grid cases /showcase/valencia-2024-efas and /showcase/valencia-2024-efaswb.

A flood is told by its rivers: how much water each reach carried, hour by hour, against what it usually carries, and what the gauges on it measured. A showcase case may carry that beside its weather field, in a river/ directory of its own named by the case’s river block (showcase/README.md). There are two kinds. A network case has a hydrological model’s output on a river network — one value per reach per frame, the National Water Model on the Guadalupe in July 2025 — and publishes the reaches as GeoParquet and each track as a network store. A grid case has its model’s discharge as the case’s own gridded field (EFAS on the Valencia DANA of October 2024, built by the ordinary case pipeline), and its river/ directory carries only what the field does not: the gauges' observed series, their reported peaks and the mapped flood extents. Xue models nothing itself; it carries what the model, the gauge operators and the mapping service published. This document is the normative description of that directory, version 1.

1. Delivery

Everything is a static file inside the case’s directory, showcase/<id>/river/, built once (python -m xuebuild.river build showcase/river-cases/<id>.json) and never rewritten.

  • index.json is the directory’s entry point (§2). The catalog row’s river block names it and carries its byteLength and crc32 (zlib CRC-32 of its bytes, eight lowercase hex digits), so it is requested as river/index.json?v=<crc32>.
  • Every other path is in the index, relative to it: no leading /, no .., no . component. Request each as <path>?v=<crc32> with the CRC the index carries; a store’s CRC is that of its group zarr.json (zarr-profile.md, “Attributes”) and is the ?v= of every object in the store.
  • A network case holds reaches.parquet (the GeoParquet), one <track id>.zarr per track, gauges.jsonl and index.json; a grid case gauges.jsonl, an extent/ directory of GeoJSON files and index.json.

2. index.json

{"version": 1, "kind": "network",
 "geometry": {"path": "reaches.parquet", "byteLength": 1114663, "crc32": "de943f65",
              "featureCount": 10940, "rowGroupRows": 4096},
 "tracks": [{"id": "analysis", "kind": "analysis", "runTime": "2025-07-03T00:00:00Z",
             "store": {"path": "analysis.zarr", "byteLength": 286352, "crc32": "499f2cb1"}},
            {"id": "short_range-2025070409", "kind": "forecast", "runTime": "2025-07-04T09:00:00Z",
             "store": {"path": "short_range-2025070409.zarr", "byteLength": 173890, "crc32": "3cfe6713"}}],
 "gauges": [{"id": "08165500", "name": "Guadalupe River at Hunt, TX", "lon": -99.321712, "lat": 30.069931,
             "source": "USGS NWIS", "unit": "m3/s", "feature": 5366,
             "series": {"path": "gauges.jsonl", "offset": 0, "length": 30080},
             "peaks": [{"time": "2025-07-04T10:05:00Z", "value": 8919.8, "note": "USGS, estimated"}]}],
 "extent": [],
 "credits": ["NOAA National Water Model v3.0 (NOAA Open Data Dissemination, noaa-nwm-pds)", "…"],
 "disclaimer": "National Water Model output is a simulation, not an observation or a warning. …"}
  • version is 1; a reader refuses any other. kind is network or grid. No key outside those this section names may appear.
  • geometry (network only, required there): the GeoParquet (zarr-profile.md, “Network store”): its path (a .parquet file), byteLength and crc32, its row count featureCount and its row group length rowGroupRows. Every store of the case names the same file with the same four numbers.
  • tracks (network only, required there, non-empty): one network store each, in the order the viewer offers them. id is a unique slug (lowercase letters, digits, _, -, .) and the store is <id>.zarr by convention; kind is analysis (the model’s best estimate of what happened, one window) or forecast (one cycle); its runTime equals the store’s own runTime — the cycle of a forecast, the first frame of an analysis. A forecast’s frames start where its product does (the NWM short range at +1 h). store is {path, byteLength, crc32}: the store’s path (a .zarr directory), the sum of its objects' lengths and the CRC-32 of its group document.
  • gauges (optional, default empty): observation points, each with a unique id (the operator’s own), a name, lon and lat (WGS84 degrees), the source operator, the unit of its values (m3/s), and:
    • feature (network only, required there): the GeoParquet row of the reach the gauge sits on, which is also the store’s feature index. A grid gauge has none: the viewer samples the case’s own field.
    • sample (grid only, optional): [lon, lat] of the model cell the gauge was snapped to, where the viewer samples the field instead of at the gauge itself; a gauge on a narrow river can fall a cell off it.
    • series (required): {path, offset, length}, the byte span of the gauge’s line in gauges.jsonl (§3). path is always gauges.jsonl.
    • outflow (optional): the same span for a second line, the outflow of a gauge on a dam (the Forata reservoir): its line’s id is the gauge’s followed by .outflow.
    • peaks (optional): reported peak values, each {time?, value, unit?, note?}: the time as ISO 8601 UTC ending in Z where the report gives one, the value, the unit where it is not the gauge’s (a stage in m or ft), and a short note saying what the value is and who reported it (USGS, estimated; peak inflow (CHJ SAIH)).
  • extent (optional, default empty): mapped flood extents, each {path, byteLength, crc32, at, credit}: a GeoJSON FeatureCollection of polygons in WGS84 (a .geojson file), the time of the imagery it was mapped from (at), and the credit line its producer requires.
  • credits: the attribution lines the case must show, as given by the data’s publishers. disclaimer (optional): one line the viewer shows beside the river data.
  • A grid index with neither gauges nor extents says nothing and is refused.

3. gauges.jsonl

One file per case, one gauge series per line, each line one JSON object in the compact serialisation of the point products (no spaces, ASCII, keys as below):

{"id":"08165500","time":["2025-07-02T00:00:00Z","2025-07-02T00:05:00Z","…"],"value":[0.142,0.149,"…"],"stage":[7.56,7.57,"…"],"stageUnit":"ft"}
  • time: strictly increasing ISO 8601 UTC times ending in Z; value: one number or null (no reading) per time, in the gauge’s unit.
  • stage and stageUnit (together or not at all): the water level, one number or null per time. The times are the union of the discharge and stage readings, so a time with only one of them has null in the other.
  • A gauge’s series span in the index is its line’s JSON object exactly, without the newline (the synop contract, synop.md): issue Range: bytes=<offset>-<offset + length − 1> against gauges.jsonl?v=<crc32 of the index> — the file is immutable with the directory — and parse the bytes on their own. The lines are in the index’s gauge order.

The series are what the operators published, unedited: the USGS’s instantaneous values with their provisional and estimated spans (the Guadalupe at Hunt stopped reporting stage at its peak and the USGS estimated the discharge after it), or a series digitised from an operator’s report where no download exists (the CHJ’s SAIH hydrographs of October 2024, about 1 % of full scale). A case’s README and the peaks notes say which.

4. Reading

  1. Fetch the catalog row’s river.index under its crc32, and validate it (§2). A viewer that does not know the block plays the case without river data.
  2. A network case: fetch reaches.parquet — or, for one area, its footer and the row groups whose bbox statistics meet the view — and open the chosen track’s store (zarr-profile.md, “Network store”). A frame is one range of the shard; colour each reach by its ratio to baseflow, or, when the row’s block names color (one of the case’s variables), by its value through that bundle’s palette and codebook, as the field draws it.
  3. A gauge: one range of gauges.jsonl. On a network case its modelled series is the store’s column feature; on a grid case, the case’s field sampled at sample (or at lon/lat).
  4. An extent: fetch its GeoJSON and draw it from at on, with its credit.

5. Writing

python -m xuebuild.river build showcase/river-cases/<id>.json reads the work directory a definition names (its case.json lists the frames, the gauges with their series files and the extents) and writes the case’s river/ directory whole, the index last, then reads the index back through the validator (xuebuild/river/schema.py::read_index), which checks every file it names against what is beside it. The definition:

{"id": "guadalupe-2025", "kind": "network", "work": "tmp/2025-07-04-guadalupe/work",
 "output": "web/public/data/showcase/guadalupe-2025/river", "model": "NWM v3.0",
 "tracks": [{"id": "analysis", "kind": "analysis", "product": "analysis_assim"},
            {"id": "short_range-2025070409", "kind": "forecast", "product": "short_range",
             "cycle": "2025-07-04T09:00:00Z"}],
 "gauges": ["08165500", "08166200", "08167000"],
 "extent": [], "disclaimer": "…"}

work and output are relative to the working directory (--work and --output override them); a network case names its model and its tracks — an analysis track takes the whole analysis window, a forecast track the frames of one cycle — and either kind picks its gauges by id and its extents by path from the work directory. credits defaults to the work directory’s. Writing GeoParquet needs pyarrow.


Part of the Xue specification, licensed under CC BY 4.0.

19 - The indicators product

Agriculture indicators are crop-area-weighted daily weather quantities over the main soybean regions of the United States, Brazil and Argentina, computed from the forecast runs Xue already publishes. They are not a raster and not a new source: xue indicators-build (xuebuild/indicators/) reads each source’s newest run through the public stores, exactly as any outside reader does (zarr-profile.md, “Reading”), aggregates it over each region with fixed weights, and appends one line per run to a static file. The product holds physical quantities only: temperatures, precipitation, soil temperature and water, area fractions and degree days. This document is the normative description of that product, schema v2.

1. Delivery

Everything is a static file under indicators/ at the data root.

indicators/
  index.json                         the one mutable entry point (§5)
  features/<source>/<yyyy-mm>.jsonl  one line per run, append-only (§4.1)
  season/<region>.<season>.json      in-season totals, rewritten per ECMWF run (§4.2)
  context/oni.json                   the Oceanic Niño Index (§6)
  weights/<grid>.zarr/               the crop-area weights, a Zarr v3 store (§7)
  • index.json is served with caching disabled. Every other object is read as <path>?v=<crc32>, with the CRC-32 (zlib, eight lowercase hex digits) the index gives for it.
  • A month file only grows. A new run is one line appended to the file of its run time’s UTC month; bytes already written never change, so every offset the index has ever published stays valid. Appending changes the file’s CRC-32 and so its ?v=: the new length is a new URL, and an edge cache holding the old URL holds a consistent prefix of the new file. A reader takes ?v= from the index it just read; a range past the end of a stale cached copy answers 416, which means the index read was older than the file.
  • Write order. Month files, then season files, then index.json last. An object exists before anything names it.
  • Reading one run. The index row for a run gives offset and length into its month file; Range: bytes=<offset>-<offset + length − 1> returns exactly that run’s line, its newline included, the same way the point products’ JSONL is read (docs/contribution/point-products.md). A whole month file is newline-delimited JSON, one run per line in the order they were appended.
  • Serialisation. Every object is compact JSON with ASCII escapes, keys in the order this document lists them, so a file’s CRC-32 is a function of its content (pointproduct.encode_json). A line is that encoding followed by \n.
  • The product is kept forever; nothing prunes it.

2. Regions

Three country composites and thirteen sub-regions. A region’s weight on a grid cell is the soybean physical area on that cell inside the region’s admin-1 units (§7). Local days are taken at a fixed UTC offset per region, never a time-zone table: the boundary does not move with daylight saving (in the United States summer, local civil midnight is 05:00 UTC, the indicators’ day begins at 06:00 UTC).

idnameISO 3166-2 unitsUTC offset
us-soyUnited States soybean beltUS-IA, US-IL, US-MN, US-IN, US-NE, US-OH, US-MO, US-SD, US-ND, US-KS, US-WI, US-MI, US-AR−6
us-ia us-il us-mn us-in us-neIowa, Illinois, Minnesota, Indiana, Nebraskaone each−6
br-soyBrazil soybean statesBR-MT, BR-PR, BR-RS, BR-GO, BR-MS, BR-MG, BR-BA, BR-MA, BR-TO, BR-PI−3
br-mt br-pr br-rs br-go br-msMato Grosso, Paraná, Rio Grande do Sul, Goiás, Mato Grosso do Sulone each−3
ar-soyArgentina soybean provincesAR-B, AR-X, AR-S, AR-E, AR-L−3
ar-ba ar-cb ar-sfBuenos Aires, Córdoba, Santa Feone each−3

The index’s regions[] lists each with id, name, country (ISO 3166-1 alpha-2), subdivisions, utcOffsetHours and parent (the composite a sub-region belongs to, null on a composite).

3. Crop calendar

Each region has a season window, over which §4.2 accumulates, and a flowering window inside it (flowering and pod set). Windows are month-day ranges, inclusive at both ends. A season inside one calendar year is named by its year (2027); one that runs over the new year by both (2026-27).

regionsseasonflowering
us-*05-01 → 09-3007-01 → 08-31
br-soy10-01 → 03-3111-15 → 02-28
br-mt10-01 → 03-3111-15 → 01-31
br-pr, br-go, br-ms10-01 → 03-3112-01 → 02-15
br-rs10-01 → 03-3112-15 → 02-28
ar-*10-15 → 04-3001-01 → 02-28

Sources: USDA NASS Agricultural Handbook 628 (United States planting and harvest dates), CONAB crop progress (Brazil), Bolsa de Comercio de Rosario and Bolsa de Cereales de Buenos Aires (Argentina). The index publishes the table as calendar with its version (§8).

4. Features

4.1 One run: features/<source>/<yyyy-mm>.jsonl

Sources: gfs, ecmwf, aifs (0.25° grid) and ifshres (0.1° grid), each read from its live pointer. Inputs are the tmp2m (°C) and prate (mm/h) bundles. A temperature frame is an instant; a rate frame is taken to hold over the step that ends at it ((previous offset, offset], the first from the run time). GFS’s rate is instantaneous and the others’ a mean over that step; the indicators treat both alike.

Where the run publishes them, the soil bundles tsoil1…tsoil4 (°C) and soilw1…soilw4 (m³/m³) are read as well. A layer number is the source’s own layer, counted from the surface; the depths are the centres’, not one set:

sourcelayersdepths
gfs1–40–10, 10–40, 40–100, 100–200 cm (Noah)
ecmwf1–40–7, 7–28, 28–100, 100–289 cm (HTESSEL)
aifs1–20–7, 7–28 cm
ifshresnone—

Volumetric soil water is the land model’s own state, held to its own field capacity and wilting point: the same number is not equally wet in two models. Compare a model with itself (a run with the previous one, a day with an earlier day), not across sources. A soil field a run does not publish is null on every day.

A line:

{"schemaVersion":2,"source":"gfs","run":"2026100806","runTime":"2026-10-08T06:00:00Z",
 "manifest":{"path":"gfs.2026100806/manifest.json","crc32":"1a2b3c4d"},
 "weights":{"version":"1","grid":"0p25","crc32":"…"},"calendar":{"version":"1"},
 "horizon_days":10.0,"frame_step_hours":[[120,1],[240,3]],
 "regions":{"us-soy":{"days":[{"date":"2026-10-08","t2m_mean":12.31,…,"complete":true},…],
                      "summary":{"days":7,"precip_sum":14.2,"gdd_sum":21.07,"hot35_days":0.0,"soilw1_change":-0.012}},…}}
fieldmeaning
source, run, runTimethe run, run as YYYYMMDDHH
manifestthe run’s manifest path under the data root and the ?v= it was read at (null for a run read by name, which has no pointer)
weightsthe weights file’s version, grid and CRC-32
calendarthe calendar version
horizon_daysthe last temperature frame’s lead, in days
frame_step_hoursthe temperature axis as [through_hour, step_hours] segments: the daily maximum and minimum are over these frames, not true extremes
regionsper region present in the weights, in §2 order: days and summary

Each day, one object per local calendar date the run’s temperature frames reach:

fieldunitdefinition
date—the local date, YYYY-MM-DD
t2m_mean°Cmean over the day’s frames of the area-weighted 2 m temperature
t2m_max°Carea-weighted mean of each cell’s highest 2 m temperature among the day’s frames
t2m_min°Carea-weighted mean of each cell’s lowest 2 m temperature among the day’s frames
precipmmarea-weighted precipitation total over the local day
dry_frac1crop-area fraction whose daily precipitation is below 1 mm
hot30_frac1crop-area fraction whose daily highest 2 m temperature is above 30 °C
hot35_frac1crop-area fraction whose daily highest 2 m temperature is above 35 °C
gdd°C dgrowing degree days, max(0, min(t2m_mean, 30) − 10)
tsoil1 … tsoil4°Cmean over the day’s frames of the area-weighted soil temperature of the source’s layer, or null
soilw1 … soilw4m³/m³mean over the day’s frames of the area-weighted volumetric soil water of the source’s layer, or null
completebooleanevery frame the source’s axis places in the day is present

The eight soil fields, one row per id for the index’s features:

idlayer
tsoil1soil temperature, layer 1
tsoil2soil temperature, layer 2
tsoil3soil temperature, layer 3
tsoil4soil temperature, layer 4
soilw1volumetric soil water, layer 1
soilw2volumetric soil water, layer 2
soilw3volumetric soil water, layer 3
soilw4volumetric soil water, layer 4

The operation order is part of the output:

  1. A temperature frame belongs to the local day containing its valid time; a frame exactly at local midnight opens the new day.
  2. Per day, in axis order: each frame’s area-weighted mean Σ w·T (float64); t2m_mean is the plain mean of those; per cell the maximum and minimum over the day’s frames, then their area-weighted means; the hot fractions are the weight of the cells whose daily maximum exceeds the threshold.
  3. Each rate frame’s step is split over the local days it overlaps in proportion to the seconds in each, rate × hours per cell, accumulated in axis order; precip is its area-weighted mean and dry_frac the weight of the cells below 1 mm.
  4. gdd comes from the unrounded t2m_mean (base 10 °C, cap 30 °C).
  5. Soil, per field: a soil frame belongs to its local day as in step 1. A cell is not soil where its water is at or below 0 m³/m³ (the codebook’s bottom code, which the stores write where a record is masked, or IFS’s 0 over the sea), where its temperature is the bottom code (−61 °C), and, for a temperature, where the same layer’s water is not soil. Each frame’s area-weighted mean is over the soil cells, the weights renormalised over them; a frame whose valued cells carry less than half the region’s weight has no mean. The day’s value is the plain mean of its frames’ means, null when none has one. The soil axis is the bundle’s own and does not enter complete.
  6. Every number is rounded once, at the end, to two decimals; the soil water fields to three.

complete is true when the run starts at or before the day, every temperature frame the source’s published axis places in [start, end) is present, and every rate frame it places in (start, close] is present, where close is the first axis offset at or after the day’s end. The first and last days of a run are usually incomplete; a reader filters on it.

summary sums the first 7 complete days, which every source reaches, so summaries compare across sources: days (how many there were), precip_sum, gdd_sum and hot35_days (the sum of hot35_frac), from the rounded daily values, and soilw1_change, the last of those days' soilw1 less the first’s (null unless both have one).

A line stores raw values only. The change between two runs for the same date is the reader’s subtraction of two lines.

4.2 In-season totals: season/<region>.<season>.json

From ECMWF IFS (ecmwf) only, rewritten whenever an ECMWF run is added. Each local day of the season is taken from the newest ECMWF run that started at or before the day began and has that day complete: normally the cycle within twelve hours before it (Xue publishes the 00 and 12 UTC cycles), the first-day forecast standing in for an analysis. When that cycle is missing an older one supplies the day and the day is partial. A day is counted once the newest indexed ECMWF run is that cycle or a later one, and is replaced only by a newer qualifying run.

One source keeps the totals from mixing models. Over the Brazilian cerrado in the dry-to-wet transition GFS runs several degrees warmer and drier than IFS and AIFS from the first day on, where airport observations side with IFS; AIFS leaves almost no crop area below 1 mm on a wet day. IFS shows neither, and it publishes all four soil layers. Its first day is three-hourly, so t2m_max is the warmest of eight frames, not of twenty-four.

A season file of schema 1 (GFS) is not carried on: the first version 2 build rebuilds each season from the ECMWF lines on hand, which reach back to the product’s first day.

fieldmeaning
region, season, sourcethe file’s identity; source is ecmwf
calendar, weights, windowsversions, and the region’s season and flowering windows as ["MM-DD", "MM-DD"]
throughRunthe newest ECMWF run the file reflects
days_counted, days_partialrows in daily, and how many are partial
precip_total (mm), gdd_total (°C d), hot35_dayssums over daily (hot35_days sums hot35_frac)
cdd_current, cdd_maxconsecutive days with precip below 1 mm, at the last row and the longest; a date missing from daily ends a spell
days_counted_window, precip_window, hot35_days_windowthe same over the rows inside the flowering window
dailyone row per counted date: date, run, lead_hours (from the run to the day’s start), partial, flowering, then the §4.1 day fields

The series exists from the day the product went live; no source used here is archived, so it is never backfilled.

5. index.json

fieldmeaning
schemaVersion2
productindicators
notea fixed sentence: what the numbers are and that no agency issued them
attribution{name, data, license} per upstream (§10), plus citation (the form the upstream asks for) and notice (a sentence it requires on adaptations) where the upstream’s terms call for them
regions§2
features{id, unit, definition} per day field, the table of §4.1
calendar{version, source, regions: {<id>: {season, flowering}}}, §3
weights{version, spam, files: [{grid, path}]}
sourcesper source: id, grid, cadence, latestRun (the newest indexed run, or null), ok, error (null when ok)
filesevery published object but the index and the weights, sorted by path: {path, byteLength, crc32}, and for a month file also runs: [{run, offset, length}], which tile the file from offset 0

A source that fails (an unreadable pointer, manifest, store or weights file) reports ok: false with its error and adds nothing; the others go on. A run already in files is not computed again.

6. context/oni.json

NOAA CPC’s Oceanic Niño Index (oni.ascii.txt): the three-month running mean of the Niño 3.4 sea surface temperature (total, °C) and its departure from CPC’s moving 30-year base (anomaly, °C).

{schemaVersion, id: "oni", name, unit, source: {name, url, license}, fetches: [{fetched, rows, crc32}], rows: [{season, year, total, anomaly}]}. rows is the newest table whole, since CPC revises its last months; fetches records every fetch that changed it, with the CRC-32 of the text as served. xue indicators-context refreshes it at the start of every publish job; a failed fetch leaves the pulled file in place.

7. Weights: weights/<grid>.zarr/

One Zarr v3 group per grid (0p25 for GFS, ECMWF and AIFS, 0p1 for IFS HRES, t126 for CFSv2), built once offline from SPAM 2020 v2r2 soybean physical area (SOYB_A) and Natural Earth admin-1 polygons, with exact area overlap between the SPAM cells and the published cells. Any Zarr v3 client opens it (xr.open_zarr(url, consolidated=False)); the build reads it with NumPy alone, as below.

<grid>.zarr/
  zarr.json            group; the attributes below
  weights/zarr.json    float32 [region, lat, lon]
  weights/c/<r>/0/0    region r's shard
  region/  lat/  lon/  coordinates, one chunk each (c/0)

Group attributes:

attributemeaning
versionthe weights version (§8)
spamthe SPAM release and layer, SPAM 2020 v2r2 SOYB_A
citationthe citation IFPRI’s terms of use ask for, as in §10
noticethe sentence IFPRI’s terms of use require on adaptations, as in §10
gridthe grid id
regionsregion id → {"rows": [row0, row1], "cols": [col0, col1]}, the half-open box of the region’s non-zero cells
lon_conventionhow the grid points are laid out, in words: Grid points at cell centres: longitudes ascend from -180, latitudes run north to south. on the global grids

Arrays:

  • weights: float32, shape [regions, ny, nx] over the whole published grid, zero outside the region; each region sums to 1. dimension_names ["region", "lat", "lon"], fill_value 0. One sharding_indexed codec with one shard per region: the outer chunk is [1, ⌈ny/180⌉·180, ⌈nx/180⌉·180] ([1, 900, 1440] for 0p25; Zarr requires whole inner chunks, and the cells past the grid are padding), the inner chunk [1, 180, 180] under [bytes little-endian, zstd] with no content checksum, and the index at the end under [bytes little-endian, crc32c], as in zarr-profile.md. Inner chunks that are all zero are never written (the index pair 2^64 − 1) and read as zero.
  • region: the region ids in the order of the weights axis, Zarr’s fixed_length_utf32 (what zarr-python writes for a NumPy <U6).
  • lat, lon: float64 cell centres. Rows and columns are the bundle stores’ own: lon[i] = firstLongitude + i · longitudeStep, lat[j] = firstLatitude + j · latitudeStep, north to south. t126 is the Gaussian grid taken as equidistant, as its bundles describe it.

Reading one region: the two documents and the coordinates, then the region’s shard index as the suffix range bytes=-N (CRC-32C checked), then only the inner chunks overlapping its box, neighbouring ones merged into one range. A reader holds the box to summing to 1 (so nothing lies outside it) and applies the weights only to a bundle store whose grid has the same shape and cell centres. The weights.crc32 a line records is the CRC-32 of the group and array documents followed by every region’s boxed weights as read (float32, little-endian, in axis order).

8. Versions

  • schemaVersion is the layout of this document. A field added within it is a widening: readers ignore what they do not know, old lines are not rewritten.
  • Version 2 added the soil fields and soilw1_change, cut summary from 14 to 7 days and moved the season files from GFS to ECMWF. Lines are never rewritten, so a month file can hold version 1 lines followed by version 2 ones: a reader takes each line’s own schemaVersion (a version 1 line has no soil fields and a 14-day summary). The index and the season files are rewritten whole, so they are all of one version.
  • calendar.version changes with any window; weights.version with any weight. Every line and season file records the versions it was computed under, and lines already written are never recomputed under new ones.
  • A line is reproducible: the same run, weights and calendar give the same bytes (xue indicators-build --force checks this instead of rewriting).

9. Validation and vocabulary

Before anything is written, the index, every line and every season file are validated (xuebuild/indicators/schema.py): temperatures −60 … 60 °C, daily precipitation 0 … 500 mm, fractions 0 … 1, degree days 0 … 20, soil temperature −60 … 60 °C and soil water 0 … 1 m³/m³ or null, t2m_min ≤ t2m_mean ≤ t2m_max, hot35_frac ≤ hot30_frac, dates ascending, the run spans tiling each month file. A line that fails is dropped whole and its source reports the error.

Words that never appear

The product describes the weather over farmland and nothing else. No key and no string value in any file contains, as a word, signal, alert, warning, watch, bull, bear, long, short, price, contract, ticker, trade, hedge, position or yield (nor their plurals), and the files carry no market data, no company and no direction. Thresholds are named by their numbers (hot35_frac), never by a level of concern. The validators enforce the list on every write. The one exception is an attribution entry’s notice, an upstream’s own sentence quoted as its terms require (§10).

10. Attribution

The index carries the credit for each upstream:

  • NOAA NCEP — GFS forecasts; public domain (U.S. Government work).
  • ECMWF — IFS and AIFS open data; CC BY 4.0.
  • Open-Meteo — ECMWF IFS HRES as forwarded by Open-Meteo; CC BY 4.0.
  • IFPRI — SPAM 2020 v2r2, doi:10.7910/DVN/SWPENT; CC BY 4.0.
  • Natural Earth — admin-1 boundaries; public domain.
  • NOAA CPC — Oceanic Niño Index; public domain.

IFPRI’s terms of use (Harvard Dataverse, the IFPRI Datasets Terms of Use Statement of December 2019) release the dataset under CC BY 4.0 and ask two things of any adaptation, which the weights are. The index entry and each weights store carry both, as citation and notice:

International Food Policy Research Institute (IFPRI). 2024. Global Spatially-Disaggregated Crop Production Statistics Data for 2020 Version 1.0.0. https://doi.org/10.7910/DVN/SWPENT. Harvard Dataverse. Version 3.

This data was provided by the International Food Policy Research Institute (IFPRI). IFPRI bears no responsibility for the analyses or interpretations of the data presented here.

Nothing here is endorsed by IFPRI, and no IFPRI mark is used.


Part of the Xue specification, licensed under CC BY 4.0.

20 - The data API

Experimental. The API may change or break without notice, including routes, parameters and response shapes, and it has no versioning promise beyond the /v1 prefix. It runs on a best-effort basis with no guarantee of availability or of freshness: a run can reach the API late, or not at all. For anything that must keep working, read the static catalog and the Zarr stores directly (docs/stac.md, docs/zarr-profile.md), which are the published data contract.

In the viewer: /api is a console for these routes.

https://xue-api.ringsaturn.me is a read-only JSON service over the published dataset. It resolves a run the way the STAC catalog does (Collection → live pointer → manifest), reads the bundle’s Zarr store with ranged requests and decodes the quantized codes with the same xue crate the viewer’s wasm decoder uses. The point products — soundings, airports, surface stations, air-quality stations, weather alerts, tropical cyclones — it reads through their own pointer and index, one station per ranged read, and answers in physical units. It writes nothing. The viewer does not depend on it, so the site and the catalog work when it is down.

This document is the contract (how the same routes run on a self-hosted origin, and why, is in contribution/api-origin.md). rust/xue-worker/static/openapi.json is its machine copy, served at /v1/openapi.json with the live source list filled in and rendered at /docs (Swagger UI). A test holds the two to the same set of routes. https://xue.ringsaturn.me/api.html is a console that builds and sends requests from a browser, and finds a /v1/cell row and column from a latitude and longitude.

Everything a response says comes from the bucket at request time: the sources, a run’s variables, grids and codebooks. A new source, variable or run needs no deploy of the API.

Endpoints

All are GET (and HEAD), answer application/json; charset=utf-8 and carry access-control-allow-origin: *, with access-control-expose-headers naming the headers below (and retry-after, age, cf-cache-status) so a page can read them. OPTIONS answers the CORS preflight. Unknown query parameters are ignored.

RouteAnswersCache-Control
GET /health{status, build, now}; never touches the bucketno-store
GET /v1/openapi.jsonthe OpenAPI 3.1 contract, its source enum the live Collections (also at /openapi.json)max-age=60
GET /v1/catalog{dataOrigin, collections: [{id, title, href}]}, one entry per child of the root catalogmax-age=60
GET /v1/sources/{source}one source’s live run (§ Sources)max-age=60
GET /v1/pointone cell’s series for one or more bundles (§ Point)max-age=30, or a day with run=
GET /v1/cellone grid cell’s series in a named run (§ Cell)a day
GET /v1/soundingsthe radiosonde stations of the live issue (§ Soundings)max-age=60, or a day with issue=
GET /v1/soundings/{station}one station’s ascentssame
GET /v1/airportsevery airport’s newest observation (§ Airports)same
GET /v1/airports/{icao}one airport’s METARs and TAFsame
GET /v1/synopevery surface station’s current values (§ Surface stations)same
GET /v1/synop/{station}one station’s 24-hour windowsame
GET /v1/aqevery air-quality station’s current values (§ Air-quality stations)same
GET /v1/aq/{station}one air-quality station’s 24-hour windowsame
GET /v1/alertsthe weather alerts in force (§ Alerts)same
GET /v1/alerts/{id}one alert’s full recordsame
GET /v1/stormsthe tropical systems of the live issue (§ Storms)same
GET /v1/storms/{storm}one storm’s trackssame

Every response carries x-xue-api (the build) and x-xue-ms (the server’s own wall time, a diagnostic, not part of the contract). A point or cell read carries x-xue-run, a product read x-xue-issue: what the request resolved to.

Point

ParameterRequiredMeaning
sourceyesa Collection id: gfs, ecmwf, mrms, himawari, …
latyesdegrees, −90 to 90
lonyesdegrees, −180 to 360; a longitude past 180 wraps onto the same cell
variablesnobundle ids, comma-separated (tmp2m,wind10m) or repeated (variables=tmp2m&variables=wind10m); the run’s first bundle when absent
timenoan ISO 8601 instant; the frame nearest to it is returned. Without it the whole axis is
runnopin a run instead of following the live pointer: a STAC Item id (gfs.2026092506, mrms.2026092509.1455), a run directory (mrms.2026092509/1455) or a run id

The response:

{
  "source": "gfs",
  "run": "gfs.2026100400",
  "runTime": "2026-10-04T00:00:00Z",
  "request": { "lat": 35.7, "lon": 139.7, "variables": ["tmp2m", "wind10m"] },
  "timezone": "Asia/Tokyo",
  "cell": { "column": 1279, "row": 217, "longitude": 139.75, "latitude": 35.75 },
  "time": { "unitSeconds": 3600, "times": ["2026-10-04T00:00:00.000Z", "…"] },
  "variables": {
    "tmp2m":   { "bundle": "tmp2m",   "label": "2 metre temperature", "unit": "°C",
                 "quantization": { "type": "linear", "offset": -60.0, "scale": 0.5, "minimumCode": 0, "maximumCode": 220, "nodataCode": 255 },
                 "values": [21.5, "…"] },
    "ugrd10m": { "bundle": "wind10m", "label": "10 metre u wind",     "unit": "m/s", "quantization": { "…" }, "values": [3.1, "…"] },
    "vgrd10m": { "bundle": "wind10m", "label": "10 metre v wind",     "unit": "m/s", "quantization": { "…" }, "values": [-1.2, "…"] }
  }
}
  • variables is a flat map keyed by variable id, whatever was asked for. A vector bundle answers as its components, each naming its bundle. The API does not derive speed or direction.
  • values follows time.times one to one. Bundles of one run need not share an axis (ECMWF’s de-accumulated prate has no analysis frame), so time.times is the union of the requested bundles’ axes and a variable is null at a time its bundle has no frame for; the order the bundles are listed in does not change the answer. null is a missing code (the variable’s nodataCode, or a chunk the store never wrote). Values are the codebook’s: a linear field is quantized to its step (0.1 °C for tmp2m read from a series store), a log1p field (prate on a map store, the aerosol fields) to its scale. A linear value is spelled with as many decimals as its codebook’s offset and scale need (12.9, never 12.900000000000006); a log1p value is spelled as computed.
  • quantization is that codebook, as the STAC Item’s xue:quantization spells it (docs/stac.md). A linear value is offset + k × scale, within scale / 2 of the source field, and only in [offset, offset + maximumCode × scale]: a field beyond that range is clamped to it. A log1p codebook spaces its codes evenly in log1p(value / scale) from trace to maximum, one step being (log1p(maximum / scale) − log1p(trace / scale)) / (maximumCode − minimumCode): a value well above scale is within half a step relative (about 3 % for prate), one well below it within scale × half a step absolute. Below trace it is 0; above maximum it is null (the overflowCode).
  • times are UTC with milliseconds. On an observation window they are the frames’ own times; on the aurora window they are valid times about an hour ahead of the clock (docs/sources.md).
  • cell is the grid cell the point falls in, by the rule the viewer’s probe and shader use (xue::zarr::probe_cell): nearest cell, longitude wrapped onto the grid’s origin. Its longitude and latitude are the cell’s true centre: through the projection on a projected grid, the Gaussian latitude on a Gaussian one.
  • timezone is the IANA zone of the requested point (not of the cell: on a coarse grid the cell centre can sit across a border from it), looked up in the tzf-rs polygon index compiled into the server. Open sea answers the nautical zone (Etc/GMT+10, whose sign is POSIX-inverted); null only where no polygon covers the point, which the bundled data does not have. times stay UTC; the zone is for the client to convert them with.
  • A bundle whose manifest entry carries a series companion (docs/zarr-profile.md, “Series store”) is read through it: one chunk for the whole axis. Otherwise its map store is read, one chunk per time chunk. The response is the same either way.

Cell

The same read addressed by grid cell in a named run, for a client that repeats a place: ask /v1/point once, then read the run, cell.row and cell.column it answered. Every coordinate in a cell resolves to one URL, and with the run fixed the answer never changes, so it caches for a day.

ParameterRequiredMeaning
sourceyesa Collection id
runyesthe run, spelled as for /v1/point; /v1/sources/{source} names the live one
row, columnyesthe cell’s indices on the bundle’s grid, 0 at its first (north-west) cell. On a projected grid they count along the projection’s axes, so neither follows a parallel or a meridian
variablesnoas for /v1/point; a bundle listed twice is read once
timenoas for /v1/point

The response is /v1/point’s, with two differences: request echoes {row, column, variables}, and timezone is the cell centre’s.

  • Every requested bundle must be on one grid, since row/column index it. A source’s bundles usually share a grid; a reduced-resolution variant or a wave field may not (400 grid_mismatch). Read those separately, each with the cell /v1/point reports for it.
  • A cell’s address belongs to its run’s grid, which may change between runs of one source (a model moved from a resampled to its native grid). Keep run, cell.row and cell.column together, and ask /v1/point again for a new run.
  • A run the prune jobs have deleted answers 404 unknown_run: ask /v1/point again for the live run and its cell.

Sources

GET /v1/sources/{source} reads the source’s Collection and its live STAC Item:

FieldFrom
source, title, description, licensethe Collection
runthe Item id, else the Collection’s xue:live
runTimethe Item’s forecast:reference_datetime, else its datetime
bbox, timethe Item’s bbox and cube:dimensions.time
variablesthe Item’s cube:variables as a flat table: {<variable id>: {bundle, label, unit, quantization}}, quantization its xue:quantization (null where the Item has none)

The ids /v1/point?variables= accepts are the distinct bundle values of variables. A source with no live Item answers an empty table.

kind says what the source is and endpoint which route reads it: grid and /v1/point for a run or an observation window, point and the product’s list route (/v1/soundings, /v1/airports, /v1/synop, /v1/aq, /v1/alerts, /v1/storms) for a point product; null for a point product the API only names (nexrad). Asking /v1/point for a point product is 400 not_a_grid, whose detail.endpoint is the right route.

Point products

The soundings (docs/sounding.md), airports (docs/airport.md), surface stations (docs/synop.md), air-quality stations (docs/aq.md), weather alerts (docs/alerts.md) and tropical cyclones (docs/tc.md) share one shape on the bucket — a mutable latest-<product>.json naming an immutable <product>.<issue>/index.json, the records beside it addressed by byte span — and one shape here: a list route that answers the index, and a record route that answers one station or storm. Each read costs the pointer, the index (held in the isolate by its crc) and, for a record, one ranged request of exactly that record’s bytes.

Every product answer opens with the same four fields:

FieldMeaning
productsounding, airport, synop, aq, alerts, tc
issuethe issue’s STAC Item id: sounding.2026091402, airport.202609161440
issuedthe aggregation hour, or the ten-minute round
generatedwhen the build ran

and takes the same optional parameter:

ParameterMeaning
issuepin an issue instead of following the live pointer: <product>.<YYYYMMDDHH> for the hourly products, <product>.<YYYYMMDDHHMM> for the ten-minute rounds. The hourly products’ issues are found under their UTC day (sounding/2026/09/14/sounding.2026091402/), then flat; a pruned issue is 404 unknown_issue

The four station lists (/v1/soundings, /v1/airports, /v1/synop, /v1/aq) take the same spatial selection, and echo it as request:

ParameterMeaning
lat, lontogether: sort the stations by great-circle distance from this point, nearest first, and add distanceKm (to a tenth) to each
radiuswith lat/lon: keep only stations within this many km
bboxwest,south,east,north in degrees; west > east spans the antimeridian
limitat most this many stations: the nearest with lat/lon, the first in index order otherwise

and count is the number of stations answered. The four record routes take time, an ISO 8601 instant: only the record nearest to it is answered (one ascent, one METAR, one observation time); without it the whole window is. A station’s timezone is its IANA zone, as on /v1/point. The lists are the index with its byte spans removed and nothing added but distanceKm; sources is the build’s account of its inputs, verbatim.

Soundings

GET /v1/soundings answers stations[], each {id, wmo, name, lat, lon, elev, latest, times, headline} as the index has them (docs/sounding.md §4): id is the WIGOS identifier, wmo the five-digit number, headline the newest ascent’s t500/td500 (°C), freezingLevel (gpm), pw (mm) and levels.

GET /v1/soundings/{station} takes the WIGOS id or the WMO number and answers:

{
  "product": "sounding", "issue": "sounding.2026091402", "issued": "2026-09-14T02:00:00Z", "generated": "…",
  "station": { "id": "0-20000-0-47401", "wmo": "47401", "name": "Wakkanai", "lat": 45.415, "lon": 141.679, "elev": 2.9, "timezone": "Asia/Tokyo" },
  "units": { "p": { "label": "pressure", "unit": "hPa" }, "t": { "label": "temperature", "unit": "°C" }, "…": "…" },
  "soundings": [
    {
      "time": "2026-09-14T00:00:00Z", "launched": "2026-09-14T00:16:00Z", "sondeType": 41,
      "bulletin": "IUSC01 RJTD 140000", "gateway": "jp-jma-gts-to-wis2", "arrived": "2026-09-14T01:23:50Z",
      "n": 15, "reported": 15,
      "levels": { "p": [1008, 1000, "…"], "z": [null, 70, "…"], "t": [22, 20.6, "…"], "td": [17.2, "…"], "wd": [210, "…"], "ws": [4.6, "…"], "sig": [131072, "…"] },
      "derived": { "freezingLevel": 3292, "pw": 26.3, "lapse850_500": 6.1, "tropopause": null }
    }
  ]
}
  • soundings is newest first, at most four nominal times (time= keeps one). The ascent’s fields are the product’s (docs/sounding.md §5).
  • levels are the product’s seven fixed-point arrays decoded: p Pa → hPa, t and td K × 100 → °C, ws m/s × 10 → m/s, z (gpm), wd (degrees the wind comes from) and sig (the BUFR 0 08 042 flag word) unchanged. -32768 is null. The arrays are parallel, n long, and p is the axis: present on every level, strictly descending.
  • derived is the product’s, computed by the publisher from the fixed-point levels (docs/sounding.md §7), not recomputed here.

Airports

GET /v1/airports answers stations[], the index’s compact rows named: {icao, lat, lon, elev, obsTime, t, td, wd, ws, gust, vis, qnh, category, tafPresent} (docs/airport.md §4), the values the newest observation’s, tafPresent a boolean. category= keeps one flight category (VFR, MVFR, IFR, LIFR). units names each value’s unit.

GET /v1/airports/{icao} takes the ICAO id in any case and answers station (icao, name, lat, lon, elev, iata, wmo, timezone), units, metars — the last 24 hours newest first, each a Metar of docs/airport.md §5 verbatim (time, raw, t, td, wd, ws, gust, vis, qnh, slp, wx, cloud, category, auto, type) — and taf, the current Taf or null. The product’s conventions hold: vis 10000 means at least 10 km, wd is null for a variable wind, raw is the authority.

Surface stations

GET /v1/synop answers networks[] (each network’s entry of the index without its file descriptors: id, name, cadence, prPeriod, attribution, license, url, latest, and whatever further fields the index gives a network), elements (the element table, each {label, unit, cell, period}) and stations[]: {id, network, lat, lon, elev, rank, name, obsTime, values}, values keyed by element with the station’s current value or null. network= keeps one network (404 unknown_network otherwise, detail.available listing them). attribution is the credit a display of that network’s data must show.

GET /v1/synop/{station} takes <network>:<number> and answers in the shape /v1/point does, so a client reads a station and a grid cell with one type:

{
  "product": "synop", "issue": "synop.202610050010", "issued": "2026-10-05T00:10:00Z", "generated": "…",
  "station": { "id": "amedas:11016", "network": "amedas", "name": "Wakkanai", "names": { "ja": "稚内", "ja-Kana": "ワッカナイ" },
               "lat": 45.415, "lon": 141.6783, "elev": 3.0, "wmo": null, "rank": 0, "timezone": "Asia/Tokyo" },
  "network": { "id": "amedas", "name": "JMA AMeDAS", "cadence": 600, "prPeriod": 600, "attribution": "出典:気象庁ホームページ (Japan Meteorological Agency)", "license": "PDL-1.0", "url": "…", "latest": "…" },
  "time": { "unitSeconds": 600, "times": ["2026-10-04T23:50:00.000Z", "2026-10-05T00:00:00.000Z", "2026-10-05T00:10:00.000Z"] },
  "variables": {
    "t":    { "label": "air temperature", "unit": "°C",  "values": [15.0, 15.4, 15.7] },
    "gust": { "label": "gust",            "unit": "m/s", "values": [null, null, null] },
    "…": "…"
  }
}
  • time.times is the station’s window, oldest first, the product’s epoch seconds written as ISO instants; unitSeconds is the network’s cadence.
  • variables has one entry per element of the index, whether or not the station reports it (an element it never reported is all null), with values following times one to one, and the element’s label, unit, cell and period. There is no bundle field.
  • label is the API’s own. unit, cell (point, mean, sum, max, min) and period (seconds a value covers, ending at its time; null for an instantaneous value; "network" for the network’s own period — prPeriod, wsPeriod) are the index’s elementTable (docs/synop.md). A round written before the table has the API’s own unit and null for cell and period.
  • The line’s further fields (quality codes, a WIGOS identifier) are not answered; read the product for them.

Air-quality stations

GET /v1/aq and GET /v1/aq/{station} read the air-quality product (docs/aq.md) exactly as the surface-station routes read theirs, with the same parameters, shapes and errors. The differences:

  • networks[] carry avgPeriod (seconds each value averages over) and preliminary (unvalidated data, which a display must say) instead of prPeriod; every element’s period is the network’s ("network").
  • A list’s station carries agency after name: the agency that runs the station and owns its data, which a display credits with the values where the network’s terms ask it to (AirNow). A record’s station has id, network, name, names, lat, lon, elev, rank, agency, timezone (no wmo).
  • The elements are pm25, pm10 (µg/m³), o3, no2, so2 (ppb) and co (ppm), hourly means timed at the end of the hour; a station id is <network>:<the network's own id> (airnow:060371103).

Alerts

GET /v1/alerts answers the live snapshot (docs/alerts.md §5): networks[] (each network’s entry of the index without its file descriptor: id, name, attribution, license, url, latest, areas, with areas.path resolved against the data root, /v1/catalog’s dataOrigin), categories (the index’s list), alerts[] — {id, network, category, level, event, sent, onset, expires, bbox}, the index’s rows named, in id order, bbox [west, south, east, north] or null — and ended[], {id, network, reason, by} for each alert that left with this round (reason expired, cancelled, replaced or gone; by the id that replaced it, where the round names one, else null).

ParameterMeaning
networkkeep one network (nws, jma, eccc, meteoalarm, cma, hko, cwa); 404 unknown_network otherwise, detail.available listing them. Also filters ended[]
categorykeep one of the index’s categories; any other is 400 invalid_parameter, detail.available listing them
levelkeep the alerts at this level or above, an integer 1 … 5
lat, lontogether: keep the alerts in force at this point
bboxwest,south,east,north; keep the alerts whose box meets it (west > east spans the antimeridian)
limitat most this many, the first in id order

radius is refused (400 invalid_parameter): a point either is in an alert’s area or is not. The point test has two tiers. An alert with its own polygon (NWS storm-based warnings, every ECCC alert) is tested against that polygon, read from its line; a MeteoAlarm alert that also names areas by code (parts of its area the polygon does not draw) matches a point outside the polygon by its box, as an area-coded alert does. An alert drawn only by area codes is tested against its box, which is the union of its areas’ boxes and so wider than the areas themselves: a point near such an alert’s edge can match it without being in any of its areas. An alert with neither a polygon nor a box (a network with no boundary set, such as jma, or a round written before area boxes) matches no point and no bbox. A client that needs the exact answer for coded alerts joins areas to the boundary set (docs/alerts.md §9) itself. A point query costs one ranged read per alert whose box holds the point.

GET /v1/alerts/{id} takes an alert id, percent-encoded where it carries reserved characters (nws:urn:oid:…), and answers network and alert: the alert’s line (docs/alerts.md §6) verbatim — id, network, category, level, native, sent, onset, expires, status, texts, areas, geometry, url, sender, and replaces where the round gives it — with bbox from its row added. An id not in force in the issue is 404 unknown_alert; one that ended with this round says how in detail.ended ({id, network, reason, by}), so a client following an alert sees what replaced it.

Storms

GET /v1/storms answers storms[], the index’s rows (docs/tc.md §4) without their file descriptors: {id, level, basin, name, aliases, position, vmax, pmin, class, classAgency, agencies, models, best}, and crosswalk, old id → current id. basin= and level= keep one basin (AL, EP, CP, WP, IO, SH) or level (A, B, C), case-insensitive.

GET /v1/storms/{storm} takes a storm id, an id the issue’s crosswalk maps onto a current one, or one of a storm’s aliases (EP97, ecmwf:70W), and answers the storm document (docs/tc.md §5) with resolvedFrom naming the id the request used when it was not the storm’s own: id, level, basin, name, sid, intl, aliases, then best, agencies, models, alert, impact and sources. include= (comma-separated section names) answers only those sections; the seven identity fields are always present.

A model’s ensemble (docs/tc.md’s Ensemble: leads, members and flattened fixed-point arrays) is unpacked into one track per member:

"gefs": {
  "issued": "…", "base": "2026-09-12T00:00:00Z", "run": "2026091200",
  "leads": [0, 21600, "…"],
  "members": [
    { "member": 0, "points": [ { "lead": 0, "time": "2026-09-12T00:00:00.000Z", "lat": 16.9, "lon": -126.0, "vmax": 21.6, "pmin": 996.0 }, "…" ] },
    { "member": 1, "points": [ "…" ] }
  ],
  "mean": { "…": "a Forecast, or null" }
}

lat/lon are degrees, vmax m/s, pmin hPa, time is base + lead; a lead at which a member has no position is left out of its track, so a member that never found the system has an empty points. Deterministic forecasts and best tracks are passed through as the product writes them.

Errors

{ "error": { "code": "unknown_variable", "message": "…", "detail": { "available": ["tmp2m", "…"] } } }
StatuscodeWhen
400invalid_parametersource, lat or lon missing or out of range; time not ISO 8601; run not a run name; issue not <product>.<digits>; /v1/cell without run, row or column, or a cell outside the grid (detail gives its rows and columns); lat without lon, radius without them, a malformed bbox, limit under 1; an include section that does not exist; an alerts level outside 1 … 5, a category the issue does not list, or radius on /v1/alerts
400grid_mismatch/v1/cell asked for bundles on different grids; detail.bundles names the first two
400not_a_grid/v1/point asked for a point product; detail.endpoint is the route that reads it
404unknown_sourceno such Collection
404no_live_runthe Collection names no live pointer, the run publishes no bundles, or a product publishes no live issue
404unknown_runrun= names no manifest
404unknown_issueissue= names no index (pruned, or never published)
404unknown_variablethe run has no such bundle (detail.available lists those it has), or the bundle ships no store
404unknown_stationthe issue has no such sounding station, airport, surface station or air-quality station
404unknown_networknetwork= names no network of the issue (detail.available lists them)
404unknown_alertthe issue has no alert in force by that id (detail.ended says how it left, when it left with this round)
404unknown_stormno storm, crosswalk entry or alias by that id (detail.available lists the storms)
404not_foundno such route
403forbiddena self-hosted origin set to answer only its proxy (XUE_API_REQUIRE_HEADER) was reached without it
405method_not_allowedanything but GET, HEAD, OPTIONS
422point_off_gridthe point is outside a regional grid (HRRR, a satellite disk)
502upstream_faileda bucket read failed, or a document in it is not what the profile says
429rate_limiteda self-hosted origin’s request budget is spent; retry after Retry-After seconds (also detail.retryAfter). Cached answers are not limited
503overloadedtoo many requests are being computed at once (on a self-hosted origin, possibly only this client’s, XUE_API_INFLIGHT_PER_CLIENT); retry after Retry-After seconds

Errors are not cached.

Caching and freshness

  • A 200 from any /v1/ data route is stored in the edge cache of the data center that served it, keyed by the full URL, for its max-age. A self-hosted origin also keeps it for that long and answers a repeat with the remaining lifetime as max-age, so the two layers together never hold an answer longer than one would.
  • A live answer can therefore lag a new run by up to 30 s (60 s for the catalog, the source summaries and the point products), and two data centers can briefly answer from different runs. Pin run= or issue= for a stable answer; it caches for a day because a run’s or an issue’s objects never change under it. /v1/cell always pins its run.
  • Inside an isolate (or the origin process), the manifest and a product’s index are held by their pointer’s crc, store documents and shard indices by path#crc32, and a station’s byte span by path#crc32:offset+length. The Collection and the pointer are read on every uncached request, so the API never names a run or an issue the prune jobs have deleted.

Limits and attribution

  • Requests are rate-limited per IP at the zone. The rule lives in the Cloudflare dashboard, not in this repository.
  • There is no key, quota or SLA (see the experimental notice above).
  • The data keep their sources’ licences. NOAA products are public domain (attribution requested); ECMWF, EUMETSAT and JMA require attribution. The Collection’s license and its providers (/v1/sources/{source}, or the STAC Collection) say which applies to a source.
  • Every timezone field contains information from timezone-boundary-builder, which is made available here under the Open Database License (ODbL). The chain is © OpenStreetMap contributors → timezone-boundary-builder → the derived database tzf-dist → tzf-rs, which compiles it into the server; every link is ODbL. A client that shows or republishes those zones keeps that notice with them.

Not in this contract

  • Spatial aggregates, area statistics, long-history stitching: those are the encoder’s job, published as products, not computed per request.
  • Derived quantities over a product’s records (a skew-T index not in derived, a METAR decoded further than the service decodes it, a storm’s impact area): the products define what is published and the API returns it; a client computes the rest.
  • Anything older than the live issue that the bucket no longer holds. The API reads what the prune jobs leave (seven days of hourly issues, three hours of ten-minute rounds); the archive is not its concern.
  • The single-site radar (nexrad): a polar Zarr product, named in /v1/sources/nexrad and read from the catalog (docs/nexrad.md).

Part of the Xue specification, licensed under CC BY 4.0.