shakemap-modules 1.2.0__tar.gz → 1.2.1__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.
Files changed (147) hide show
  1. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/CHANGELOG.md +5 -0
  2. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/PKG-INFO +5 -5
  3. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/code.json +36 -0
  4. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/pyproject.toml +4 -4
  5. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/model.py +77 -8
  6. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/model.conf +26 -7
  7. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/modelspec.conf +2 -0
  8. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/config.py +8 -2
  9. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/context.py +7 -0
  10. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules.egg-info/PKG-INFO +5 -5
  11. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules.egg-info/requires.txt +4 -4
  12. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules.egg-info/scm_file_list.json +2 -0
  13. shakemap_modules-1.2.1/src/shakemap_modules.egg-info/scm_version.json +8 -0
  14. shakemap_modules-1.2.0/src/shakemap_modules.egg-info/scm_version.json +0 -8
  15. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/.gitignore +0 -0
  16. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/.gitlab-ci.yml +0 -0
  17. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/DISCLAIMER.md +0 -0
  18. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/LICENSE.md +0 -0
  19. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/MANIFEST.in +0 -0
  20. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/README.md +0 -0
  21. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/install.sh +0 -0
  22. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/pytest.ini +0 -0
  23. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/setup.cfg +0 -0
  24. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/setup.py +0 -0
  25. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/base/base.py +0 -0
  26. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/base/cli.py +0 -0
  27. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/base/transfer_base.py +0 -0
  28. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/assemble.py +0 -0
  29. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/associate.py +0 -0
  30. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/augment.py +0 -0
  31. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/contour.py +0 -0
  32. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/coverage.py +0 -0
  33. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/dyfi.py +0 -0
  34. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/exception.py +0 -0
  35. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/gridxml.py +0 -0
  36. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/history.py +0 -0
  37. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/info.py +0 -0
  38. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/kml.py +0 -0
  39. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/makecsv.py +0 -0
  40. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/mapping.py +0 -0
  41. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/plotregr.py +0 -0
  42. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/raster.py +0 -0
  43. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/rupture.py +0 -0
  44. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/save.py +0 -0
  45. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/shape.py +0 -0
  46. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/sleep.py +0 -0
  47. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/sm_select.py +0 -0
  48. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/stations.py +0 -0
  49. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/transfer_email.py +0 -0
  50. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/transfer_pdl.py +0 -0
  51. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/transfer_scp.py +0 -0
  52. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/uncertaintymaps.py +0 -0
  53. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/xtestimage.py +0 -0
  54. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/xtestplot.py +0 -0
  55. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/xtestplot_multi.py +0 -0
  56. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/coremods/xtestplot_spectra.py +0 -0
  57. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/fdsn_networks.json +0 -0
  58. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/WGS1984.prj +0 -0
  59. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/mi.lyr +0 -0
  60. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/mi.shp.xml +0 -0
  61. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/pga.lyr +0 -0
  62. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/pga.shp.xml +0 -0
  63. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/pgv.lyr +0 -0
  64. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/pgv.shp.xml +0 -0
  65. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/psa0p3.lyr +0 -0
  66. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/psa0p3.shp.xml +0 -0
  67. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/psa1p0.lyr +0 -0
  68. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/psa1p0.shp.xml +0 -0
  69. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/psa3p0.lyr +0 -0
  70. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gis/psa3p0.shp.xml +0 -0
  71. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/gmpe_sets.conf +0 -0
  72. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/alaska.wkt +0 -0
  73. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/australia.wkt +0 -0
  74. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/california.wkt +0 -0
  75. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/cascadia.wkt +0 -0
  76. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/chile.wkt +0 -0
  77. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/china.wkt +0 -0
  78. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/europe_share.wkt +0 -0
  79. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/hawaii.wkt +0 -0
  80. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/induced.wkt +0 -0
  81. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/japan.wkt +0 -0
  82. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/new_zealand.wkt +0 -0
  83. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/south_africa.wkt +0 -0
  84. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/layers/taiwan.wkt +0 -0
  85. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/logging.conf +0 -0
  86. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/loggingspec.conf +0 -0
  87. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/circle.png +0 -0
  88. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/intensity_legend.png +0 -0
  89. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/map_strings.cn +0 -0
  90. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/map_strings.en +0 -0
  91. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/map_strings.en-AU +0 -0
  92. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/map_strings.en-CA +0 -0
  93. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/map_strings.es +0 -0
  94. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/map_strings.fr-CA +0 -0
  95. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/map_strings.it +0 -0
  96. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/map_strings.tw +0 -0
  97. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/mapping/triangle.png +0 -0
  98. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/migrate.conf +0 -0
  99. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/migratespec.conf +0 -0
  100. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/modules.conf +0 -0
  101. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/modulesspec.conf +0 -0
  102. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/products.conf +0 -0
  103. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/productsspec.conf +0 -0
  104. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/queue.conf +0 -0
  105. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/queuespec.conf +0 -0
  106. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/select.conf +0 -0
  107. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/selectspec.conf +0 -0
  108. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/shake.conf +0 -0
  109. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/shakespec.conf +0 -0
  110. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/simulationspec.conf +0 -0
  111. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/transfer.conf +0 -0
  112. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/transfer_reviewed_origin.conf +0 -0
  113. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/data/transferspec.conf +0 -0
  114. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/mapping/mapmaker.py +0 -0
  115. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/mapping/mercatormap.py +0 -0
  116. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/mapping/scalebar.py +0 -0
  117. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/__init__.py +0 -0
  118. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/bias.py +0 -0
  119. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/distance_utils.py +0 -0
  120. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/formatting.py +0 -0
  121. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/gmpe_setup.py +0 -0
  122. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/griddict.py +0 -0
  123. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/imt_utils.py +0 -0
  124. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/info_builder.py +0 -0
  125. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/masking.py +0 -0
  126. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/mvn.py +0 -0
  127. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/origin_setup.py +0 -0
  128. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/output_grid.py +0 -0
  129. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/station_data.py +0 -0
  130. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/station_json.py +0 -0
  131. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/modeling/storage.py +0 -0
  132. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/amps.py +0 -0
  133. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/comcat.py +0 -0
  134. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/config.py +0 -0
  135. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/dataframe.py +0 -0
  136. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/generic_amp.py +0 -0
  137. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/layers.py +0 -0
  138. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/logging.py +0 -0
  139. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/macros.py +0 -0
  140. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/points_to_station.py +0 -0
  141. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/probs.py +0 -0
  142. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/smclone.py +0 -0
  143. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules/utils/utils.py +0 -0
  144. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules.egg-info/SOURCES.txt +0 -0
  145. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules.egg-info/dependency_links.txt +0 -0
  146. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules.egg-info/entry_points.txt +0 -0
  147. {shakemap_modules-1.2.0 → shakemap_modules-1.2.1}/src/shakemap_modules.egg-info/top_level.txt +0 -0
