metpy.calc.surface_based_cape_cin(pressure, temperature, dewpoint)

Calculate surface-based CAPE and CIN.

Calculate the convective available potential energy (CAPE) and convective inhibition (CIN) of a given upper air profile for a surface-based parcel. CIN is integrated between the surface and LFC, CAPE is integrated between the LFC and EL (or top of sounding). Intersection points of the measured temperature profile and parcel profile are logarithmically interpolated.

  • pressure (pint.Quantity) – Atmospheric pressure profile. The first entry should be the starting (surface) observation, with the array going from high to low pressure.

  • temperature (pint.Quantity) – Temperature profile corresponding to the pressure profile

  • dewpoint (pint.Quantity) – Dewpoint profile corresponding to the pressure profile


  • pint.Quantity – Surface based Convective Available Potential Energy (CAPE)

  • pint.Quantity – Surface based Convective Inhibition (CIN)


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.

Examples using metpy.calc.surface_based_cape_cin