parcel_profile#

metpy.calc.parcel_profile(pressure, temperature, dewpoint)#

Calculate the profile a parcel takes through the atmosphere.

The parcel starts at temperature, and dewpoint, lifted up dry adiabatically to the LCL, and then moist adiabatically from there. pressure specifies the pressure levels for the profile.

Parameters
  • pressure (pint.Quantity) – Atmospheric pressure level(s) of interest. This array must be from high to low pressure.

  • temperature (pint.Quantity) – Starting temperature

  • dewpoint (pint.Quantity) – Starting dewpoint

Returns

pint.Quantity – The parcel’s temperatures at the specified pressure levels

Notes

Only functions on 1D profiles (not higher-dimension vertical cross sections or grids). Duplicate pressure levels return duplicate parcel temperatures. Consider preprocessing low-precision, high frequency profiles with tools like scipy.medfilt, pandas.drop_duplicates, or numpy.unique.

Will only return Pint Quantities, even when given xarray DataArray profiles. To obtain a xarray Dataset instead, use parcel_profile_with_lcl_as_dataset instead.

Changed in version 1.0: Renamed dewpt parameter to dewpoint

Examples using metpy.calc.parcel_profile#