@@ -1,5 +1,10 @@
1
1
  # main
2
2
 
3
+ ## 1.2.1 / 2026-08-14
4
+ - Add blas_threads and openmp_threads config parameters to model.conf.
5
+ - Add thread control to model.
6
+ - Add tests for threading.
7
+
3
8
  ## 1.2.0 / 2026-08-10
4
9
  - Optimize mapping performance:
5
10
  o Render the static basemap/faults/roads layers once instead of once per IMT map
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shakemap-modules
3
- Version: 1.2.0
3
+ Version: 1.2.1
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-Expression: CC0-1.0
@@ -29,12 +29,11 @@ Requires-Dist: openpyxl; extra == "dyfi"
29
29
  Requires-Dist: pandas>=2.0.2; extra == "dyfi"
30
30
  Provides-Extra: exception
31
31
  Provides-Extra: gridxml
32
- Requires-Dist: esi-core>=1.2.8; extra == "gridxml"
33
32
  Requires-Dist: mapio>=0.8.8; extra == "gridxml"
34
33
  Provides-Extra: history
35
34
  Provides-Extra: info
36
35
  Provides-Extra: kml
37
- Requires-Dist: esi-core>=1.2.8; extra == "kml"
36
+ Requires-Dist: esi-core>=1.2.9; extra == "kml"
38
37
  Requires-Dist: esi-utils-colors>=1.0.5; extra == "kml"
39
38
  Requires-Dist: mapio>=0.8.8; extra == "kml"
40
39
  Requires-Dist: fiona>=1.9.4.post1; extra == "kml"
@@ -54,11 +53,12 @@ Requires-Dist: matplotlib>=3.7.1; extra == "mapping"
54
53
  Requires-Dist: rasterio; extra == "mapping"
55
54
  Requires-Dist: scipy; extra == "mapping"
56
55
  Provides-Extra: model
