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.

From a column map to an emission rate: models, identifiability and the wind

GeoStack · background · the modeling cycle · example 2 of 3 · L2 → L4

Abstract

The second worked example of the modeling cycle. It starts from the column map that example 1 retrieved and asks how much the facility emits. The usual first answer, the integrated mass enhancement, follows from a mass balance in three lines and returns a number with no prediction of the image, so the compare step has nothing to hold. A column plume derived from advection–diffusion does predict the image. Fitting it makes the misfit visible, one structural change removes it, and the derivation shows what no image can supply: the image determines Q/UQ / U, never QQ.

Keywords:integrated mass enhancementGaussian plumeemission rateLaplace approximationmodeling cycleplumax

The operators

1 · Mass enhancement

Add up the gas in the plume and divide by the time it takes to leave. The integrated mass enhancement over the plume mask, times an effective wind and divided by the plume’s length scale, gives the rate.

IME=∑n∈Mκα^na\rEst{\mathrm{IME}} = \sum_{n \in \rEst{\mathcal{M}}} \rCon{\kappa} \rIn{\hat{\alpha}_n} \rCon{a}
Q=UeffIME/L\rOut{Q} = \rEst{U_\text{eff}} \rEst{\mathrm{IME}} / \rEst{L}
RoleSymbolNameShapeUnitNote
Inputα^\rIn{\hat{\alpha}}enhancement map(row, col)ppm·mfrom example 1
External inputU10\rExt{U_{10}}10 m wind speed()m s⁻¹from a reanalysis
ParameterθU,1\rPar{\theta_{U,1}}effective-wind slope()—fitted to simulations
θU,0\rPar{\theta_{U,0}}effective-wind offset()m s⁻¹fitted to simulations
Constantκ\rCon{\kappa}column per enhancement()kg m⁻² (ppm·m)⁻¹
a\rCon{a}pixel area()m²
EstimatedM\rEst{\mathcal{M}}plume mask(row, col)bool
L\rEst{L}plume length()m
IME\rEst{\mathrm{IME}}integrated mass enhancement()kgeq. 1
Ueff\rEst{U_\text{eff}}effective wind()m s⁻¹
OutputQ\rOut{Q}emission rate()kg s⁻¹eq. 2

2 · Column plume

To have something to compare with the image, plumax predicts it: what a steady plume looks like from above. A Gaussian cross-section that widens with distance from the source carries the line density qq over a background.

w(d)2=w02+wref2(d/dref)2bw(\rEst{d})^2 = \rCon{w_0}^2 + \rPar{w_\text{ref}}^2 (\rEst{d} / \rCon{d_\text{ref}})^{2\rPar{b}}
ϕplume(s)=12πw(d)exp⁡(−c22w(d)2)\phi_\text{plume}(\rIn{\vect{s}}) = \frac{1}{\sqrt{2\pi} w(\rEst{d})} \exp\left(-\frac{\rEst{c}^2}{2 w(\rEst{d})^2}\right)
ΔΩ(s)=qϕplume(s)+Ωbg\rOut{\Delta\Omega}(\rIn{\vect{s}}) = \rPar{q} \phi_\text{plume}(\rIn{\vect{s}}) + \rPar{\Omega_\text{bg}}
RoleSymbolNameShapeUnitNote
Inputs\rIn{\vect{s}}pixel centres(pixel, 2)m
Parameterq\rPar{q}line density()kg m⁻¹the controls, 7 numbers in all
φ\rPar{\varphi}plume direction()rad
s0\rPar{\vect{s}_0}source position(2,)m
wref\rPar{w_\text{ref}}reference width()m
b\rPar{b}widening exponent()—
Ωbg\rPar{\Omega_\text{bg}}background()kg m⁻²
Constantw0\rCon{w_0}pixel blur width()m
dref\rCon{d_\text{ref}}reference distance()m
Estimatedd\rEst{d}along-plume distance(pixel,)meq. 1
c\rEst{c}cross-plume distance(pixel,)meq. 1
w(d)\rEst{w(d)}cross-plume width(pixel,)meq. 1
ϕplume\rEst{\phi_\text{plume}}unit cross-section shape(pixel,)m⁻¹eq. 2
OutputΔΩ\rOut{\Delta\Omega}column enhancement(row, col)kg m⁻²eq. 3

