Ported from plumax 0.1.2 (28f257e); module and link paths updated for radtrax.
This note derives the forward model behind radtrax.spectroscopy.hitran and radtrax.spectroscopy.tables. We start from a line-by-line sum of Voigt profiles, which gives the absorption cross-section of a gas, store it in a look-up table (LUT) over temperature and pressure, and then use it in a single-layer Beer–Lambert calculation of the transmittance. So the LUT is the expensive object we precompute once, and the forward model is an interpolation in followed by one exponential.
The theory follows Gordon et al. [1] for the line-by-line physics (intensity, shape and cross-section) and Rothman et al. [2] for the HITRAN database conventions. The LUT design follows the decoupled-VOD recipe used in operational SWIR retrievals (e.g. Frankenberg et al. [3]).
Symbols
| Symbol | Meaning | Shape | Unit |
|---|---|---|---|
| wavenumber; is the number of points on a wavenumber grid | scalar | cm⁻¹ | |
| , | temperature and pressure of the layer | scalar | K, atm |
| volume mixing ratio of the absorbing gas | scalar | mol/mol | |
| index of a line (one rovibrational transition) | - | - | |
| line centre | scalar | cm⁻¹ | |
| line intensity | scalar | cm⁻¹/(molecule cm⁻²) | |
| lower-state energy | scalar | cm⁻¹ | |
| total internal partition sum | scalar | dimensionless | |
| second radiation constant, | scalar | cm K | |
| molecular mass of the gas | scalar | kg | |
| , | Doppler and Lorentz half-widths at half maximum | scalar | cm⁻¹ |
| Voigt profile of line , normalised to unit area | scalar | cm | |
| absorption cross-section | on a grid | cm²/molecule | |
| , | number density of air and of the gas | scalar | molecules/cm³ |
| absorption coefficient | on a grid | cm⁻¹ | |
| vertical thickness of the layer | scalar | cm | |
| , | solar and viewing zenith angles | scalar | degrees |
| two-way air-mass factor | scalar | dimensionless | |
| slant optical depth of the layer | on a grid | dimensionless | |
| transmittance of the layer | on a grid | dimensionless | |
| radiance at the sensor | scalar | W m⁻² sr⁻¹ (cm⁻¹)⁻¹ | |
| solar irradiance at the top of the atmosphere | scalar | W m⁻² (cm⁻¹)⁻¹ | |
| surface reflectance | scalar | dimensionless | |
| optical depth of everything but the target gas (other gases, aerosol) | scalar | dimensionless | |
| , | background mixing ratio and the plume’s enhancement over it | scalar | mol/mol |
Pressures are in atm here because the tables are built in atm (HITRAN’s broadening coefficients are per atm); elsewhere radtrax uses Pa unless a name says otherwise. On this page is a reflectance, not an air density, and is always an optical depth, never a transmittance.
1. Physical setup¶
Consider a pencil of sunlight crossing a plane-parallel atmospheric layer of vertical thickness , which holds a single absorbing gas at temperature , pressure and volume mixing ratio . We want the transmittance (the fraction of photons at wavenumber that get through untouched) as a function of the atmospheric state.
Two viewing angles enter: the solar zenith angle (light coming in) and the viewing zenith angle (light going out to the sensor after reflection at the ground). The plane-parallel two-way air-mass factor
converts the vertical path through the layer into the slant path the photons actually travel. It is valid for zenith angles below about 75° and gives at nadir (). It is radiomax’s radiomax.geometry.air_mass_factor.
2. Line-by-line absorption cross-section¶
The HITRAN database lists every rovibrational transition of every atmospherically relevant isotopologue by its line centre , a reference line intensity at K and a lower-state energy . For a given , each line’s intensity is the reference value scaled by the Boltzmann and stimulated-emission factors, so we will have:
where is the total internal partition sum (HAPI ships the TIPS-2021 tables) and cm K is the second radiation constant.
Each line also has a shape , set by two broadening mechanisms. Thermal motion of the molecules gives a Gaussian (Doppler) shape whose half-width grows with the line centre and with :
Collisions give a Lorentzian shape whose half-width is a sum over the broadening gases , each with its HITRAN coefficient [cm⁻¹/atm], temperature exponent and fraction of the gas mixture:
with atm. For CH₄ at 4300 cm⁻¹ and 296 K the Doppler half-width is about cm⁻¹, whereas at 1 atm the Lorentz half-width (several hundredths of a cm⁻¹) dominates; high in the atmosphere the two become comparable. HITRAN also gives a pressure shift , which moves each centre to .
The real line shape is the convolution of the two, the Voigt profile:
where and are the normalised Gaussian and Lorentzian profiles with half-widths and . HAPI evaluates it with the Humlíček algorithm. Summing intensity times shape over all lines within the requested wavenumber window gives the absorption cross-section:
Practically speaking, the builder cuts each line at cm⁻¹ from its centre and sums every isotopologue of the gas; §8 explains why those two conventions matter.
3. Absorption coefficient and Beer–Lambert¶
The absorption coefficient follows from and the number density of the absorbing gas. From the ideal-gas law (number_density), we will have:
and the absorption coefficient is their product:
The Beer–Lambert law says that each small path element removes a fraction of the light. So integrating over a homogeneous layer along the slant path, of length , gives the optical depth and the transmittance:
The code names the transmittance tau in places (the docstring of transmittance writes , with its own for our and for our ). What it returns is the transmittance in the notation of this page.
Units
| Quantity | Units | |
|---|---|---|
| cm⁻¹/(molecule cm⁻²) × cm | cm²/molecule ✓ | |
| mol/mol × molecules/cm³ | molecules/cm³ ✓ | |
| cm²/molecule × molecules/cm³ | cm⁻¹ ✓ | |
| cm⁻¹ × cm × 1 | dimensionless ✓ |
4. Why a look-up table¶
Evaluating at run time for every pixel is very expensive, since each call sums thousands of Voigt profiles over a dense grid. However, at fixed , is a smooth function of : the Doppler width scales as , the Lorentz width as , and the line intensity is entire in . So we precompute once on a coarse grid and interpolate at run time.
The natural axes are:
Wavenumber , set by the instrument’s native resolution. Hyperspectral work (TROPOMI, EMIT) needs a step of 0.01 cm⁻¹ or less, since HITRAN half-widths go down to about 0.005 cm⁻¹ at low pressure; coarser is fine for tutorials.
Temperature , from the upper troposphere (about 200 K) to the surface (about 320 K). Steps of about 20 K keep the bilinear interpolation error below 1 %.
Pressure , from the upper troposphere (about 0.1 atm) to the surface (about 1.0 atm), logarithmic or uniform depending on where accuracy matters most.
The builder’s defaults (LUTGridConfig) follow these ranges: seven temperatures from 200 to 320 K every 20 K, six pressures between 0.1 and 1.0 atm, and a 0.01 cm⁻¹ step. The tables of the layered forward model (v0’s grid) reach higher in the atmosphere: 4000–6500 cm⁻¹ at 0.01 cm⁻¹, sixteen pressures log-spaced from 0.01 to 1.1 atm and eight temperatures from 180 to 320 K, interpolated bilinearly in by TableOpacity.
Viewing geometry (, ) is not a LUT axis: the multiplies after the lookup, so one cross-section table serves every satellite geometry.
5. Differential Beer–Lambert: the plume enhancement¶
For plume retrievals from point sources (landfills, oil and gas, industrial stacks) we care about the enhancement above the regional background, not the absolute column. Let be the background mixing ratio and the mixing ratio in the plume pixel. Since is linear in the mixing ratio, the optical depth splits additively into a background part and an enhancement part:
and so the transmittances multiply:
On the measurement side, dividing the radiance of the plume pixel by that of a background pixel cancels every factor the two pixels share:
The solar irradiance , the broadband surface reflectance , the aerosol and other-gas optical depth and the target gas’s own background all drop out of the ratio, which leaves only the narrow-band absorption features of the enhancement. This cancellation is what makes plume retrievals from space possible, even when an absolute column retrieval would be dominated by nuisance parameters. It assumes the two pixels share their reflectance, which is the assumption the absorption-shape test makes explicit and pairs pixels to satisfy.
The retrieval then fits the simulated ratio to the measured one:
where the norm runs over the wavenumber grid. plume_ratio_spectrum computes the model side, , with vmr_total (its docstring writes vmr_total = vmr_background * (1 + enhancement), a fractional enhancement). The same Beer–Lambert kernel is the forward model of the matched filter and of the 3D-Var retrieval downstream.
6. Assumptions and caveats¶
The forward model above inherits a stack of approximations, roughly in decreasing order of severity:
Absorption-only radiative transfer. Scattering by molecules (Rayleigh), aerosols and clouds is ignored. For hazy or cloudy pixels a full scalar or vector RTM (e.g. VLIDORT, SASKTRAN) is needed.
A single homogeneous layer. Real atmospheres have , and profiles. Operational retrievals discretise into 20–40 layers and sum the layers’ vertical optical depths (VODs); the same LUT machinery applies per layer, which is what radtrax’s layered
ForwardModeldoes withTableOpacity.Plane-parallel geometry. It breaks down past about 75° zenith, where the factors in the are replaced by a spherical-shell air mass (radtrax’s
ViewingGeometry.layer_air_mass, radtrax#104).Local thermodynamic equilibrium (LTE). It holds in the troposphere and lower stratosphere, and fails at very high altitudes, where radiative excitation competes with collisional excitation.
No line mixing. HAPI’s
_Voigtprofile does not account for line mixing, which matters at very high pressure for some species (the CO₂ 4.3 µm band, for instance). The_HT(Hartmann–Tran) profile is available but costs more.Diluent composition. We pin the diluent to
{'air': 1-VMR, 'self': VMR}, with dry-air broadening coefficients. Humid conditions change slightly through water-vapour broadening, which is second order for most retrievals.
7. Software surface¶
Three functions carry the physics:
compute_absorption_lut(gas_config, grid_config, *, cache_dir, progress)evaluates on the full LUT grid by callinghapi.absorptionCoefficient_Voigtat each knot, for aGasConfigand aLUTGridConfig.build_tablewraps it for v0’s tables, with the command linepython -m radtrax.spectroscopy.hitran GAS [GAS ...].beers_law_from_lut(ds, *, vmr, T_K, p_atm, l_vert_cm, sza_deg, vza_deg)interpolates the LUT at , multiplies by to get , applies the and the exponential, and returns the transmittance .plume_ratio_spectrum(ds, *, vmr_background, vmr_total, T_K, p_atm, l_vert_cm, sza_deg, vza_deg)returns the differential form , used by the enhancement retrieval in 03_beers _law _with _lut .ipynb.
The sketch below runs the chain of §3 and §5 on radtrax’s synthetic CH₄ table, which has the same layout as a HITRAN-built LUT, so it needs no HAPI and no download. The layer is 1 km at 1 atm and 288 K with 1.9 ppm of CH₄, the sun at 35° and the sensor at 10°.
from radtrax.spectroscopy import (
absorption_coefficient,
beers_law_from_lut,
interpolate_cross_section,
plume_ratio_spectrum,
transmittance,
)
from radtrax.spectroscopy.synthetic import synthetic_table
# Shapes: G = 14,000 wavenumbers (4230–4370 cm⁻¹ at 0.01 cm⁻¹); T = 6, P = 10 knots
# today (radtrax)
# σ(ν; T, p) on the table's knots [cm²/molecule]
table = synthetic_table() # → (G, T, P)
# today (radtrax)
# σ(ν) at (T, p), bilinear between the knots
sigma = interpolate_cross_section(table, T_K=288.0, p_atm=1.0) # (G, T, P) → (G,)
# today (radtrax)
# k_abs(ν) = σ(ν) VMR p / (k_B T) [cm⁻¹]
k_abs = absorption_coefficient(sigma, vmr=1.9e-6, p_atm=1.0, T_K=288.0) # (G,) → (G,)
# today (radtrax)
# e^{-τ(ν)}, τ(ν) = k_abs(ν) Δz AMF
trans = transmittance(k_abs, l_vert_cm=1e5, sza_deg=35.0, vza_deg=10.0) # (G,) → (G,)
# today (radtrax)
# the same three steps in one call
trans_lut = beers_law_from_lut( # → (G,)
table, vmr=1.9e-6, T_K=288.0, p_atm=1.0,
l_vert_cm=1e5, sza_deg=35.0, vza_deg=10.0,
)
# today (radtrax)
# e^{-τ_tot(ν)} / e^{-τ_bg(ν)} = e^{-Δτ(ν)}
ratio = plume_ratio_spectrum( # → (G,)
table, vmr_background=1.9e-6, vmr_total=2.9e-6, T_K=288.0, p_atm=1.0,
l_vert_cm=1e5, sza_deg=35.0, vza_deg=10.0,
)interpolate_cross_section, absorption_coefficient and transmittance are the three steps of §3, and beers_law_from_lut is the same chain in one call (the two agree exactly). On this layer the is 2.24, the strongest line leaves a transmittance of 0.64 (), and an enhancement of 1 ppm over the 1 km layer (1000 ppm·m) brings the plume ratio down to 0.79 at its deepest. These numbers come from the synthetic table, so they illustrate the chain rather than real CH₄.
The notebooks walk through building the LUT (01), extending it to several gases (02) and, in plumax because it simulates the plume, using it as the forward model of a plume-enhancement retrieval (03).
8. Benchmarks against published numbers¶
The builder is tested against numbers it did not produce, the benchmarks of Korkin et al. [4] (tests/spectroscopy/test_benchmarks_korkin2025.py, radtrax#171).
One line (their §4.6, Table 4): a single HITRAN2020 O₂ record, whose peak cross-section on a 0.01 cm⁻¹ grid at 270, 300 and 330 K and 0.9, 1.0 and 1.1 atm must match the published seven digits to 10-4 relative, the accuracy of HAPI’s Voigt algorithm. It catches unit, partition-sum and line-shift errors.
Gas cells (their §5.4.1 and §5.4.2): pure O₂ in the A band and pure CH₄ at 2.3 µm, whose optical thickness (with the cell’s column density, in molecules/cm²) must be within 1 % of
gcell’s wherever , and, for CH₄, whose filter-weighted transmittance must be within 10-3 of SpectralCalc’s at every wavenumber.
Three conventions decide whether the cells can pass. The cells are pure gas, so only self-broadening applies, and gcell shifts each line by whatever the broadener (HITRAN has no self shift, so HAPI would shift a pure gas by nothing). gcell sums every isotopologue and cuts each line at cm⁻¹. And the cells were computed from HITRAN2020, while HITRANonline now serves a later edition whose CH₄ lines differ by several per cent, so the tests read the authors’ own line lists rather than fetching lines.
Since radtrax#172 the builder follows the same two line conventions by default: it fetches every isotopologue of a gas (GasConfig.isotopologue_ids = None; HITRAN’s intensities already carry each isotopologue’s natural abundance) and cuts each line at cm⁻¹ (LUTGridConfig.wing_cm). Built the old way, with the main isotopologue alone and HAPI’s default cut-off of 50 half-widths, the O₂ cell’s was up to 100 % off gcell’s (median 8.5 %) and the CH₄ cell’s up to 8.2 % (median 2.9 %, on 4300–4305 cm⁻¹). Built the new way, they agree to and , and the CH₄ filter-weighted transmittance is within of SpectralCalc’s.
Gordon, I. E. et al. (2022). The HITRAN2020 molecular spectroscopic database. JQSRT 277, 107949.
Rothman, L. S. et al. (2013). HITRAN: 40 years and counting. JQSRT 130, 4–50.
Frankenberg, C. et al. (2005). Iterative maximum a posteriori (IMAP)-DOAS for retrieval of strongly absorbing trace gases. Atmos. Chem. Phys. 5, 9–22.
Korkin, S., Sayer, A. M., Ibrahim, A. & Lyapustin, A. (2025). A practical guide to coding line-by-line trace gas absorption in Earth’s atmosphere. JQSRT 337, 109345.