<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def geometric2geopotential(z: float, latitude: float) -> float: """Converts geometric height to geopoential height Parameters z : float Geometric height (meters) latitude : float Latitude (degrees) Returns ------- h : float Geopotential Height (meters) above the reference ellipsoid """

    twolat = deg2rad(2 * latitude)
    g = 9.80616 * (1 - 0.002637*cos(twolat) + 0.0000059*cos(twolat)**2)
    re = _geoid_radius(latitude)
    return z * g * re / (re + z)