Calculation of Geopotential Elevation of Weather Stations
for use in Meteorology
By: Jan Barani, Copyright © BARANI DESIGN Technologies s.r.o.  Manufacturer of professional microweather stations and weather sensors which meet all requirements of the WMO and NWS for professional climate monitoring.
This geopotential height above standard sea level (AMSL) calculator includes a gravitational correction due to lattitude (earth's centrifugal force). Based on WMO technical note 7 (also ref. WMO tech note 188)
Inputs
VARIABLE NAME VALUE UNITS DESCRIPTION
Zp_m = m Weather station elevation above mean sea-level (AMSL) in geometric meters
(NOT gpm)
Lat_deg = deg Latitude in degrees
 
Constants
g = 9.80616 m/s2 Gravitational constant
 
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
 
Hp_out = gpm OUTPUT: Weather station AMSL elevation in geopotential meters (gpm) adjusted for variations in gravitational force with altitude and latitude