Skip to content
scipython.com

The Earth's gravity field

Posted on

The Earth's gravity field is described by a gravity model: the coefficients of its expansion in spherical harmonics, determined from the orbits of satellites and from measurements on the ground. This post reads a published model with NumPy and SciPy, and draws the geoid, the surface of constant potential that coincides with mean sea level, as a map and as an exaggerated 3D surface, together with the gravity anomalies.

A uniform sphere attracts as if all its mass were at its centre, but the Earth is neither spherical nor uniform: it bulges at the equator, because it rotates, and the density of its crust and mantle varies from place to place. Its gravitational potential therefore departs from \(GM/r\), by about one part in a thousand because of the bulge and by a few parts in a million because of everything else. These small departures determine the orbits of satellites, the shape of the sea surface and the heights of points on land above sea level.

Spherical harmonic expansion

Outside the Earth's masses, the gravitational potential, \(V\), satisfies Laplace's equation, \(\nabla^2 V = 0\), and its solutions that vanish at infinity are the functions \(r^{-(n+1)} Y_n^m(\theta, \lambda)\), where the \(Y_n^m\) are the spherical harmonics described in an earlier post. Geodesists write the potential at a distance \(r\) from the Earth's centre of mass, at the colatitude \(\theta\) and the longitude \(\lambda\), as

\[V(r, \theta, \lambda) = \frac{GM}{r} \sum_{n=0}^{\infty} \left(\frac{R}{r}\right)^n \sum_{m=0}^{n} \bar{P}_{nm}(\cos\theta) \left[\bar{C}_{nm} \cos m\lambda + \bar{S}_{nm} \sin m\lambda\right],\]

where \(GM\) is the product of the gravitational constant and the Earth's mass, \(R\) is a reference radius, and the dimensionless Stokes coefficients, \(\bar{C}_{nm}\) and \(\bar{S}_{nm}\), describe the field; the degree is written \(n\) in geodesy, where the earlier post used \(l\). The \(\bar{P}_{nm}\) are the fully normalised associated Legendre functions, scaled so that the square of each term, \(\bar{P}_{nm}(\cos\theta)\cos m\lambda\) or \(\bar{P}_{nm}(\cos\theta)\sin m\lambda\), averages to 1 over the sphere, and without the Condon–Shortley phase. They are related to the real spherical harmonics of the earlier post by

\[Y_{nm} = \frac{1}{\sqrt{4\pi}} \bar{P}_{nm}(\cos\theta) \cos m\lambda, \quad Y_{n,-m} = \frac{1}{\sqrt{4\pi}} \bar{P}_{nm}(\cos\theta) \sin m\lambda \quad (m \ge 0).\]

The term \(n = 0\) is \(GM/r\), the potential of a sphere, and the terms of degree 1 vanish, since the origin is at the centre of mass. Of the rest, \(\bar{C}_{20}\) is about 200 times larger than any other coefficient: \(J_2 = -\sqrt{5}\,\bar{C}_{20} = 1.0826 \times 10^{-3}\) describes the equatorial bulge, and makes the planes of satellites' orbits precess, an effect that Sun-synchronous orbits exploit. \(\bar{C}_{21}\) and \(\bar{S}_{21}\) are of the order of \(10^{-9}\), since the axis about which the Earth's mass is most nearly symmetric almost coincides with its axis of rotation, and \(\bar{C}_{22} = 2.44 \times 10^{-6}\) and \(\bar{S}_{22} = -1.40 \times 10^{-6}\) describe a slight ellipticity of the equator. The Earth's magnetic field is expanded in spherical harmonics in the same way; its dipole term is drawn in another post.

Gravity models

The coefficients are determined from the orbits of satellites, which the field perturbs, tracked by laser ranging and GPS, and from two dedicated missions: GRACE (2002–2017) measured the changing distance between two satellites following each other in the same orbit, and GOCE (2009–2013) carried a gradiometer that measured the gradients of gravity directly. A satellite at a height \(h\) feels the term of degree \(n\) reduced by the factor \([R/(R + h)]^{n+1}\), which at a height of 250 km is \(2 \times 10^{-2}\) for \(n = 100\) but \(9 \times 10^{-6}\) for \(n = 300\), so the coefficients of high degree are poorly determined from orbit. Models of higher degree, such as EGM2008, which reaches degree 2190, add measurements of gravity on the ground and satellite altimetry of the sea surface.

