Data Pipeline Explainer

Identifying ISSRs in WindBorne observations

A visual walkthrough of the WindBorne radiosonde pipeline — which fields we pull from the API, how raw levels are filtered into a clean cruise-band table, how relative humidity over liquid and over ice are derived, and the exact criteria that flag an ice-supersaturated region (ISSR).

01 — The Data Source

Pulling Soundings from the WindBorne API

Every balloon ascent and subsequent descent (referred to as legs) are a sounding: a time-ordered sequence of observations collected and transmitted as the balloon rises and falls. The WindBorne observations API (api.windbornesystems.com/observations/v1) exposes soundings through two calls, paired together: a paginated index that lists which soundings exist, and a per-sounding fetch that returns the full vertical column for one of them.

The index (GET soundings.json) is walked page by page, trusting the server's has_next_page flag as the authoritative loop terminator rather than stopping on a short page — a short page can still be followed by another page. Each index row is lightweight metadata: id, mission_id, start_time/end_time, and the min/max altitude the ascent reached. The heavy payload comes from following up with GET soundings/{sounding_id}.json, which returns {sounding_id, mission_id, data: [levels…]} — one dict per level.

soundings.json paginated index id · mission_id · start_time soundings/{id}.json one ascent, full column retried on 400/403/429/5xx (spurious overload signals) per-level record altitude_m pressure_hpa temperature_c dewpoint_c relative_humidity_pct specific_humidity_mg_kg latitude, longitude time repeated for every observation of the sounding
Two calls, chained: the index tells the pipeline which sounding ids exist; the per-sounding fetch returns every observation of the requested sounding. Position (latitude/longitude) is per observation, not per sounding — balloons drift horizontally while climbing, so each level carries its own fix.

Eight fields are read from each observation record. The client and the two downstream consumers (sounding.py's live analysis path and ingest.py's cache builder) both resolve field names through a small alias table rather than a hardcoded key, tolerant of schema variants (e.g. altitude_m vs. altitude) until the exact production schema is locked down:

Field pulledWhat it is
altitude_mGeopotential height above mean sea level (m)
pressure_hpaAmbient pressure (hPa)
temperature_cAir temperature (°C)
dewpoint_cDewpoint temperature (°C) — the preferred route to compute RHi
relative_humidity_pctReported RH (%) — over liquid water, see §03
specific_humidity_mg_kgKept for documentation / cross-check; not used to derive RHi
latitude, longitudeLateral position (deg) — the balloon's drift track
timeTimestamp
What's deliberately not used. flying_missions and missions/{id}/flight_path exist in the same API family and would give a mission's live position/launch site directly — but under the key this pipeline uses they return a hard 401, unconditionally, whether the mission is still flying or already landed. The ISSR pipeline never depends on them: it only calls soundings/sounding, which work fine under the same key. WindBorne has been contacted about potentially granting access to mission-level data as well.
02 — Cleaning the Column

From Raw Telemetry to a Clean Table

A sounding's data array is ordered by time, not altitude. It captures the balloon ascending and then descending (when negative lift is applied), such that both legs can potentially pass through nearly the same air if there was little drift involved. The same can of course be the case for the descent of a sounding followed by the ascent of the subsequent sounding. Filtering happens in three passes, in the following order.

1. Splitting into legs. The sounding's data array is split at its altitude argmax into an ascent leg (start through the peak) and a descent leg (peak to end). Both legs keep the parent sounding_id as a pairing key, since the two passes sample correlated, rather than independent air.

2. Restricting to the cruise band. Only levels between FL250 and FL450 (approximately 7620 to 13716 m above mean sea level or 375 to 150 hPa pressure altitude), representing the altitude band commercial aircraft actually fly, are kept. This is the band our contrail avoidance-relevant ISSR statistics are meant to be representative of.

3. Applying the QC mask. A n observation survives only if every one of the following conditions hold:

The QC mask (ingest.py levels_to_frame)
$$ \begin{aligned} \text{good} = \ & \text{finite}(alt,\, p,\, lat,\, lon,\, time) \\ \wedge\ & (1\ \text{hPa} < p < 1100\ \text{hPa}) \\ \wedge\ & (7620\,\text{m} \le alt \le 13716\,\text{m}) \\[4pt] \wedge\ & \text{finite}(T,\, RH) \\ \wedge\ & (150\,\text{K} < T < 330\,\text{K}) \\ \wedge\ & (0 \le RH < 1.6) \end{aligned} $$

