Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Tier III: Eulerian finite-volume transport

Forward model: full PDE solved on a grid. Uses gridax for spatial discretisation and spectraldiffx for spectral / periodic-domain operators.

This is the gold-standard physics tier, with full mass conservation, arbitrary wind fields and support for chemistry and deposition. It is also the most expensive, so emulators (Step 3) are essential, not optional.


(1) Simple model

Conservation equation

Operational implementations carry the mixing ratio cc (kg/kg) rather than mass density, because that is what the satellite observes and what WRF couples to. The conservation form is then:

∂t(ρc)  +  ∇⋅(ρu c)  =  ∇⋅(ρK∇c)  +  S(x,t)  −  λ ρ c\partial_{t} (\rho c) \;+\; \nabla\cdot(\rho \mathbf{u}\, c) \;=\; \nabla\cdot(\rho \mathbf{K} \nabla c) \;+\; S(\mathbf{x},t) \;-\; \lambda\, \rho\, c

with ρ(x,t)\rho(\mathbf{x},t) the dry-air density from the met field. When ρ\rho is approximately constant over the integration window (typical at fixed altitude in a regional basin) this reduces to the textbook ∂tc+∇⋅(u c)=∇⋅(K∇c)+S−λc\partial_t c + \nabla\cdot(\mathbf{u}\, c) = \nabla\cdot(\mathbf{K}\nabla c) + S - \lambda c. Commit to the full ρ\rho-weighted form for any work crossing significant pressure-altitude variation.

Initial and boundary conditions

Both matter a lot for inversion accuracy, and both are currently underspecified in operational code:

Spatial / temporal discretisation

Cell-centred FV with flux-limited advection via gridax; explicit RK or IMEX for stiff diffusion; spectraldiffx for periodic / global domains.

Build order within Tier III

  1. 1D column model. Validates numerics (diffusion against analytical Gaussian, advection against cosine pulse / Burgers’).

  2. 2D horizontal slab. What most satellite work needs (vertical column already integrated by AK).

  3. Full 3D with vertical layers. Needed when injection altitude matters or when assimilating multi-layer in-situ data alongside columns.


(2) Model-based inference

Forward observation operator

Same column + AK pipeline as Tiers I and II:

yt  =  At colz ⁣(c(S,c0,t))  +  cbg  +  εt\mathbf{y}_t \;=\; \mathbf{A}_t\, \mathrm{col}_z\!\bigl(c(S, c_0, t)\bigr) \;+\; \mathbf{c}_\text{bg} \;+\; \boldsymbol{\varepsilon}_t

Ht≔At⋅colz(⋅)\mathbf{H}_t \coloneqq \mathbf{A}_t \cdot \mathrm{col}_z(\cdot) is the observation operator at time tt. The 4D-Var cost below uses Ht\mathbf{H}_t; the column + AK implementation is shared with Tier I and the prereqs.

4D-Var cost: three terms

J(S,c0)  =  12∥S−Sb∥B2  +  12∥c0−cb(0)∥Bc2  +  12∑t∥Ht c(S,c0,t)−yt∥Rt2J(S, c_0) \;=\; \tfrac{1}{2}\lVert S - S_b \rVert^{2}_{\mathbf{B}} \;+\; \tfrac{1}{2}\lVert c_0 - c_b(0) \rVert^{2}_{\mathbf{B}_c} \;+\; \tfrac{1}{2} \sum_{t} \lVert \mathbf{H}_t\, c(S, c_0, t) - \mathbf{y}_t \rVert^{2}_{\mathbf{R}_t}

The cost has three terms, the source background, the IC background and the time-summed observation mismatch. The IC term drops out only if you commit to a long warm-up that pins c(0)c(0). Treating observations as a single instantaneous mismatch (no time index) is incompatible with multi-hour assimilation windows.

Likelihood model

εt∼N(0,Rt),Rt  =  Rretr,t+Rrepr,t\boldsymbol{\varepsilon}_t \sim \mathcal{N}(\mathbf{0}, \mathbf{R}_t), \qquad \mathbf{R}_t \;=\; \mathbf{R}_{\text{retr},t} + \mathbf{R}_{\text{repr},t}

Prior on SS: spatially correlated, sign-constrained

Same structure as Tier II:

Prior specification on the source field SS.

