Scientific computing
for geophysical problems

Observational seismology

Léonard Seydoux and Alexandre Fournier (seydoux,fournier@ipgp.fr)
October 2026 at the institut de physique du globe de Paris.

Learning outcomes

This session will teach you:

  • Where seismic data come from, and how to get them
  • How to turn raw counts into ground motion
  • How to look at a seismogram in frequency: spectrum, filters, spectrogram
  • The uncertainty principle between time and frequency
  • How to recognize seismic waves in a seismogram and a spectrogram

Reference textbooks

  • Stein & Wysession (2003): the reference for this class, and most figures (free to use for educational purposes)
  • Aki & Richards (2002): when you need the full derivations

Stein, S., & Wysession, M. (2003). An introduction to seismology, earthquakes, and Earth structure. Blackwell Publishing. Aki, K., & Richards, P. G. (2002). Quantitative seismology (2nd ed.). University Science Books.

The first seismoscope

Built in China in 132 by Zhang Heng, it may have detected an unfelt earthquake in 143

Early seismometers

A pendulum stays still while the ground shakes, and records motion.



Example: Wiechert seismometer (1904), with a 17-ton pendulum

First record of a distant earthquake

An earthquake in Japan recorded in Potsdam, Germany, in 1889 by von Rebeur-Paschwitz (9,000 km away).

Modern seismometers

A feedback force keeps the mass in place: the required voltage V(t)V(t) is the recorded signal



V(t)V(t) is then digitized and sent to datacenters

Stein & Wysession (2003), fig. 6.6-5

Modern seismic station

Station site in Northern California, © David Croker, USGS, vault and sensor (left), solar panels (right)

Modern seismic networks

  • 10,000+ permanent
  • Many more temporary
  • From meters to the whole globe
  • Large volumes of data
  • Mostly open access
All stations with open metadata at the FDSN data centers (EarthScope federated catalog, GeoNet, NRCan, BGS, KAGSR, RSBR, GEOSHAKE) and of the JMA bulletin (Japan). Global networks: GSN (II, IU), GEOSCOPE (G) and GEOFON (GE)

What is a seismogram?

Seismology (from Ancient Greek σεισμός, "earthquake", and -λογία, "study of") is the scientific study of earthquakes and the propagation of elastic waves through the Earth or through other planet-like bodies. It also includes studies of earthquake environmental effects such as tsunamis, as well as diverse seismic sources such as volcanic, tectonic, glacial, fluvial, oceanic, atmospheric, and artificial processes such as explosions. A related field that uses geology to infer information regarding past earthquakes is paleoseismology. A recording of Earth motion as a function of time is called a seismogram.

Twelve hours of ground motion

A twelve-hour seismogram at station BFO, Germany: earthquakes, noise, and much more

Most of what we know about the Earth's interior comes from such records

Digital seismic data

Digital seismic data

The ground motion u(t)u(t) is sampled every Δt\Delta t

u[n]=u(nΔt),n=0…N−1u[n] = u(n \Delta t), \quad n = 0 \ldots N - 1

  • Number of samples: NN
  • Sampling rate: fs=1/Δtf_s = 1 / \Delta t, in Hz (or samples per second)
  • Duration: T=NΔt=N/fsT = N \Delta t = N / f_s

How much data?

Record Samples per day Volume per day
One channel at 100 Hz 8.6 million 35 MB
One three-component station 26 million 100 MB
One station over a year 9.5 billion 38 GB
One fiber, 10,000 channels at 1 kHz (DAS) 860 billion 3.5 TB
Volumes for 4-byte samples, before compression

Data centers

The International Federation of Digital Seismograph Networks (FDSN)

  • Every network has a unique code and digital object identifier (DOI)
  • Map, coordinates, sensors and operating range of all networks

The EarthScope Consortium (formerly IRIS) is one of the largest data centers. IPGP, RESIF, SCEDC, NCEDC or GFZ are also accessible with ObsPy

Seismic data in Python

  • Stream: a list of traces
  • Trace: one channel, with
    • data: the samples, as a NumPy array
    • stats: identifier, sampling rate, start time
  • Inventory: stations, channels and instrument responses

Formats: miniSEED (waveforms), StationXML (metadata), SAC (one trace per file)

from obspy import read

stream = read("record.mseed")
trace = stream[0]
trace.stats.sampling_rate 
trace.data                

Naming seismic data