The first block (altitude/pressure/position/time) is always required. The second block (temperature/RH range) is required for climatology work but can be relaxed — an ingest run for a position-only analysis (e.g. balloon movement) passes skip_temp_rh_requirement=True, since humidity is gated on temperature QC and has the lowest pass rate of any field WindBorne reports (see Spisak et al. preprint).

Observations that pass are then sorted by altitude within their leg, so every downstream array is monotone in altitude — the ISSR layer detection in §06 depends on that ordering. The sounding.py live-analysis path applies the same shape of filter (finite checks, 150 K < T < 330 K, 0 ≤ RH < 1.6, plausible pressure), and additionally requires at least 5 surviving samples before building a usable profile.

Why RH's upper bound is 1.6, not 1.0. The QC range check on the reported RH allows values up to 160%, not the naive 100% ceiling — the capacitive sensor genuinely reads above saturation over liquid in and around cloud, and clipping at 1.0 here would discard real data before it even reaches the humidity/ISSR logic. The clear-sky screen that actually excludes the sensor's saturation-rail artifact is a separate, ISSR-specific step — see §06.
03 — The Reported Humidity

RH over Liquid Water

Relative humidity is always a ratio: the ambient water-vapour partial pressure divided by a saturation vapour pressure. That saturation pressure depends on which phase — liquid or ice — the air would be in equilibrium with, and below 0°C those two reference curves diverge. "RH = 80%" is a different amount of water vapour depending on which curve was used to compute it.

Saturation vapour pressure over (supercooled) liquid water is computed with the Murphy & Koop (2005) formulation, valid from 123 K to 332 K — comfortably covering the cirrus/UTLS temperature range:

Saturation vapour pressure over liquid — Murphy & Koop (2005) Eq. 10
$$ e_{\text{sat,liq}}(T) = \exp\!\Big(54.842763 - \tfrac{6763.22}{T} - 4.210\ln T + 0.000367\,T \\ {} + \tanh\!\big(0.0415\,(T-218.8)\big)\big(53.878 - \tfrac{1331.22}{T} - 9.44523\ln T + 0.014025\,T\big)\Big) $$

$T$ in Kelvin; result in Pa. The same paper's ice formulation (§04) is used for the ice reference so both curves are internally consistent — the prior ERA5/GRUAN pipeline mixed Murphy & Koop liquid with a different ice formula (Sonntag 1994); the two ice curves differ by well under 1% across the cirrus range, so this pipeline uses Murphy & Koop for both.

Which reference phase does WindBorne's own relative_humidity_pct field use? This had to be checked empirically rather than assumed: comparing the reported RH against the over-liquid and over-ice readings implied by each observation's dewpoint shows the reported field matches the liquid reading to within 0.4%, at every observation, independent of Temperature. So the API's processed RH field is plain RH over liquid water at all temperatures — not WindBorne's onboard sensor-paper blend convention (that distinction matters a lot; see §05). Nonetheless, RH is always computed from the dewpoint temperature for our purposes:

RH over liquid, from dewpoint
$$RH_{\text{liquid}} = \frac{e_{\text{sat,liq}}(T_{\text{dew}})}{e_{\text{sat,liq}}(T)}$$

Dewpoint is defined as the temperature at which ambient vapour pressure equals saturation over liquid, so $e = e_{\text{sat,liq}}(T_{\text{dew}})$ by construction — this ratio recomputes exactly what the reported field should read, and is the basis of the schema-drift check below.

A running sanity check, not just a one-time verification. Every sounding is passed through a drift guard: at levels colder than 250 K (where the liquid and ice curves are furthest apart), it compares the reported RH against both the liquid- and ice-referenced dewpoint readings and logs a warning if the reported value ever starts matching ice better than liquid. If the API's convention silently changed, this is what would catch it — the humidity logic itself always trusts the dewpoint route (§04), so a drift wouldn't corrupt results, but it would otherwise go unnoticed.
04 — The ISSR Quantity

RH over Ice (RHi)

Everything ISSR-related hinges on getting one number right: relative humidity with respect to ice, RHi. A region is ice-supersaturated when $RHi \ge 1$. The ice-side saturation curve uses the companion Murphy & Koop formula, valid above 110 K:

Saturation vapour pressure over ice — Murphy & Koop (2005) Eq. 7
$$e_{\text{sat,ice}}(T) = \exp\!\left(9.550426 - \frac{5723.265}{T} + 3.53068\ln T - 0.00728332\,T\right)$$

Because ice holds less water vapour at saturation than liquid does, $e_{\text{sat,liq}}(T) \ge e_{\text{sat,ice}}(T)$ at every temperature below 0°C — and the gap widens the colder it gets. That single fact is the entire reason ISSRs exist in clear air: a parcel can be sub-saturated with respect to liquid (so no cloud is visible) while simultaneously being super-saturated with respect to ice.

