ucgmsim-workflow 2026.9.1__py3-none-any.whl

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.
Files changed (42) hide show
  1. ucgmsim_workflow-2026.9.1.dist-info/METADATA +43 -0
  2. ucgmsim_workflow-2026.9.1.dist-info/RECORD +42 -0
  3. ucgmsim_workflow-2026.9.1.dist-info/WHEEL +5 -0
  4. ucgmsim_workflow-2026.9.1.dist-info/entry_points.txt +23 -0
  5. ucgmsim_workflow-2026.9.1.dist-info/top_level.txt +1 -0
  6. workflow/__init__.py +103 -0
  7. workflow/default_parameters/__init__.py +0 -0
  8. workflow/default_parameters/root/__init__.py +0 -0
  9. workflow/default_parameters/root/defaults.yaml +1226 -0
  10. workflow/default_parameters/v24_2_2_1/__init__.py +0 -0
  11. workflow/default_parameters/v24_2_2_1/defaults.yaml +8 -0
  12. workflow/default_parameters/v24_2_2_2/__init__.py +0 -0
  13. workflow/default_parameters/v24_2_2_2/defaults.yaml +8 -0
  14. workflow/default_parameters/v24_2_2_4/__init__.py +0 -0
  15. workflow/default_parameters/v24_2_2_4/defaults.yaml +8 -0
  16. workflow/defaults.py +46 -0
  17. workflow/log_utils.py +170 -0
  18. workflow/realisations.py +1337 -0
  19. workflow/schemas.py +1208 -0
  20. workflow/scripts/__init__.py +7 -0
  21. workflow/scripts/bb_sim.py +233 -0
  22. workflow/scripts/check_domain.py +106 -0
  23. workflow/scripts/check_srf.py +153 -0
  24. workflow/scripts/convert_vm_hdf5_to_emod3d.py +74 -0
  25. workflow/scripts/copy_velocity_model_parameters.py +67 -0
  26. workflow/scripts/create_e3d_par.py +294 -0
  27. workflow/scripts/gcmt_auto_simulate.py +124 -0
  28. workflow/scripts/gcmt_to_realisation.py +299 -0
  29. workflow/scripts/generate_domain.py +609 -0
  30. workflow/scripts/generate_rupture_propagation.py +129 -0
  31. workflow/scripts/generate_station_coordinates.py +139 -0
  32. workflow/scripts/generate_stoch.py +102 -0
  33. workflow/scripts/generate_velocity_model.py +254 -0
  34. workflow/scripts/hf_sim.py +483 -0
  35. workflow/scripts/im_calc.py +330 -0
  36. workflow/scripts/import_realisation.py +90 -0
  37. workflow/scripts/lf_to_xarray.py +55 -0
  38. workflow/scripts/merge_ts.py +433 -0
  39. workflow/scripts/migrate.py +589 -0
  40. workflow/scripts/nshm2022_to_realisation.py +401 -0
  41. workflow/scripts/realisation_to_srf.py +900 -0
  42. workflow/utils.py +218 -0
