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.0.8.tar.gz (275.8 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.0.8-cp314-cp314-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.14Windows x86-64

pygrnwang-2.0.8-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.0.8-cp314-cp314-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

pygrnwang-2.0.8-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.0.8-cp313-cp313-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

pygrnwang-2.0.8-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.0.8-cp312-cp312-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

pygrnwang-2.0.8-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.0.8-cp311-cp311-macosx_15_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

pygrnwang-2.0.8-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.0.8-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.0.8.tar.gz.

File metadata

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

File hashes

Hashes for pygrnwang-2.0.8.tar.gz
Algorithm Hash digest
SHA256 3d259745e3fef8ec5e55b84e09d42049fe13be80f055bff08a6547a5a289914c
MD5 5ccc86824ac741eca55e5ba9bb9c9665
BLAKE2b-256 93ac7401145f492dcf683b14fac01758b5f517ce554b46e23215f29205d4e177

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8.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.0.8-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.0.8-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.0.8-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c4f6ca8b689a81e257818f865e00e871cc4b788dc9fecab705f59a5d5eaa2757
MD5 22504044efb50afcb14b2cdaeb857b5f
BLAKE2b-256 e356efb35e886ecc630184a0ee173112e7cd5482c7968316c4de9f0244f0b3a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 15d986ebeda6c99a430244098353454a6501695afc78bd21eb6dc4f95693eb88
MD5 2df9d103d9924251553f259eea208ce0
BLAKE2b-256 b3db74db810f1038b32e93efbbd4df87e7888ecd0506c9fb03b2a0902963eddd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 da93b854fbe3d04d788c760a50ef7b6ea5919bac04da430983ec775cbf36925e
MD5 e10f0e713ea3c934b820c6fa29a88039
BLAKE2b-256 336b0560797dbfe3d94d786872c978f080c232afaeda07b4b1c5866d36d0ca44

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.0.8-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.0.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 99995e3a764626d2f98ecbd4e53712c066b5821df6ca5cd56a65134cacbfcfce
MD5 9e6497b0a1d654f6d7047b14b926e20e
BLAKE2b-256 76a81805b5a78dc16cdec268579a14efbd72d2fbd1a83be0a7c579d2bacd9caf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 d672671e86bc43fa023b98bd100e97d2e14fee49007e6f45fcf3e84246657bf6
MD5 4df25a8330ffa8309fea412d5a060de0
BLAKE2b-256 d41d2d23c9dc05820b9c9403357dc5cc5c1e896b40b8c757466d385af50f5813

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b319e6f03cb83f2506d661a69fe1b94162cee00c377a3b0669e538262ba292eb
MD5 fed9ed1ad3e6a861b328ab3ba9463898
BLAKE2b-256 77b5f4a9c08a64a5cec9b132d5e667c6d88c168c8dedab06cf203247ac7a96b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.0.8-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.0.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5f3aec0db7693af27e3f6ba61cf10719f6fc3567589f0c10a0acc895ffc58000
MD5 951529700ff1c0e3b4e1e6841fd3d7d6
BLAKE2b-256 d6dec31c1811f48bd92061f0942b6f14014ba5fedafde2f47997a1f3826fbe72

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 8b737cabe5d804873adfebb213cd35452a02e4ffe40ce5f4815c75e5676acccf
MD5 bd43bf9a92f7eb7277d23be77502ecae
BLAKE2b-256 4df7c15dbea9c8c8d2179dfea452173e61561b7408ca50cd427f305b00d74a3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 71f8ef3dbc4c53055fb9ec6994f048ae20ccbba1920972482ebfd5f1ef249bad
MD5 353aef0361daa726894b5a637c670471
BLAKE2b-256 7298ddbdcf7ca4a99badd9c30a76e2f8ebde1f10bf67dcf983f84312f7358ce1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.0.8-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.0.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 afd15bd1e31a4522b2f40101f93ab71269b09874c32ce172fdac090e2552b3b4
MD5 e565183f70dfc5c59d029e1283daff2c
BLAKE2b-256 4ba7e5aa536c5c6050e4ea9875cbc19c4ef8d9de8c9ebd46fa93ecad1ba54991

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 7b023c0b5204b6a0afebb45fac4d3bd0a7c52c279cd8d564bf300a77423747e7
MD5 a17004c8a7afaddd18056063f489ce64
BLAKE2b-256 697fc68255edabca9248beaec509d4e72355e81f35a59b9a66401cd619c0a5a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c305eaad32830e315113a5c239239da344d33f6647d62af68f9fdd8de3c2a68a
MD5 ff3102502cc6d0e14d1b6662de7a0878
BLAKE2b-256 4aceba7333870754fa4ff9cfcafe7778b5da875e00e0bca2149edd0f5dcdfc06

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pygrnwang-2.0.8-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.0.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 673357606a2f9adde96ffbf0d0fc159047245d9809279d2096e4bf17aadbe1ce
MD5 121f3be8dff67de4d38ab32059c9beaa
BLAKE2b-256 f58e1d6708e508e214af7ea4ee1e86d6e8a89c9cd054d8a769166f9b3f00add9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 42e2569c7727206553a139285d239163a3f09a0d7656f7eb198ceb74a643cf98
MD5 a5c6bcad9aefd3be2421a51374f300ba
BLAKE2b-256 bb43961bfe3512d908f1a819d6cf5f7f9db477d990509fd0adf8af35cb879515

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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.0.8-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pygrnwang-2.0.8-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e394ad610583a65c89b0141ed405e9f77668ae5d2038f7a91d573b142358c630
MD5 5617899594a9e70d5f63c6d9e7326d57
BLAKE2b-256 1d5dbe87f75633fd98148c83352fa29c44561779ae99efaaa48d73a8daeb5546

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygrnwang-2.0.8-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