1 10 100 600 0 -10 -20 -30 -40 -50 -60 temperature (°C) e_sat (Pa, log scale) e_sat, liquid e_sat, ice gap widens with cold
Murphy & Koop (2005) saturation vapour pressure over liquid (red) and ice (blue), computed exactly as in thermo.py. The two curves meet at 0°C and diverge below it — at −50°C the liquid curve sits 60% above the ice curve, which is exactly why a parcel reading sub-saturated over liquid can still be ice-supersaturated.

RHi is computed one of two ways, in strict preference order:

Preferred — directly from dewpoint (convention-free)
$$RHi = \frac{e_{\text{sat,liq}}(T_{\text{dew}})}{e_{\text{sat,ice}}(T)}$$

This is the route actually used for WindBorne soundings, since every observation should carry a dewpoint_c. It depends on no reporting convention and is immune to any clamp on the reported RH field, because it's built straight from the vapour pressure implied by the dewpoint, referenced onto the ice curve.

Fallback — only when a level has no finite dewpoint
$$RHi = RH_{\text{liquid}} \times \frac{e_{\text{sat,liq}}(T)}{e_{\text{sat,ice}}(T)}$$

Converts the reported (over-liquid) RH onto the ice reference by multiplying by the liquid/ice saturation-pressure ratio — always $\ge 1$ below 0°C — as presented in Spisak et al. preprint. Used per-observation, only where the dewpoint route yields a non-finite result.

Both the live-analysis path (sounding.py) and the cache builder (ingest.py) apply exactly this preference: try the dewpoint formula first, and substitute the RH-conversion fallback only at the specific levels where it comes back non-finite — np.where(np.isfinite(rhi_dew), rhi_dew, rhi_from_rh). RHi is never read from the API; it is always derived.

05 — The Subtlety

Why Not Use WindBorne's Own Convention?

