Geopotential Altitude Calculator
(for Aviation  & Weather Stations in Meteorology)
By: Jan Barani, Copyright © BARANI DESIGN Technologies s.r.o. 
BARANI DESIGN Technologies is a manufacturer of professional micro weather stations and weather sensors that meet all requirements of the WMO and NWS for professional climate monitoring.

This geopotential height or geopotential altitude (above standard mean sea level AMSL) calculator includes corrections for the variability of earth's gravitational field due to altitude, earth's centrifugal force, and earth's imperfect shape. Based on WMO technical note 7 (also ref. WMO tech note 188).
Inputs
VARIABLE NAME VALUE UNITS DESCRIPTION
Zp_m = meters Weather station altitude above mean sea-level (AMSL) in geometric meters
(NOT gpm)
Lat_deg = degrees Latitude in degrees
Constants
g0 = 9.80665 m/s2 Standard gravitational constant
g1 = 9.80616 m/s2 Gravitational constant @ 45° latitude used for corrections of earth's centrifugal force
Conversions 
Lat_rad =   Latitude converted to radians
Calculations
g_lat_o =   Correction due to lattitude (earth's centrifugal force)
b_lat =   g variation in free air or extended plateaus
g_lat_elev =   Combining both variations above
OUTPUT:
Hp_out =
gpm OUTPUT: Weather station AMSL elevation in geopotential meters (gpm) adjusted for variations in gravitational force with altitude and latitude
Difference =  
Geopotential altitude is used instead of geometric height and GPS altitude (in geometric units of meters, feet, ...) to simplify mathematical calculations in meteorology and aviation. It allows one to use gravitational acceleration as a constant fixed number (ɡ0 or ɡn = 9.80665 m/s2 (32.17405 ft/s2)) because variations in gravity around the earth's surface are already accounted for in the geopotential altitude when given in geopotential units.
In short,
geopotential altitude is just a mathematical construct to make calculations simpler by allowing us to use gravity as a constant/fixed number.
UNITS:
• Geopotential altitude/height = Geopotential meters (gpm) or geopotential feet
• Geometric altitude/height (GPS altitude)= meters (m) or feet (ft) and length many other units
In meteorology, weather stations like the MeteoHelix may be located on high mountain ranges where geopotential altitude is used to convert measured barometric pressure into the height of a standard isobaric surface. This enables accurate determination of meteorological pressure highs and lows, which drive weather patterns.