Skip to main content

A Python library for computing Coulomb Failure Stress Change.

Project description

Introduction

This Python package serves as the frontend for calculating and building a Green's function library for synthetic seismograms. The backend consists of Wang Rongjiang's program for calculating synthetic seismograms, including EDGRN/EDCMP, QSEIS_STRESS, SPGRN, and QSSP (Wang, 1999; Wang 2003; Wang and Wang 2007; Wang et al., 2017). The code includes two parallel modes: one using the multiprocessing library (single-node multi-process) and the other using MPI (multi-node).

Installation

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

Usage

  1. An example for creating a Green's function library with qssp2020
from pygrnwang.create_qssp2020_bulk import *

if __name__ == '__main__':
    wavelet_duration = 0
    sampling_interval = 1
    time_window = 4096 - sampling_interval
    path_green = r'path\grns_qssp2020\ak135fc'
    os.makedirs(path_green, exist_ok=True)
    output_observables = [0 for _ in range(11)]
    output_observables[0] = 1
    output_observables[1] = 1
    output_observables[2] = 1
    pre_process_qssp2020(
        processes_num=24,
        path_green=path_green,
        event_depth_list=[h for h in range(1, 41, 2)],
        receiver_depth_list=[0],
        dist_range=[3000, 12000],
        delta_dist=10,
        spec_time_window=time_window,
        sampling_interval=sampling_interval,
        max_frequency=0.2,
        max_slowness=0.4,
        anti_alias=0.01,
        turning_point_filter=0,
        turning_point_d1=0,
        turning_point_d2=0,
        free_surface_filter=1,
        gravity_fc=0,
        gravity_harmonic=0,
        cal_sph=1,
        cal_tor=1,
        min_harmonic=4000,
        max_harmonic=10000,
        source_radius=0,
        source_duration=wavelet_duration * sampling_interval,
        output_observables=output_observables,
        time_window=time_window,
        time_reduction=-20,
        path_nd=r'path\ak135fc.nd',
        earth_model_layer_num=None,
        physical_dispersion=0,
        check_finished_tpts_table=False
    )
    create_grnlib_qssp2020_parallel(
        path_green=path_green, check_finished=False, cal_spec=False
    )

  1. An example for reading from a Green's function library created by qssp2020
from pygrnwang.read_qssp2020 import seek_qssp2020


if __name__ == "__main__":
    seismograms, tpts_table, first_p, first_s, grn_dep, grn_receiver, green_dist = (
        seek_qssp2020(
            path_green="/e/grns_test/test_qssp",
            event_depth_km=10,
            receiver_depth_km=0,
            az_deg=60,
            dist_km=5000,
            focal_mechanism=[30, 40, 50],
            srate=1,
            before_p=20,
            pad_zeros=False,
            shift=False,
            rotate=True,
            only_seismograms=False,
            output_type='disp',
            model_name=r"path\ak135fc.nd",
        )
    )

    import matplotlib.pyplot as plt
    fig, axs = plt.subplots(nrows=3, ncols=1)
    axs[0].plot(seismograms[0])
    axs[1].plot(seismograms[1])
    axs[2].plot(seismograms[2])
    plt.show()

Reference

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

pygrnwang-2.1.1.tar.gz (276.7 kB view details)

Uploaded Source

Built Distributions

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

pygrnwang-2.1.1-cp314-cp314-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.14Windows x86-64

pygrnwang-2.1.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pygrnwang-2.1.1-cp314-cp314-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

pygrnwang-2.1.1-cp313-cp313-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.13Windows x86-64

pygrnwang-2.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pygrnwang-2.1.1-cp313-cp313-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pygrnwang-2.1.1-cp312-cp312-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.12Windows x86-64

pygrnwang-2.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pygrnwang-2.1.1-cp312-cp312-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

pygrnwang-2.1.1-cp311-cp311-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.11Windows x86-64

pygrnwang-2.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pygrnwang-2.1.1-cp311-cp311-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

pygrnwang-2.1.1-cp310-cp310-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.10Windows x86-64

pygrnwang-2.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

pygrnwang-2.1.1-cp310-cp310-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

Details for the file pygrnwang-2.1.1.tar.gz.

File metadata

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

File hashes