The International Centre for Global Earth Models (ICGEM) at GFZ Potsdam collects the published models and distributes them as text files in its .gfc format: a header that gives \(GM\), \(R\), the maximum degree and the normalisation, followed by a line for each coefficient with \(n\), \(m\), \(\bar{C}_{nm}\), \(\bar{S}_{nm}\) and their standard errors. This post uses GOCO06s (A. Kvas et al., Earth Syst. Sci. Data 13, 99 (2021), doi:10.5194/essd-13-99-2021), a model to degree 300 determined from satellite data alone and licensed CC BY 4.0 (doi:10.5880/ICGEM.2019.002). Its coefficients up to degree 200 vary with time, and the file gives, for each, a mean value at the epoch 1 January 2010, a trend and an annual cycle. The trends change the geoid by at most 6 mm a year, and the annual cycle by at most 16 mm, far too little to be seen in the figures below, so only the mean values are used here.

The program below downloads the model (10.5 MB) into a folder data/, reads it and evaluates the expansion on a grid. SciPy's assoc_legendre_p_all (new in SciPy 1.15) returns all the associated Legendre functions up to a given degree and order at once. It normalises each to unit integral of its square over \([-1, 1]\) and includes the Condon–Shortley phase, so that the geodesists' functions are

\[\bar{P}_{nm} = (-1)^m \sqrt{2(2 - \delta_{m0})}\, P_{nm}^{\mathrm{SciPy}},\]

where \(\delta_{m0}\) is 1 for \(m = 0\) and 0 otherwise. At each latitude, the sums over \(n\) are evaluated first, for every \(m\) at once, and the sum over \(m\) then becomes a product of matrices with \(\cos m\lambda\) and \(\sin m\lambda\). Run on its own, the program prints some of the coefficients and plots the degree spectrum described below.

gravity_model.py
"""Read a model of the Earth's gravity field, as the coefficients of its
expansion in spherical harmonics in a .gfc file from ICGEM, and evaluate the
expansion on a grid of latitude and longitude.

The potential at radius r, geocentric colatitude theta and longitude lambda is

    V = (GM/r) sum_n (R/r)^n sum_m Pbar_nm(cos theta)
                                   [C_nm cos(m lambda) + S_nm sin(m lambda)],

where the Pbar_nm are the fully normalised associated Legendre functions used
in geodesy.
"""

import urllib.request
from pathlib import Path

import matplotlib.pyplot as plt
import numpy as np
from scipy.special import assoc_legendre_p_all

DATA_DIR = Path(__file__).parent / "data"
GOCO06S_URL = ("https://icgem.gfz-potsdam.de/getmodel/gfc/32ec2884630a02670476f"
               "752d2a2bf1c395d8c8d6d768090ed95b4f04b0d5863/GOCO06s.gfc")


def download(url, name):
    """Return the path of the file name in DATA_DIR, downloading it from url
    if it is not already there."""
    path = DATA_DIR / name
    if not path.exists():
        DATA_DIR.mkdir(exist_ok=True)
        print(f"Downloading {url}")
        urllib.request.urlretrieve(url, path)
    return path


def read_gfc(path):
    """Read a .gfc file; return GM, R and the arrays C, S and their errors,
    indexed [n, m]. Coefficients that vary with time are given as a mean
    value at an epoch (gfct), a trend (trnd) and an annual cycle (acos,
    asin): only the mean value is taken."""
    header, rows = {}, []
    with open(path, encoding="utf-8") as f:
        for line in f:
            if line.startswith("end_of_head"):
                break
            fields = line.split()
            if len(fields) == 2:
                header[fields[0]] = fields[1]
        for line in f:
            fields = line.split()
            if fields and fields[0] in ("gfc", "gfct"):
                rows.append(fields[1:7])
    n_max = int(header["max_degree"])
    rows = np.array(rows, dtype=float)
    n, m = rows[:, 0].astype(int), rows[:, 1].astype(int)
    C, S, sigma_C, sigma_S = np.zeros((4, n_max + 1, n_max + 1))
    C[n, m], S[n, m], sigma_C[n, m], sigma_S[n, m] = rows[:, 2:6].T
    GM, R = float(header["earth_gravity_constant"]), float(header["radius"])
    return GM, R, C, S, sigma_C, sigma_S


