stilt.observations.pressure_altitudes#

stilt.observations.pressure_altitudes(pressures, *, surface_pressure, surface_altitude, temperature=None, top=None)[source]#

Mean-sea-level altitudes of a retrieval’s pressure levels.

Turns the pressure levels a sounding reports (OCO-2 pressure_levels, or TROPOMI’s surface_pressure minus multiples of pressure_interval) into the altitudes argument of slant_points(), so the slant samples follow the retrieval’s own layers. Pressures are in hPa and altitudes in metres above mean sea level; surface_pressure and surface_altitude are the sounding’s.

Altitude follows the hypsometric equation upward from the surface. What it assumes about temperature depends on temperature:

Return type:

ndarray

Parameters:
None

The standard-atmosphere lapse rate of 6.5 K/km from a surface temperature of 288.15 K minus 6.5 K/km times the surface altitude. This reproduces the U.S. Standard Atmosphere below 11 km and is within a few percent of a real profile.

a number

An isothermal atmosphere at that temperature (K), with scale height R_d T / g: 7.3 km at 250 K.

one temperature per level

Layer by layer with the mean temperature (K) of each layer, the way a sounding is integrated. Use this when the retrieval or its prior gives a temperature profile. The layer between the surface and the first level takes the first level’s temperature.

Levels below the surface (pressure above surface_pressure) are dropped, as are levels above top (metres MSL, for example the meteorology’s top). The result is sorted from the surface upward, so the first altitude anchors the slant at the sounding’s location whatever order the product lists its levels in.