Repository navigation
Add the GLAD-M35 seismic tomography model - #57
Merged
Merged
Conversation
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
…DF5 build Generated-with: Claude Code
Generated-with: Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withgdrift.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.pychecks 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 hasvs,vsh,vsv,vp,vph,vpv,eta,std_vsandstd_vp.vsis sqrt((2 vsv² + vsh²)/3), the same definition as in the other datasets, andvpis 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_vpexactly 0 at every node of the 10 to 40 km and 2870 to 2890 km layers, wherestd_vshas values. I treat that as missing data and store those layers as NaN, sostd_vpis 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 serverpasses. 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.