def load_goco06s():
    """The satellite-only model GOCO06s, to degree 300."""
    return read_gfc(download(GOCO06S_URL, "GOCO06s.gfc"))


def legendre(n_max, x):
    """The fully normalised associated Legendre functions Pbar_nm(x), indexed
    [n, m] for 0 <= m <= n <= n_max. SciPy normalises each to unit integral of
    its square over [-1, 1] and includes the Condon-Shortley phase, (-1)^m;
    in geodesy, (Pbar_nm(cos theta) cos m lambda)^2 averages to 1 over the
    sphere, with no such phase."""
    p = assoc_legendre_p_all(n_max, n_max, x, norm=True)[0, :, :n_max + 1]
    m = np.arange(n_max + 1)
    return p * np.sqrt(2 * np.where(m == 0, 1, 2)) * (-1.0)**m


def synthesise(C, S, colat, lon, weights):
    """Evaluate sum_n w_n sum_m Pbar_nm(cos theta) (C_nm cos m lambda + S_nm
    sin m lambda) at the colatitudes colat and longitudes lon (in degrees);
    weights[i, n] is the factor w_n for the colatitude colat[i]."""
    n_max = C.shape[0] - 1
    m_lambda = np.outer(np.arange(n_max + 1), np.radians(lon))
    cos_ml, sin_ml = np.cos(m_lambda), np.sin(m_lambda)
    f = np.empty((len(colat), len(lon)))
    for i, theta in enumerate(np.radians(colat)):
        wP = weights[i][:, None] * legendre(n_max, np.cos(theta))
        f[i] = (wP * C).sum(axis=0) @ cos_ml + (wP * S).sum(axis=0) @ sin_ml
    return f


def degree_rms(C, S):
    """The root-mean-square coefficient of each degree n."""
    n = np.arange(C.shape[0])
    return np.sqrt((C**2 + S**2).sum(axis=1) / (2 * n + 1))


if __name__ == "__main__":
    GM, R, C, S, sigma_C, sigma_S = load_goco06s()
    n_max = C.shape[0] - 1
    print(f"GM = {GM:.10e} m3/s2, R = {R} m, n_max = {n_max}")
    print(f"J2 = -sqrt(5) C20 = {-np.sqrt(5) * C[2, 0]:.6e}")
    for n, m in ((2, 1), (2, 2), (3, 0), (3, 1)):
        print(f"C{n}{m} = {C[n, m]: .6e}, S{n}{m} = {S[n, m]: .6e}")

    n = np.arange(2, n_max + 1)
    fig, ax = plt.subplots(layout="constrained")
    ax.semilogy(n, degree_rms(C, S)[2:], label="Coefficients")
    ax.semilogy(n, degree_rms(sigma_C, sigma_S)[2:], label="Formal errors")
    ax.semilogy(n, 1e-5 / n**2, "--", label="Kaula's rule, $10^{-5}/n^2$")
    ax.set(xlabel="Degree, $n$", ylabel="RMS coefficient")
    ax.legend()
    plt.show()
text
GM = 3.9860044150e+14 m3/s2, R = 6378136.3 m, n_max = 300
J2 = -sqrt(5) C20 = 1.082636e-03
C21 = -3.383273e-10, S21 =  1.453697e-09
C22 =  2.439370e-06, S22 = -1.400308e-06
C30 =  9.571726e-07, S30 =  0.000000e+00
C31 =  2.030446e-06, S31 =  2.482421e-07

Degree spectrum

The root-mean-square coefficient of degree \(n\),

\[\sigma_n = \left[\frac{1}{2n + 1} \sum_{m=0}^{n} \left(\bar{C}_{nm}^2 + \bar{S}_{nm}^2\right)\right]^{1/2},\]

summarises the size of the coefficients of each degree. W. M. Kaula found, from the statistics of gravity anomalies measured on the ground, that \(\sigma_n \approx 10^{-5}/n^2\), a relation known as Kaula's rule (Theory of Satellite Geodesy, 1966). From degree 10 to degree 250, the coefficients of GOCO06s lie between 0.44 and 1.44 times the rule; degree 2 lies far above it, because of \(J_2\). The term of degree \(n\) describes features with a half-wavelength of about \(\pi R/n\), or 20 000 km\(/n\): 67 km at degree 300.

