downdraft_cape#

metpy.calc.downdraft_cape(pressure, temperature, dewpoint)[source]#

Calculate downward CAPE (DCAPE).

Calculate the downward convective available potential energy (DCAPE) of a given upper air profile. Downward CAPE is the maximum negative buoyancy energy available to a descending parcel. Parcel descent is assumed to begin from the lowest equivalent potential temperature between 700 and 500 hPa. This parcel is lowered moist adiabatically from the environmental wet bulb temperature to the surface. This assumes the parcel remains saturated throughout the descent.

Parameters:
Returns:

  • dcape (pint.Quantity) – Downward Convective Available Potential Energy (DCAPE)

  • down_pressure (pint.Quantity) – Pressure levels of the descending parcel

  • down_parcel_trace (pint.Quantity) – Temperatures of the descending parcel

Examples

>>> from metpy.calc import dewpoint_from_relative_humidity, downdraft_cape
>>> 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, 25.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, .75, .56, .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)
>>> downdraft_cape(p, T, Td)
(<Quantity(1222.67967, 'joule / kilogram')>, <Quantity([1008. 1000.  950.
900.  850.  800.  750.  700.  650.  600.], 'hectopascal')>, <Quantity([17.50959548
17.20643425 15.237249 13.12607097 10.85045704 8.38243809 5.68671014 2.71808368
-0.58203825 -4.29053485], 'degree_Celsius')>)

Notes

Formula adopted from [Emanuel1994].

\[\text{DCAPE} = -R_d \int_{SFC}^{p_\text{top}} (T_{{v}_{env}} - T_{{v}_{parcel}}) d\text{ln}(p)\]
  • \(DCAPE\) is downward convective available potential energy

  • \(SFC\) is the level of the surface or beginning of parcel path

  • \(p_\text{top}\) is pressure of the start of descent path

  • \(R_d\) is the gas constant

  • \(T_{{v}_{env}}\) is environment virtual temperature

  • \(T_{{v}_{parcel}}\) is the parcel virtual temperature

  • \(p\) is atmospheric pressure

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.