57
- Requires-Dist: esi-core>=1.2.8; extra == "model"
56
+ Requires-Dist: esi-core>=1.2.9; extra == "model"
58
57
  Requires-Dist: mapio>=0.8.8; extra == "model"
59
58
  Requires-Dist: cartopy>=0.22.0; extra == "model"
60
59
  Requires-Dist: fiona>=1.9.4.post1; extra == "model"
61
60
  Requires-Dist: shapely; extra == "model"
61
+ Requires-Dist: threadpoolctl; extra == "model"
62
62
  Provides-Extra: plotregr
63
63
  Requires-Dist: matplotlib>=3.7.1; extra == "plotregr"
64
64
  Provides-Extra: raster
@@ -66,7 +66,7 @@ Requires-Dist: mapio>=0.8.8; extra == "raster"
66
66
  Provides-Extra: rupture
67
67
  Provides-Extra: save
68
68
  Provides-Extra: shape
69
- Requires-Dist: esi-core>=1.2.8; extra == "shape"
69
+ Requires-Dist: esi-core>=1.2.9; extra == "shape"
70
70
  Requires-Dist: esi-utils-colors>=1.0.5; extra == "shape"
71
71
  Requires-Dist: fiona>=1.9.4.post1; extra == "shape"
72
72
  Requires-Dist: scikit-image; extra == "shape"