The formal errors of the coefficients grow with degree, because the satellites feel the short wavelengths only weakly, and they reach the size of the coefficients themselves at degree 263. Beyond degree 150, the model was regularised: the coefficients were constrained towards zero, with Kaula's rule as their expected size, so that where the data no longer determine them they shrink, to 0.35 times the rule at degree 300.

A plot of RMS coefficient, on a logarithmic scale from 1e-14 to 1e-3, against degree from 0 to 300. The coefficients start at 2e-4 at degree 2, fall steeply to about 1e-7 by degree 10 and then follow a dotted line labelled Kaula's rule, 1e-5/n^2, down to about 1e-10 at degree 260, beyond which they fall below it. The formal errors, dashed, rise from about 1e-13 near degree 30 to meet the coefficients at a vertical line labelled n = 263.
The root-mean-square coefficient of each degree of GOCO06s and of its formal errors, with Kaula's rule. Data: GOCO06s (Kvas et al. 2021, CC BY 4.0).

Geoid

The geoid is the surface on which the gravity potential, \(W\), the sum of the gravitational potential and the centrifugal potential of the Earth's rotation, \(\tfrac{1}{2}\omega^2(x^2 + y^2)\), takes the value of mean sea level: it is the shape that the surface of the oceans would take if the water were at rest, and heights above sea level are measured from it. The name, meaning "Earth-shaped", was coined by J. B. Listing in 1873.

The geoid is close to an ellipsoid of revolution, and a map of the geoid shows its height, \(N\), above a reference ellipsoid. The WGS84 ellipsoid, used by GPS, has the semi-major axis \(a = 6\,378\,137\) m and the flattening \(f = 1/298.257223563\) (see the post on Ordnance Survey grid references for ellipsoids and datums). With \(GM\) and the angular velocity of the Earth, \(\omega\), these define a level ellipsoid, whose surface is an equipotential of its own gravitational potential and the centrifugal potential. Its gravitational potential has only even zonal terms: with the eccentricity \(e = \sqrt{f(2 - f)}\), the second eccentricity \(e' = \sqrt{a^2 - b^2}/b\), where \(b = a(1 - f)\) is the semi-minor axis, and \(m = \omega^2 a^2 b/GM\),

\[J_2 = \frac{e^2}{3}\left(1 - \frac{2}{15}\frac{m e'}{q_0}\right), \quad q_0 = \frac{1}{2}\left[\left(1 + \frac{3}{e'^2}\right)\arctan e' - \frac{3}{e'}\right],\]

and the higher terms follow from \(J_2\) as

\[J_{2k} = (-1)^{k+1} \frac{3 e^{2k}}{(2k + 1)(2k + 3)}\left(1 - k + 5k\frac{J_2}{e^2}\right), \quad \bar{C}_{2k,0} = -\frac{J_{2k}}{\sqrt{4k + 1}}\]

(W. A. Heiskanen and H. Moritz, Physical Geodesy, 1967). These give \(\bar{C}_{20} = -0.484166774985 \times 10^{-3}\), the published value for WGS84.

The difference between the Earth's gravity potential and the potential of the ellipsoid, \(U\), which takes the same value on the ellipsoid as \(W\) does on the geoid, is the disturbing potential, \(T = W - U\): its coefficients are those of the model less those of the ellipsoid, rescaled to the model's \(GM\) and \(R\). Bruns' formula gives the geoid height as \(N = T/\gamma\), where \(\gamma\) is the normal gravity, the gravity of the level ellipsoid on its surface, given by Somigliana's formula,

\[\gamma(\phi) = \frac{a\gamma_a \cos^2\phi + b\gamma_b \sin^2\phi}{\sqrt{a^2\cos^2\phi + b^2\sin^2\phi}},\]

where \(\gamma_a\) and \(\gamma_b\) are the normal gravity at the equator and at the poles and \(\phi\) is the geodetic latitude, the angle between the normal to the ellipsoid and the plane of the equator, which maps use. The program below evaluates \(T\) on the ellipsoid itself, at the geocentric radius and colatitude of the point at each geodetic latitude; the geodetic and geocentric latitudes differ by up to 0.19°. Its geoid heights agree to 2 mm RMS with those of pyshtools, which finds the height at which \(W\) takes the value of \(U\) on the ellipsoid from a Taylor series of third order.