Hashes for pygrnwang-2.1.1.tar.gz
Algorithm Hash digest
SHA256 434974bc62ba351b7a4af4fdaa52b2c2d5bc7bc583c104fca7e381b1268bcd1d
MD5 eb0033b07c63cc9ab8bd31f1acb75685
BLAKE2b-256 00472f63ea83aae38f951461e4418061cfff44e1b5303d376950a00ad80ab44e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1.tar.gz:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.1.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygrnwang-2.1.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 a3ce27f62b998a47c4d0453a4b29652e772044942693ec39774c58256afde666
MD5 43863dd36c444da8ca81c74311a0e062
BLAKE2b-256 c8d8a55a1e7e2c80af319a7bece8c628455a9fc98b1f00d2f2ea54055ddb429a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp314-cp314-win_amd64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 20272c1e48506a660e5fe73e219305b22f41fecb087cf0498f7ffbfb032b1654
MD5 187a150bc9f847a2e40256ecef8a0d2a
BLAKE2b-256 70b1ab5e3ebb37b27261c32559ba4338bc283bbdcebda709aa71eaae3690725b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 67db3a7c5eacf098508d027d0af2d5a67dca2742b77072603a0f2c4e09ae5cfe
MD5 4de2ba10c27ddcc74b1daed85ac564e1
BLAKE2b-256 acddd9a543c1de293f5436a6e46d3d61a989ad98c01bfc652d97add4126d8bd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp314-cp314-macosx_15_0_arm64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.1.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygrnwang-2.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 0556eb50b3abd2eb8bde4d5e83343f46f3a4abdb666e58d8c810de6552e908af
MD5 99be0087f65b44aaf9384cc18dcc2812
BLAKE2b-256 8b0dadc4428fc41d72db1e4385bed34a8da23f231ef0bf62da4cab11321deeff

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 2fbaa8b5514af2009a0ad75ae344af6c255d1c259e0ce2703c3b1cb424481ab7
MD5 7f7b554324cc01ac11e134e978a47463
BLAKE2b-256 62ad842fa22f60db1dd41bc65429d7cae35c8f0467a186c863d7d4988662f1e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b6f3cf7636665a906ddadd61d9195a30f5c452f3f3c9de197436120a7133e5fc
MD5 420d100a5355069ebef21b5c0fc25b1d
BLAKE2b-256 df6b783aff13495b77d1b45b12c3bf76b875a96c9fc0fb61bfda0becaa0ce20a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp313-cp313-macosx_15_0_arm64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygrnwang-2.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ef67d1ec34d8bfc7a81d90e930afe2a650f788c575bace0dbe4b681257d8505f
MD5 2b467465975459459452d9f76c2dbe4e
BLAKE2b-256 54f2f0d9ccca3d0efa6d83a4d6ed223a846e48d0e4ec92f46f147b6e1459bed6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 607185ba46bd2b8f34088e29284ada39cc6d7223c447c6ea460fa428cb5da885
MD5 d567519c4799ebb133a9859c1fa6e277
BLAKE2b-256 68ad28741872272293046b9377fafc49c8a702363466672d2db654fbf6ba7b9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 edc730c28b11b30e9bb42c736e23fad5d2129bb384f7474fbd3c1e928db35277
MD5 f7b37d43c1326a24f2031b157943661f
BLAKE2b-256 7d9905a45ce0f249cd31580978661b7e385562925fce98bc2028d79a0b32da3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygrnwang-2.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5ba53f21be4745f7504c2d6c5213717daeca0d98a265f63cd2f09fc956c30f50
MD5 67717967c8eefaebe935632554916fbf
BLAKE2b-256 fc728662996677c88987351c0cc424db06c2ad4457b4c69893e6583cdb3c95bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3a263a2382a30e2f1186ac5c6ac4e550074bc29e46b20c6d3adf2ddec3c931fb
MD5 615a17a5680a955e790801ae3e348581
BLAKE2b-256 817b727a48f6a56cc1990a5ea800c9189d7d1a328d006a7b7b002afb6d9d0f3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 3e820fc738001ffa31b25836d0dd34c739a30557b26bd1c7f28bb5c85f7b5b22
MD5 aadf69da891f3d1f78fbc5ecc02833db
BLAKE2b-256 f924c19cbe5f0f69e3c95a39f1b2eb0c31596b95a705bb38b92dd87e1259bed9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp311-cp311-macosx_15_0_arm64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pygrnwang-2.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1f9171ba88a6c6fdddd59644ea0c356ce872ba6a8d80218a523df5d4af250ba1
MD5 1413327444d8752198121a67fb7bb0f1
BLAKE2b-256 af890e85be6a6b19aeca5d971ced6a5b7e537e822420411d2cf782eaacfc5da9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 3667ffc68cf5143954d11f3086712f9c280b839b0920b3715d450878bffdf6a5
MD5 e66704301fdc19b6955865718100f6c3
BLAKE2b-256 e6e4bb09124ff324e97b089913189bbf479175e3ef1b9568b3a3cfa2824cf823

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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

File details

Details for the file pygrnwang-2.1.1-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.1.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0fc81b1381b5d2ffa3fd4ca992589c468171742cda3ddcd47a85495761f8babc
MD5 95dfacc7ae3d375d2f7a8d88434ea33d
BLAKE2b-256 1e8accb9d8e9b3da455c4cc38eb6a72d0126306c802cf56e230abf4d0db8b819

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.1.1-cp310-cp310-macosx_15_0_arm64.whl:

Publisher: publish.yml on Zhou-Jiangcheng/pygrnwang

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