dyncfs 2.0.2__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dyncfs-2.0.2 → dyncfs-2.1.0}/MANIFEST.in +2 -2
- {dyncfs-2.0.2/dyncfs.egg-info → dyncfs-2.1.0}/PKG-INFO +27 -63
- {dyncfs-2.0.2 → dyncfs-2.1.0}/README.md +23 -35
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/cfs_dynamic.py +18 -19
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/cfs_static.py +126 -102
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/configuration.py +30 -30
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/convert_input_format.py +3 -2
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/plot_cfs_dynamic_3d.py +1 -1
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/plot_cfs_static_2d.py +2 -2
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/plot_cfs_static_3d.py +1 -1
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/plot_slip_2d.py +2 -2
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/plot_slip_3d.py +1 -1
- dyncfs-2.1.0/dyncfs/signal_process.py +53 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/utils.py +2 -64
- {dyncfs-2.0.2 → dyncfs-2.1.0/dyncfs.egg-info}/PKG-INFO +27 -63
- dyncfs-2.1.0/dyncfs.egg-info/SOURCES.txt +41 -0
- dyncfs-2.1.0/dyncfs.egg-info/requires.txt +2 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/pyproject.toml +7 -12
- dyncfs-2.1.0/setup.py +80 -0
- dyncfs-2.0.2/dyncfs/cfs_dynamic_backup.py +0 -1328
- dyncfs-2.0.2/dyncfs/create_edcmp.py +0 -117
- dyncfs-2.0.2/dyncfs/create_edcmp_bulk.py +0 -227
- dyncfs-2.0.2/dyncfs/create_edgrn.py +0 -96
- dyncfs-2.0.2/dyncfs/create_edgrn_bulk.py +0 -147
- dyncfs-2.0.2/dyncfs/create_nd_by_crust1_ak135.py +0 -121
- dyncfs-2.0.2/dyncfs/create_qseis2025.py +0 -234
- dyncfs-2.0.2/dyncfs/create_qseis2025_bulk.py +0 -258
- dyncfs-2.0.2/dyncfs/create_qssp2020.py +0 -282
- dyncfs-2.0.2/dyncfs/create_qssp2020_bulk.py +0 -535
- dyncfs-2.0.2/dyncfs/crust1.py +0 -132
- dyncfs-2.0.2/dyncfs/edcmp2inp.py +0 -132
- dyncfs-2.0.2/dyncfs/edgrn2inp.py +0 -91
- dyncfs-2.0.2/dyncfs/exec/TauP-2.6.1.jar +0 -0
- dyncfs-2.0.2/dyncfs/focal_mechanism.py +0 -360
- dyncfs-2.0.2/dyncfs/geo.py +0 -397
- dyncfs-2.0.2/dyncfs/obspy_geo.py +0 -310
- dyncfs-2.0.2/dyncfs/pytaup.py +0 -153
- dyncfs-2.0.2/dyncfs/qseis2025inp.py +0 -280
- dyncfs-2.0.2/dyncfs/qssp2020inp.py +0 -166
- dyncfs-2.0.2/dyncfs/read_edcmp.py +0 -140
- dyncfs-2.0.2/dyncfs/read_qseis2025.py +0 -352
- dyncfs-2.0.2/dyncfs/read_qssp2020.py +0 -354
- dyncfs-2.0.2/dyncfs/signal_process.py +0 -146
- dyncfs-2.0.2/dyncfs.egg-info/SOURCES.txt +0 -203
- dyncfs-2.0.2/dyncfs.egg-info/requires.txt +0 -6
- dyncfs-2.0.2/fortran_src_codes/edcmp2.0_src/dc3d.f +0 -665
- dyncfs-2.0.2/fortran_src_codes/edcmp2.0_src/dc3d0.f +0 -460
- dyncfs-2.0.2/fortran_src_codes/edcmp2.0_src/edcdisc.f +0 -188
- dyncfs-2.0.2/fortran_src_codes/edcmp2.0_src/edcglobal.h +0 -15
- dyncfs-2.0.2/fortran_src_codes/edcmp2.0_src/edcgrn.f +0 -447
- dyncfs-2.0.2/fortran_src_codes/edcmp2.0_src/edcmain.f +0 -327
- dyncfs-2.0.2/fortran_src_codes/edcmp2.0_src/edcoutput.f +0 -134
- dyncfs-2.0.2/fortran_src_codes/edcmp2.0_src/getdata.f +0 -30
- dyncfs-2.0.2/fortran_src_codes/edcmp2.0_src/okada.f +0 -189
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/axb.f +0 -26
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/bessj.f +0 -58
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/bessj0.f +0 -42
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/bessj1.f +0 -42
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgbstab.f +0 -60
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgglobal.h +0 -25
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edghask.f +0 -79
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgkern.f +0 -36
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edglayer.f +0 -77
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgmain.f +0 -299
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgmatinv.f +0 -55
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgmatrix.f +0 -48
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgmoment.f +0 -97
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgpsv.f +0 -321
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgsh.f +0 -208
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgsublay.f +0 -78
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/edgwvint.f +0 -334
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/gemp.f +0 -83
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/getdata.f +0 -26
- dyncfs-2.0.2/fortran_src_codes/edgrn2.0_src/memcpy.f +0 -17
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/bessj.f +0 -54
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/bessj0.f +0 -33
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/bessj1.f +0 -33
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/caxcb.f +0 -20
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/cdgemp.f +0 -81
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/cmemcpy.f +0 -15
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/four1.f +0 -65
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/getdata.f +0 -26
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsam2ve.f +0 -61
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsbsj.f +0 -36
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsfftinv.f +0 -138
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsgetinp.f +0 -843
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsglobal.h +0 -192
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qshksh.f +0 -51
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qskern.f +0 -33
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qslayer.f +0 -128
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsmain.f +0 -78
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsmatrix0.f +0 -86
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsmultis.f +0 -136
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qspsv.f +0 -610
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsqmodel.f +0 -61
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qssh.f +0 -240
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qssource.f +0 -69
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qssublay.f +0 -142
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qsve2am.f +0 -75
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qswavelet.f +0 -60
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qswaveno.f +0 -37
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/qswvint.f +0 -422
- dyncfs-2.0.2/fortran_src_codes/qseis2025_src/taper.f +0 -25
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/banddpasss.f +0 -44
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/brunewvlet.f +0 -22
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/butterworth.f +0 -37
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/caxcb.f +0 -20
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/cdsvd500.f +0 -107
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/cmemcpy.f +0 -15
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/disazi.f +0 -73
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/four1w.f +0 -77
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/fsimpson.f +0 -34
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/legendre.f +0 -28
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/moments.f +0 -41
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpalloc.f +0 -119
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpdifmat0.f +0 -91
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpdifmatl.f +0 -116
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpdifmats.f +0 -96
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpfftinv.f +0 -240
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpgetinp.f +0 -686
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpgrnspec.f +0 -752
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qplegendre.f +0 -28
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpmain.f +0 -78
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qppsvkern.f +0 -257
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qppsvkerng.f +0 -124
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpqmodel.f +0 -68
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpshkern.f +0 -90
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpsmat.f +0 -284
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpsmat0.f +0 -124
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpsmatc.f +0 -142
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpsprop.f +0 -1602
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpsprop0.f +0 -229
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpspropg.f +0 -2037
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpspropg0.f +0 -212
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart0.f +0 -40
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart0a.f +0 -46
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart0g.f +0 -28
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart2t.f +0 -36
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart4.f +0 -88
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart4a.f +0 -65
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart4g.f +0 -51
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart6.f +0 -123
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart6a.f +0 -103
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpstart6g.f +0 -29
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpsublayer.f +0 -714
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qptmat.f +0 -99
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qptprop.f +0 -196
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/qpwvint.f +0 -1112
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/ruku.f +0 -108
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/skipdoc.f +0 -20
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/spbdphj.f +0 -48
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/spbdphy.f +0 -48
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/spbh12.f +0 -41
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/spbjh.f +0 -162
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/spbphj.f +0 -44
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/spbphy.f +0 -44
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/spbpsj.f +0 -44
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/spbpsy.f +0 -44
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/swavelet.f +0 -31
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/taper.f +0 -31
- dyncfs-2.0.2/fortran_src_codes/qssp2020_src/transfs2t.f +0 -143
- dyncfs-2.0.2/setup.py +0 -75
- {dyncfs-2.0.2 → dyncfs-2.1.0}/LICENSE +0 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/__init__.py +0 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/main.py +0 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/plot_cfs_dynamic_2d.py +0 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs/plot_gif.py +0 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs.egg-info/dependency_links.txt +0 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs.egg-info/entry_points.txt +0 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/dyncfs.egg-info/top_level.txt +0 -0
- {dyncfs-2.0.2 → dyncfs-2.1.0}/setup.cfg +0 -0
|
@@ -3,7 +3,7 @@ include LICENSE
|
|
|
3
3
|
recursive-include fortran_src_codes *.f *.for *.f90 *.F *.F90
|
|
4
4
|
recursive-include fortran_src_codes *.inc *.INC *.par *.PAR *.dat *.DAT *.txt *.cfg *.in *.h *.H
|
|
5
5
|
recursive-include dyncfs/exec *.jar
|
|
6
|
-
exclude dyncfs/exec/*.bin
|
|
7
|
-
exclude dyncfs/exec/*.exe
|
|
6
|
+
#exclude dyncfs/exec/*.bin
|
|
7
|
+
#exclude dyncfs/exec/*.exe
|
|
8
8
|
exclude dyncfs/exec/*.out
|
|
9
9
|
exclude dyncfs/exec/*.o
|
|
@@ -1,92 +1,45 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dyncfs
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: A Python library for computing Coulomb Failure Stress Change.
|
|
5
5
|
Author-email: Zhou Jiangcheng <zhoujcpku@outlook.com>
|
|
6
|
-
License: MIT
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2024 Zhou Jiangcheng
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
-
SOFTWARE.
|
|
6
|
+
License-Expression: MIT
|
|
27
7
|
Project-URL: Homepage, https://github.com/Zhou-Jiangcheng/dyncfs
|
|
28
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.9
|
|
29
9
|
Description-Content-Type: text/markdown
|
|
30
10
|
License-File: LICENSE
|
|
31
|
-
Requires-Dist:
|
|
11
|
+
Requires-Dist: pygrnwang>=2.1.0
|
|
32
12
|
Requires-Dist: matplotlib>=3.9.2
|
|
33
|
-
Requires-Dist: scipy>=1.16.2
|
|
34
|
-
Requires-Dist: pandas>=2.2.3
|
|
35
|
-
Requires-Dist: jpype1>=1.5.2
|
|
36
|
-
Requires-Dist: tqdm>=4.67.1
|
|
37
13
|
Dynamic: license-file
|
|
38
14
|
|
|
39
15
|
# Introduction
|
|
40
16
|
|
|
41
|
-
This Python package serves as the frontend for
|
|
42
|
-
|
|
43
|
-
References:
|
|
44
|
-
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](https://doi.org/10.1785/BSSA0890030733)
|
|
45
|
-
|
|
46
|
-
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
|
|
47
|
-
|
|
48
|
-
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
|
|
49
|
-
|
|
50
|
-
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
|
|
17
|
+
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](https://github.com/Zhou-Jiangcheng/QSEIS_2006_STRESS), and QSSP. The generation and retrieval of Green's function libraries are handled by the [pygrnwang](https://github.com/Zhou-Jiangcheng/pygrnwang) package, while travel-time calculations and geographic coordinate transformations are implemented using [obspy](https://github.com/obspy/obspy).
|
|
51
18
|
|
|
52
19
|
# Installation
|
|
53
20
|
|
|
54
|
-
1.
|
|
21
|
+
1. For user mode
|
|
55
22
|
|
|
56
23
|
```
|
|
57
|
-
|
|
58
|
-
conda activate cfs
|
|
59
|
-
conda install openjdk jpype1 gfortran numpy scipy pandas matplotlib tqdm -c conda-forge
|
|
60
|
-
conda install geographiclib mpi4py -c conda-forge # optional
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
or install the requirments using system package manager, such as apt (Debian 12)
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
sudo apt install openjdk gfortran
|
|
67
|
-
sudo apt install openmpi-common # optional
|
|
24
|
+
pip install dyncfs
|
|
68
25
|
```
|
|
69
26
|
|
|
70
|
-
2.
|
|
27
|
+
2. For developer mode.
|
|
71
28
|
|
|
72
29
|
```
|
|
30
|
+
conda create -n cfs python=3.13
|
|
31
|
+
conda activate cfs
|
|
32
|
+
conda install gfortran obspy tqdm -c conda-forge
|
|
33
|
+
conda install geographiclib mpi4py -c conda-forge # optional
|
|
34
|
+
git clone https://github.com/Zhou-Jiangcheng/pygrnwang
|
|
35
|
+
cd pygrnwang
|
|
36
|
+
pip install -e .
|
|
37
|
+
cd ..
|
|
73
38
|
git clone https://github.com/Zhou-Jiangcheng/dyncfs.git
|
|
74
39
|
cd dyncfs
|
|
75
|
-
pip install .
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
For code modification and debugging, use editable mode:
|
|
79
|
-
|
|
80
|
-
```
|
|
81
40
|
pip install -e .
|
|
82
41
|
```
|
|
83
42
|
|
|
84
|
-
or install from pypi
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
pip install dyncfs
|
|
88
|
-
```
|
|
89
|
-
|
|
90
43
|
# Usage
|
|
91
44
|
|
|
92
45
|
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.
|
|
@@ -140,3 +93,14 @@ if __name__ == "__main__":
|
|
|
140
93
|
create_dynamic_lib(config)
|
|
141
94
|
compute_dynamic_cfs_parallel(config)
|
|
142
95
|
```
|
|
96
|
+
|
|
97
|
+
# References:
|
|
98
|
+
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
|
|
99
|
+
|
|
100
|
+
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
|
|
101
|
+
|
|
102
|
+
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
|
|
103
|
+
|
|
104
|
+
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
|
|
105
|
+
|
|
106
|
+
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
|
|
@@ -1,54 +1,31 @@
|
|
|
1
1
|
# Introduction
|
|
2
2
|
|
|
3
|
-
This Python package serves as the frontend for
|
|
4
|
-
|
|
5
|
-
References:
|
|
6
|
-
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](https://doi.org/10.1785/BSSA0890030733)
|
|
7
|
-
|
|
8
|
-
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
|
|
9
|
-
|
|
10
|
-
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
|
|
11
|
-
|
|
12
|
-
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
|
|
3
|
+
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](https://github.com/Zhou-Jiangcheng/QSEIS_2006_STRESS), and QSSP. The generation and retrieval of Green's function libraries are handled by the [pygrnwang](https://github.com/Zhou-Jiangcheng/pygrnwang) package, while travel-time calculations and geographic coordinate transformations are implemented using [obspy](https://github.com/obspy/obspy).
|
|
13
4
|
|
|
14
5
|
# Installation
|
|
15
6
|
|
|
16
|
-
1.
|
|
7
|
+
1. For user mode
|
|
17
8
|
|
|
18
9
|
```
|
|
19
|
-
|
|
20
|
-
conda activate cfs
|
|
21
|
-
conda install openjdk jpype1 gfortran numpy scipy pandas matplotlib tqdm -c conda-forge
|
|
22
|
-
conda install geographiclib mpi4py -c conda-forge # optional
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
or install the requirments using system package manager, such as apt (Debian 12)
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
sudo apt install openjdk gfortran
|
|
29
|
-
sudo apt install openmpi-common # optional
|
|
10
|
+
pip install dyncfs
|
|
30
11
|
```
|
|
31
12
|
|
|
32
|
-
2.
|
|
13
|
+
2. For developer mode.
|
|
33
14
|
|
|
34
15
|
```
|
|
16
|
+
conda create -n cfs python=3.13
|
|
17
|
+
conda activate cfs
|
|
18
|
+
conda install gfortran obspy tqdm -c conda-forge
|
|
19
|
+
conda install geographiclib mpi4py -c conda-forge # optional
|
|
20
|
+
git clone https://github.com/Zhou-Jiangcheng/pygrnwang
|
|
21
|
+
cd pygrnwang
|
|
22
|
+
pip install -e .
|
|
23
|
+
cd ..
|
|
35
24
|
git clone https://github.com/Zhou-Jiangcheng/dyncfs.git
|
|
36
25
|
cd dyncfs
|
|
37
|
-
pip install .
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
For code modification and debugging, use editable mode:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
26
|
pip install -e .
|
|
44
27
|
```
|
|
45
28
|
|
|
46
|
-
or install from pypi
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
pip install dyncfs
|
|
50
|
-
```
|
|
51
|
-
|
|
52
29
|
# Usage
|
|
53
30
|
|
|
54
31
|
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.
|
|
@@ -102,3 +79,14 @@ if __name__ == "__main__":
|
|
|
102
79
|
create_dynamic_lib(config)
|
|
103
80
|
compute_dynamic_cfs_parallel(config)
|
|
104
81
|
```
|
|
82
|
+
|
|
83
|
+
# References:
|
|
84
|
+
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
|
|
85
|
+
|
|
86
|
+
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
|
|
87
|
+
|
|
88
|
+
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
|
|
89
|
+
|
|
90
|
+
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
|
|
91
|
+
|
|
92
|
+
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
|
|
@@ -13,21 +13,22 @@ import numpy as np
|
|
|
13
13
|
import pandas as pd
|
|
14
14
|
from scipy import signal
|
|
15
15
|
from tqdm import tqdm
|
|
16
|
-
|
|
17
|
-
from .
|
|
18
|
-
from .obspy_geo import gps2dist_azimuth
|
|
19
|
-
from .create_qssp2020_bulk import (
|
|
16
|
+
from obspy.geodetics import gps2dist_azimuth
|
|
17
|
+
from pygrnwang.create_qssp2020_bulk import (
|
|
20
18
|
pre_process_qssp2020,
|
|
21
19
|
create_grnlib_qssp2020_parallel,
|
|
22
20
|
)
|
|
23
|
-
from .read_qssp2020 import seek_qssp2020
|
|
24
|
-
from .create_qseis2025_bulk import (
|
|
21
|
+
from pygrnwang.read_qssp2020 import seek_qssp2020
|
|
22
|
+
from pygrnwang.create_qseis2025_bulk import (
|
|
25
23
|
pre_process_qseis2025,
|
|
26
24
|
create_grnlib_qseis2025_parallel,
|
|
27
25
|
)
|
|
28
|
-
from .read_qseis2025 import seek_qseis2025
|
|
29
|
-
from .focal_mechanism import plane2nd, check_convert_fm, mt2plane
|
|
30
|
-
from .signal_process import resample
|
|
26
|
+
from pygrnwang.read_qseis2025 import seek_qseis2025
|
|
27
|
+
from pygrnwang.focal_mechanism import plane2nd, check_convert_fm, mt2plane
|
|
28
|
+
from pygrnwang.signal_process import resample
|
|
29
|
+
|
|
30
|
+
from .configuration import CfsConfig
|
|
31
|
+
from .signal_process import correct_zero_frequency
|
|
31
32
|
from .cfs_static import (
|
|
32
33
|
cal_coulomb_failure_stress,
|
|
33
34
|
cal_coulomb_failure_stress_poroelasticity,
|
|
@@ -48,7 +49,6 @@ def create_dynamic_lib(config: CfsConfig):
|
|
|
48
49
|
pre_process_qssp2020(
|
|
49
50
|
processes_num=config.processes_num,
|
|
50
51
|
path_green=config.path_green_dynamic,
|
|
51
|
-
path_bin=config.path_bin_qssp,
|
|
52
52
|
event_depth_list=config.event_depth_list,
|
|
53
53
|
receiver_depth_list=config.receiver_depth_list,
|
|
54
54
|
spec_time_window=config.spec_time_window,
|
|
@@ -88,7 +88,6 @@ def create_dynamic_lib(config: CfsConfig):
|
|
|
88
88
|
pre_process_qseis2025(
|
|
89
89
|
processes_num=config.processes_num,
|
|
90
90
|
path_green=config.path_green_dynamic,
|
|
91
|
-
path_bin=config.path_bin_qseis,
|
|
92
91
|
event_depth_list=config.event_depth_list,
|
|
93
92
|
receiver_depth_list=config.receiver_depth_list,
|
|
94
93
|
dist_range=config.grn_dist_range,
|
|
@@ -140,8 +139,7 @@ def synthesize_dynamic_stress(
|
|
|
140
139
|
stf_array(dimensionless)]
|
|
141
140
|
The stf at the end will be normalized by m0.
|
|
142
141
|
:param obs_array_single_point: 1D numpy array,
|
|
143
|
-
[lat(deg), lon(deg), depth(km)
|
|
144
|
-
strike(deg), dip(deg), rake(deg)]
|
|
142
|
+
[lat(deg), lon(deg), depth(km)]
|
|
145
143
|
:param srate_stf: Sampling rate of stf in Hz.
|
|
146
144
|
:param static_stress: Static stress tensor used for correcting zero-frequency values.
|
|
147
145
|
:param max_slowness: Seismograms after dist(km)*max_slowness(s/km) will be set to 0.
|
|
@@ -208,6 +206,7 @@ def synthesize_dynamic_stress(
|
|
|
208
206
|
output_type="stress",
|
|
209
207
|
model_name=green_info["path_nd_without_Q"],
|
|
210
208
|
green_info=green_info,
|
|
209
|
+
interpolate_type=1
|
|
211
210
|
)
|
|
212
211
|
else:
|
|
213
212
|
(
|
|
@@ -234,6 +233,7 @@ def synthesize_dynamic_stress(
|
|
|
234
233
|
output_type="stress",
|
|
235
234
|
model_name=green_info["path_nd_without_Q"],
|
|
236
235
|
green_info=green_info,
|
|
236
|
+
interpolate_type=1
|
|
237
237
|
)
|
|
238
238
|
tp_i = tpts_table["p_onset"]
|
|
239
239
|
tp_ic = max(1, round((tp_i - 1) * srate_cfs))
|
|
@@ -407,10 +407,10 @@ def cal_cfs_dynamic_single_point_fm(
|
|
|
407
407
|
sigma_vector = cal_stress_vector_ned_dynamic(stress_ned, n)
|
|
408
408
|
sigma = np.dot(sigma_vector, n).flatten()
|
|
409
409
|
tau = np.dot(sigma_vector, d).flatten()
|
|
410
|
-
|
|
411
|
-
if B_pore != 0:
|
|
410
|
+
if B_pore == 0:
|
|
412
411
|
cfs = cal_coulomb_failure_stress(norm_stress=sigma, shear_stress=tau, mu_f=mu_f)
|
|
413
412
|
else:
|
|
413
|
+
mean_stress = (stress_ned[:, 0] + stress_ned[:, 3] + stress_ned[:, 5]) / 3
|
|
414
414
|
cfs = cal_coulomb_failure_stress_poroelasticity(
|
|
415
415
|
norm_stress=sigma,
|
|
416
416
|
shear_stress=tau,
|
|
@@ -594,7 +594,7 @@ def cal_cfs_dynamic_single_point_opt_rake(
|
|
|
594
594
|
# Shear stress scalar with optimal rake: tau = |s|
|
|
595
595
|
tau = s_norm # (N,)
|
|
596
596
|
|
|
597
|
-
if B_pore
|
|
597
|
+
if B_pore == 0:
|
|
598
598
|
cfs = cal_coulomb_failure_stress(
|
|
599
599
|
norm_stress=sigma_n, shear_stress=tau, mu_f=mu_f
|
|
600
600
|
)
|
|
@@ -689,8 +689,7 @@ def cal_cfs_dynamic_single_point_oop(
|
|
|
689
689
|
stf_array(dimensionless)]
|
|
690
690
|
The stf at the end will be normalized by m0.
|
|
691
691
|
:param obs_array_single_point: 1D numpy array,
|
|
692
|
-
[lat(deg), lon(deg), depth(km)
|
|
693
|
-
strike(deg), dip(deg), rake(deg)]
|
|
692
|
+
[lat(deg), lon(deg), depth(km)]
|
|
694
693
|
:param srate_stf: Sampling rate of stf in Hz.
|
|
695
694
|
:param tectonic_stress_type: 1 for stress, 2 for orientations
|
|
696
695
|
:param tectonic_stress:
|
|
@@ -842,7 +841,7 @@ def cal_cfs_dynamic_single_point_oop(
|
|
|
842
841
|
sigma2 = np.einsum("ni,ni->n", sigvec2, n2)
|
|
843
842
|
tau2 = np.einsum("ni,ni->n", sigvec2, d2)
|
|
844
843
|
|
|
845
|
-
if B_pore
|
|
844
|
+
if B_pore == 0:
|
|
846
845
|
cfs = cal_coulomb_failure_stress(
|
|
847
846
|
norm_stress=sigma2, shear_stress=tau2, mu_f=mu_f
|
|
848
847
|
)
|