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 weightsw, and prior profilex_prioron 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_kernelandpressure_weighting(sim.footprintandsim.background). The last term is the prior the retrieval carries where it is not sensitive. Withoutak,pressure_weight, andpriorthe result isenhancement + background.- Parameters:
enhancement (
float) – The modeled enhancement of the column, weighted by the kernel and the pressure weights, in the units ofprior. 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 withpressure_levelsp(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:
- Raises:
ValueError – If only some of
ak,pressure_weight, andpriorare 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]), ... )