Not every instrument reports RH the same way. WindBorne's sensors paper (arXiv:2602.02714 §3.1) describes the onboard sensor's raw telemetry as a liquid/ice/blend quantity — over liquid above 0°C, over ice below −23°C, and a squared blend in between (the same convention ECMWF's IFS model uses internally). The pipeline encodes this as a general-purpose RHConvention: a reported value is treated as a mixture of a liquid-referenced part and an ice-referenced part, with the liquid weight ramping from 1 (warm) to 0 (cold):

Liquid weight of a reported RH — general convention
$$w_{\text{liq}}(T) = \left[\text{clip}\!\left(\frac{T - T_{\text{ice}}}{T_0 - T_{\text{ice}}},\,0,\,1\right)\right]^{p}$$

WindBorne's own onboard convention sets $T_0 = 273.16\,\text{K}$ (0°C), $T_{\text{ice}} = 250.16\,\text{K}$ (−23°C), $p = 2$ — matching ECMWF IFS formula 3.12.

The bug this avoids. §03 showed empirically that the API's processed relative_humidity_pct field is already plain RH over liquid at every temperature — not the onboard blend. Applying WindBorne's own liquid/ice blend on top of that field would be a double correction: below −23°C the blend treats the value as already-over-ice and passes it through unchanged, when it is in fact still over-liquid and needs the full liquid→ice conversion. The practical effect is severe — it cancels the real supersaturation and caps the computed RHi at roughly 100%, silently erasing every ice-supersaturated region the data actually contains. This is why §04 uses the convention-free dewpoint route, or (as a fallback) the plain WMO_LIQUID convention — never the WINDBORNE blend — against the API's RH field.

The convention machinery is kept general rather than hardcoded, because it also expresses the two simpler conventions the pipeline treats as reference points: WMO_LIQUID (report-over-liquid at every temperature — the classic radiosonde/GRUAN convention, and the correct one to apply to WindBorne's API field) and ALL_ICE (report-over-ice everywhere, the identity transform for an already-ice-referenced field). Making the reference phase an explicit, named object — rather than an implicit assumption baked into a formula — is what let the mismatch between "what the sensor telemetry uses" and "what the API field actually reports" be caught and named instead of silently miscomputing RHi.

06 — The Detection

Flagging an ISSR

An ISSR (ice-supersaturated region) is a purely thermodynamic definition — $RHi \ge 1$ — with no Schmidt-Appleman contrail-formation criterion applied. Per-sample, three conditions must all hold for an ice-supersaturated layer to be counted:

Per-sample ISSR flag (find_issr_layers)
$$ \text{issr}_i = \underbrace{\big(FL250 \le alt_i \le FL450\big)}_{\text{cruise band}} \;\wedge\; \underbrace{\big(RHi_i \ge 1.0\big)}_{\text{thermodynamic threshold}} \;\wedge\; \underbrace{\big(RH_{\text{liquid},i} < 1.0\big)}_{\text{clear-sky screen}} $$

The third condition — the clear-sky screen — exists for a concrete sensor-behavior reason. WindBorne's capacitive humidity sensor has a 0–100% RH range and pins at the RH = 1.0 rail in and just after cloud. At that rail, dewpoint equals temperature by construction, which forces $RHi \approx 1.6$ — a sensor-ceiling artifact, not a measured clear-sky supersaturation. Dropping samples with $RH_{\text{liquid}} \ge 1.0$ removes exactly this artifact without discarding real ISSR: genuine clear-sky ice supersaturation stays below the homogeneous-freezing limit ($RHi \approx 1.5$ at −50°C, corresponding to $RH_{\text{liquid}} \approx 0.9$), so it always reads $RH_{\text{liquid}} < 1.0$ and survives the screen.

Per-sample flags aren't the final answer, though — a single noisy sample shouldn't count as a "layer," and a real layer shouldn't be split by one dropout reading. Two clean-up passes turn the flag mask into ISSR layers:

Layer clean-up — IssrConfig defaults
KnobDefaultWhat it does
rhi_threshold1.0RHi at/above this counts as supersaturated
rh_liquid_max1.0clear-sky screen — RH-liquid must be strictly below this
gap_merge_m30.0 mdry layer gaps between two ISSR layers that narrower than this are merged into one layer
min_layer_thickness_m30.48 m (100 ft)merged layers thinner than this are discarded
fl_min / fl_maxFL250 / FL450cruise-band restriction (7620–13716 m)
FL250 FL350 FL450 altitude RHi = 1.0 0.5 1.5 RHi (fraction) gap < 30 m → merged isolated spike, < 100 ft thick → dropped Layer A (merged) Layer B kept ISSR layer discarded (too thin)
A schematic ascent: RHi (x-axis) crosses the RHi = 1.0 threshold (dashed red) several times as altitude (y-axis) increases through the cruise band. Two ISSR layers separated by a sub-30 m gap merge into one Layer A; a lone RHi spike that is thinner than 100 ft is discarded rather than counted as a layer; the broader excursion higher up survives intact as Layer B.

Concretely, the merge-and-filter pass works on the boolean run structure of the mask: rising/falling edges mark layer boundaries, adjacent layers separated by a gap under gap_merge_m get their (lo, hi) altitude bounds combined into one, and any surviving layer — merged or not — thinner than min_layer_thickness_m is dropped. A layer whose bottom or top coincides with the edge of the sampled cruise-band range is also flagged edge-censored: the cruise-band cutoff ended the layer there, not a real return below threshold, so its reported thickness on that side is a lower bound rather than the layer's true physical extent.

Two similar-looking constants, two different jobs — not symmetric. It's easy to assume gap_merge_m (30.0 m) and min_layer_thickness_m (30.48 m ≈ 100 ft) are "the same rule applied to both classes." They aren't:
  • Short dry gap between two ISSR runs (< 30 m): bridged by gap_merge_m at the mask-merge step, before layers exist. The two runs become one ISSR layer; the gap is never separately evaluated against min_layer_thickness_m.
  • Isolated ISSR run (< 30.48 m, too far from a neighbor to merge): dropped by min_layer_thickness_m after merging. It never becomes an ISSRLayer at all.
  • Short dry layer on its own terms: there is no equivalent minimum-thickness drop for dry intervals. find_dry_layers() — the separate function that reports the dry interval between two consecutive kept ISSRLayers — only rejects a candidate for poor sample density inside it (max_gap_m, default 500 m). It happens to never see a dry layer shorter than ~gap_merge_m, but only because anything shorter was already absorbed in the first bullet — that floor is a side effect, not a rule applied to dry layers directly.
One more wrinkle: an isolated thin ISSR spike dropped by the second bullet doesn't get relabeled "dry" — it just disappears from the layer list. If a dry layer is later computed across that gap, its density check never re-confirms that every sample inside is actually sub-threshold; it just checks that the sensor kept sampling.
Detection runs on the native grid, deliberately unresampled. The sonde's native vertical spacing is a median of about 8 m (23 m at the 90th percentile) — far finer than a standard 1000 ft (≈305 m) flight-level grid. Interpolating onto a coarse fixed grid first would merge or completely drop most real ISSR layers, which are often only a few hundred metres thick. The 30 m gap-merge tolerance is chosen to match GRUAN's own sensor-noise tolerance, not to smooth over real structure.