3 · Image fit

Fit the plume’s controls to the map. The minimiser is the MAP estimate, and the Laplace approximation at it gives the posterior covariance, from which the line density and its uncertainty follow.

θ⋆=argminθ 12∥y−h(θ)∥Σε−12+12∥θ−μθ∥Σθ−12\rOut{\gvect{\theta}^\star} = \mathrm{argmin}_{\gvect{\theta}} \ \frac{1}{2} \Vert \rIn{\vect{y}} - h(\gvect{\theta}) \Vert^2_{\rIn{\gmat{\Sigma}_\varepsilon}^{-1}} + \frac{1}{2} \Vert \gvect{\theta} - \rPar{\gvect{\mu}_\theta} \Vert^2_{\rPar{\gmat{\Sigma}_\theta}^{-1}}
Σθ∣y=(Σθ−1+Jh⊤Σε−1Jh)−1\rOut{\gmat{\Sigma}_{\theta \mid y}} = \left(\rPar{\gmat{\Sigma}_\theta}^{-1} + \mat{J}_h^\top \rIn{\gmat{\Sigma}_\varepsilon}^{-1} \mat{J}_h\right)^{-1}
RoleSymbolNameShapeUnitNote
Inputy\rIn{\vect{y}}enhancement map(pixel,)kg m⁻²from example 1
Σε\rIn{\gmat{\Sigma}_\varepsilon}its error covariancediagonal(kg m⁻²)²from example 1
Parameterμθ\rPar{\gvect{\mu}_\theta}prior mean(7,)wind product, catalogue position
Σθ\rPar{\gmat{\Sigma}_\theta}prior covariance(7, 7)
Estimatedh\rEst{h}observation operator(pixel,)kg m⁻²
Jh\rEst{\mat{J}_h}Jacobian of hh(pixel, 7)kg m⁻² per control
Outputq\rOut{q}line density()kg m⁻¹
σq\rOut{\sigma_q}its uncertainty()kg m⁻¹

4 · Wind

The one input the image cannot supply is the wind, applied after the fit and independent of it. The rate is the line density times the transport wind, and their log-variances add.

Q=qU\rOut{Q} = \rIn{q} \rExt{U}
V[log⁡Q]=V[log⁡q]+V[log⁡U]\mathbb{V}[\log \rOut{Q}] = \mathbb{V}[\log \rIn{q}] + \mathbb{V}[\log \rExt{U}]
RoleSymbolNameShapeUnitNote
Inputq\rIn{q}line density()kg m⁻¹from the fit
σq\rIn{\sigma_q}its uncertainty()kg m⁻¹from the fit
External inputU\rExt{U}transport wind speed()m s⁻¹
σU\rExt{\sigma_U}its uncertainty()m s⁻¹
OutputQ\rOut{Q}emission rate()kg s⁻¹
σQ\rOut{\sigma_Q}its uncertainty()kg s⁻¹

The running example

Notation

nn indexes the pixels at positions sn\vect{s}_n; dd and cc are a pixel’s distance along and across the plume from the source s0\vect{s}_0, for a plume heading φ\varphi; aa is the pixel area; N=NΩyN = N_{\Omega_y} is the number of pixels and Dθ=7D_\theta = 7 the number of controls.

