sigma_to_pressure#
- metpy.calc.sigma_to_pressure(sigma, pressure_sfc, pressure_top)#
Calculate pressure from sigma values.
- Parameters
sigma (numpy.ndarray) – Sigma levels to be converted to pressure levels
pressure_sfc (
pint.Quantity
) – Surface pressure valuepressure_top (
pint.Quantity
) – Pressure value at the top of the model domain
- Returns
pint.Quantity
– Pressure values at the given sigma levels
Examples
>>> import numpy as np >>> from metpy.calc import sigma_to_pressure >>> from metpy.units import units >>> sigma_levs = np.linspace(0, 1, 10) >>> sigma_to_pressure(sigma_levs, 1000 * units.hPa, 10 * units.hPa) <Quantity([ 10. 120. 230. 340. 450. 560. 670. 780. 890. 1000.], 'hectopascal')>
Notes
Sigma definition adapted from [Philips1957]:
\[p = \sigma * (p_{sfc} - p_{top}) + p_{top}\]\(p\) is pressure at a given sigma level
\(\sigma\) is non-dimensional, scaled pressure
\(p_{sfc}\) is pressure at the surface or model floor
\(p_{top}\) is pressure at the top of the model domain
Changed in version 1.0: Renamed
psfc
,ptop
parameters topressure_sfc
,pressure_top