def geometric_to_geopotential(z, r0):
    """ Converts from given geometric altitude to geopotential one.

    Parameters
    ----------
    z: ~astropy.units.Quantity
        Geometric altitude.
    r0: ~astropy.units.Quantity
        Planet/Natural satellite radius.

    Returns
    -------
    h: ~astropy.units.Quantity
        Geopotential altitude.
    """
    h = r0 * z / (r0 + z)
    return h
