Forward model: stochastic particle trajectories driven by wind + turbulence. It is the bridge between the analytical Tier I (no real wind variability) and the full PDE Tier III (no statistical efficiency), and it is what FLEXPART ([stohl2005flexpart]) and STILT do operationally (see also HYSPLIT, [stein2015hysplit]).
Status: the forward model (Step 1) is implemented in plumax.lagrangian; Step 2 (inference), Steps 3-4 (footprint emulator and emulator-based inversion) and the met-ensemble runner are implemented too, and only the Step 5 predictor is still proposed below.
(1) Simple model¶
Stochastic dynamics: Markov-1 Langevin¶
Operational LPDMs (FLEXPART, STILT, HYSPLIT) use Markov-1: a Langevin equation on particle velocity, then position from velocity. We commit to Markov-1 because it’s required for near-source super-emitter work and for non-stationary turbulence:
: mean wind from the met field (WRF / ERA5 / HRRR).
: turbulent velocity perturbation, the actual stochastic state.
: drift and diffusion coefficients constructed from the Reynolds-stress tensor and Lagrangian timescale . Reference: [thomson1987], [wilson1996] (well-mixed condition).
come from MO similarity ([monin1954]) parameterised by plus WRF TKE; see MO prereqs.
Sub-grid wind interpolation¶
WRF velocities are gridded at hourly snapshots; particles are continuous in space and time. Naïve bilinear interpolation of is not divergence-free, which causes mass-conservation drift over long integrations, so we use a C-grid-aware interpolator that reconstructs consistently with the WRF staggered grid (operational STILT pattern). We document the chosen scheme on the integrator API and treat divergence preservation as load-bearing.
Time-stepping¶
Default to Euler-Maruyama with adaptive step bounded by
Higher-order Milstein only if convergence diagnostics flag bias. is an open parameter; see open questions for the operational target.
Run modes¶
Forward mode: release particles from the source, track concentration by binning particle density on the analysis grid.
Backward mode (footprint): release receptors backward in time to get the source-receptor sensitivity matrix , which is the FLEXPART/STILT paradigm and the workhorse of regional-scale inversions ([stohl2005flexpart]).
Footprint definition (formal)¶
For a receptor and a candidate source cell :
It is integrated over particle residence time below a fraction of the local PBL height . Units: (mixing-ratio per kg/m²/s of surface flux). The footprint is a probability density over candidate source cells, properly normalised by particle volume and air density, and so is not an indicator. Numerical scaling matters because the values are tiny, so we work in log-space when storing.
For an overpass with columns and candidate source cells, is shape and typically 90%+ sparse.
(2) Model-based inference¶
Forward model with observation operator¶
The full forward used by inference is not . It’s:
gives a 3D concentration field from the source vector.
collapses to an XCH₄ column.
applies the satellite averaging kernel; see (eq-ak-operator).
is the regional background, and it is mandatory. As in Tier I, the predicted enhancement and the absolute-column observation must be reconciled on day 1.
The column and averaging kernel are the Tier I ColumnObservation, applied to the forward concentration on its (z, y, x) grid. With c in kg m⁻³ and h_k = Δz it returns the column-mass enhancement in kg m⁻², the unit plumax.obs converts L2 products to:
import jax.numpy as jnp
from plumax.gauss_plume import ColumnObservation
from plumax.lagrangian import simulate_lagrangian
# Shapes: N_x, N_y analysis-grid cells; N_z levels; N_Ωy = 2 receptors
# today* (plumax)
# c(x, y, z) [kg m⁻³]
dataset = simulate_lagrangian(...) # → Dataset (N_x, N_y, N_z)
# reorder to the (z, y, x) grid of the column operator
field = dataset["concentration"].transpose("z", "y", "x") # → (N_z, N_y, N_x)
concentration = jnp.asarray(field.values) # (N_z, N_y, N_x)
# Δz = z₁ − z₀ [m]
layer_thickness = float(dataset["z"][1] - dataset["z"][0]) # → ()
# h_k = Δz on every level
layer_weights = jnp.full(dataset.sizes["z"], layer_thickness) # → (N_z,)
# receptors at the (iy, ix) cells
receptor_index = jnp.array([[4, 2], [4, 6]]) # → (N_Ωy, 2)
# today (plumax)
observation = ColumnObservation(
layer_weights=layer_weights,
receptor_index=receptor_index,
)
# today (plumax)
# ΔΩ_i = ∑_k h_k c_{k,i} [kg m⁻²]
column = observation.from_field(concentration) # (N_z, N_y, N_x) → (N_Ωy,)Likelihood model¶
: heteroscedastic per-pixel from the L2 retrieval-error map.
: representation error (model-vs-observation footprint mismatch). Typically a 1-5 ppb diagonal addition, rising with terrain complexity and at coarse-instrument boundaries. Don’t omit it, as the naive overweights observations and produces overconfident posteriors.
Block-diagonal across overpasses; cross-overpass correlation only if observation times are within met decorrelation scale (~hours).
Prior on : spatially correlated, sign-constrained¶
The prior is the regularizer; it’s the methodological choice in regional inversions.
Spatial-prior choices for the source vector .
| Choice | Form | Notes |
|---|---|---|
| Mean | from emission inventory ([crippa2023edgar,scarpelli2022gfei,maasakkers2023ghgi]) | prior median per cell |
| Covariance | Matérn-3/2 with correlation length km | smooth posterior; tuned by posterior diagnostics or hierarchical |
| Positivity | (lognormal) | non-negative emissions; conjugate variant: NNLS / projected-gradient on Gaussian |
Gaussian-Gaussian closed form (linear-in-log)¶
When the lognormal is linearised around (fine for moderate enhancements over the prior), the posterior is closed form:
with (the linearised Jacobian). Identical structure to the equations gaussx is built around.
Scaling beyond moderate grids¶
“≲10k cells × ≲1k obs” is the dense-solver limit. Beyond that:
Krylov + structure-aware solves via
gaussx(Kroneckerfor separable correlation,LowRankUpdatefor low-rank , CG / Lanczos solvers).gaussxships no covariance-kernel functions, so the Matérn matrices themselves are built inplumax.lagrangian.inversion.matern32_covarianceand handed to the operators. Pushes direct solves to ~100k cells with sufficient sparsity.Ensemble Kalman Inversion (EKI): ensemble of forward trajectories → ensemble-based . Plug into
filterax; couple withvardaXfor the variational version.MCMC over : expensive but exact. Use only when EKI is suspected biased.
(3) Model emulator¶
The Lagrangian model becomes expensive at large particles or when running ensembles for met-uncertainty propagation.
Footprint emulator: . Receptor location is part of the input (not just source location). CNN if the met grid is regular; FNO if you want to be resolution-agnostic.
Trajectory emulator: replace the SDE integration with a neural ODE or normalising flow. Less common but potentially useful for backward integration.
Training distribution. Sample met conditions from the actual distribution at facility locations of interest rather than a uniform climatology bin. A coarse grid covers <10% of the operational regime probability mass; train on the conditional distribution instead.
(4) Emulator-based inference¶
Replace with the emulated footprint in the linear inversion. Enables:
Real-time source estimation during satellite overpass (no SDE integration in the loop).
Ensemble-based UQ at scale: sample met conditions, let the emulator give a footprint per sample, and propagate to the source posterior.
Validation: posterior from emulator-inversion ≈ posterior from full-Lagrangian inversion on the same observations. Diverging posteriors flag emulator bias before it becomes a downstream problem.
(5) Amortized inference (predictor)¶
Output grid commitment¶
is on the inversion grid (~1-10 km, basin-scoped). The predictor outputs a fixed-size 2D field per basin tile. We use per-instrument predictors, dispatched by instrument_id, because TROPOMI ([s5p_tropomi], ~5 km), EMIT ([emit], ~60 m), Tanager ([carbon_mapper], ~30 m) need different summary networks.
Multi-instrument observations¶
When fusing across instruments, each observation tensor carries its own AK and footprint at native resolution. The predictor consumes a list of per instrument and aggregates internally, so we don’t pre-regrid to a common resolution (that loses information).
Conditional flow architecture¶
Posterior over is a spatial field, a natural fit for a conditional flow over images.
Context conditioning via FiLM / hypernet primitives in
pyrox.nn, the same pattern as Tier I.
(6) Improve¶
Multi-layer met fields. Move from 2D footprints to 3D trajectories through stacked WRF layers, which is necessary when emissions span the inversion layer or when the source PBL is poorly mixed.
Chemical loss during transport. along trajectories. For CH₄ over <1 day, loss is negligible (~0.5%/day); for CO it’s significant.
Met uncertainty propagation. Run the trajectory ensemble across WRF / ERA5 ensemble realisations → uncertainty in propagated through to source posterior. Hooks into the
MetField.ensemble_dimfrom the prereqs schema.Hierarchical correlation length. Promote in the Matérn prior to a hyperparameter with its own posterior, so the data choose the regularisation scale.
Module layout (proposed)¶
Tier II proposed module layout: step, concern, target module, status.
| Step | Concern | Module | Status |
|---|---|---|---|
| 1 | Particle integrator (Markov-1) | tracerax.advect (Langevin, integrate) | dependency |
| 1 | Turbulence parameterisation () | plumax.lagrangian.turbulence | ✓ |
| 1 | Forward concentration (residence-time binning) | plumax.lagrangian.concentration | ✓ |
| 1 | Backward footprint | plumax.lagrangian.footprint | ✓ |
| 1 | C-grid-aware wind interpolator | plumax.lagrangian.wind_interp | ✓ #88 |
| 1 | Column + AK pipeline | reuse gauss_plume.observation from Tier I | ✓ #83 |
| 2 | Likelihoods + spatial priors (Matérn-3/2, R = R_retr + R_repr) | plumax.lagrangian.inversion | ✓ |
| 2 | Linear inversion (Gaussian / lognormal, linearised in log space) | plumax.lagrangian.inversion (linear_gaussian_inversion / lognormal_inversion): vardax.OptimalInterpolation over footprint_operator, Laplace covariance; assim extra | ✓ #163 |
| 2 | Krylov / structure-aware solver | dispatch to gaussx | dependency |
| 2 | EKI | filterax (external) | dependency |
| 2 | Posterior export → Tier V | samples / prior_logpdf on GaussianPosterior / LognormalPosterior | ✓ #107 |
| 3 | Footprint emulator (+ Step 4 inversion on it) | plumax.lagrangian.emulator (v1: per-receptor MLP on a met-context vector, trained with pipekit-train; Step 4 is linear_gaussian_inversion on emulated_footprint; calibration gates from vardax) | ✓ #90 |
| 5 | Field predictor (per instrument) | plumax.lagrangian.predictor | ☐ after #90 |
| 6 | Met-ensemble runner | plumax.lagrangian.met_ensemble (v1: mean footprint + linearised transport covariance; mixture posterior not yet) | ✓ #89 |
plumax.lagrangian exists (Steps 1-2 landed in #8, corrected in #63); the ☐ rows are tracked under the Tier II epic #71.
Validation strategy¶
Particle integration, zero-turbulence limit. With , trajectories must follow streamlines exactly. Compare to streamline integration of the same wind field.
Mass conservation. In the no-deposition, closed-domain limit, total particle-seconds in the domain must be conserved to floating-point precision over the integration window. Standard LPDM regression test.
Adjoint-finite-difference. Verify backward ≡ adjoint of forward: perturb in the forward, measure , compare to from the backward run. Should agree within Monte Carlo error. Cheap test, catches indexing / sign / time-direction bugs that are otherwise a nightmare to track down.
Particle-count convergence. should give converging posterior moments; unconverged means is too low. Sets the operational floor and replaces the open-question guess (10⁵ forward / 10³ backward) with measurement.
Footprint vs. forward agreement. For a single-source , the column (forward) and the receptor row (backward) should agree. Catches indexing/orientation bugs distinct from the adjoint test.
Linear inversion against Tier I. In the limit of a single source, near-stationary winds, and known turbulence, the Lagrangian inversion should recover Tier I’s MAP estimate within posterior .
Real-data Permian benchmark. Invert TROPOMI + EMIT observations over the Permian for a published time window and compare to Lu et al. / Maasakkers et al. inverse-modelling estimates (see [maasakkers2023ghgi,jacob2022quantifying]). Without this, the inversion is a synthetic exercise.
Emulator residual. on a held-out met-condition set drawn from the operational distribution (not the training-bin distribution).