geoid.py
"""The height of the geoid above the WGS84 ellipsoid, from the gravity model
GOCO06s, by Bruns' formula, N = T / gamma, where T is the disturbing potential
(the difference between the Earth's potential and that of the ellipsoid) and
gamma is the normal gravity, both on the ellipsoid."""

import argparse
import json

import matplotlib.pyplot as plt
import numpy as np

from gravity_model import download, load_goco06s, synthesise

# The WGS84 ellipsoid: its semi-major axis, flattening, gravitational constant
# times mass, angular velocity, and normal gravity at the equator and poles.
A, F = 6378137.0, 1 / 298.257223563
GM_E, OMEGA = 3.986004418e14, 7.292115e-5
GAMMA_A, GAMMA_B = 9.7803253359, 9.8321849378
B, E2 = A * (1 - F), F * (2 - F)

COASTLINES_URL = ("https://raw.githubusercontent.com/nvkelso/natural-earth-vector/"
                  "master/geojson/ne_110m_coastline.geojson")


def normal_C(n_max):
    """The coefficients C_n0 (even n, to n_max) of the gravitational
    potential of the level ellipsoid, whose surface is an equipotential of its
    own gravity and rotation: its J2 follows from A, F, GM_E and OMEGA, and
    the higher coefficients, J_2k, from J2."""
    ep = np.sqrt(A**2 - B**2) / B  # the second eccentricity
    m = OMEGA**2 * A**2 * B / GM_E
    q0 = ((1 + 3 / ep**2) * np.arctan(ep) - 3 / ep) / 2
    J2 = E2 / 3 * (1 - 2 / 15 * m * ep / q0)
    C = np.zeros(n_max + 1)
    for k in range(1, n_max // 2 + 1):
        J = ((-1)**(k + 1) * 3 * E2**k / ((2 * k + 1) * (2 * k + 3))
             * (1 - k + 5 * k * J2 / E2))
        C[2 * k] = -J / np.sqrt(4 * k + 1)
    return C


def disturbing_coefficients(GM, R, C, n_max):
    """The coefficients C_nm of the disturbing potential, to degree n_max,
    with those of the ellipsoid, rescaled to the model's GM and R, removed."""
    dC = C[:n_max + 1, :n_max + 1].copy()
    n = np.arange(n_max + 1)
    Ce = normal_C(n_max)
    Ce[0] = 1
    dC[:, 0] -= Ce * GM_E / GM * (A / R)**n
    return dC


def ellipsoid_point(lat):
    """The geocentric radius and colatitude (in degrees) of the point on the
    ellipsoid at the geodetic latitude lat (in degrees)."""
    phi = np.radians(lat)
    nu = A / np.sqrt(1 - E2 * np.sin(phi)**2)  # radius of curvature
    x, z = nu * np.cos(phi), nu * (1 - E2) * np.sin(phi)
    return np.hypot(x, z), 90 - np.degrees(np.arctan2(z, x))


def normal_gravity(lat):
    """Somigliana's formula for gravity on the ellipsoid at geodetic latitude
    lat (in degrees)."""
    c2, s2 = np.cos(np.radians(lat))**2, np.sin(np.radians(lat))**2
    return (A * GAMMA_A * c2 + B * GAMMA_B * s2) / np.sqrt(A**2 * c2 + B**2 * s2)


def grid(step):
    """The latitudes and longitudes of the centres of a grid of step degrees."""
    lat = np.arange(90 - step / 2, -90, -step)
    lon = np.arange(-180 + step / 2, 180, step)
    return lat, lon


def geoid_heights(model, lat, lon, n_max=None):
    """The geoid height, in metres, at the geodetic latitudes lat and the
    longitudes lon (in degrees), from the expansion to degree n_max."""
    GM, R, C, S = model[:4]
    n_max = n_max or C.shape[0] - 1
    dC, S = disturbing_coefficients(GM, R, C, n_max), S[:n_max + 1, :n_max + 1]
    r, colat = ellipsoid_point(lat)
    n = np.arange(n_max + 1)
    weights = GM / r[:, None] * (R / r[:, None])**n  # T = (GM/r) sum (R/r)^n ...
    T = synthesise(dC, S, colat, lon, weights)
    return T / normal_gravity(lat)[:, None]


def coastlines():
    """The coastlines of Natural Earth (1:110 million), as a list of arrays of
    longitude and latitude."""
    with open(download(COASTLINES_URL, "ne_110m_coastline.geojson")) as f:
        features = json.load(f)["features"]
    lines = []
    for feature in features:
        geometry = feature["geometry"]
        parts = (geometry["coordinates"] if geometry["type"] == "MultiLineString"
                 else [geometry["coordinates"]])
        lines += [np.array(part) for part in parts]
    return lines


def plot_map(ax, lat, lon, values, coast_color="k", **kwargs):
    """Draw values on a grid of lat, lon on Mollweide Axes, with coastlines."""
    step = lat[0] - lat[1]
    lat_edges = np.radians(np.append(lat + step / 2, lat[-1] - step / 2))
    lon_edges = np.radians(np.append(lon - step / 2, lon[-1] + step / 2))
    mesh = ax.pcolormesh(lon_edges, lat_edges, values, rasterized=True, **kwargs)
    for line in coastlines():
        ax.plot(*np.radians(line).T, c=coast_color, lw=0.6)
    ax.set(xticklabels=[], yticklabels=[])
    return mesh


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--nmax", type=int, default=300,
                        help="the highest degree to include (default 300)")
    parser.add_argument("--step", type=float, default=0.5,
                        help="the spacing of the grid, in degrees (default 0.5)")
    args = parser.parse_args()

    model = load_goco06s()
    lat, lon = grid(args.step)
    N = geoid_heights(model, lat, lon, args.nmax)
    for name, k in (("Lowest", N.argmin()), ("Highest", N.argmax())):
        i, j = np.unravel_index(k, N.shape)
        print(f"{name}: {N[i, j]:6.1f} m at latitude {lat[i]:5.1f},"
              f" longitude {lon[j]:6.1f}")

    fig = plt.figure(figsize=(9, 5), layout="constrained")
    ax = fig.add_subplot(projection="mollweide")
    mesh = plot_map(ax, lat, lon, N, cmap="RdBu_r", vmin=-100, vmax=100)
    fig.colorbar(mesh, ax=ax, orientation="horizontal", shrink=0.6,
                 label="Geoid height / m")
    plt.show()
