# geopotential_to_height#

metpy.calc.geopotential_to_height(geopotential)[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 – Corresponding value(s) of height above sea level

Examples

>>> import metpy.calc
>>> from metpy.units import units
>>> geopot = units.Quantity([0., 9805., 19607., 29406.], 'm^2/s^2')
>>> height = metpy.calc.geopotential_to_height(geopot)
>>> height
<Quantity([   0.          999.98867965 1999.98521653 2999.98947022], '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.)

Changed in version 1.0: Renamed geopot parameter to geopotential