geopotential_to_height

metpy.calc.geopotential_to_height(geopot)[source]

Compute height above sea level from a given geopotential.

Calculates the height above mean sea level from geopotential using the following formula, which is derived from the definition of geopotential as given in [Hobbs2006] Pg. 69 Eq 3.21, along with an approximation for variation of gravity with altitude:

\[z = \frac{\Phi R_e}{gR_e - \Phi}\]

(where \(\Phi\) is geopotential, \(z\) is height, \(R_e\) is average Earth radius, and \(g\) is standard gravity.)

Parameters

geopotential (pint.Quantity) – Geopotential

Returns

pint.Quantity – The corresponding value(s) of height above sea level

Examples

>>> 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.           9805.11102602  19607.14506998  29406.10358006
39201.98800351  48994.79978671  58784.54037509  68571.21121319
78354.81374467  88135.34941224  97912.81965774], '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

This calculation approximates \(g(z)\) as

\[g(z) = g_0 \left( \frac{R_e}{R_e + z} \right)^2\]

where \(g_0\) is standard gravity. It thereby accounts for the average effects of centrifugal force on apparent gravity, but neglects latitudinal variations due to centrifugal force and Earth’s eccentricity.

(Prior to MetPy v0.11, this formula instead calculated \(g(z)\) from Newton’s Law of Gravitation assuming a spherical Earth and no centrifugal force effects.)