text
Lowest: -106.4 m at latitude   5.2, longitude   78.8
Highest:   85.9 m at latitude  -8.2, longitude  147.2
A world map on a Mollweide projection, blue where the geoid is below the ellipsoid and red where it is above, with coastlines. The darkest blue, marked −106 m, is in the Indian Ocean south of Sri Lanka; the darkest red, marked +86 m, is over New Guinea. Other red regions cover the North Atlantic, Europe and Africa, the western Pacific, the Andes and the oceans south of Africa; blue regions cover North America, India and central Asia, and the Ross Sea.
The height of the geoid above the WGS84 ellipsoid, to degree 300, on a Mollweide (equal-area) projection, with its lowest and highest points marked. Data: GOCO06s (Kvas et al. 2021, CC BY 4.0); coastlines from Natural Earth.

The geoid bears little resemblance to the topography. Its lowest point, 106 m below the ellipsoid, is in the Indian Ocean south of Sri Lanka; this Indian Ocean geoid low has been attributed to low-density material between depths of about 300 and 900 km in the mantle (A. Ghosh, G. Thyagarajulu and B. Steinberger, Geophys. Res. Lett. 44, 9707 (2017), doi:10.1002/2017GL075392). Its highest point, 86 m above the ellipsoid, is over New Guinea. The Himalaya and Tibet, the highest ground on Earth, lie 30 to 45 m below the ellipsoid, on the edge of the Indian Ocean low: mountains are largely supported by roots of low-density crust (they are isostatically compensated), so that they add little to the potential, and the largest undulations reflect differences of density deep in the mantle.

Truncation

The coefficients fall off as \(1/n^2\), so the lowest degrees carry most of the geoid. Summed to degree 4, the geoid already ranges from \(-76\) m to \(+66\) m and departs from the full model by 12 m RMS; summed to degree 10 (python geoid.py --nmax 10), it departs by 4 m, and summed to degree 36, by 1.8 m. The degrees above 36, features smaller than about 550 km, add the detail of ocean trenches, island arcs and seamounts at the level of a metre or two.