ChoiceFormNotes
Mean SbS_bfrom emission inventoryEDGAR / GFEI / EPA per-cell median
Covariance B\mathbf{B}Matérn-3/2, ℓ∈[5,50]\ell \in [5, 50] kmspatial regulariser; ℓ\ell tuneable or hierarchical
Positivitylog⁡S∼N(log⁡Sb,Blog⁡)\log S \sim \mathcal{N}(\log S_b, \mathbf{B}_{\log}) (lognormal)non-negative emissions; conjugate when linearised
BC scalingper-face α∼N(1,0.12)\alpha \sim \mathcal{N}(1, 0.1^{2})absorbs lateral-BC bias

Adjoint

The adjoint of the transport equation (backward in time, conservative form) is:

−∂tλ  −  ∇⋅(u λ)  −  ∇⋅(K∇λ)  +  λchem λ  =  ∂L∂c-\partial_{t} \lambda \;-\; \nabla\cdot(\mathbf{u}\, \lambda) \;-\; \nabla\cdot(\mathbf{K} \nabla \lambda) \;+\; \lambda_\text{chem}\, \lambda \;=\; \frac{\partial \mathcal{L}}{\partial c}

The ∇⋅(u λ)\nabla\cdot(\mathbf{u}\,\lambda) term is conservative (it matches the forward ∇⋅(u c)\nabla\cdot(\mathbf{u}\,c)). The doc previously had u⋅∇λ\mathbf{u}\cdot\nabla\lambda, which is equivalent only for divergence-free u\mathbf{u} and is incorrect for compressible WRF winds. JAX computes the discretised adjoint exactly via reverse-mode autodiff through the FV solver, so there is no hand-derived adjoint code and no separate adjoint-correctness derivation. The form above is for reading, not implementation.

Incremental 4D-Var (the operational default)

Linearise around the current iterate SkS^k, solve the linear inner minimisation, update outer iterate:

Sk+1  =  Sk+δS,δS  =  arg⁡min⁡δ Jlin(δ;Sk)S^{k+1} \;=\; S^k + \delta S, \qquad \delta S \;=\; \arg\min_{\delta} \, J_\text{lin}(\delta; S^k)

JlinJ_\text{lin} uses the tangent linear of the FV solver, which jax.linearize builds trivially. The inner solves are quadratic in δS\delta S, so we use CG or Lanczos via gaussx. This cuts the cost by 1-2 orders of magnitude vs. fully-nonlinear 4D-Var, so it is the default and the full nonlinear solve is a sanity check.

Control-variable transform

Direct optimisation in SS-space with B−1\mathbf{B}^{-1} is infeasible, as B\mathbf{B} for a 200×200200 \times 200 grid is 400002≈10940000^{2} \approx 10^{9} entries. The standard fix is:

χ  =  B−1/2(S−Sb),optimise J(S(χ)) in χ-space (prior = identity Gaussian).\boldsymbol{\chi} \;=\; \mathbf{B}^{-1/2}(S - S_b), \qquad \text{optimise } J(S(\boldsymbol{\chi})) \text{ in } \boldsymbol{\chi}\text{-space (prior = identity Gaussian)}.

We materialise B−1/2\mathbf{B}^{-1/2} via the structure-aware Cholesky in gaussx (Kronecker structure for separable correlation). gaussx has no covariance-kernel functions, so the spatial Matérn matrix is built in plumax (matern32_covariance), while the temporal axis can use gaussx.MaternSDE + MarkovGaussian, the state-space Matérn with O(T)O(T) solves. This trick is what makes 4D-Var tractable, so it should be explicit in assimilation/control.py and on the API.

Posterior covariance: three options

4D-Var alone gives MAP; downstream Tier V needs the posterior:

We export the posterior to Tier V.A with the same adapter pattern as Tier I/II (see the posterior-export module).

Cost / performance

For a 200×200200 \times 200 grid, 24-hour assimilation window, with incremental 4D-Var: ~minutes per outer iteration on CPU, seconds on GPU. Inner CG iteration is O(niter×nsteps×ngrid)O(n_\text{iter} \times n_\text{steps} \times n_\text{grid}).


(3) Model emulator

Full 3D FV transport is expensive, with an O(N3)O(N^{3}) state and repeated time integration. An emulator is essential here, whereas at Tier I it is optional.

State variable: commit to a 2D column for v1

Most satellite inversion needs only the column-integrated XCH₄, not the 3D field. The default emulator state is a 2D column ccol(x,y,t)c_\text{col}(x, y, t), and full 3D is a v2 escalation once multi-layer in-situ assimilation enters scope. The difference in training cost is an order of magnitude.

Architecture options

Training data

Emulator adjoint must be calibrated

