mixed_parcel#

metpy.calc.mixed_parcel(pressure, temperature, dewpoint, parcel_start_pressure=None, height=None, bottom=None, depth=None, interpolate=True)#

Calculate the properties of a parcel mixed from a layer.

Determines the properties of an air parcel that is the result of complete mixing of a given atmospheric layer.

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

  • temperature (pint.Quantity) – Atmospheric temperature profile

  • dewpoint (pint.Quantity) – Atmospheric dewpoint profile

  • parcel_start_pressure (pint.Quantity, optional) – Pressure at which the mixed parcel should begin (default None)

  • height (pint.Quantity, optional) – Atmospheric heights corresponding to the given pressures (default None)

  • bottom (pint.Quantity, optional) – The bottom of the layer as a pressure or height above the surface pressure (default None)

  • depth (pint.Quantity, optional) – The thickness of the layer as a pressure or height above the bottom of the layer (default 100 hPa)

  • interpolate (bool, optional) – Interpolate the top and bottom points if they are not in the given data

Returns

Examples

>>> from metpy.calc import dewpoint_from_relative_humidity, mixed_parcel
>>> from metpy.units import units
>>> # pressure
>>> p = [1008., 1000., 950., 900., 850., 800., 750., 700., 650., 600.,
...      550., 500., 450., 400., 350., 300., 250., 200.,
...      175., 150., 125., 100., 80., 70., 60., 50.,
...      40., 30., 25., 20.] * units.hPa
>>> # temperature
>>> T = [29.3, 28.1, 23.5, 20.9, 18.4, 15.9, 13.1, 10.1, 6.7, 3.1,
...      -0.5, -4.5, -9.0, -14.8, -21.5, -29.7, -40.0, -52.4,
...      -59.2, -66.5, -74.1, -78.5, -76.0, -71.6, -66.7, -61.3,
...      -56.3, -51.7, -50.7, -47.5] * units.degC
>>> # relative humidity
>>> rh = [.85, .65, .36, .39, .82, .72, .75, .86, .65, .22, .52,
...       .66, .64, .20, .05, .75, .76, .45, .25, .48, .76, .88,
...       .56, .88, .39, .67, .15, .04, .94, .35] * units.dimensionless
>>> # calculate dewpoint
>>> Td = dewpoint_from_relative_humidity(T, rh)
>>> # find the mixed parcel of depth 50 hPa
>>> mixed_parcel(p, T, Td, depth=50 * units.hPa)
(<Quantity(1008.0, 'hectopascal')>, <Quantity(28.750033, 'degree_Celsius')>,
<Quantity(18.1998736, 'degree_Celsius')>)

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 p, dewpt, heights parameters to pressure, dewpoint, height

Examples using metpy.calc.mixed_parcel#

Sounding Calculation Examples

Sounding Calculation Examples

Sounding Calculation Examples