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.

Why layers: the single-slab error in v0

plumax’s forward model and its observation operator put the whole methane column in one slab at one pressure and temperature. radtrax’s v0 forward model, ForwardModel, puts it in layers. This notebook runs both on the same column and reproduces the radtrax · 3 finding: a slab at the lowest layer’s pressure misstates a band’s optical depth by up to 19 %, because it broadens every line as if all the methane sat near the surface. A slab at the column’s pressure-weighted mean does better, but is still off by 3 %.

What you’ll learn:

  1. How to compose a layered forward model: opacity, solver, surface, geometry, instrument.

  2. How large the single-slab error is, band by band.

  3. How to get the matched-filter target t=∂ln⁡y/∂ΔXt = \partial \ln y / \partial \Delta X from the layered model by autodiff.

Background

Beer–Lambert along the two-way path gives the radiance at the top of the atmosphere, and a band integrates it over the instrument’s spectral response fbf_b:

L(ν)=E0μ0πAexp⁡(−m∑lτl(ν)),yb=∑gfbgL(νg)L(\nu) = \frac{E_0 \mu_0}{\pi} A \exp\Big(-m \sum_l \tau_l(\nu)\Big), \qquad y_b = \sum_g f_{bg} L(\nu_g)

with m=1/μ0+1/μm = 1/\mu_0 + 1/\mu the air-mass factor and τl=σ(ν;pl,Tl) nlxlΔzl\tau_l = \sigma(\nu; p_l, T_l)\, n_l x_l \Delta z_l layer ll’s optical depth. A line’s width grows with pressure, so the same column of methane absorbs differently at 1 atm and at 0.3 atm; a single slab must pick one. We compare a band’s optical depth τb=−ln⁡(yb/ybno gas)\tau_b = -\ln(y_b / y_b^{\text{no gas}}) through 20 layers and through one slab holding the same column.

The cross sections are radtrax · 3’s synthetic spectrum: 150 Voigt lines near 4300 cm⁻¹, built in about a second, so the notebook runs without HITRAN. With HITRAN tables, build them with python -m radtrax.spectroscopy.hitran CH4 and load them with radtrax.spectroscopy.load_opacity.

Python implementation: CPython
Python version       : 3.13.5
IPython version      : 9.10.0

numpy  : 2.4.4
jax    : 0.11.2
equinox: 0.13.8
radtrax: 0.0.0

Compiler    : GCC 11.2.0
OS          : Linux
Release     : 6.8.0-1044-azure
Machine     : x86_64
Processor   : x86_64
CPU cores   : 16
Architecture: 64bit

1. The cross-section table

σ(ν; T, p) on 4230–4370 cm⁻¹ at 0.01 cm⁻¹, ten pressures (0.03–1.1 atm) and six temperatures (200–310 K): line strengths log-normal at 296 K, Lorentz widths γair(p/1 atm)(296/T)0.75\gamma_{\text{air}} (p / 1\,\text{atm}) (296/T)^{0.75}, Doppler widths of CH₄. The format is the one radtrax.spectroscopy.hitran writes. It is radtrax · 3’s own code, radtrax.spectroscopy.synthetic.synthetic_table, the same table radtrax’s tests use.

2. The forward model

TableOpacity interpolates σ bilinearly in (ln⁡p,T)(\ln p, T) for each layer, BeerLambert gives the radiance, and BandInstrument integrates seven Gaussian bands, 8.5 nm wide and 14 cm⁻¹ apart, as in radtrax · 3.

3. Twenty layers against one slab

Twenty one-kilometre layers with an 8 km scale height and a 6.5 K/km lapse rate down to 217 K, holding 1.9 ppm of methane. The two slabs hold the same column, at the lowest layer’s (p,T)(p, T) (0.94 atm, 285 K) and at the column’s air-weighted mean (p,T)(p, T).

CH₄ column: 4.1e+19 molecules/cm²
lowest-layer slab: up to 18.6% off
mean slab:    up to 3.1% off
<Figure size 1200x500 with 1 Axes>

The slab at the lowest layer broadens every line as if all the methane sat near the surface. Its band optical depth is off by up to 19 %. The slab at the mean (p,T)(p, T) is off by up to 3 %. That is an error of the model’s structure, and it is 30 times the 0.1 % to which v0 holds its tables’ interpolation. The layers are not decoration: they are the first thing v0 changes.

4. The matched-filter target from autodiff

unit_absorption_target differentiates ln⁡y\ln y with respect to a column enhancement ΔX\Delta X [mol/m²], here spread over the lowest kilometre, by one forward-mode pass. It depends on the scene through the state and the geometry, which is why a target per scene replaces a MODTRAN table. The slab’s target is off too, by up to 3.8 % here: a smaller error than in the optical depth, because the plume itself sits in the lowest kilometre, near the surface’s pressure.

t, 20 layers [per mol/m²]: [-0.0427 -0.035  -0.0526 -0.0845 -0.0692 -0.0616 -0.0634]
lowest-layer slab: up to 3.8% off

Summary

  • ForwardModel(opacity, solver, instrument)(state, surface, geometry) gives one value per band, and every input is differentiable.

  • Through one slab at the lowest layer’s (p,T)(p, T), a band’s optical depth is off by up to 19 % (18.6 %) from 20 layers; at the column’s mean (p,T)(p, T), by up to 3 % (3.1 %).

  • The slab’s matched-filter target is off by up to 3.8 %.

  • unit_absorption_target gives each scene its own matched-filter target, t=∂ln⁡y/∂ΔXt = \partial \ln y / \partial \Delta X.