Vertical
vertical
Vertical coordinates expressed uniformly as p_k = A_k + B_k * ps.
- ERA5 model levels (L137, hybrid sigma-pressure, Simmons & Burridge 1981):
half levels
p_{k+1/2} = a_{k+1/2} + b_{k+1/2} * psand full levels are the mean of the two adjacent half levels (IFS convention), henceA_k = (a_{k-1/2} + a_{k+1/2}) / 2andB_klikewise. - Pressure levels:
A_k = p_k,B_k = 0.
Levels are always ordered top (low pressure) to bottom (high pressure).
VerticalCoordinate
dataclass
Full-level pressures A + B * ps for a set of native level identifiers.
Source code in packages/barograph-met/src/baro/met/vertical.py
needs_surface_pressure
property
True for hybrid levels (pressures depend on the surface pressure).
pressure(ps)
Full-level pressure (Pa); ps broadcasts on a trailing level axis.
select_bracketing(p_min, p_max, ps_min, ps_max, margin=1)
Positions of the levels needed to bracket pressures in [p_min, p_max].
The level pressures move with ps: a level is kept if, for some
ps in [ps_min, ps_max], it can be the level just above or just
below a target pressure. margin extra levels are added on each side.
Source code in packages/barograph-met/src/baro/met/vertical.py
subset(positions)
The levels at positions.
model_levels(ids=None)
ERA5 L137 full levels (default: all 137, hybrid index 1 = model top).
Source code in packages/barograph-met/src/baro/met/vertical.py
pressure_levels(hpa)
Isobaric levels given in hPa (must be strictly increasing).