Skip to main content

A Python library for computing Coulomb Failure Stress Change.

Project description

Introduction

This Python package serves as the frontend for computing static and dynamic Coulomb Failure Stress changes in layerd media. The backend relies on programs developed by Rongjiang Wang and modified by Jiangcheng Zhou for calculating synthetic seismograms, specifically EDGRN/EDCMP, QSEIS_2006_STRESS, and QSSP. The generation and retrieval of Green's function libraries are handled by the pygrnwang package, while travel-time calculations and geographic coordinate transformations are implemented using obspy.

Installation

  1. For user mode
pip install dyncfs
  1. For developer mode.
conda create -n cfs python=3.13
conda activate cfs
conda install gfortran obspy tqdm -c conda-forge
conda install geographiclib mpi4py -c conda-forge # optional
git clone https://github.com/Zhou-Jiangcheng/pygrnwang
cd pygrnwang
pip install -e .
cd ..
git clone https://github.com/Zhou-Jiangcheng/dyncfs.git
cd dyncfs
pip install -e .

Usage

Fill in all parameters in the .ini file, and prepare the input files as described in example.ini, including source_plane[m].csv and obs_plane[n].csv under the input directory, as well as model.nd representing the Earth model.

  1. Command-line usage
dyncfs --help
usage: dyncfs [-h] --config CONFIG [--create-static-lib] [--compute-static-cfs] [--compute-static-cfs-fix-depth] [--run-static] [--create-dynamic-lib] [--compute-dynamic-cfs] [--compute-dynamic-cfs-fix-depth] [--run-dynamic] [--run-all]

dyncfs command line tool

options:
  -h, --help            show this help message and exit
  --config CONFIG       Path to the configuration file
  --create-static-lib   Create static stress library
  --compute-static-cfs  Compute static dCFS on obs faults
  --compute-static-cfs-fix-depth
                        Compute static dCFS at fixed depth
  --run-static          Create static stress library and Compute static dCFS on obs faults and Compute static dCFS at fixed depth
  --create-dynamic-lib  Create dynamic stress library
  --compute-dynamic-cfs
                        Compute dynamic dCFS on obs faults
  --compute-dynamic-cfs-fix-depth
                        Compute dynamic dCFS at fixed depth
  --run-dynamic         Create dynamic stress library and Compute dynamic dCFS on obs faults and Compute dynamic dCFS at fixed depth
  --run-all             Create static and dynamic stress library and Compute static and dynamic dCFS
  1. Import and use classes and functions in .py files
from dyncfs.cfs_static import *

if __name__ == "__main__":
    config = CfsConfig()
    config.read_config("example.ini")
    create_static_lib(config)
    compute_static_cfs_parallel(config)
from dyncfs.cfs_dynamic import *

if __name__ == "__main__":
    config = CfsConfig()
    config.read_config("example.ini")
    create_dynamic_lib(config)
    compute_dynamic_cfs_parallel(config)

References:

Wang, R. (1999). A simple orthonormalization method for stable and efficient computation of Green’s functions. Bulletin of the Seismological Society of America , 89 (3), 733–741. https://doi.org/10.1785/BSSA0890030733

Wang, R. (2003). Computation of deformation induced by earthquakes in a multi-layered elastic crust—FORTRAN programs EDGRN/EDCMP. Computers & Geosciences, 29(2), 195–207. https://doi.org/10.1016/S0098-3004(02)00111-5

Wang, R., & Wang, H. (2007). A fast converging and anti-aliasing algorithm for green’s functions in terms of spherical or cylindrical harmonics. Geophysical Journal International, 170(1), 239–248. https://doi.org/10.1111/j.1365-246X.2007.03385.x

Wang, R., Heimann, S., Zhang, Y., Wang, H., & Dahm, T. (2017). Complete synthetic seismograms based on a spherical self-gravitating earth model with an atmosphere–ocean–mantle–core structure. Geophysical Journal International, 210(3), 1739–1764. https://doi.org/10.1093/gji/ggx259

Zhou, J., Wang, R., & Zhang, Y. (2026). DynCFS: a program for modeling dynamic coulomb failure stress changes in layered elastic media. Geophysical Journal International, ggaf534. https://doi.org/10.1093/gji/ggaf534

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dyncfs-2.1.0.tar.gz (37.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dyncfs-2.1.0-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file dyncfs-2.1.0.tar.gz.

File metadata

  • Download URL: dyncfs-2.1.0.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dyncfs-2.1.0.tar.gz
Algorithm Hash digest
SHA256 c6faf21c027944a79b6aaca729ca37d378f4150776bc24d5c6bb9acdd3a305eb
MD5 c78d5b56d175f83a8a041a7b403466fa
BLAKE2b-256 083725fb84cb1a3bc878dd14dce94f01e75270564f05e708f7ae684d136714c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for dyncfs-2.1.0.tar.gz:

Publisher: publish.yml on Zhou-Jiangcheng/dyncfs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dyncfs-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: dyncfs-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dyncfs-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 246f8fa349a85d18d72f1e7e4469bb727e7b9a1ab1dd46d85e259d1c850c59e3
MD5 071889378b42ef9d86a42c253b1ffecc
BLAKE2b-256 4823cef095f7165949bd55b9e530b5016cf1f46c138a88c430e4d8c80eb8d862

See more details on using hashes here.

Provenance

The following attestation bundles were made for dyncfs-2.1.0-py3-none-any.whl:

Publisher: publish.yml on Zhou-Jiangcheng/dyncfs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page