moist_lapse#
- metpy.calc.moist_lapse(pressure, temperature, reference_pressure=None)[source]#
Calculate the temperature at a level assuming liquid saturation processes.
This function lifts a parcel starting at temperature. The starting pressure can be given by reference_pressure. Essentially, this function is calculating moist pseudo-adiabats.
- Parameters:
pressure (
pint.Quantity
) – Atmospheric pressure level(s) of interesttemperature (
pint.Quantity
) – Starting temperaturereference_pressure (
pint.Quantity
, optional) – Reference pressure; if not given, it defaults to the first element of the pressure array.
- Returns:
pint.Quantity
– The resulting parcel temperature at levels given by pressure
Examples
>>> from metpy.calc import moist_lapse >>> from metpy.units import units >>> plevs = [925, 850, 700, 500, 300, 200] * units.hPa >>> moist_lapse(plevs, 5 * units.degC).to('degC') <Quantity([ 5. 0.99716773 -8.88545598 -28.37637988 -60.11086751 -83.33806983], 'degree_Celsius')>
See also
dry_lapse
Calculate parcel temperature assuming dry adiabatic processes
parcel_profile
Calculate complete parcel profile
Notes
This function is implemented by integrating the following differential equation:
\[\frac{dT}{dP} = \frac{1}{P} \frac{R_d T + L_v r_s} {C_{pd} + \frac{L_v^2 r_s \epsilon}{R_d T^2}}\]This equation comes from [Bakhshaii2013].
Only reliably functions on 1D profiles (not higher-dimension vertical cross sections or grids).
Changed in version 1.0: Renamed
ref_pressure
parameter toreference_pressure