Backprop through a trained emulator gives some gradient, and whether it matches the true PDE adjoint is an empirical question.


(4) Emulator-based inference

Replace the FV integrator with the FNO / neural ODE in the 4D-Var loop:


(5) Amortized inference (predictor)

fθ:(yt1,…,tn, u1:T, instrument_id)  ⟼  p(log⁡S(x,t)∣y,u)f_\theta : (\mathbf{y}_{t_1, \dots, t_n},\, \mathbf{u}_{1:T},\, \text{instrument\_id}) \;\longmapsto\; p(\log S(\mathbf{x},t) \mid \mathbf{y}, \mathbf{u})

Output grid commitment

S(x,t)S(\mathbf{x},t) is on the inversion grid (~1-10 km, basin-scoped). The predictor outputs a fixed-size 2D field per basin tile per time slice, with per-instrument predictor heads dispatched by instrument_id (the same pattern as Tier II).

Irregular temporal sampling

Satellite passes are intermittent (1-3 per day per instrument over a basin) with gaps. The input is not regularly sampled, as t1,…,tnt_1, \dots, t_n are observation times, not a fixed grid. We use a set-transformer with time-encoding over the irregular passes, fused with a regular-grid encoder over u1:T\mathbf{u}_{1:T} from the met field. A vanilla seq2seq / ConvLSTM assumes regular sampling and will silently underperform.

Posterior over the spatial source field

Conditional flow over images vs. score-based diffusion, the same trade-off as Tier II:


(6) Improve


Module layout

Tier III module layout: step, concern, target module, status.

StepConcernModuleStatus
1FV gridles_fvm/grid.py✓
1Advectionles_fvm/advection.py✓
1Diffusionles_fvm/diffusion.py✓
1Source injectionles_fvm/source.py✓
1Boundary conditionsles_fvm/boundary.py✓
1Time integrationles_fvm/dynamics.py, simulate.py✓
1Eddy diffusivityles_fvm/diffusion.py (EddyDiffusivity, pg_eddy_diffusivity, mo_eddy_diffusivity, smagorinsky_k_h)✓ PG, MO + Smagorinsky #94
1Column + AK pipelinereuse gauss_plume.observation from Tier I✓ #83
24D-Var cost (prior + time-summed obs) over the FV transportles_fvm/fourdvar.py (FourDVarProblem)✓
2Differentiable forward (emission → column-obs series) + exact adjoint via ADles_fvm/fourdvar.py (EulerianForward4DVar)✓
2Column observation operator H_tles_fvm/fourdvar.py (ColumnObservationOperator)✓
2Likelihood + temporal prior on the emission series (Matérn-3/2, R = R_retr + R_repr)reuse lagrangian.inversion.matern32_covariance✓
2Spatial source prior (per-cell B)les_fvm/fourdvar.py (SpatialControl): per-cell surface flux, product or isotropic Matérn-3/2✓ #91
2Control vector + whitening transformles_fvm/fourdvar.py: vardax.LinearParameterization(linear_basis(L)), B = L Lᵀ✓
24D-Var solver (L-BFGS in whitened space)les_fvm/fourdvar.py (solve_4dvar): vardax.ThreeDVar over FourDVarProblem.source_receptor_operator; assim extra✓ #163
2Incremental (Gauss-Newton inner) 4D-Var solverles_fvm/fourdvar.py (solve_4dvar(method="gauss_newton")): vardax.IncrementalFourDVar; dual PSAS (method="psas") is vardax.DualThreeDVar for a linear advection scheme🚧 #93, PSAS ✓ #246
2Background (SbS_b, cbc_b, BC scaling)les_fvm/fourdvar.py (BackgroundControl): initial concentration and per-face Gaussian scaling in the control, block-diagonal prior✓ #92
2Diagnosticsassimilation/diagnostics.py🚧
2Posterior covariance (Hessian / Laplace / En4D-Var)les_fvm/fourdvar.py (posterior_covariance, laplace_sample): an argminax Laplace of the whitened control🚧 Gauss-Newton Laplace ✓; En4D-Var ☐
2Posterior export → Tier Vsamples / prior_logpdf on FourDVarResult✓ #107
3Emulator (UNet / GNN / FNO)plumax.les_fvm.emulator☐ #95
3Emulator-adjoint calibration harnessplumax.les_fvm.emulator_adjoint_test☐ #95
5Sequence predictor (set-transformer)plumax.les_fvm.predictor☐
6Multi-species couplingplumax.les_fvm.multispecies☐

Validation strategy


Open questions