get_layer_heights¶
-
metpy.calc.
get_layer_heights
(heights, depth, *args, bottom=None, interpolate=True, with_agl=False)[source]¶ Return an atmospheric layer from upper air data with the requested bottom and depth.
This function will subset an upper air dataset to contain only the specified layer using the heights only.
- Parameters
heights (array-like) – Atmospheric heights
depth (
pint.Quantity
) – The thickness of the layerargs (array-like) – Atmospheric variable(s) measured at the given pressures
bottom (
pint.Quantity
, optional) – The bottom of the layerinterpolate (bool, optional) – Interpolate the top and bottom points if they are not in the given data. Defaults to True.
with_agl (bool, optional) – Returns the heights as above ground level by subtracting the minimum height in the provided heights. Defaults to False.
- Returns
pint.Quantity, pint.Quantity – The height and data variables of the layer