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