SymbolRoleShapeUnit
y\vect{y}observation · column enhancement map, κα^\kappa \hat{\alpha}RN\mathbb{R}^{N} (row, col)kg m⁻²
Σε\gmat{\Sigma}_\varepsilonconst · error of the map, diagonalRN×N\mathbb{R}^{N \times N}kg² m⁻⁴
QQout · emission rateR\mathbb{R}kg s⁻¹
qqstate · line density, Q/UQ / UR\mathbb{R}kg m⁻¹
φ,s0\varphi, \vect{s}_0state · plume direction and source positionR\mathbb{R}, R2\mathbb{R}^2rad, m
wref,bw_\text{ref}, bstate · width at drefd_\text{ref}, growth exponentR\mathbb{R}, R\mathbb{R}m, —
Ωbg\Omega_\text{bg}state · residual background columnR\mathbb{R}kg m⁻²
hhobservation operator, controls to mapRDθ→RN\mathbb{R}^{D_\theta} \to \mathbb{R}^{N}kg m⁻²
U,σUU, \sigma_Uexogenous · transport wind and its standard deviationR\mathbb{R}, R\mathbb{R}m s⁻¹

Model 1 · Add up the gas

The integrated mass enhancement (IME) is the workhorse of plume quantification. It is a mass balance on the plume as one box.

Measuring MM from the map as the IME and inserting B1:

Q=UeffLIME and IME=∑n∈Mκα^naQ = \frac{U_\text{eff}}{L} \mathrm{IME} \text{ and } \mathrm{IME} = \sum_{n \in \mathcal{M}} \kappa \hat{\alpha}_n a

A second view of the same balance is the cross-sectional flux: in steady state the mass crossing any line across the plume per second is the emission rate, Q=U∫ΔΩ(d,c)dcQ = U \int \Delta\Omega(d, c) \mathrm{d}c at any distance dd downwind. It needs a centreline, and it gives one estimate per transect, whose scatter is a useful check.

import plumax.geo

# Shapes: R × C pixels
# Units: [Ω] = kg m⁻²; [Q] = kg s⁻¹

# today (plumax)
# 𝓜 = [α̂_n > α_thr], small components dropped
mask = plumax.geo.PlumeMask(threshold=750.0, min_area_px=20)(enhancement)   # (R, C) bool
# today* (plumax)
# IME = Σ_𝓜 κ α̂ a,  Q = U_eff · IME / L
estimate = plumax.geo.IMEEstimate(
    wind_speed=effective_wind, length_method="max_axis", return_uncertainty=True
)(enhancement, mask)                                                        # → dict

Model 2 · A plume that predicts the image

To have something to compare, write down what a steady plume looks like from above. Start from the transport equation and simplify it in numbered steps.

Integrating over height under B2 and B3, the column ΔΩ(s1,s2)=∫ρCH4ds3\Delta\Omega(s_1, s_2) = \int \rho_{\mathrm{CH_4}} \mathrm{d}s_3 obeys a one-dimensional diffusion equation in which s1/Us_1 / U plays the role of time:

U∂ΔΩ∂s1=K2∂2ΔΩ∂s22 and ΔΩ(0,s2)=QUδ(s2)U \frac{\partial \Delta\Omega}{\partial s_1} = K_2 \frac{\partial^2 \Delta\Omega}{\partial s_2^2} \text{ and } \Delta\Omega(0, s_2) = \frac{Q}{U} \delta(s_2)

whose solution is a Gaussian across the plume whose width grows downwind:

ΔΩ(s1,s2)=QU12πw(s1)exp⁡(−s222w(s1)2) and w(s1)2=2K2s1U\Delta\Omega(s_1, s_2) = \frac{Q}{U} \frac{1}{\sqrt{2\pi} w(s_1)} \exp\left(-\frac{s_2^2}{2 w(s_1)^2}\right) \text{ and } w(s_1)^2 = \frac{2 K_2 s_1}{U}

Card 2 generalises ww to a power law with a pixel-sized floor w0w_0, and rotates the coordinates to a heading φ\varphi from a source s0\vect{s}_0, so that dd and cc are distances along and across the plume. Two consequences follow from eq. (14) before any data are seen:

