Computational Seismology Tools


Coseis is a toolkit for earthquake simulation featuring:

The primary interface is through a Python module which (for high-performance components) wraps Fortran parallelized with hybrid OpenMP and MPI.

Coseis is written by Geoffrey Ely with contributions from Steven Day, Bernard Minster, Feng Wang, Zheqiang Shi, and Jun Zhou. It is licensed under BSD terms.

WARNING: Coseis is a research code under active development. Changes are frequent and it has known bugs! The latest committed version may not be your best option or even working. Please contact me for guidance.


For MacOS only, install Xcode from the App Store followed by the Xcode the Command Line Tools with:

xcode-select --install

For MacOS only, install Homebrew and use it to install Fortran with:

brew install gfortran

Clone the source code from the Coseis GitHub repository:

git clone git://

Setup python to be able to find the cst package:

cd coseis
python -m cst setup


To run the test suite interactively:

cd tests
python --run=exec

Or, submit a job for batch processing:

python --run=submit

After completion, a report is printed to the screen (or saved in run/test_suite/test_suite.output):

PASSED: cst.tests.hello_mpi.test()
PASSED: cst.tests.point_source.test()
PASSED: cst.tests.pml_boundary.test()
PASSED: cst.tests.kostrov.test()


CVM depth plane

Extract S-wave velocity at 500 meters depth. Plot using Matplotlib:

CVM-S fence diagram

Build a fence diagram similar to Magistrale (2000) figure 10. Plot using Mayavi

CVM-S basin depth

Extract 3D mesh and search for the shallowest surface of Vs = 2.5 km/s. Plot over topography using Mayavi.