Four small world maps, labelled n ≤ 4, n ≤ 10, n ≤ 36 and n ≤ 300, shaded as in the previous map. The first shows only a few broad regions: a low over India and the Indian Ocean and highs over the North Atlantic and the western Pacific. Each later map divides these into smaller features, and the last adds fine detail.
The geoid summed to degrees 4, 10, 36 and 300. Data: GOCO06s (Kvas et al. 2021, CC BY 4.0); coastlines from Natural Earth.

The gravity potato

Drawn on a sphere, with its heights multiplied by 8000, the geoid becomes the shape known, after the pictures published by GFZ in Potsdam, as the Potsdam gravity potato. A short warning: the potato is not the shape of the Earth. The geoid departs from the ellipsoid by at most about 100 m, a sixty-thousandth of the Earth's radius; multiplied by 8000, the largest departures become 13 per cent of the radius. The program below draws the potato with Matplotlib's plot_surface.

geoid_3d.py
"""The geoid as a surface in three dimensions: a sphere whose radius is
increased by the geoid height, multiplied by a large factor so that its
undulations can be seen, and coloured by the geoid height."""

import argparse

import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import Normalize

from geoid import geoid_heights, grid
from gravity_model import load_goco06s

R_EARTH = 6371e3  # the Earth's mean radius, m

parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--exaggeration", type=float, default=8000,
                    help="the factor by which the geoid heights are multiplied"
                         " (default 8000)")
parser.add_argument("--lon", type=float, default=80,
                    help="the longitude seen at the centre (default 80)")
args = parser.parse_args()

lat, lon = grid(1)
N = geoid_heights(load_goco06s(), lat, lon)

# Close the surface: add the poles and repeat the first longitude at the end.
lat = np.concatenate(([90], lat, [-90]))
N = np.vstack((N[:1].mean() * np.ones(N.shape[1]), N,
               N[-1:].mean() * np.ones(N.shape[1])))
lon, N = np.append(lon, lon[0] + 360), np.column_stack((N, N[:, 0]))
phi, lam = np.meshgrid(np.radians(lat), np.radians(lon), indexing="ij")
r = 1 + args.exaggeration * N / R_EARTH
x, y, z = (r * np.cos(phi) * np.cos(lam), r * np.cos(phi) * np.sin(lam),
           r * np.sin(phi))

norm = Normalize(-100, 100)
fig = plt.figure(figsize=(6, 6))
ax = fig.add_subplot(projection="3d")
ax.plot_surface(x, y, z, facecolors=plt.cm.RdBu_r(norm(N)), rstride=1,
                cstride=1, linewidth=0, antialiased=False)
ax.view_init(elev=10, azim=args.lon)
ax.set_box_aspect((1, 1, 1))
ax.set_proj_type("ortho")
ax.set_axis_off()
fig.colorbar(plt.cm.ScalarMappable(norm, "RdBu_r"), ax=ax, shrink=0.6,
             label="Geoid height / m")
plt.show()
Two views of a lumpy globe, shaded blue where the geoid is low and red where it is high, with coastlines. Seen from 80° E, a broad hollow over the Indian Ocean and India is flanked by swellings over Europe and Africa to the left and over New Guinea to the right. Seen from 70° W, North America lies in a gentle hollow, with swellings over the Andes and, to the upper right, over the North Atlantic.
The geoid, with its heights above the ellipsoid multiplied by 8000, seen from above the equator at two longitudes. Data: GOCO06s (Kvas et al. 2021, CC BY 4.0); coastlines from Natural Earth.
Animation of the lumpy globe of the previous figure turning once about the Earth's axis, from west to east, showing in turn the hollow over the Indian Ocean, the swelling over New Guinea and the western Pacific, the hollow over the Americas and the swelling over the North Atlantic and Europe.
The geoid, with its heights multiplied by 8000, turning once about the Earth's axis. Data: GOCO06s (Kvas et al. 2021, CC BY 4.0); coastlines from Natural Earth.

Gravity anomalies

The free-air gravity anomaly, \(\Delta g\), is the difference between the magnitude of gravity on the geoid and the normal gravity at the corresponding point on the ellipsoid. In the spherical approximation, it follows from the disturbing potential as

