height_to_geopotential

metpy.calc.height_to_geopotential(height)[source]

Compute geopotential for a given height above sea level.

Calculates the geopotential from height above mean sea level 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:

\[\Phi = \frac{g R_e z}{R_e + z}\]

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

Parameters

height (pint.Quantity) – Height above sea level

Returns

pint.Quantity – Corresponding geopotential value(s)

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.11097983 19607.1448853  29406.10316465
39201.98726524 48994.79863351 58784.53871501 68571.20895435
78354.81079527 88135.34568058 97912.81505219], 'meter ** 2 / second ** 2')>

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).