Every record has a unique identifier, as IU.CTAO.00.BHZ

Code Part Meaning
IU Network Global Seismograph Network
CTAO Station Charters Towers, Australia
00 Location Sensor of the station (00, 10...)
B Band Broadband, 10–80 Hz (L: 1 Hz, H: ≥ 80 Hz)
H Instrument Seismometer (N: accelerometer)
Z Component Vertical (N, E: horizontal)
SEED channel naming convention, from the FDSN

Requesting data

One FDSN request is a URL: network, station, location, channel and time window

service.earthscope.org
/fdsnws/dataselect/1/query
?net=G&sta=SSB&loc=00&cha=BHZ
&starttime=2011-03-11T05:46:24
&endtime=2011-03-11T06:26:24

from obspy import UTCDateTime
from obspy.clients.fdsn import Client

client = Client("EARTHSCOPE")
start = UTCDateTime("2011-03-11T05:46:24")
stream = client.get_waveforms(
    "G", "SSB", "00", "BHZ", start, start + 2400
)

The same request works for any FDSN data center

Finding events

Catalogs give the time, location and magnitude of events

  • USGS ComCat: global
  • ISC-GEM: large events since 1904
  • EMSC: Euro-Mediterranean
  • Regional and volcano observatories

From counts to ground motion

Records are in counts: divide by the instrument response, in a band where it is large (pre_filt)

Each time derivative multiplies the spectrum by 2iπf2i\pi f

v^(f)=2iπf u^(f),a^(f)=2iπf v^(f)\hat v(f) = 2i\pi f\, \hat u(f), \quad \hat a(f) = 2i\pi f\, \hat v(f)

  • Displacement: low frequencies
  • Acceleration: high frequencies
Kermadec Islands earthquake (Mw 8.1, 4 March 2021) recorded at IU.CTAO.00.BHZ, the example of the lab

Filtering

Keep a frequency band: low-pass, high-pass or band-pass

  • Butterworth: flat in the band
  • Higher order (corners): sharper cut
  • zerophase=True: no phase shift
  • Low frequencies: surface waves
  • High frequencies: body waves
Kermadec Islands earthquake (Mw 8.1, 4 March 2021) recorded at IU.CTAO.00.BHZ, the example of the lab

Seismic waves

Body waves

P wave: compressional wave

S wave: shear wave

Ray paths in the iasp91 model, computed with ObsPy (TauP)

Surface waves

Rayleigh wave: rolling motion, decaying with depth

Love wave: horizontal shear, decaying with depth

Dispersion

Long periods reach deeper, faster rocks

Phase and group velocities

vφ=ωk,vg=dωdkv_\varphi = \frac{\omega}{k}, \quad v_g = \frac{d\omega}{dk}

Each period arrives at

t(ω)=Δvg(ω)t(\omega) = \frac{\Delta}{v_g(\omega)}

  • Long periods first: in a spectrogram, the frequency increases with time
  • vgv_g: a probe of the crust and mantle
Kermadec Islands earthquake (Mw 8.1, 4 March 2021) recorded at IU.CTAO.00.BHZ, the example of the lab, filtered in period bands

Seismic phases

PP

PcP

PKP

SS

ScS

SKS

Seismogram at G.SSB.00.BHZ

Ray paths and arrival times in the iasp91 model, computed with ObsPy (TauP).
Tohoku-Oki earthquake (2011, Mw 9.1) recorded at station G.SSB, France

Time and frequency

Spectrum of a seismogram

The discrete Fourier transform of NN samples, taken every Δt\Delta t

u^[k]=∑n=0N−1u[n] e−2iπkn/N\hat u[k] = \sum_{n=0}^{N-1} u[n]\, e^{-2i\pi kn/N}

  • Frequencies every Δf=1/T=1/(NΔt)\Delta f = 1 / T = 1 / (N \Delta t)
  • Up to the Nyquist frequency fs/2f_s / 2
  • With NumPy: numpy.fft.rfft and numpy.fft.rfftfreq
  • Shown as ∣u^(f)∣|\hat u(f)|, in log-log scale

The spectrum tells which frequencies are in the record, not when

Building a spectrogram

Cut the record in windows of duration TT, starting at times tkt_k

Fourier transform of each window, tapered by ww

u^(tk,f)=∫0Tw(τ) u(tk+τ) e−2iπfτdτ\hat u(t_k, f) = \int_0^T w(\tau)\, u(t_k + \tau)\, e^{-2i\pi f \tau} d\tau

