stilt.observations.modelled_column#

stilt.observations.modelled_column(enhancement, background, *, ak=None, pressure_weight=None, prior=None)[source]#

Return the column-average mole fraction a retrieval would report for the modeled air.

With the retrieval’s averaging kernel A, pressure weights w, and prior profile x_prior on the same levels, it is:

enhancement + background + Σ_l w_l (1 − A_l) x_prior,l

The enhancement and the background must already be weighted by the averaging kernel and the pressure weights, as they are when the footprint’s transforms include averaging_kernel and pressure_weighting (sim.footprint and sim.background). The last term is the prior the retrieval carries where it is not sensitive. Without ak, pressure_weight, and prior the result is enhancement + background.

Parameters:
  • enhancement (float) – The modeled enhancement of the column, weighted by the kernel and the pressure weights, in the units of prior. A flux in µmol m⁻² s⁻¹ gives ppm; multiply by 1000 for ppb.

  • background (float) – The weighted background (sim.background(field).value). Over a receptor that stops below the top of the atmosphere it covers the receptor’s levels only; add the weighted field above the top first.

  • ak (ArrayLike | None) – The column averaging kernel on the retrieval’s levels (the soundings’ ak).

  • pressure_weight (ArrayLike | None) – Each level’s share of the column’s dry air, summing to 1. For a layer product with pressure_levels p (surface first), that is -np.diff(p) / (p[0] - p[-1]).

  • prior (ArrayLike | None) – The retrieval’s prior profile on the same levels (the soundings’ apriori).

Return type:

float

Raises:

ValueError – If only some of ak, pressure_weight, and prior are given, or they differ in length.

Examples

>>> bg = sim.background(cams).value
>>> dxch4 = 1000 * float(
...     sim.footprint.stilt.enhancement(flux).sum()
... )  # ppb
>>> p = row.pressure_levels
>>> modelled_column(
...     dxch4,
...     bg,
...     ak=row.ak,
...     prior=row.apriori,
...     pressure_weight=-np.diff(p) / (p[0] - p[-1]),
... )