Measure of instability in the air as a buoyancy force
In meteorology, convective available potential energy (commonly abbreviated as CAPE), is a measure of the capacity of the atmosphere to support upward air movement that can lead to cloud formation and storms. Some atmospheric conditions, such as very warm, moist, air in an atmosphere that cools rapidly with height, can promote strong and sustained upward air movement, possibly stimulating the formation of cumulus clouds or cumulonimbus (thunderstorm clouds). In that situation the potential energy of the atmosphere to cause upward air movement is very high, so CAPE (a measure of potential energy) would be high and positive. By contrast, other conditions, such as a less warm air parcel or a parcel in an atmosphere with a temperature inversion (in which the temperature increases above a certain height) have much less capacity to support vigorous upward air movement, thus the potential energy level (CAPE) would be much lower, as would the probability of thunderstorms.
More technically, CAPE is the integrated amount of work that the upward (positive) buoyancy force would perform on a given mass of air (called an air parcel) if it rose vertically through the entire atmosphere. Positive CAPE will cause the air parcel to rise, while negative CAPE will cause the air parcel to sink. 
Nonzero CAPE is an indicator of atmospheric instability in any given atmospheric sounding, a necessary condition for the development of cumulus and cumulonimbus clouds with attendant severe weather hazards.
Mechanics.
CAPE exists within the conditionally unstable layer of the troposphere, the free convective layer (FCL), where an ascending air parcel is warmer than the ambient air. CAPE is measured in joules per kilogram of air (J/kg). Any value greater than 0 J/kg indicates instability and an increasing possibility of thunderstorms and hail. Generic CAPE is calculated by integrating vertically the local buoyancy of a parcel from the level of free convection (LFC) to the equilibrium level (EL):
formula_1
Where formula_2 is the height of the level of free convection and formula_3 is the height of the equilibrium level (neutral buoyancy), where formula_4 is the virtual temperature of the specific parcel, where formula_5 is the virtual temperature of the environment (note that temperatures must be in the Kelvin scale), and where formula_6 is the acceleration due to gravity. This integral is the work done by the buoyant force minus the work done against gravity, hence it's the excess energy that can become kinetic energy.
CAPE for a given region is most often calculated from a thermodynamic or sounding diagram (e.g., a Skew-T log-P diagram) using air temperature and dew point data usually measured by a weather balloon.
CAPE is effectively positive buoyancy, expressed "B+" or simply "B"; the opposite of convective inhibition (CIN), which is expressed as "B-", and can be thought of as "negative CAPE". As with CIN, CAPE is usually expressed in J/kg but may also be expressed as m2/s2, as the values are equivalent. In fact, CAPE is sometimes referred to as "positive buoyant energy" ("PBE"). This type of CAPE is the maximum energy available to an ascending parcel and to moist convection. When a layer of CIN is present, the layer must be eroded by surface heating or mechanical lifting, so that convective boundary layer parcels may reach their level of free convection (LFC).
On a sounding diagram, CAPE is the "positive area" above the LFC, the area between the parcel's virtual temperature line and the environmental virtual temperature line where the ascending parcel is warmer than the environment. Neglecting the virtual temperature correction may result in substantial relative errors in the calculated value of CAPE for small CAPE values. CAPE may also exist below the LFC, but if a layer of CIN (subsidence) is present, it is unavailable to deep, moist convection until CIN is exhausted. When there is mechanical lift to saturation, cloud base begins at the lifted condensation level (LCL); absent forcing, cloud base begins at the convective condensation level (CCL) where heating from below causes spontaneous buoyant lifting to the point of condensation when the convective temperature is reached. When CIN is absent or is overcome, saturated parcels at the LCL or CCL, which had been small cumulus clouds, will rise to the LFC, and then spontaneously rise until hitting the stable layer of the equilibrium level. The result is deep, moist convection (DMC), or simply, a thunderstorm.
When a parcel is unstable, it will continue to move vertically, in either direction, dependent on whether it receives upward or downward forcing, until it reaches a stable layer (though momentum, gravity, and other forcing may cause the parcel to continue). There are multiple types of CAPE, "downdraft CAPE" ("DCAPE"), estimates the potential strength of rain and evaporatively cooled downdrafts. Other types of CAPE may depend on the depth being considered. Other examples are "surface based CAPE" ("SBCAPE"), "mixed layer" or "mean layer CAPE" ("MLCAPE"), "most unstable" or "maximum usable CAPE" ("MUCAPE"), and "normalized CAPE" ("NCAPE").
Fluid elements displaced upwards or downwards in such an atmosphere expand or compress adiabatically in order to remain in pressure equilibrium with their surroundings, and in this manner become less or more dense.
If the adiabatic decrease or increase in density is "less" than the decrease or increase in the density of the ambient (not moved) medium, then the displaced fluid element will be subject to downwards or upwards pressure, which will function to restore it to its original position. Hence, there will be a counteracting force to the initial displacement. Such a condition is referred to as "convective stability".
On the other hand, if adiabatic decrease or increase in density is "greater" than in the ambient fluid, the upwards or downwards displacement will be met with an additional force in the same direction exerted by the ambient fluid. In these circumstances, small deviations from the initial state will become amplified. This condition is referred to as "convective instability".
Convective instability is also termed "static instability", because the instability does not depend on the existing motion of the air; this contrasts with dynamic instability where instability is dependent on the motion of air and its associated effects such as dynamic lifting.
Significance to thunderstorms.
Thunderstorms form when air parcels are lifted vertically. Deep, moist convection requires a parcel to be lifted to the LFC where it then rises spontaneously until reaching a layer of non-positive buoyancy. The atmosphere is warm at the surface and lower levels of the troposphere where there is mixing (the planetary boundary layer (PBL)), but becomes substantially cooler with height. The temperature profile of the atmosphere, the change in temperature, the degree that it cools with height, is the lapse rate. When the rising air parcel cools more slowly than the surrounding atmosphere, it remains warmer and less dense. The parcel continues to rise freely (convectively; without mechanical lift) through the atmosphere until it reaches an area of air less dense (warmer) than itself.
The amount, and shape, of the positive-buoyancy area modulates the speed of updrafts, thus extreme CAPE can result in explosive thunderstorm development; such rapid development usually occurs when CAPE stored by a capping inversion is released when the "lid" is broken by heating or mechanical lift. The amount of CAPE also modulates how low-level vorticity is entrained and then stretched in the updraft, with importance to tornadogenesis. The most important CAPE for tornadoes is within the lowest 1 to 3 km (0.6 to 1.9 mi) of the atmosphere, whilst deep layer CAPE and the width of CAPE at mid-levels is important for supercells. Tornado outbreaks tend to occur within high CAPE environments. Large CAPE is required for the production of very large hail, owing to updraft strength, although a rotating updraft may be stronger with less CAPE. Large CAPE also promotes lightning activity.
Two notable days for severe weather exhibited CAPE values over 5 kJ/kg. Two hours before the 1999 Oklahoma tornado outbreak occurred on May 3, 1999, the CAPE value sounding at Oklahoma City was at 5.89 kJ/kg. A few hours later, an F5 tornado ripped through the southern suburbs of the city. Also on May 4, 2007, CAPE values of 5.5 kJ/kg were reached and an EF5 tornado tore through Greensburg, Kansas. On these days, it was apparent that conditions were ripe for tornadoes and CAPE wasn't a crucial factor. However, extreme CAPE, by modulating the updraft (and downdraft), can allow for exceptional events, such as the deadly F5 tornadoes that hit Plainfield, Illinois on August 28, 1990, and Jarrell, Texas on May 27, 1997, on days which weren't readily apparent as conducive to large tornadoes. CAPE was estimated to exceed 8 kJ/kg in the environment of the Plainfield storm and was around 7 kJ/kg for the Jarrell storm.
Severe weather and tornadoes can develop in an area of low CAPE values. The surprise severe weather event that occurred in Illinois and Indiana on April 20, 2004, is a good example. Importantly in that case, was that although overall CAPE was weak, there was strong CAPE in the lowest levels of the troposphere which enabled an outbreak of minisupercells producing large, long-track, intense tornadoes.
Example from meteorology.
A good example of convective instability can be found in our own atmosphere. If dry mid-level air is drawn over very warm, moist air in the lower troposphere, a hydrolapse (an area of rapidly decreasing dew point temperatures with height) results in the region where the moist boundary layer and mid-level air meet. As daytime heating increases mixing within the moist boundary layer, some of the moist air will begin to interact with the dry mid-level air above it. Owing to thermodynamic processes, as the dry mid-level air is slowly saturated its temperature begins to drop, increasing the adiabatic lapse rate. Under certain conditions, the lapse rate can increase significantly in a short amount of time, resulting in convection. High convective instability can lead to severe thunderstorms and tornadoes as moist air which is trapped in the boundary layer eventually becomes highly negatively buoyant relative to the adiabatic lapse rate and escapes as a rapidly rising bubble of humid air triggering the development of a cumulus or cumulonimbus cloud.
Limitations.
As with most parameters used in meteorology, there are some caveats to keep in mind, one of which is what CAPE represents physically and in what instances CAPE can be used. One example where the more common method for determining CAPE might start to break down is in the presence of tropical cyclones (TCs), such as tropical depressions, tropical storms, or hurricanes.
The more common method of determining CAPE can break down near tropical cyclones because CAPE assumes that liquid water is lost instantaneously during condensation. This process is thus irreversible upon adiabatic descent. This process is not realistic for tropical cyclones. To make the process more realistic for tropical cyclones is to use Reversible CAPE (RCAPE for short). RCAPE assumes the opposite extreme to the standard convention of CAPE and is that no liquid water will be lost during the process. This new process gives parcels a greater density related to water loading.
RCAPE is calculated using the same formula as CAPE, the difference in the formula being in the virtual temperature. In this new formulation, we replace the parcel saturation mixing ratio (which leads to the condensation and vanishing of liquid water) with the parcel water content. This slight change can drastically change the values we get through the integration.
RCAPE does have some limitations, one of which is that RCAPE assumes no evaporation keeping consistent for the use within a TC but should be used sparingly elsewhere.
Another limitation of both CAPE and RCAPE is that currently, both systems do not consider entrainment.
References.
 ;templatestyles src="Reflist/styles.css" / ;