Model 3 · Fit the plume to the image

Under B4 the objective is card 3’s weighted least squares. The controls enter through logarithms where they must stay positive, so the posterior is closer to Gaussian in those coordinates. At the minimum, the Laplace approximation takes the curvature as the posterior covariance; the share of each control set by the data is 1−σpost2/σprior21 - \sigma^2_\text{post} / \sigma^2_\text{prior}.

import jax.numpy as jnp
import plumax.coupled as cpl
import plumax.gauss_plume as gp

# Shapes: N pixels; D = 7 controls
# Units: [Ω] = kg m⁻²; [q] = kg m⁻¹

# today* (plumax)
# φ_plume(s; θ) = exp(−c² / 2w²) / (√(2π) w),  w² = w₀² + w_ref² (d / d_ref)^(2b)
plume = gp.ColumnPlume(reference_distance=1_000.0, initial_width=17.3, pixel_size=60.0)
# today (plumax)
source = gp.ColumnPlumeSource(plume=plume, geometry=reported_geometry)
# today (plumax)
# Σ_ε = diag(σ_n²)
instrument = cpl.Instrument("EMIT", receptors, retrieval_variance=column_std**2)  # (N, 2)
# today (plumax)
# θ ~ 𝒩(μ_θ, diag(σ_θ²)): direction from the wind product, s₀ from the catalogue
prior = cpl.CoupledPrior.from_std(prior_mean, prior_std)
# today (plumax)
# h(θ) = q φ_plume(s; θ) + Ω_bg
problem = cpl.CoupledProblem(
    forward=cpl.build_coupled_forward(source, [instrument]),
    prior=prior,
    observations={"EMIT": column_map},                                         # (N,)
)
# today (plumax)
# θ⋆ = argmin ℒ_MAP(θ),  Σ_θ∣y = (Σ_θ⁻¹ + J_hᵀ Σ_ε⁻¹ J_h)⁻¹
result = cpl.solve_coupled(problem)

Compare: read the residual

Read the residual: a plume pointed the wrong way

Truth and the reported windwind product18∘18^\circ

Fit along the reported wind++−-residual: ++ above, −- below

Fit with the direction freeresidual: noise

What the plume model predicts and what goes wrong when its direction is fixed. The truth (left) heads off the reported wind; a plume forced along the reported wind (middle) compensates by widening, and its residual has one positive and one negative flank; with the direction fitted (right) the residual is noise.

The first fit takes the plume’s direction from the wind product and fits the rest. Two diagnostics come out of the residual r=y−h(θ⋆)\vect{r} = \vect{y} - h(\gvect{\theta}^\star):

Repair. Add the direction φ\varphi and the source position s0\vect{s}_0 to the controls, with the wind product and the catalogue as their priors. The prior keeps them sensible when the plume is faint; when it is bright, the data share of both is close to 100 %.

The outer loop on quantification

Model 1 · Mass enhancementa mask, a wind speed, a length

Q=UeffIME/LQ = U_\text{eff} \mathrm{IME} / Lpredicts no image

compare: nothing to compare the image withthe model returns a number, not a prediction

Model 2 · Plume along the reported windqq, width and background fitted

reduced χ2\chi^2 well above 1qq and the width too large

compare: the residual is one-sided along the plumethe plume does not point where the wind says

Model 3 · Direction and source fittedφ\varphi and s0\vect{s}_0 become controls

reduced χ2≈1\chi^2 \approx 1qq to about 5 %5\ \%

The outer loop on quantification. The first change is to a model that predicts the observation at all; the second adds the control the residual asked for.

The referee: is the quick posterior right?

The Laplace posterior is a Gaussian fitted to the curvature at the optimum. It is cheap, and it is wrong when the posterior is skewed or curved: near a faint plume, or when the direction is poorly constrained. The referee samples the same posterior without that assumption.

