bulk_shear#

metpy.calc.bulk_shear(pressure, u, v, height=None, bottom=None, depth=None)[source]#

Calculate bulk shear through a layer.

Layer top and bottom specified in meters or pressure.

Parameters:
  • pressure (pint.Quantity) – Atmospheric pressure profile

  • u (pint.Quantity) – U-component of wind

  • v (pint.Quantity) – V-component of wind

  • height (pint.Quantity, optional) – Heights from sounding

  • depth (pint.Quantity, optional) – The depth of the layer in meters or hPa. Defaults to 100 hPa.

  • bottom (pint.Quantity, optional) – The bottom of the layer in height or pressure coordinates. If using a height, it must be in the same coordinates as the given heights (i.e., don’t use meters AGL unless given heights are in meters AGL.) Defaults to the highest pressure or lowest height given.

Returns:

Examples

>>> from metpy.calc import bulk_shear, wind_components
>>> from metpy.units import units
>>> p = [1000, 925, 850, 700, 500] * units.hPa
>>> wdir = [165, 180, 190, 210, 220] * units.degree
>>> sped = [5, 15, 20, 30, 50] * units.knots
>>> u, v = wind_components(sped, wdir)
>>> bulk_shear(p, u, v)
(<Quantity(2.41943319, 'knot')>, <Quantity(11.6920573, 'knot')>)

Notes

Only functions on 1D profiles (not higher-dimension vertical cross sections or grids). Since this function returns scalar values when given a profile, this will return Pint Quantities even when given xarray DataArray profiles.

Changed in version 1.0: Renamed heights parameter to height

Examples using metpy.calc.bulk_shear#

Advanced Sounding Plot with Complex Layout

Advanced Sounding Plot with Complex Layout

Bulk Shear

Bulk Shear

Sounding Calculation Examples

Sounding Calculation Examples