Power spectral density, in decibels

P(tk,f)=10log⁡102 ∣u^(tk,f)∣2TP(t_k, f) = 10 \log_{10} \frac{2\, |\hat u(t_k, f)|^2}{T}

With scipy.signal.spectrogram: nperseg samples per window, and noverlap samples shared by two windows

Station G.SSB.00.BHZ, 2–8 January 2023, after removing the instrument response, with windows of 1 hour

Uncertainty principle

A signal cannot be both short in time and narrow in frequency

Δt Δf≥14π\Delta t \, \Delta f \geq \frac{1}{4\pi}

with Δt\Delta t and Δf\Delta f the spreads (standard deviations) of ∣u(t)∣2|u(t)|^2 and ∣u^(f)∣2|\hat u(f)|^2

  • Short pulse: wide spectrum
  • Long wave train: narrow spectrum
  • The bound is reached for Gaussian envelopes
Gabor (1946), the same mathematics as Heisenberg's principle in quantum mechanics

Time–frequency trade-off

A window of duration TT resolves Δf=1/T\Delta f = 1 / T in frequency, and TT in time

  • Short windows: sharp in time, blurred in frequency
  • Long windows: sharp in frequency, blurred in time
  • Overlap (noverlap): smoother, not sharper

Choose TT for what you want to see: arrival times or frequencies

Kermadec Islands earthquake (Mw 8.1, 4 March 2021) recorded at IU.CTAO.00.BHZ, the example of the lab

Reading a spectrogram

The event of the lab, recorded 3,800 km away

  • Before P: background noise
  • P and S: short arrivals over a wide band
  • Surface waves: long, large, low frequency
  • Dispersion: the frequency of the surface waves increases with time
Kermadec Islands earthquake (Mw 8.1, 4 March 2021) recorded at IU.CTAO.00.BHZ, windows of 100 s as in the lab, power relative to its median at each frequency

Cutting-edge seismology

  • New sensors: fiber optics, nodes, smartphones
  • Dense networks, and big data
  • Open data and open software
  • Machine learning and high-performance computing
Optical fibers, the sensors of distributed acoustic sensing

Software

Obspy: a Python toolbox for seismology.

  • Documentation and tutorials: docs.obspy.org
  • Download data from datacenters
  • Read most seismological formats
  • Process and plot seismograms
  • Compute travel times and ray paths
  • Tutorials and examples
Beyreuther, M., Barsch, R., Krischer, L., Megies, T., Behr, Y., & Wassermann, J. (2010). ObsPy: A Python toolbox for seismology. Seismological Research Letters, 81(3), 530–533.

Scientific Python

  • NumPy: arrays, linear algebra, Fourier transforms (numpy.fft)
  • SciPy: signal processing (scipy.signal)
  • Matplotlib: publication-quality plots (matplotlib.org)
  • Jupyter: notebooks mixing code, figures and text. VS Code runs them too
Harris et al. (2020), Nature, NumPy. Virtanen et al. (2020), Nature Methods, SciPy. Hunter (2007), Computing in Science & Engineering, Matplotlib. Kluyver et al. (2016), Jupyter Notebooks.

Managing packages

  • Installs Python and packages, very fast
  • One virtual environment per project
  • Lock file for reproducible environments
  • Runs scripts with uv run

Alternatives include Anaconda (conda), pip with venv, or Docker

Computing at IPGP

S-CAPAD, the computing service of IPGP, runs the DANTE supercomputer, shared with the APC laboratory since 2021

  • More than 7,000 CPU cores, and GPUs
  • 256 to 512 GB of memory per node
  • About 300 Tflops at peak, a laptop about 1
  • About 1 PB of parallel storage
  • Slurm scheduler and JupyterHub
Figures from IPGP and Université Paris Cité (2021–2026)

The Zen of Python

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Type import this in Python. Read the PEP 8 guidelines before naming f your frequency and t your time

Hands-on time

Read the instructions on the paper sheet I just distributed

License and credits

© 2022–2026 Léonard Seydoux. Slides and original figures are licensed under CC BY 4.0; the code (in sources/) under the MIT license. Figures from other authors remain their property and are credited in the footers. This slide set was created for the class Scientific computing for geophysical problems at the institut de physique du globe de Paris, and is available on GitHub (leonard-seydoux).