import numpyro
import numpyro.distributions as dist
from numpyro.infer import MCMC, NUTS

# Shapes: D controls; S draws

# user
# the same posterior, sampled in coordinates scaled by the Laplace covariance:
# θ = θ⋆ + C z with C Cᵀ = Σ_θ∣y, so the sampler sees unit scale in every direction
def model():
    whitened = numpyro.sample("chi", dist.ImproperUniform(dist.constraints.real_vector, (), (D,)))
    theta = unflatten(result.mean + cholesky @ whitened)                       # (D,)
    # log p(θ)
    numpyro.factor("prior", prior_log_density(theta))
    # y ~ 𝒩(h(θ), Σ_ε)
    numpyro.sample("y", dist.Normal(problem.predict_stacked(theta), noise_std).to_event(1),
                   obs=column_map)

# today (numpyro)
draws = MCMC(NUTS(model), num_warmup=400, num_samples=800).run(key)            # (S, D)

The density is exact; only the coordinates come from the approximation. Compare the two posteriors control by control: the shift of the means in units of the sampler’s standard deviation, and the ratio of the widths. When both are close to 0 and 1, the Laplace posterior is used for every scene, and NUTS is rerun when the model changes.

What the image cannot see

Card 4 applies the wind after the fit. Because Q=qUQ = q U and the two are independent, the variances of their logarithms add:

σlog⁡Q2=σlog⁡q2+σlog⁡U2 and σlog⁡U2=log⁡(1+σU2U2)\sigma^2_{\log Q} = \sigma^2_{\log q} + \sigma^2_{\log U} \text{ and } \sigma^2_{\log U} = \log\left(1 + \frac{\sigma_U^2}{U^2}\right)

The image fixes the plume to about 5 %; the rate inherits the wind’s 33 %. A better plume model would not change that. A better wind would, and so would a catalogue that stores qq and applies winds later, which plumax#111 proposes.

What example 1’s errors do here

The plume fit inherits whatever example 1 got wrong. An uncorrected matched-filter map under-reads dark ground near the source and over-reads bright ground downwind; the fit faithfully reproduces that as a wrong width exponent and a biased qq. A level cannot repair the one below it; it can only report, through its residual, that something does not fit.

Worked numbers

ModelPredicts the image?What it needsUncertainty
1 · Mass enhancementnomask, U10U_{10}, calibrationa fixed fraction, about ±50 %
1′ · Cross-sectional fluxnocentreline, transport windscatter across transects
2 · Column plume along the reported windyeswind direction as givenLaplace; residual patterned
3 · Column plume, direction fittedyespriors on φ\varphi, s0\vect{s}_0Laplace, checked by NUTS
with the wind—U±σUU \pm \sigma_Ueq. (15)

The six steps, for this problem

StepIn this exampleStatus
1 · Simple modelplumax.gauss_plume.ColumnPlume: a Gaussian ridge with a power-law width, per unit line densitytoday
2 · Model-based inferenceplumax.coupled.solve_coupled (L-BFGS, Laplace); NUTS on the same posterior as the refereetoday
3 · EmulatorSkipped: one evaluation of the model takes milliseconds—
4 · Emulator-based inferenceSkipped with it—
5 · Amortized inferenceA network from the image and its context straight to the posterior of qq, for screening thousands of scenesplumax#87
6 · ImproveA meandering centreline (plumax#270), cross-plume transects (#269), per-pixel noise from the retrieval (#272), the gate against metered releases (#273)plumax#265

What example 3 receives

Handed onValueUsed in example 3 as
One catalogue eventQQ = 2.0 kg s⁻¹ = 7 200 kg h⁻¹, σlog⁡Q\sigma_{\log Q} = 0.33what a detection looks like
Draws of QQfrom the posterior of log⁡q\log q and the windthe measurement error of each detection’s rate
How it is builtplumax.population.catalog.event_from_posteriorthe per-event payload of the population tier