@@ -0,0 +1,43 @@
1
+ Metadata-Version: 2.4
2
+ Name: ucgmsim-workflow
3
+ Version: 2026.9.1
4
+ Summary: Next generation workflow powered by cylc.
5
+ Author: QuakeCoRE
6
+ Requires-Python: >=3.12
7
+ Description-Content-Type: text/markdown
8
+ Requires-Dist: im-calculation<2026.09.01,>=2025.12.5
9
+ Requires-Dist: velocity-modelling>=2026.2.1
10
+ Requires-Dist: nshmdb>=2026.09.1
11
+ Requires-Dist: oq_wrapper>=2025.12.3
12
+ Requires-Dist: qcore-utils>=2025.12.2
13
+ Requires-Dist: source_modelling>=2026.08.1
14
+ Requires-Dist: geopandas
15
+ Requires-Dist: pandas[hdf5,parquet]
16
+ Requires-Dist: pyyaml
17
+ Requires-Dist: xarray[io]
18
+ Requires-Dist: numpy
19
+ Requires-Dist: scipy
20
+ Requires-Dist: shapely
21
+ Requires-Dist: tqdm
22
+ Requires-Dist: typer
23
+ Requires-Dist: requests
24
+ Requires-Dist: schema
25
+ Requires-Dist: structlog
26
+ Requires-Dist: psutil
27
+ Requires-Dist: parse>=1.21.0
28
+ Requires-Dist: rich>=14.3.2
29
+ Provides-Extra: test
30
+ Requires-Dist: pytest>=6.0.0; extra == "test"
31
+ Requires-Dist: hypothesis[numpy]>=6.0.0; extra == "test"
32
+ Requires-Dist: pytest-cov; extra == "test"
33
+ Requires-Dist: coverage[toml]; extra == "test"
34
+ Provides-Extra: types
35
+ Requires-Dist: pandas-stubs; extra == "types"
36
+ Requires-Dist: types-geopandas; extra == "types"
37
+ Requires-Dist: types-requests; extra == "types"
38
+ Requires-Dist: scipy-stubs; extra == "types"
39
+ Provides-Extra: dev
40
+ Requires-Dist: ruff>=0.16.5; extra == "dev"
41
+ Requires-Dist: deptry; extra == "dev"
42
+ Requires-Dist: ty>=0.0.75; extra == "dev"
43
+ Requires-Dist: numpydoc; extra == "dev"
@@ -0,0 +1,42 @@
1
+ workflow/__init__.py,sha256=_1YJQk8uG677uqautnX12LjL-F-LVYIRELxcggz3DWc,5391
2
+ workflow/defaults.py,sha256=OPDKSiDtnzJtw8qmfgTqa0HBclAaEuqLGWYMzEcBbVk,1598
3
+ workflow/log_utils.py,sha256=-1XDS-yO0asolQd4909ppRVlYOb4Kw1ltPVmsfpCNKM,5381
4
+ workflow/realisations.py,sha256=x3nrTFyRBFrkRdSj1il3qBbWBGG8CqyuBi2PQMugQ4w,49292
5
+ workflow/schemas.py,sha256=bYxskumR20eNNptHLUeWiTquoe8BNPlmdgEofWUJxOo,45255
6
+ workflow/utils.py,sha256=FILOF1H5NxLWTjxDJr5kcUYC4jAGe5x_AiAaWr9lGWE,6395
7
+ workflow/default_parameters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ workflow/default_parameters/root/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ workflow/default_parameters/root/defaults.yaml,sha256=Coof7sY7DYNEe2mczZTaUv1CdveHj_rISoOjTdQPDOs,24053
10
+ workflow/default_parameters/v24_2_2_1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ workflow/default_parameters/v24_2_2_1/defaults.yaml,sha256=3eQ8NTXdyf4qNlCupSUoyU5EO08R06I6BuPiRsxoPF8,104
12
+ workflow/default_parameters/v24_2_2_2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ workflow/default_parameters/v24_2_2_2/defaults.yaml,sha256=ntgGDaUjfERFHc9UzQk3FqVHydL2U8UpfzM9bD67Ra0,104
14
+ workflow/default_parameters/v24_2_2_4/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
+ workflow/default_parameters/v24_2_2_4/defaults.yaml,sha256=FKTAb1iw-j4HMLDc8k1-FKc6Rdio_tNY_4fA5D_ljkk,105
16
+ workflow/scripts/__init__.py,sha256=yp7ioOlu5lBDPu1vBmANdyKoFUV6eiV6CJffCSfkQ5w,248
17
+ workflow/scripts/bb_sim.py,sha256=rHuuXgcH86f57o9K0WuYllwnZmUuvQUuK2ofRyk0Dc8,7364
18
+ workflow/scripts/check_domain.py,sha256=ftm9-Al8lf_8lwLcOPQx2v15ZtB1U8HlpAh0tTusim8,3232
19
+ workflow/scripts/check_srf.py,sha256=PShXMGRfkm0QjgJdu-rKmxG2mohjDPMOH57UbbRxuno,4424
20
+ workflow/scripts/convert_vm_hdf5_to_emod3d.py,sha256=RI1GPcJTOnZ89Wy2A1yoMruA5dqa6Fj5i3LQFVEwDIU,2142
21
+ workflow/scripts/copy_velocity_model_parameters.py,sha256=iGMmCjYVsa9LmCi2S8ip1G_aA9dMBM0A0X4VSMUpDBU,2159
22
+ workflow/scripts/create_e3d_par.py,sha256=ueVVUQJjaCV_gb0-e54XfVy14V3ujNsEYpsaDyJXzck,8743
23
+ workflow/scripts/gcmt_auto_simulate.py,sha256=VbSIhGcfjl6aPpFGtEkHKREYShtIiNJusDNFRFoQ3jM,3743
24
+ workflow/scripts/gcmt_to_realisation.py,sha256=ORcX1QC76FVERho0F3bTbSmKt2fJa81FZrSm97mK4Hw,11531
25
+ workflow/scripts/generate_domain.py,sha256=GEwnjPsoHp7MQo7A2LBRKehxkyduMqw4EhHP5P0n2JU,17993
26
+ workflow/scripts/generate_rupture_propagation.py,sha256=dIE45UFkU7y3cNJ2VljfNPfvCtvFT5bD0oLhLwn2yUk,3891
27
+ workflow/scripts/generate_station_coordinates.py,sha256=6pFT3ppXHF2F5KMofU4XvccwtLL8EQPkbWhQAQ3JyEE,4626
28
+ workflow/scripts/generate_stoch.py,sha256=5_hzGmAKog0ad_YCL4ZL__exBVZnj-soKi34888JGwU,3602
29
+ workflow/scripts/generate_velocity_model.py,sha256=R2ZTBbK7s0cuZYccky4-CbhQWUiclZHol85MjI-9hBQ,8862
30
+ workflow/scripts/hf_sim.py,sha256=CstarixSv7TaP8kSL85F4UT8WgC8wNEB4_W4a5lYY68,16306
31
+ workflow/scripts/im_calc.py,sha256=avXK6HMTFrrOQMEQEn0E9iZEOKoBX8KhmQi8X6wK4_8,11028
32
+ workflow/scripts/import_realisation.py,sha256=knmk4V6WuG9FYDebUAEe-ZvocparQlpHLx34a7OI4Bo,2956
33
+ workflow/scripts/lf_to_xarray.py,sha256=sE7cBoyQY42YBj_olpS2mides5AfcbtXl8839bM_0UE,1318
34
+ workflow/scripts/merge_ts.py,sha256=--hQ03PqWpSXb-Df4WKaLXvCTu9shfS3ZsGkr29Agjc,12079
35
+ workflow/scripts/migrate.py,sha256=3eGmeEHRIe1fOLVvs3KcVCjrz9-WMydQLLseU7Rr5_o,18181
36
+ workflow/scripts/nshm2022_to_realisation.py,sha256=ECMxyi0m7hDtU0j8cbKceECBJ3k5hpW-ecHSSrlsx64,15212
37
+ workflow/scripts/realisation_to_srf.py,sha256=OjBJjgMBOvEH6l5zTYn2gCmumQhwBO2uh_TTvFURsJM,30027
38
+ ucgmsim_workflow-2026.9.1.dist-info/METADATA,sha256=OeNXxeibrSKakaU5UdJPySHeQk_ncTqm0111PReYJVM,1417
39
+ ucgmsim_workflow-2026.9.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
40
+ ucgmsim_workflow-2026.9.1.dist-info/entry_points.txt,sha256=6VOCmCjzz8y1GfrjgYjnQbXt3g5-d2L_zFIC4jH8rb8,1292
41
+ ucgmsim_workflow-2026.9.1.dist-info/top_level.txt,sha256=jT-znOUjxvwdr-w5ECrvROWZ9y_Doiz0yVYSI0VxpXA,9
42
+ ucgmsim_workflow-2026.9.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,23 @@
1
+ [console_scripts]
2
+ bb-sim = workflow.scripts.bb_sim:app
3
+ check-domain = workflow.scripts.check_domain:app
4
+ check-srf = workflow.scripts.check_srf:app
5
+ convert-vm-hdf5-to-emod3d = workflow.scripts.convert_vm_hdf5_to_emod3d:app
6
+ copy-domain-parameters = workflow.scripts.copy_velocity_model_parameters:app
7
+ create-e3d-par = workflow.scripts.create_e3d_par:app
8
+ gcmt-auto-simulate = workflow.scripts.gcmt_auto_simulate:app
9
+ gcmt-to-realisation = workflow.scripts.gcmt_to_realisation:app
10
+ generate-domain = workflow.scripts.generate_domain:app
11
+ generate-model-coordinates = workflow.scripts.generate_model_coordinates:app
12
+ generate-rupture-propagation = workflow.scripts.generate_rupture_propagation:app
13
+ generate-station-coordinates = workflow.scripts.generate_station_coordinates:app
14
+ generate-stoch = workflow.scripts.generate_stoch:app
15
+ generate-velocity-model = workflow.scripts.generate_velocity_model:app
16
+ hf-sim = workflow.scripts.hf_sim:app
17
+ im-calc = workflow.scripts.im_calc:app
18
+ import-realisation = workflow.scripts.import_realisation:app
19
+ lf-to-xarray = workflow.scripts.lf_to_xarray:app
20
+ merge-ts = workflow.scripts.merge_ts:app
21
+ migrate = workflow.scripts.migrate:app
22
+ nshm2022-to-realisation = workflow.scripts.nshm2022_to_realisation:app
23
+ realisation-to-srf = workflow.scripts.realisation_to_srf:app
@@ -0,0 +1 @@
1
+ workflow
workflow/__init__.py ADDED
@@ -0,0 +1,103 @@
1
+ """QuakeCoRE Scientific Software Stack.
2
+
3
+ ## Overview
4
+ The QuakeCoRE scientific workflow is composed of a number of independent components
5
+
6
+ - `workflow` :: This module, which implements the Cybershake workflow. It defines a cylc workflow and scripts that researchers can use to build their own automated research pipeline using scientifically validated, regularly tested, well-documented components built from the software team.
7
+ - `source_modelling` :: A collection of modules for modelling sources.
8
+ - `velocity_modelling` :: The next-generation velocity model.
9
+ - `qcore` :: Utilities and common functions.
10
+
11
+ ## Using the Workflow
12
+
13
+ To deploy the workflow on NeSI, first clone the repository and then install the cylc workflow
14
+
15
+ ```
16
+ $ git clone https://github.com/ucgmsim/workflow
17
+ $ # add inputs into workflow/cylc/inputs
18
+ $ cp -r workflow/cylc ~/cylc-src/cybershake # OR a suitable name for your custom workflow
19
+ $ cylc install cybershake
20
+ $ cylc play cybershake
21
+ ```
22
+
23
+ And that's it! You can monitor the progress of your workflow with `cylc log cybershake` and `squeue -u $USER` to see the slurm job queue for your user.
24
+
25
+ ## The Stages
26
+
27
+ The workflow repository contains all the tools necessary to build a
28
+ workflow for ground motion model simulations. We build and maintain a
29
+ Cybershake workflow, but researchers may wish to build their own. For
30
+ this reason, the workflow is build out of composable parts we intend
31
+ for anyone to reuse to build their own workflow based on the
32
+ Cybershake workflow. Below you will find documentation for all the
33
+ workflow stages, their inputs, outputs and environments.
34
+
35
+ ```mermaid
36
+ flowchart LR
37
+ A[NSHM To Realisation] --> B[SRF Generation]
38
+ A --> C[Domain Generation]
39
+ B --> D[Stoch Generation]
40
+ C --> E[Velocity Model Generation]
41
+ C --> F[Station Selection]
42
+ C --> G[Write Model Coordinates]
43
+ B --> H[Create EMOD3D Parameters]
44
+ E --> H
45
+ F --> H
46
+ G --> H
47
+ H --> I[EMOD3D]
48
+ D --> J[High Frequency Simulation]
49
+ I --> M[Broadband Simulation]
50
+ J --> M
51
+ M --> N[Intensity Measure Calculation]
52
+ I -->|Optionally| K[Merge Timeslices]
53
+ K --> L[Create Simulation Video]
54
+ ```
55
+
56
+
57
+ Many of the stages will run in a _container_. A container is a self-contained execution environment with all the system and Python libraries required to execute workflow stages. It is also isolated from the host system and may not be able to access certain directories. We maintain a [cybershake container](https://hub.docker.com/r/earthquakesuc/runner) that has a copy of the latest validated workflow, and environment. Use this container as much as possible in your own scripts to run your code.
58
+
59
+ To find the documentation for a given stage, find the module that runs this stage in the above flow diagram and then click the corresponding link
60
+
61
+ | Stage | Module |
62
+ |:------------------------------|:------------------------------------------------------|
63
+ | NSHM to Realisation | `workflow.scripts.nshm2022_to_realisation` |
64
+ | SRF Generation | `workflow.scripts.realisation_to_srf` |
65
+ | Domain Generation | `workflow.scripts.generate_velocity_model_parameters` |
66
+ | Stoch Generation | `workflow.scripts.generate_stoch` |
67
+ | Velocity Model Generation | `workflow.scripts.generate_velocity_model` |
68
+ | Station Selection | `workflow.scripts.generate_station_coordinates` |
69
+ | Write Model Coordinates | `workflow.scripts.generate_model_coordinates` |
70
+ | EMOD3D | See below. |
71
+ | High Frequency Simulation | `workflow.scripts.hf_sim` |
72
+ | Broadband Simulation | `workflow.scripts.bb_sim` |
73
+ | Create Simulation Video | `workflow.scripts.plot_ts` |
74
+ | Intensity Measure Calculation | `workflow.scripts.im_calc` |
75
+
76
+
77
+ ## EMOD3D
78
+
79
+ Most stages are documented in their corresponding python module
80
+
81
+ ### Description
82
+ Run a low frequency ground motion simulation using EMOD3D.
83
+
84
+ ### Inputs
85
+ 1. A parameter file in "key=value" format,
86
+ 2. An SRF file,
87
+ 3. A station file list (latitude, longitude, and x, y), see .
88
+
89
+ ### Outputs
90
+ 1. Ground acceleration timeslice files, one per core.
91
+ 2. Seismograms, one per station.
92
+
93
+ ### Environment
94
+ This stage must be run on a system with MPI installed. Typically, we run this stage in Maui on NeSI HPCs or Kisti. Due to high computational requirements, this stage usually cannot be run locally.
95
+
96
+ ### Usage
97
+ On an HPC with slurm enabled `srun emod3d-mpi_v3.0.8 -args "par=$CYLC_WORKFLOW_SHARE_DIR/LF/e3d.par"` will run EMOD3D. Depending on the number of cores rerequested, this may invoke multiple proesses on different compute nodes (for Maui, this will occur when the number of cores exceeds 40). EMOD3D has support for checkpointing, so repeat invocations will continue from their previous checkpointed stage.
98
+
99
+ ### For More Help
100
+ See Graves, 1996[^1] for a description of the mathematical and technical details of EMOD3D's implementation.
101
+
102
+ [^1]: Graves, Robert W. "Simulating seismic wave propagation in 3D elastic media using staggered-grid finite differences." Bulletin of the seismological society of America 86.4 (1996): 1091-1106.
103
+ """
File without changes
File without changes