shakemap-modules 1.1.0__tar.gz → 1.1.2__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.
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/CHANGELOG.md +9 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/PKG-INFO +2 -2
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/code.json +72 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/pyproject.toml +1 -1
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/assemble.py +37 -12
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/augment.py +27 -10
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/model.py +326 -157
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/amps.py +85 -34
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/points_to_station.py +22 -7
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/smclone.py +53 -28
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules.egg-info/PKG-INFO +2 -2
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules.egg-info/requires.txt +1 -1
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/.gitignore +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/.gitlab-ci.yml +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/DISCLAIMER.md +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/LICENSE.md +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/MANIFEST.in +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/README.md +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/install.sh +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/pytest.ini +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/setup.cfg +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/setup.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/base/base.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/base/cli.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/base/transfer_base.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/associate.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/contour.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/coverage.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/dyfi.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/exception.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/gridxml.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/history.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/info.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/kml.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/makecsv.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/mapping.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/plotregr.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/raster.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/rupture.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/save.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/shape.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/sleep.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/sm_select.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/stations.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/transfer_email.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/transfer_pdl.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/transfer_scp.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/uncertaintymaps.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/xtestimage.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/xtestplot.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/xtestplot_multi.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/coremods/xtestplot_spectra.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/fdsn_networks.json +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/WGS1984.prj +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/mi.lyr +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/mi.shp.xml +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/pga.lyr +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/pga.shp.xml +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/pgv.lyr +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/pgv.shp.xml +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/psa0p3.lyr +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/psa0p3.shp.xml +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/psa1p0.lyr +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/psa1p0.shp.xml +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/psa3p0.lyr +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gis/psa3p0.shp.xml +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/gmpe_sets.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/alaska.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/australia.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/california.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/cascadia.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/chile.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/china.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/europe_share.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/hawaii.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/induced.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/japan.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/new_zealand.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/south_africa.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/layers/taiwan.wkt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/logging.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/loggingspec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/circle.png +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/intensity_legend.png +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/map_strings.cn +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/map_strings.en +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/map_strings.en-AU +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/map_strings.en-CA +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/map_strings.es +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/map_strings.fr-CA +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/map_strings.it +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/map_strings.tw +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/mapping/triangle.png +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/migrate.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/migratespec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/model.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/modelspec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/modules.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/modulesspec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/products.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/productsspec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/queue.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/queuespec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/select.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/selectspec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/shake.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/shakespec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/simulationspec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/transfer.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/transfer_reviewed_origin.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/data/transferspec.conf +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/mapping/mapmaker.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/mapping/mercatormap.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/mapping/scalebar.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/comcat.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/config.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/dataframe.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/generic_amp.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/layers.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/logging.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/macros.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/probs.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules/utils/utils.py +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules.egg-info/SOURCES.txt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules.egg-info/dependency_links.txt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules.egg-info/entry_points.txt +0 -0
- {shakemap_modules-1.1.0 → shakemap_modules-1.1.2}/src/shakemap_modules.egg-info/top_level.txt +0 -0
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# main
|
|
2
2
|
|
|
3
|
+
## 1.1.2 / 2025-03-13
|
|
4
|
+
- Fix points mode in model to use the same bounds that grid mode would use, insuring consistent bias between modes.
|
|
5
|
+
- Set a fixed seed for FFSimmer RNG (RFF) to make results between runs and across deployments consistent.
|
|
6
|
+
|
|
7
|
+
## 1.1.1 / 2025-02-28
|
|
8
|
+
- Refactor strings for sqlite to single quote string literals.
|
|
9
|
+
- Refactor to emove a bunch of linter warnings.
|
|
10
|
+
- Eliminate a bunch of deprecation warnings (datetime.utcnow(), etc.)
|
|
11
|
+
|
|
3
12
|
## 1.1.0 / 2025-02-07
|
|
4
13
|
- Adding parameter for system_id in transfer_pdl.
|
|
5
14
|
- Handling edge case in smclone where event does not have a depth. Logging a warning
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: shakemap-modules
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.2
|
|
4
4
|
Summary: USGS Earthquake Impact ShakeMap Modules
|
|
5
5
|
Author-email: Bruce Worden <cbworden@contractor.usgs.gov>, Eric Thompson <emthompsone@usgs.gov>, Mike Hearne <mhearne@usgs.gov>
|
|
6
6
|
License: License
|
|
@@ -54,7 +54,7 @@ Requires-Python: >=3.9
|
|
|
54
54
|
Description-Content-Type: text/markdown
|
|
55
55
|
License-File: LICENSE.md
|
|
56
56
|
Requires-Dist: configobj>=5.0.8
|
|
57
|
-
Requires-Dist: esi-shakelib>=1.
|
|
57
|
+
Requires-Dist: esi-shakelib>=1.1.1
|
|
58
58
|
Requires-Dist: h5py>=3.8.0
|
|
59
59
|
Requires-Dist: importlib-resources>=6.0.0
|
|
60
60
|
Provides-Extra: assemble
|
|
@@ -1,4 +1,76 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"name": "shakemap-modules",
|
|
4
|
+
"description": "ShakeMap processing modules.",
|
|
5
|
+
"version": "v1.1.2",
|
|
6
|
+
"status": "Development",
|
|
7
|
+
"organization": "U.S. Geological Survey",
|
|
8
|
+
"vcs": "git",
|
|
9
|
+
"repositoryURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules.git",
|
|
10
|
+
"homepageURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules",
|
|
11
|
+
"downloadURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/archive/v1.1.2/shakemap-modules-v1.1.2.zip",
|
|
12
|
+
"disclaimerURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/raw/v1.1.2/DISCLAIMER.md",
|
|
13
|
+
"permissions": {
|
|
14
|
+
"usageType": "openSource",
|
|
15
|
+
"licenses": [
|
|
16
|
+
{
|
|
17
|
+
"name": "Public Domain, CC0-1.0",
|
|
18
|
+
"URL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/raw/v1.1.2/LICENSE.md"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"laborHours": 1,
|
|
23
|
+
"languages": [
|
|
24
|
+
"python"
|
|
25
|
+
],
|
|
26
|
+
"tags": [
|
|
27
|
+
"earthquake",
|
|
28
|
+
"utilities"
|
|
29
|
+
],
|
|
30
|
+
"contact": {
|
|
31
|
+
"name": "Bruce Worden",
|
|
32
|
+
"email": "cbworden@contractor.usgs.gov"
|
|
33
|
+
},
|
|
34
|
+
"date": {
|
|
35
|
+
"metadataLastUpdated": "2025-03-13"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "shakemap-modules",
|
|
40
|
+
"description": "ShakeMap processing modules.",
|
|
41
|
+
"version": "v1.1.1",
|
|
42
|
+
"status": "Development",
|
|
43
|
+
"organization": "U.S. Geological Survey",
|
|
44
|
+
"vcs": "git",
|
|
45
|
+
"repositoryURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules.git",
|
|
46
|
+
"homepageURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules",
|
|
47
|
+
"downloadURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/archive/v1.1.1/shakemap-modules-v1.1.1.zip",
|
|
48
|
+
"disclaimerURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/raw/v1.1.1/DISCLAIMER.md",
|
|
49
|
+
"permissions": {
|
|
50
|
+
"usageType": "openSource",
|
|
51
|
+
"licenses": [
|
|
52
|
+
{
|
|
53
|
+
"name": "Public Domain, CC0-1.0",
|
|
54
|
+
"URL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/raw/v1.1.1/LICENSE.md"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"laborHours": 1,
|
|
59
|
+
"languages": [
|
|
60
|
+
"python"
|
|
61
|
+
],
|
|
62
|
+
"tags": [
|
|
63
|
+
"earthquake",
|
|
64
|
+
"utilities"
|
|
65
|
+
],
|
|
66
|
+
"contact": {
|
|
67
|
+
"name": "Bruce Worden",
|
|
68
|
+
"email": "cbworden@contractor.usgs.gov"
|
|
69
|
+
},
|
|
70
|
+
"date": {
|
|
71
|
+
"metadataLastUpdated": "2025-02-28"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
2
74
|
{
|
|
3
75
|
"name": "shakemap-modules",
|
|
4
76
|
"description": "ShakeMap processing modules.",
|
|
@@ -69,7 +69,12 @@ class AssembleModule(CoreModule):
|
|
|
69
69
|
configs = ["gmpe_sets.conf", "model.conf", "modules.conf"]
|
|
70
70
|
|
|
71
71
|
def __init__(
|
|
72
|
-
self,
|
|
72
|
+
self,
|
|
73
|
+
eventid,
|
|
74
|
+
comment=None,
|
|
75
|
+
process="shakemap",
|
|
76
|
+
logger=None,
|
|
77
|
+
points=None,
|
|
73
78
|
):
|
|
74
79
|
"""
|
|
75
80
|
Instantiate a CoreModule class with an event ID.
|
|
@@ -150,7 +155,9 @@ class AssembleModule(CoreModule):
|
|
|
150
155
|
#
|
|
151
156
|
global_config = get_model_config(install_path, datadir, self.logger)
|
|
152
157
|
|
|
153
|
-
global_data_path = os.path.join(
|
|
158
|
+
global_data_path = os.path.join(
|
|
159
|
+
os.path.expanduser("~"), "shakemap_data"
|
|
160
|
+
)
|
|
154
161
|
#
|
|
155
162
|
# If there is a prediction_location->file file, then we need
|
|
156
163
|
# to expand any macros; this could have the event ID, so we
|
|
@@ -170,7 +177,9 @@ class AssembleModule(CoreModule):
|
|
|
170
177
|
raise FileNotFoundError(
|
|
171
178
|
f"prediction file '{loc_file}' is not a valid file"
|
|
172
179
|
)
|
|
173
|
-
global_config["interp"]["prediction_location"][
|
|
180
|
+
global_config["interp"]["prediction_location"][
|
|
181
|
+
"file"
|
|
182
|
+
] = loc_file
|
|
174
183
|
|
|
175
184
|
config = global_config.dict()
|
|
176
185
|
|
|
@@ -188,7 +197,9 @@ class AssembleModule(CoreModule):
|
|
|
188
197
|
rupturefile = os.path.join(datadir, "rupture.json")
|
|
189
198
|
if not os.path.isfile(rupturefile):
|
|
190
199
|
# failing any of those, look for text file versions
|
|
191
|
-
rupturefiles = sorted(
|
|
200
|
+
rupturefiles = sorted(
|
|
201
|
+
glob.glob(os.path.join(datadir, "*_fault.txt"))
|
|
202
|
+
)
|
|
192
203
|
rupturefile = None
|
|
193
204
|
if len(rupturefiles):
|
|
194
205
|
rupturefile = rupturefiles[0]
|
|
@@ -197,7 +208,7 @@ class AssembleModule(CoreModule):
|
|
|
197
208
|
# Sort out the version history. Get the most recent backup file and
|
|
198
209
|
# extract the existing history. Then add a new line for this run.
|
|
199
210
|
#
|
|
200
|
-
timestamp = datetime.datetime.
|
|
211
|
+
timestamp = datetime.datetime.now(datetime.UTC).strftime("%FT%TZ")
|
|
201
212
|
originator = config["system"]["source_network"]
|
|
202
213
|
backup_dirs = sorted(
|
|
203
214
|
glob.glob(os.path.join(datadir, "..", "backup*")), reverse=True
|
|
@@ -212,7 +223,9 @@ class AssembleModule(CoreModule):
|
|
|
212
223
|
history = bu_ic.getVersionHistory()
|
|
213
224
|
bu_ic.close()
|
|
214
225
|
version = int(
|
|
215
|
-
backup_dirs[0].replace(
|
|
226
|
+
backup_dirs[0].replace(
|
|
227
|
+
os.path.join(datadir, "..", "backup"), ""
|
|
228
|
+
)
|
|
216
229
|
)
|
|
217
230
|
version += 1
|
|
218
231
|
new_line = [timestamp, originator, version, self.comment]
|
|
@@ -248,7 +261,12 @@ class AssembleModule(CoreModule):
|
|
|
248
261
|
if maprun[2] > highest_version:
|
|
249
262
|
highest_version = maprun[2]
|
|
250
263
|
history = {"history": history_list}
|
|
251
|
-
new_line = [
|
|
264
|
+
new_line = [
|
|
265
|
+
timestamp,
|
|
266
|
+
originator,
|
|
267
|
+
highest_version + 1,
|
|
268
|
+
self.comment,
|
|
269
|
+
]
|
|
252
270
|
history["history"].append(new_line)
|
|
253
271
|
else:
|
|
254
272
|
#
|
|
@@ -283,7 +301,9 @@ class AssembleModule(CoreModule):
|
|
|
283
301
|
momentfile=momentfile,
|
|
284
302
|
datafiles=datafiles,
|
|
285
303
|
)
|
|
286
|
-
self.logger.debug(
|
|
304
|
+
self.logger.debug(
|
|
305
|
+
f"Created HDF5 input container in {shake_data.getFileName()}"
|
|
306
|
+
)
|
|
287
307
|
#
|
|
288
308
|
# Add any STREC data that is lying around
|
|
289
309
|
#
|
|
@@ -324,7 +344,9 @@ class AssembleModule(CoreModule):
|
|
|
324
344
|
|
|
325
345
|
# find the spec file for simulation.conf
|
|
326
346
|
sim_config_spec = get_configspec("simulation")
|
|
327
|
-
sim_config = ConfigObj(
|
|
347
|
+
sim_config = ConfigObj(
|
|
348
|
+
infile=config_file, configspec=f"{sim_config_spec}"
|
|
349
|
+
)
|
|
328
350
|
results = sim_config.validate(Validator())
|
|
329
351
|
if not isinstance(results, bool) or not results:
|
|
330
352
|
config_error(global_config, results)
|
|
@@ -345,7 +367,8 @@ class AssembleModule(CoreModule):
|
|
|
345
367
|
Set up the object to accept the --comment flag.
|
|
346
368
|
"""
|
|
347
369
|
parser = argparse.ArgumentParser(
|
|
348
|
-
prog=self.__class__.command_name,
|
|
370
|
+
prog=self.__class__.command_name,
|
|
371
|
+
description=inspect.getdoc(self.__class__),
|
|
349
372
|
)
|
|
350
373
|
parser.add_argument(
|
|
351
374
|
"-c",
|
|
@@ -378,7 +401,9 @@ class AssembleModule(CoreModule):
|
|
|
378
401
|
# will not work as it will suck up any later modules'
|
|
379
402
|
# options that are the same as this one's.
|
|
380
403
|
#
|
|
381
|
-
parser.add_argument(
|
|
404
|
+
parser.add_argument(
|
|
405
|
+
"rem", nargs=argparse.REMAINDER, help=argparse.SUPPRESS
|
|
406
|
+
)
|
|
382
407
|
args = parser.parse_args(arglist)
|
|
383
408
|
self.comment = args.comment
|
|
384
409
|
self.points = args.points
|
|
@@ -462,7 +487,7 @@ def _get_grids(config, simfile):
|
|
|
462
487
|
grid2 = grid.project(GEO_PROJ_STR)
|
|
463
488
|
else:
|
|
464
489
|
grid2 = grid
|
|
465
|
-
|
|
490
|
+
|
|
466
491
|
# remove any nan's, maximizing the resulting area of good data
|
|
467
492
|
grid3 = _trim_grid(grid2)
|
|
468
493
|
|
|
@@ -81,7 +81,9 @@ class AugmentModule(CoreModule):
|
|
|
81
81
|
|
|
82
82
|
hdf_file = os.path.join(datadir, "shake_data.hdf")
|
|
83
83
|
if not os.path.isfile(hdf_file):
|
|
84
|
-
raise FileNotFoundError(
|
|
84
|
+
raise FileNotFoundError(
|
|
85
|
+
f"{hdf_file} does not exist. Use assemble."
|
|
86
|
+
)
|
|
85
87
|
shake_data = ShakeMapInputContainer.load(hdf_file)
|
|
86
88
|
|
|
87
89
|
# Prompt for a comment string if none is provided on the command line
|
|
@@ -160,7 +162,9 @@ class AugmentModule(CoreModule):
|
|
|
160
162
|
shake_config.merge(event_config)
|
|
161
163
|
elif os.path.isfile(event_config_zc_file):
|
|
162
164
|
self.logger.debug("Found an event specific model_select file.")
|
|
163
|
-
event_config = ConfigObj(
|
|
165
|
+
event_config = ConfigObj(
|
|
166
|
+
event_config_zc_file, configspec=spec_file
|
|
167
|
+
)
|
|
164
168
|
shake_config.merge(event_config)
|
|
165
169
|
#
|
|
166
170
|
# Validate the resulting config
|
|
@@ -170,7 +174,9 @@ class AugmentModule(CoreModule):
|
|
|
170
174
|
config_error(shake_config, results)
|
|
171
175
|
check_config(shake_config, self.logger)
|
|
172
176
|
|
|
173
|
-
global_data_path = os.path.join(
|
|
177
|
+
global_data_path = os.path.join(
|
|
178
|
+
os.path.expanduser("~"), "shakemap_data"
|
|
179
|
+
)
|
|
174
180
|
#
|
|
175
181
|
# If there is a prediction_location->file file, then we need
|
|
176
182
|
# to expand any macros
|
|
@@ -189,7 +195,9 @@ class AugmentModule(CoreModule):
|
|
|
189
195
|
raise FileNotFoundError(
|
|
190
196
|
f'prediction file "{loc_file}" is not a valid file'
|
|
191
197
|
)
|
|
192
|
-
shake_config["interp"]["prediction_location"][
|
|
198
|
+
shake_config["interp"]["prediction_location"][
|
|
199
|
+
"file"
|
|
200
|
+
] = loc_file
|
|
193
201
|
#
|
|
194
202
|
# Put the updated config back into shake_data.hdf`
|
|
195
203
|
#
|
|
@@ -220,9 +228,13 @@ class AugmentModule(CoreModule):
|
|
|
220
228
|
rupturefile = faultfiles[0]
|
|
221
229
|
else:
|
|
222
230
|
rupturefile = None
|
|
223
|
-
if (
|
|
231
|
+
if (
|
|
232
|
+
rupturefile and os.path.isfile(rupturefile)
|
|
233
|
+
) or eventxml is not None:
|
|
224
234
|
self.logger.debug("Updating rupture/origin information.")
|
|
225
|
-
shake_data.updateRupture(
|
|
235
|
+
shake_data.updateRupture(
|
|
236
|
+
eventxml=eventxml, rupturefile=rupturefile
|
|
237
|
+
)
|
|
226
238
|
#
|
|
227
239
|
# Look for a strec_results.json file and replace the existing one if found
|
|
228
240
|
#
|
|
@@ -236,7 +248,7 @@ class AugmentModule(CoreModule):
|
|
|
236
248
|
# HDF file, so: if we are the originator, just update the timestamp,
|
|
237
249
|
# otherwise add a new line.
|
|
238
250
|
#
|
|
239
|
-
timestamp = datetime.datetime.
|
|
251
|
+
timestamp = datetime.datetime.now(datetime.UTC).strftime("%FT%TZ")
|
|
240
252
|
originator = config["system"]["source_network"]
|
|
241
253
|
|
|
242
254
|
history = shake_data.getVersionHistory()
|
|
@@ -268,7 +280,8 @@ class AugmentModule(CoreModule):
|
|
|
268
280
|
Set up the object to accept the --comment flag.
|
|
269
281
|
"""
|
|
270
282
|
parser = argparse.ArgumentParser(
|
|
271
|
-
prog=self.__class__.command_name,
|
|
283
|
+
prog=self.__class__.command_name,
|
|
284
|
+
description=inspect.getdoc(self.__class__),
|
|
272
285
|
)
|
|
273
286
|
parser.add_argument(
|
|
274
287
|
"-c",
|
|
@@ -286,7 +299,9 @@ class AugmentModule(CoreModule):
|
|
|
286
299
|
# will not work as it will suck up any later modules'
|
|
287
300
|
# options that are the same as this one's.
|
|
288
301
|
#
|
|
289
|
-
parser.add_argument(
|
|
302
|
+
parser.add_argument(
|
|
303
|
+
"rem", nargs=argparse.REMAINDER, help=argparse.SUPPRESS
|
|
304
|
+
)
|
|
290
305
|
args = parser.parse_args(arglist)
|
|
291
306
|
self.comment = args.comment
|
|
292
307
|
return args.rem
|
|
@@ -317,7 +332,9 @@ def main():
|
|
|
317
332
|
if "comment" not in vhash:
|
|
318
333
|
vhash["comment"] = None
|
|
319
334
|
|
|
320
|
-
mod = AugmentModule(
|
|
335
|
+
mod = AugmentModule(
|
|
336
|
+
evid, comment=vhash["comment"], process="main", logger=logger
|
|
337
|
+
)
|
|
321
338
|
mod.execute(config=config, indir=datadir, outdir=outdir)
|
|
322
339
|
|
|
323
340
|
|