get_layer_heights

metpy.calc.get_layer_heights(heights, depth, *args, **kwargs)[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 layer

  • args (array-like) – Atmospheric variable(s) measured at the given pressures

  • bottom (pint.Quantity, optional) – The bottom of the layer

  • interpolate (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