lair.soundings.Sounding.interpolate#

Sounding.interpolate(start=None, stop=5000, interval=10)[source]#

Interpolate sounding data to regular height levels.

Parameters:
  • start (float, optional) – The lowest height, in meters above sea level. Default is the ground at the station: its elevation, or, in a file without one (soundings downloaded from Wyoming today), the height of the first level, which Wyoming lists from the ground up.

  • stop (float, optional) – The height to stop at, in meters. Like the end of a range, it is not itself a level. Default is 5000.

  • interval (float, optional) – The spacing between levels, in meters. Default is 10.

Returns:

xr.Dataset – The interpolated sounding data.

See also

get_soundings

Interpolates every sounding of a period to the same heights.

Notes

The levels are sorted by height before they are interpolated. Heights that wrap at 10 km were unwrapped when the file was read; a level reported lower than the one before it, by a balloon pushed down, keeps its height.

Examples

Levels every 10 m from the station’s ground up to 4999 m above sea level (Salt Lake City’s ground is 1289 m):

ds = Sounding("SLC_2024011512.csv").interpolate()
ds.height.values[:3]  # array([1289., 1299., 1309.])