EMM2017 main-field and lithospheric contributions at Uruana
Manuscript Section 3.1 | 2011 survey, project 3087

Run from the root of the extracted S1 supplement:
    python core_lithosphere/verify.py

The script uses NumPy, pandas and SciPy, the IGRF-14 synthesis supplied in S1,
the five measured products in processing_audit/ and the EMM vectors supplied
here. It recomputes 2,240 slope estimates (14 lines, two windows, five products,
two estimators and eight backgrounds) and checks the reported sign and range on
the five eastern lines in the north window. The extrema pool 50 fits per
background, not 50 independent profiles.

Geometry and quantities
The computations use the measured 250 m bins in the target (6–8 km) and
northern (16–20 km) windows, at epoch 2011.5. The primary coordinate is grid
northing in kilometres. GPSALT is used as ellipsoidal height in metres.
For the 348 bins, emm_vectors.csv.gz contains line, region, bin, LAT, LONG,
GPSALT and EMM2017 north, east and down components in nT at truncations 15,
133, 400 and 790 (e.g. N15). The bins use exactly the original survey keys.
line_slopes.csv.gz gives observed (obs), residual (res) and modeled (bg)
slopes in nT/km. Each estimator is fitted directly to each profile. In
particular, the Theil–Sen residual slope is fitted after pointwise subtraction.

Background definitions
IGRF14 and EMM15 give main-field intensities. EMM790 gives full EMM intensity.
Define B[n] as the EMM vector at truncation n. The lithospheric scalar
increment is |B[790]| minus |B[15]|. This includes the projection of the
higher-degree field onto the local field direction. It is distinct from
the magnitude of the vector difference. Subtract that scalar increment
from the observations for EMM_lith_increment_only. For IGRF+a-b add
B[b] minus B[a-1] to the IGRF vector before taking its magnitude.
Degrees 134–400 span roughly 100–300 km in nominal surface wavelength.
The full EMM resolves wavelengths down to about 51 km.
The hybrid fields test sensitivity to the selected degree bands.

The northern slopes of lines 12430–12470 are positive for all ten processing
and estimator combinations after subtracting the modeled lithospheric increment.
All five reverse after subtraction of EMM15 or EMM790 and after subtraction of
IGRF plus degrees 134–400. Changing the band can affect other lines. For
example, adding degrees 16–133 to IGRF also reverses line 12420 in all ten fits.
These are comparisons at the spatial resolution of the global field models.
The EMM crustal field draws on EMAG2-v3, a compilation of magnetic observations.

Rebuild the EMM vectors (optional)
NOAA NCEI (2017), Enhanced Magnetic Model 2017, spherical harmonic Linux version.
https://www.ncei.noaa.gov/products/enhanced-magnetic-model
https://www.ncei.noaa.gov/products/enhanced-magnetic-model/emm-spherical-harmonic-model-2017
Original filename: EMM2017_Sph_Linux.zip
SHA-256: 69c9fa8e8887071619ae42fa3331634efee5890a9edaf318262d888d3483abf3

With a C compiler (cc) on Linux, provide the NOAA archive and a fresh output path:
    python core_lithosphere/rebuild_vectors.py /path/to/EMM2017_Sph_Linux.zip /tmp/emm_vectors.csv.gz

The rebuild runs in a temporary directory. It uses NOAA's epoch adjustment,
geodetic conversion and harmonic synthesis, with a loop over the four maximum
degrees and high-precision vector output. It checks the full-degree components
against four official NOAA test cases, then compares the regenerated vectors
with the 348 archived survey-bin vectors. The NOAA coefficients are only needed
for this optional rebuild.

Supplementary fixed-height comparison. emm_vectors_1km.csv.gz stores the same
bins evaluated at 1.000 km ellipsoidal height. The optional NOAA rebuild above
accepts --fixed-height for this file. See spatial_sensitivity/height.py and
height_sensitivity.csv for all five lines, model bands and the two heights.