\[\Delta g = -\frac{\partial T}{\partial r} - \frac{2T}{r},\]

which multiplies the term of degree \(n\) by \((n - 1)/r\). Gravity anomalies therefore weight the high degrees more heavily than geoid heights do, by a factor of about \(n\), and mostly show the structure of the crust and upper mantle rather than of the deep mantle. They are given in milligals (1 Gal = 1 cm s\(^{-2}\), named after Galileo), and 1 mGal is about a millionth of the gravity at the Earth's surface.

gravity_anomaly.py
"""Free-air gravity anomalies from the gravity model GOCO06s, in the spherical
approximation, Delta g = -dT/dr - 2T/r, where T is the disturbing potential:
for each degree n, this multiplies the terms of T by (n - 1)/r."""

import argparse

import matplotlib.pyplot as plt
import numpy as np

from geoid import (
    disturbing_coefficients,
    ellipsoid_point,
    grid,
    plot_map,
)
from gravity_model import load_goco06s, synthesise


def gravity_anomalies(model, lat, lon, n_max=None):
    """The free-air gravity anomaly, in mGal, at the geodetic latitudes lat
    and the longitudes lon (in degrees), from the expansion to degree n_max."""
    GM, R, C, S = model[:4]
    n_max = n_max or C.shape[0] - 1
    dC, S = disturbing_coefficients(GM, R, C, n_max), S[:n_max + 1, :n_max + 1]
    r, colat = ellipsoid_point(lat)
    n = np.arange(n_max + 1)
    weights = GM / r[:, None]**2 * (n - 1) * (R / r[:, None])**n
    return synthesise(dC, S, colat, lon, weights) * 1e5  # 1 mGal = 1e-5 m/s2


if __name__ == "__main__":
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument("--nmax", type=int, default=300,
                        help="the highest degree to include (default 300)")
    parser.add_argument("--step", type=float, default=0.25,
                        help="the spacing of the grid, in degrees (default 0.25)")
    args = parser.parse_args()

    model = load_goco06s()
    lat, lon = grid(args.step)
    dg = gravity_anomalies(model, lat, lon, args.nmax)
    for name, k in (("Lowest", dg.argmin()), ("Highest", dg.argmax())):
        i, j = np.unravel_index(k, dg.shape)
        print(f"{name}: {dg[i, j]:6.1f} mGal at latitude {lat[i]:5.1f},"
              f" longitude {lon[j]:6.1f}")

    fig = plt.figure(figsize=(9, 5), layout="constrained")
    ax = fig.add_subplot(projection="mollweide")
    mesh = plot_map(ax, lat, lon, dg, cmap="RdBu_r", vmin=-100, vmax=100)
    fig.colorbar(mesh, ax=ax, orientation="horizontal", shrink=0.6,
                 extend="both", label="Free-air gravity anomaly / mGal")
    plt.show()
text
Lowest: -345.2 mGal at latitude  19.4, longitude  -66.6
Highest:  456.3 mGal at latitude  19.6, longitude -155.6
A world map on a Mollweide projection, mostly pale but with narrow, intense bands of blue and red, and with grey coastlines. Pairs of parallel blue and red bands follow the ocean trenches and island arcs around the Pacific, along the Andes and through Indonesia; red and blue patches mark the Himalaya and Tibet. A speckle of small rings covers the oceans.
The free-air gravity anomaly, to degree 300, on a Mollweide projection; the colours saturate at ±100 mGal. Data: GOCO06s (Kvas et al. 2021, CC BY 4.0); coastlines from Natural Earth.

The largest anomalies follow the subduction zones, where a deep trench (negative) runs beside an island arc or a mountain range (positive): the lowest, \(-345\) mGal on the program's grid, is over the Puerto Rico Trench. The highest of all, \(+456\) mGal, is over the island of Hawaii, a load that the lithosphere supports by bending rather than by a root of low-density crust. The rings around isolated features, such as seamounts and islands, are partly ripples from cutting off the series at degree 300 (the Gibbs phenomenon).

Comments

Leave a comment

Optional, and never shown: only the moderator sees it.

Comments are written in Markdown (code between ``` lines) and appear once approved. Your name and comment are published; your email address, if you give one, is seen only by the moderator.