@@ -1,4 +1,40 @@
1
1
  [
2
+ {
3
+ "name": "shakemap-modules",
4
+ "description": "ShakeMap processing modules.",
5
+ "version": "v1.2.1",
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.2.1/shakemap-modules-v1.2.1.zip",
12
+ "disclaimerURL": "https://code.usgs.gov/ghsc/esi/shakemap-modules/-/raw/v1.2.1/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.2.1/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": "2026-08-14"
36
+ }
37
+ },
2
38
  {
3
39
  "name": "shakemap-modules",
4
40
  "description": "ShakeMap processing modules.",
@@ -56,13 +56,12 @@ dyfi = [
56
56
  ]
57
57
  exception = []
58
58
  gridxml = [
59
- "esi-core>=1.2.8",
60
59
  "mapio>=0.8.8",
61
60
  ]
62
61
  history = []
63
62
  info = []
64
63
  kml = [
65
- "esi-core>=1.2.8",
64
+ "esi-core>=1.2.9",
66
65
  "esi-utils-colors>=1.0.5",
67
66
  "mapio>=0.8.8",
68
67
  "fiona>=1.9.4.post1",
@@ -84,11 +83,12 @@ mapping = [
84
83
  "scipy",
85
84
  ]
86
85
  model = [
87
- "esi-core>=1.2.8",
86
+ "esi-core>=1.2.9",
88
87
  "mapio>=0.8.8",
89
88
  "cartopy>=0.22.0",
90
89
  "fiona>=1.9.4.post1",
91
90
  "shapely",
91
+ "threadpoolctl",
92
92
  ]
93
93
  plotregr = [
94
94
  "matplotlib>=3.7.1",
@@ -99,7 +99,7 @@ raster = [
99
99
  rupture = []
100
100
  save = []
101
101
  shape = [
102
- "esi-core>=1.2.8",
102
+ "esi-core>=1.2.9",
103
103
  "esi-utils-colors>=1.0.5",
104
104
  "fiona>=1.9.4.post1",
105
105
  "scikit-image",
@@ -15,8 +15,16 @@ import inspect
15
15
  import json
16
16
  import os
17
17
  import os.path
18
+ from contextlib import contextmanager, nullcontext
18
19
 
19
20
  from openquake.hazardlib import imt
21
+ from threadpoolctl import threadpool_limits
22
+
23
+ from esi_core.shakemap.covariance_matrix import (
24
+ get_openmp_threads,
25
+ has_openmp,
26
+ set_openmp_threads,
27
+ )
20
28
 
21
29
  from shakemap_modules.base.base import Contents, CoreModule
22
30
  from shakemap_modules.utils.utils import get_object_from_config
@@ -111,14 +119,16 @@ class ModelModule(CoreModule):
111
119
  self.logger.debug("Starting model...")
112
120
 
113
121
  self._open_input_and_build_context(indir)
114
- do_mmi = self._setup_gmpe_ipe_gmice()
115
- self._setup_rupture_and_origin()
116
- self._setup_output_geometry()
117
- self._setup_station_data()
118
- full_oqimt_dict = self._build_full_oqimt_dict(do_mmi)
119
- self._run_bias_and_mvn(full_oqimt_dict)
120
- masking.apply_custom_mask(self.ctx)
121
- self._write_output(outdir)
122
+
123
+ with self._threading_context():
124
+ do_mmi = self._setup_gmpe_ipe_gmice()
125
+ self._setup_rupture_and_origin()
126
+ self._setup_output_geometry()
127
+ self._setup_station_data()
128
+ full_oqimt_dict = self._build_full_oqimt_dict(do_mmi)
129
+ self._run_bias_and_mvn(full_oqimt_dict)
130
+ masking.apply_custom_mask(self.ctx)
131
+ self._write_output(outdir)
122
132
 
123
133
  if self.process == "shakemap":
124
134
  self.contents.addFile(
@@ -163,6 +173,65 @@ class ModelModule(CoreModule):
163
173
 
164
174
  model_config.populate_config_options(self.ctx)
165
175
 
176
+ @contextmanager
177
+ def _threading_context(self):
178
+ """
179
+ Apply model.conf native-thread limits for the duration of modeling.
180
+
181
+ A configured value of 0 means ShakeMap does not alter that runtime's
182
+ current/native setting. Positive BLAS limits are applied through
183
+ threadpoolctl. Positive OpenMP limits are applied through esi-core's
184
+ OpenMP runtime API. The prior OpenMP setting is restored on exit so
185
+ ModelModule does not leak thread-state changes into later work in the
186
+ same Python process.
187
+ """
188
+ blas_threads = self.ctx.blas_threads
189
+ openmp_threads = self.ctx.openmp_threads
190
+
191
+ if blas_threads > 0:
192
+ blas_context = threadpool_limits(
193
+ limits=blas_threads,
194
+ user_api="blas",
195
+ )
196
+ self.logger.info("BLAS thread limit: %d", blas_threads)
197
+ else:
198
+ blas_context = nullcontext()
199
+ self.logger.info(
200
+ "BLAS thread limit: native/unrestricted "
201
+ "(not set by ShakeMap)"
202
+ )
203
+
204
+ original_openmp_threads = None
205
+ restore_openmp = False
206
+
207
+ with blas_context:
208
+ if openmp_threads > 0:
209
+ if has_openmp():
210
+ original_openmp_threads = get_openmp_threads()
211
+ set_openmp_threads(openmp_threads)
212
+ restore_openmp = original_openmp_threads is not None
213
+ self.logger.info(
214
+ "OpenMP thread limit: %d", openmp_threads
215
+ )
216
+ else:
217
+ self.logger.warning(
218
+ "openmp_threads is set to %d, but esi-core was "
219
+ "built without OpenMP support; the setting will "
220
+ "be ignored.",
221
+ openmp_threads,
222
+ )
223
+ else:
224
+ self.logger.info(
225
+ "OpenMP thread limit: native/unrestricted "
226
+ "(not set by ShakeMap)"
227
+ )
228
+
229
+ try:
230
+ yield
231
+ finally:
232
+ if restore_openmp:
233
+ set_openmp_threads(original_openmp_threads)
234
+
166
235
  def _setup_gmpe_ipe_gmice(self):
167
236
  """
168
237
  Build the output GMPE set, ensure a VirtualIPE (if configured)
@@ -37,18 +37,37 @@
37
37
  #---------------------------------------------------------------------------
38
38
  # row_block: The number of output grid rows to combine in each pass of the
39
39
  # MVN algorithm. Larger numbers are often faster but consume more memory.
40
- # Benchmarking is advised when changing this value. The default (8) provides
41
- # good results on an M3 Mac with 64GB memory, but 16 produced slightly
42
- # better runtimes (about 1%). YMMV. Individual results will depend on BLAS
43
- # implementation, thread count, cache hierarchy, memory bandwidth, number
44
- # of stations, and grid width, as well as total available memory.
45
- # The minimum is 1, the default is 8.
40
+ # The minimum is 1 and the default is 8.
41
+ #
42
+ # sm_tune does not determine this value. Users wishing to change row_block
43
+ # should benchmark representative ShakeMap events on the target machine.
44
+ # Performance depends on factors including BLAS implementation and thread
45
+ # count, cache hierarchy, memory bandwidth, number of stations, grid width,
46
+ # and available memory.
47
+ #
48
+ # The default value of 8 has provided a good balance of runtime and memory
49
+ # use in testing; larger values may be slightly faster on some systems.
50
+ #---------------------------------------------------------------------------
51
+ row_block = 8
52
+
53
+ #---------------------------------------------------------------------------
54
+ # blas_threads:
55
+ # Maximum number of threads used by BLAS/LAPACK operations. A value of 0
56
+ # leaves the native BLAS runtime unrestricted. This is a machine-specific
57
+ # performance setting and may be determined with sm_tune.
58
+ #
59
+ # openmp_threads:
60
+ # Maximum number of OpenMP threads used by esi-core numerical routines.
61
+ # A value of 0 leaves the OpenMP runtime unrestricted. This is a
62
+ # machine-specific performance setting and may be determined with sm_tune.
46
63
  #---------------------------------------------------------------------------
64
+ blas_threads = 0
65
+ openmp_threads = 0
47
66
 
48
67
  #---------------------------------------------------------------------------
49
68
  # [gmpe_sets]: GMPE sets may be specified in this file. See the documentation
50
69
  # within gmpe_sets.conf for the details. This facility is provided mainly
51
- # to support the automatic generation of event-specific model_zc.conf
70
+ # to support the automatic generation of event-specific model_select.conf
52
71
  # files with custom GMPE sets.
53
72
  #---------------------------------------------------------------------------
54
73
 
@@ -27,6 +27,8 @@
27
27
  max_workers = integer(default=0) # Now defunct. Preserved for backward
28
28
  # compatibility.
29
29
  row_block = integer(min=1, default=8)
30
+ blas_threads = integer(min=0, default=0)
31
+ openmp_threads = integer(min=0, default=0)
30
32
 
31
33
  [data]
32
34
  vs30file = file_type(default='')
@@ -142,8 +142,8 @@ def populate_config_options(ctx):
142
142
  Unpack processing/bias/outlier/grid/vs30 options from ctx.config
143
143
  onto ctx. Requires ctx.config to already be set.
144
144
 
145
- Mutates: ctx.row_block, ctx.apply_gafs,
146
- ctx.do_bias, ctx.bias_max_range, ctx.bias_max_mag,
145
+ Mutates: ctx.row_block, ctx.blas_threads, ctx.openmp_threads,
146
+ ctx.apply_gafs, ctx.do_bias, ctx.bias_max_range, ctx.bias_max_mag,
147
147
  ctx.bias_max_dsigma, ctx.do_outliers,
148
148
  ctx.outlier_deviation_level, ctx.outlier_max_mag,
149
149
  ctx.outlier_valid_stations, ctx.imt_out_set, ctx.smdx,
@@ -159,6 +159,12 @@ def populate_config_options(ctx):
159
159
  # Must be >= 1 (validated at the config-schema level, not here).
160
160
  ctx.row_block = config["system"]["row_block"]
161
161
 
162
+ # Machine-specific native threading limits. A value of 0 means that
163
+ # ShakeMap should leave the corresponding runtime unrestricted.
164
+ # These values are validated by modelspec.conf.
165
+ ctx.blas_threads = config["system"]["blas_threads"]
166
+ ctx.openmp_threads = config["system"]["openmp_threads"]
167
+
162
168
  ctx.apply_gafs = config["modeling"]["apply_generic_amp_factors"]
163
169
 
164
170
  bias = config["modeling"]["bias"]
@@ -148,6 +148,13 @@ class ModelingContext:
148
148
  # deployment without a code change. Must be >= 1; no upper bound.
149
149
  row_block: int = None
150
150
 
151
+ # Machine-specific thread limits for numerical runtimes. A value of 0
152
+ # means "unrestricted": the model should not modify that runtime's native
153
+ # thread setting. Positive values are explicit limits, normally determined
154
+ # by sm_tune.
155
+ blas_threads: int = 0
156
+ openmp_threads: int = 0
157
+
151
158
  do_bias: bool = True
152
159
  bias_max_range: float = None
153
160
  bias_max_mag: float = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shakemap-modules
3
- Version: 1.2.0
3
+ Version: 1.2.1
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-Expression: CC0-1.0
@@ -29,12 +29,11 @@ Requires-Dist: openpyxl; extra == "dyfi"
29
29
  Requires-Dist: pandas>=2.0.2; extra == "dyfi"
30
30
  Provides-Extra: exception
31
31
  Provides-Extra: gridxml
32
- Requires-Dist: esi-core>=1.2.8; extra == "gridxml"
33
32
  Requires-Dist: mapio>=0.8.8; extra == "gridxml"
34
33
  Provides-Extra: history
35
34
  Provides-Extra: info
36
35
  Provides-Extra: kml
37
- Requires-Dist: esi-core>=1.2.8; extra == "kml"
36
+ Requires-Dist: esi-core>=1.2.9; extra == "kml"
38
37
  Requires-Dist: esi-utils-colors>=1.0.5; extra == "kml"
39
38
  Requires-Dist: mapio>=0.8.8; extra == "kml"
40
39
  Requires-Dist: fiona>=1.9.4.post1; extra == "kml"
@@ -54,11 +53,12 @@ Requires-Dist: matplotlib>=3.7.1; extra == "mapping"
54
53
  Requires-Dist: rasterio; extra == "mapping"
55
54
  Requires-Dist: scipy; extra == "mapping"
56
55
  Provides-Extra: model
57
- Requires-Dist: esi-core>=1.2.8; extra == "model"
56
+ Requires-Dist: esi-core>=1.2.9; extra == "model"
58
57
  Requires-Dist: mapio>=0.8.8; extra == "model"
59
58
  Requires-Dist: cartopy>=0.22.0; extra == "model"
60
59
  Requires-Dist: fiona>=1.9.4.post1; extra == "model"
61
60
  Requires-Dist: shapely; extra == "model"
61
+ Requires-Dist: threadpoolctl; extra == "model"
62
62
  Provides-Extra: plotregr
63
63
  Requires-Dist: matplotlib>=3.7.1; extra == "plotregr"
64
64
  Provides-Extra: raster
@@ -66,7 +66,7 @@ Requires-Dist: mapio>=0.8.8; extra == "raster"
66
66
  Provides-Extra: rupture
67
67
  Provides-Extra: save
68
68
  Provides-Extra: shape
69
- Requires-Dist: esi-core>=1.2.8; extra == "shape"
69
+ Requires-Dist: esi-core>=1.2.9; extra == "shape"
70
70
  Requires-Dist: esi-utils-colors>=1.0.5; extra == "shape"
71
71
  Requires-Dist: fiona>=1.9.4.post1; extra == "shape"
72
72
  Requires-Dist: scikit-image; extra == "shape"
@@ -45,7 +45,6 @@ pandas>=2.0.2
45
45
  [exception]
46
46
 
47
47
  [gridxml]
48
- esi-core>=1.2.8
49
48
  mapio>=0.8.8
50
49
 
51
50
  [history]
@@ -53,7 +52,7 @@ mapio>=0.8.8
53
52
  [info]
54
53
 
55
54
  [kml]
56
- esi-core>=1.2.8
55
+ esi-core>=1.2.9
57
56
  esi-utils-colors>=1.0.5
58
57
  mapio>=0.8.8
59
58
  fiona>=1.9.4.post1
@@ -75,11 +74,12 @@ rasterio
75
74
  scipy
76
75
 
77
76
  [model]
78
- esi-core>=1.2.8
77
+ esi-core>=1.2.9
79
78
  mapio>=0.8.8
80
79
  cartopy>=0.22.0
81
80
  fiona>=1.9.4.post1
82
81
  shapely
82
+ threadpoolctl
83
83
 
84
84
  [plotregr]
85
85
  matplotlib>=3.7.1
@@ -92,7 +92,7 @@ mapio>=0.8.8
92
92
  [save]
93
93
 
94
94
  [shape]
95
- esi-core>=1.2.8
95
+ esi-core>=1.2.9
96
96
  esi-utils-colors>=1.0.5
97
97
  fiona>=1.9.4.post1
98
98
  scikit-image
@@ -406,6 +406,8 @@
406
406
  "tests/station_data_test.py",
407
407
  "tests/station_json_test.py",
408
408
  "tests/storage_test.py",
409
+ "tests/test_model_threading.py",
410
+ "tests/test_modeling_config_threads.py",
409
411
  "tests/transfer_test.py",
410
412
  "tests/util_amps_test.py",
411
413
  "tests/util_config_test.py",
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "1.2.1",
3
+ "distance": 0,
4
+ "node": "ga1a2ba10097fb99ade9e463c5593c91690f3f1df",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-08-14"
8
+ }
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "1.2.0",
3
- "distance": 0,
4
- "node": "g21c6f8e311fea23387545ac910ca98ba4cc47950",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-08-10"
8
- }