Kernel
kernel
Interpolation of a regional cube at aircraft positions.
For each of the 4 horizontal corners around a point, the full-level pressures
of that grid column are computed from its own surface pressure
(p_k = A_k + B_k * ps), the two levels bracketing the aircraft pressure are
found, and the field is interpolated linearly in ln p (default) or p.
The 4 column values are then combined bilinearly. Time interpolation between
two hourly cubes is done by the caller. Nothing is ever extrapolated: points
outside the domain or outside a column get NaN and a flag.
Flag
Bases: IntFlag
Bit flags describing why a value is missing.
Source code in packages/barograph-met/src/baro/met/kernel.py
SampleOptions
dataclass
How to interpolate on the vertical.
vertical: "log" (linear in ln p, default) or "linear" in p.
surface_pressure: "actual" (column pressures from the cube's
surface pressure) or "standard" (101325 Pa everywhere, i.e. a fixed
altitude->level table).
Source code in packages/barograph-met/src/baro/met/kernel.py
sample(cube, lat, lon, pressure, options=None)
Interpolate every cube field at the given positions (pressure in Pa).
Source code in packages/barograph-met/src/baro/met/kernel.py
track_components(u, v, track_deg)
Along-track (tailwind > 0) and cross-track (from left to right > 0) wind.