Forward model: stochastic particle trajectories driven by wind + turbulence. The bridge between the analytical Tier I (no real wind variability) and the full PDE Tier III (no statistical efficiency). This is what FLEXPART ([stohl2005flexpart]) and STILT do operationally — see also HYSPLIT ([stein2015hysplit]).
Status: the forward model (Step 1) is implemented in
plumax.lagrangian;
the inference, emulator and predictor steps (2–5) are 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. Use a C-grid-aware interpolator that reconstructs consistently with the WRF staggered grid (operational STILT pattern). Document the chosen scheme on the integrator API; assume divergence preservation is 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 → source–receptor sensitivity matrix . The FLEXPART/STILT paradigm and the workhorse of regional-scale inversions ([stohl2005flexpart]).
Footprint definition (formal)¶
For a receptor and a candidate source cell :
— 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, not an indicator: properly normalised by particle volume and air density. Numerical scaling matters because the values are tiny — 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 — mandatory, not optional. Same critique as Tier I: predicted enhancement vs. absolute-column observation must be reconciled day-1.
Likelihood model¶
— heteroscedastic per-pixel from the L2 retrieval-error map.
— representation error: model-vs-observation footprint mismatch. Typically 1–5 ppb diagonal addition; rises with terrain complexity and at coarse-instrument boundaries. Don’t omit — 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, not 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, emulator gives footprint per sample, propagate to 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). Predictor outputs a fixed-size 2D field per basin tile. 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 — don’t pre-regrid to a common resolution (loses information).
Conditional flow architecture¶
Posterior over is a spatial field — natural fit for a conditional flow over images.
Context conditioning via FiLM / hypernet primitives in
pyrox.nn— same pattern as Tier I.
(6) Improve¶
Multi-layer met fields. Move from 2D footprints to 3D trajectories through stacked WRF layers — 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 — let 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) | plumax.lagrangian.particles | ✓ |
| 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 closed form) | plumax.lagrangian.inversion (linear_gaussian_inversion / lognormal_inversion) | ✓ |
| 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 | ☐ #90 |
| 5 | Field predictor (per instrument) | plumax.lagrangian.predictor | ☐ after #90 |
| 6 | Met-ensemble runner | plumax.lagrangian.met_ensemble | ☐ #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 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).