Skip to content

Add the GLAD-M35 seismic tomography model - #57

Merged
sghelichkhani merged 4 commits into
mainfrom
add-glad-m35
Oct 18, 2026
Merged

sghelichkhani merged 4 commits into
mainfrom
add-glad-m35

Conversation

@sghelichkhani

Copy link
Copy Markdown
Collaborator

This adds GLAD-M35 (Cui et al., 2024, GJI 239, 478-502, doi:10.1093/gji/ggae270, CC BY 4.0) as 3d_seismic_GLAD-M35, loaded with gdrift.SeismicModel("GLAD-M35"). It is the successor of GLAD-M25 in the Princeton adjoint tomography series: a joint P and S model, radially anisotropic in the upper mantle, and the first in the series with standard deviations of Vs and Vp.

The source is the EarthScope EMC grid (GLAD-M35.r0.1-n4c.nc, doi:10.17611/dp/emc.2024.gladm35.1, 1 degree, 289 depths from 10 to 2890 km). scripts/convert_glad_m35.py checks its sha256, resamples it bilinearly onto the same 65,341-point layers as the other seismic models, keeps all 289 depths, and converts the speeds and standard deviations to m/s. The file has vs, vsh, vsv, vp, vph, vpv, eta, std_vs and std_vp. vs is sqrt((2 vsv² + vsh²)/3), the same definition as in the other datasets, and vp is sqrt((vpv² + 4 vph²)/5). Both leave out eta, so they differ from the full Voigt averages by up to 29 and 54 m/s; the script and the description say so. The resampled values agree with the source to float32 rounding.

Two things are new for a gdrift dataset. The fields are float32, the precision of the source, and every array is gzip-compressed with shuffle, which brings the file from 1.13 GB to 737 MB. h5py decompresses on read, so the loader needed no change. The catch is that the sha256 of a rebuild only matches with the same h5py, HDF5 and zlib, so the script records the versions used and says to compare a rebuild by content.

The EMC file has std_vp exactly 0 at every node of the 10 to 40 km and 2870 to 2890 km layers, where std_vs has values. I treat that as missing data and store those layers as NaN, so std_vp is NaN above 50 km and from 2860 km down.

The bilinear weights moved from the Lloyd viscosity script into gdrift.utility.regular_grid_bilinear_weights. That function now raises for points outside the grid, where it used to extrapolate without a warning. The Lloyd file built with it is byte-identical. The tomography gallery skips the standard deviations, because it plots each field as its departure from the depth mean.

The file is uploaded under its content name, checked through the CDN, and its ETag is recorded; tests/test_server_hashes.py -m server passes. The new tests use a small synthetic EMC-like file and check every field against values computed in the test. The test on the real file is skipped unless the file is already on disk, so CI does not download it.

GLAD-M35 (Cui et al., 2024, GJI 239, 478) is the successor of GLAD-M25: a
joint P and S adjoint tomography model, radially anisotropic in the upper
mantle, with standard deviations of Vs and Vp. scripts/convert_glad_m35.py
reads the EarthScope EMC grid (r0.1, 1 degree, 289 depths from 10 to
2890 km) after checking its sha256, resamples it bilinearly onto the
65,341-point layers of the other seismic models, converts speeds to m/s,
and computes vs and vp as the Voigt averages of the resampled components.
The nine fields are stored as float32, the precision of the source.

The bilinear weights move from scripts/convert_lloyd_viscosity.py to
gdrift.utility.regular_grid_bilinear_weights, so both conversions use the
same function. The Lloyd et al. (2024) file built with it is byte-identical.

Generated-with: Claude Code
… field

std_vp is 0 at every node of the 10-40 km and 2870-2890 km layers of the
EMC file, which marks missing values; those layers are now NaN. All arrays
are compressed with gzip and shuffle (1.13 GB to 737 MB; the loader reads
them unchanged). The script docstring states that vs and vp are the Voigt
forms without eta and how much they differ from the full Voigt averages,
where the model is isotropic, and what was observed at the date line.
regular_grid_bilinear_weights raises for points outside the grid. The
synthetic test now checks every field against values computed in the
test, and the gallery skips the standard deviations.

Generated-with: Claude Code
@sghelichkhani
sghelichkhani merged commit bf03ecb into main Oct 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant