geopotential_to_height¶
-
metpy.calc.
geopotential_to_height
(geopot)[source]¶ Compute height from a given geopotential.
Parameters: geopotential (pint.Quantity) – Geopotential (array_like) Returns: pint.Quantity – The corresponding height value(s) Examples
>>> from metpy.constants import g, G, me, Re >>> import metpy.calc >>> from metpy.units import units >>> height = np.linspace(0,10000, num = 11) * units.m >>> geopot = metpy.calc.height_to_geopotential(height) >>> geopot <Quantity([ 0. 9817.46806283 19631.85526579 29443.16305888 39251.39289118 49056.54621087 58858.62446525 68657.62910064 78453.56156253 88246.42329545 98036.21574306], 'meter ** 2 / second ** 2')> >>> height = metpy.calc.geopotential_to_height(geopot) >>> height <Quantity([ 0. 1000. 2000. 3000. 4000. 5000. 6000. 7000. 8000. 9000. 10000.], 'meter')>
Notes
Derived from definition of geopotential in [Hobbs2006] pg.14 Eq.1.8.