Skip to content
Snippets Groups Projects
Commit a9959542 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

Merge branch 'main' into 'production'

Production Release | nshmp-haz

See merge request !611
parents 76e8c833 e59bf908
No related branches found
No related tags found
1 merge request!611Production Release | nshmp-haz
Pipeline #134691 passed
Showing
with 427 additions and 136 deletions
......@@ -25,5 +25,3 @@ libs
# Node
node_modules
package.json
package-lock.json
......@@ -14,6 +14,10 @@ stages:
- build
- trigger
default:
tags:
- nshmp
####
# Environment Templates
####
......@@ -93,17 +97,23 @@ stages:
for arg in ${DOCKER_BUILD_ARGS}; do
BUILD_ARGS="${BUILD_ARGS} --build-arg ${arg}";
done
- env_image_name="${REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest";
- latest_image_name="${REGISTRY_IMAGE}/${CI_PROJECT_NAME}:latest";
- sha_image_name="${REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}";
- |
docker build \
${BUILD_ARGS} \
--pull \
--tag "${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}" \
--tag "${latest_image_name}" \
--file "${CI_PROJECT_DIR}/${DOCKERFILE}" \
"${CI_PROJECT_DIR}/.";
- docker push "${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}";
- latest_image_name="${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${ENVIRONMENT}-latest";
- docker tag "${CODE_REGISTRY_IMAGE}/${CI_PROJECT_NAME}:${IMAGE_TAG}" "${latest_image_name}";
- docker push "${latest_image_name}";
- |
docker tag "${latest_image_name}" "${env_image_name}";
docker push "${env_image_name}";
- |
docker tag "${latest_image_name}" "${sha_image_name}";
docker push "${sha_image_name}";
- |
printf "
--------
......@@ -112,13 +122,15 @@ stages:
" "${CI_PROJECT_NAME}" "${IMAGE_TAG}";
stage: build
tags:
- build
- ${TAG}
variables:
DOCKERFILE: Dockerfile
DOCKER_BUILD_ARGS: |
BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/centos:latest
FROM_IMAGE=${DEVOPS_REGISTRY}usgs/centos:latest
BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11
FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11
IMAGE_TAG: ${ENVIRONMENT}-${CI_COMMIT_SHORT_SHA}
REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE}
TAG: build
####
# Java Templates
......@@ -130,34 +142,55 @@ stages:
.java:
image: ${DEVOPS_REGISTRY}usgs/amazoncorretto:11
stage: build
tags:
- development
####
# Stage: build
####
Build Image Haz:
CHS Registry:
extends:
- .docker-build
parallel:
matrix:
-
CI_PROJECT_NAME: nshmp-haz
DOCKERFILE: Dockerfile
REGISTRY_IMAGE: ${CODE_REGISTRY_IMAGE}
TAG: build
-
CI_PROJECT_NAME: nshmp-haz-ws
DOCKERFILE: ws.Dockerfile
REGISTRY_IMAGE: ${CODE_REGISTRY_IMAGE}
TAG: build
variables:
CI_PROJECT_NAME: nshmp-haz
DOCKER_BUILD_ARGS: |
BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11
FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11
CI_JOB_TOKEN=${CI_JOB_TOKEN}
UPSTREAM_PATH: ghsc/nshmp/nshmp-haz
Build Image WS:
Container Registry:
before_script:
- docker login ${CI_REGISTRY} -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD}
extends:
- .docker-build
parallel:
matrix:
-
CI_PROJECT_NAME: nshmp-haz
DOCKERFILE: Dockerfile
REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE}
TAG: nshmp
-
CI_PROJECT_NAME: nshmp-haz-ws
DOCKERFILE: ws.Dockerfile
REGISTRY_IMAGE: ${CI_REGISTRY_IMAGE}
TAG: nshmp
variables:
CI_PROJECT_NAME: nshmp-haz-ws
DOCKER_BUILD_ARGS: |
BUILD_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11
FROM_IMAGE=${DEVOPS_REGISTRY}usgs/amazoncorretto:11
CI_JOB_TOKEN=${CI_JOB_TOKEN}
DOCKERFILE: ws.Dockerfile
UPSTREAM_PATH: ghsc/nshmp/nshmp-haz
Build Project:
......@@ -170,8 +203,15 @@ Markdown Lint:
extends:
- .java
script:
- ./gradlew nodeInstall
- ./gradlew markdownlint
allow_failure: true
YAML Lint:
extends:
- .java
script:
- ./gradlew nodeInstall
- ./gradlew yamllint
Unit Tests:
artifacts:
......@@ -192,7 +232,7 @@ Unit Tests:
Trigger nshmp-haz-ws CDK:
needs:
- Build Image WS
- CHS Registry
rules:
-
<<: *development-env
......
# nshmp-haz
U.S. Geological Survey ([USGS](https://www.usgs.gov)) National Seismic Hazard Model Project
([NSHMP](https://earthquake.usgs.gov/hazards/)) codes for performing probabilistic seismic
hazard (PSHA) and related analyses. These codes are intended for use with seismic hazard models
developed by the NSHMP for the U.S. and its territories. This project includes a variety of
command line applications and web service classes and relies on the
[*nshmp-lib*](https://code.usgs.gov/ghsc/nshmp/nshmp-lib) hazard library, among other
dependencies.
Please see the [docs](docs/README.md) for more information.
U.S. Geological Survey ([USGS][1]) National Seismic Hazard Model Project ([NSHMP][2]) codes for
performing probabilistic seismic hazard (PSHA) and related analyses. These codes are intended for
use with seismic hazard models developed by the NSHMP for the U.S. and its territories. This
project includes a variety of command line applications and web service classes and relies on the
[*nshmp-lib*][3] hazard library, among other dependencies.
Please see the [documentation](docs/README.md) for more information.
The current published version of the code is [2.0.0][4] with IPDS record: IP-139142.
**Suggested citation:** Powers, P.M., Clayton, B.S., and Altekruse, J.M., 2022, nshmp-haz:
National Seismic Hazard Model Project hazard applications and web services. U.S. Geological Survey
software release, doi: [10.5066/P9STF5GK][5].
[1]: https://www.usgs.gov
[2]: https://www.usgs.gov/programs/earthquake-hazards/hazards
[3]: https://code.usgs.gov/ghsc/nshmp/nshmp-lib
[4]: https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/2.0.0
[5]: https://doi.org/10.5066/P9STF5GK
......@@ -108,6 +108,7 @@ test {
useJUnitPlatform()
filter {
excludeTestsMatching "gov.usgs.earthquake.nshmp.model.NshmTestsLarge"
excludeTestsMatching "gov.usgs.earthquake.nshmp.model.NshmTestsConus"
excludeTestsMatching "gov.usgs.earthquake.nshmp.model.NshmTestsHawaii"
}
}
......@@ -24,6 +24,57 @@
"laborHours": 1200,
"tags": [
"Earthquake Hazards",
"Geologic Hazards Science Center",
"psha",
"nshmp-haz",
"seismic-hazard",
"seismic-source",
"earthquake-hazard",
"earthquake-source",
"hazard-curve",
"disaggregation"
],
"languages": [
"Java"
],
"contact": {
"name": "Peter Powers",
"email": "pmpowers@usgs.gov"
},
"date": {
"metadataLastUpdated": "2022-04-05"
}
},
{
"name": "nshmp-haz",
"organization": "U.S. Geological Survey",
"description": "NSHMP command line applications and web services",
"version": "2.0.0",
"status": "Production",
"permissions": {
"usageType": "openSource",
"licenses": [
{
"name": "Public Domain, CC0-1.0",
"URL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/raw/2.0.0/LICENSE.md"
}
]
},
"homepageURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz/",
"downloadURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/archive/2.0.0/nshmp-haz-2.0.0.zip",
"disclaimerURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/raw/2.0.0/DISCLAIMER.md",
"repositoryURL": "https://code.usgs.gov/ghsc/nshmp/nshmp-haz.git",
"vcs": "git",
"laborHours": 1200,
"tags": [
"Earthquake Hazards",
"Geologic Hazards Science Center",
......@@ -48,7 +99,7 @@
},
"date": {
"metadataLastUpdated": "2021-10-20"
"metadataLastUpdated": "2022-01-11"
}
}
]
......@@ -19,6 +19,7 @@ use *nshmp-haz* as well as underlying model implementation details.
* [Calculation Configuration](./pages/Calculation-Configuration.md)
* [Site Specification](./pages/Site-Specification.md)
* [Examples](../../etc/examples)
* [Web Services](./pages/Web-Services.md)
* [Hazard Model](./pages/Hazard-Model.md)
* [Model Structure](./pages/Model-Structure.md)
* [Model Files](./pages/Model-Files.md)
......
......@@ -8,6 +8,7 @@
* [Site Specification](./Site-Specification.md#site-specification)
* [Examples](../../etc/examples) (or
[on GitLab](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main/etc/examples))
* [Web Services](./Web-Services.md)
## Build & Run Options
......@@ -73,10 +74,11 @@ files. Disaggregations also have some independent
## Run with [Docker](https://docs.docker.com/install/)
nshmp-haz is available as a [public image](https://hub.docker.com/repository/docker/usgs/nshmp-haz)
nshmp-haz is available as a public image from the
[container registry](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry)
with tags:
* `development-latest`: Developer forks
* `latest`: Refers to the latest updates from the main or production branch
* `staging-latest`: Latest updates associated with the
[main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch
* `production-latest`: Latest stable release associated with the
......@@ -106,11 +108,16 @@ to a minimum of 4 GB.
### Run nshmp-haz in Docker
The *nshmp-haz* application may be run as a Docker container which mitigates the need to install
Git, Java, or other dependencies besides Docker. A public image is available on
Docker hub at [https://hub.docker.com/r/usgs/nshmp-haz](https://hub.docker.com/r/usgs/nshmp-haz)
Git, Java, or other dependencies besides Docker. A public image is available
from this repository's
[container registry](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry).
which can be run with:
```bash
# Pull docker image
docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest
# Run docker image
docker run \
--env CLASS_NAME=<DisaggCalc | HazardCalc | RateCalc> \
--env IML=<NUMBER> \
......@@ -118,7 +125,7 @@ docker run \
--volume /absolute/path/to/sites/file:/app/sites.<geojson | csv> \
--volume /absolute/path/to/config/file:/app/config.json \
--volume /absolute/path/to/output:/app/output \
usgs/nshmp-haz
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws
```
Where:
......@@ -151,7 +158,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git
# Pull image
docker pull usgs/nshmp-haz:production-latest
docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest
# Run nshmp-haz HazardCalc
docker run \
......@@ -159,7 +166,7 @@ docker run \
--volume "$(pwd)/nshm-hawaii:/app/model" \
--volume "$(pwd)/sites.geojson" \
--volume "$(pwd)/hawaii-hazard-output:/app/output" \
usgs/nshmp-haz:production-latest
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz
```
#### [`DisaggCalc`](../../src/main/java/gov/usgs/earthquake/nshmp/DisaggCalc.java) Example
......@@ -173,7 +180,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git
# Pull image
docker pull usgs/nshmp-haz:production-latest
docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest
# Run nshmp-haz DisaggCalc
docker run \
......@@ -182,7 +189,7 @@ docker run \
--volume "$(pwd)/nshm-hawaii:/app/model" \
--volume "$(pwd)/sites.geojson" \
--volume "$(pwd)/hawaii-disagg-output:/app/output" \
usgs/nshmp-haz:production-latest
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest
```
#### [`RateCalc`](../../src/main/java/gov/usgs/earthquake/nshmp/RateCalc.java) Example
......@@ -196,7 +203,7 @@ assumption a GeoJSON [site](./Site-Specification.md) file exists named `sites.ge
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii.git
# Pull image
docker pull usgs/nshmp-haz:production-latest
docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz:latest
# Run nshmp-haz RateCalc
docker run \
......@@ -204,7 +211,7 @@ docker run \
--volume "$(pwd)/nshm-hawaii:/app/model" \
--volume "$(pwd)/sites.geojson" \
--volume "$(pwd)/hawaii-rate-output:/app/output" \
usgs/nshmp-haz:production-latest
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz
```
### Run Customization
......@@ -216,13 +223,13 @@ be set with the environment flag (-e, -env):
docker run \
--env JAVA_MEMORY=<MEMORY> \
...
usgs/nshmp-haz
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz
# Example
docker run \
--env JAVA_MEMORY="12g" \
...
usgs/nshmp-haz
code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz
```
Where:
......
......@@ -106,7 +106,7 @@ T ≤ 10 s | 0.000333, 0.000499, 0.000749, 0.00112, 0.00169, 0.00253, <br>0.00
* [Site Specification](./Site-Specification.md#site-specification)
* [Examples](../../etc/examples) (or
[on GitLab](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main/etc/examples))
* [**Documentation Index**](../README.md)
* [__Documentation Index__](../README.md)
---
![USGS logo](./images/usgs-icon.png) &nbsp;[U.S. Geological Survey](https://www.usgs.gov)
......
......@@ -119,10 +119,10 @@ foreach IMT {
Break the traditional PSHA formulation down into discrete steps and preserve the data associated
with each step:
* **[1]** Source & Site parameterization
* **[2]** Ground motion calculation (mean and standard deviation only)
* **[3]** Exceedance curve calculation (per source)
* **[4]** Recombine
* __[1]__ Source & Site parameterization
* __[2]__ Ground motion calculation (mean and standard deviation only)
* __[3]__ Exceedance curve calculation (per source)
* __[4]__ Recombine
Whereas the traditional pipeline looks something like this:
......@@ -132,9 +132,9 @@ The functional pipeline can be processed stepwise:
![image](images/psha-functional.png "PSHA functional pipeline")
**Need a disaggregation?** Revisit and parse the results of steps 1 and 2
__Need a disaggregation?__ Revisit and parse the results of steps 1 and 2
**Need a response spectra?** Spawn more calculations, one for each IMT, at step 2.
__Need a response spectra?__ Spawn more calculations, one for each IMT, at step 2.
## Benefits
......@@ -161,7 +161,7 @@ The functional pipeline can be processed stepwise:
---
[**Documentation Index**](../README.md)
[__Documentation Index__](../README.md)
---
![USGS logo](./images/usgs-icon.png) &nbsp;[U.S. Geological Survey](https://www.usgs.gov)
......
......@@ -44,7 +44,7 @@ The following sample `gmm-config.json` file applies the NGA-West 2 epistemic unc
## GMM Uncertainty Models
*nshmp-haz* supports additional epistemic uncertainty models derived from the PEER NGA-West 1
_nshmp-haz_ supports additional epistemic uncertainty models derived from the PEER NGA-West 1
and PEER NGA-West 2 projects. These models both have factors for distance (`Rrup`) bins
Rrup < 10 km, 10 km <= Rrup, < 30 km, and 30 km <= Rrup, and for magnitude bins M < 6.0, 6.0 <=
M < 7.0, and 7.0 <= M. These models can be applied within the `gmm-config.json` file as shown in
......@@ -52,7 +52,7 @@ the [GMM Uncertainty](#gmm-uncertainty) section above.
## GMMs By Tectonic Setting
GMMs available in *nshmp-haz* are tabulated by tectonic setting below. See the javadocs for the
GMMs available in _nshmp-haz_ are tabulated by tectonic setting below. See the javadocs for the
[GMM Package](https://earthquake.usgs.gov/nshmp/docs/nshmp-lib/gov/usgs/earthquake/nshmp/gmm/package-summary.html)
for implementation details of each GMM and comprehensive lists of GMM IDs.
......@@ -93,7 +93,7 @@ NGA-East<br>[Goulet et al., 2017](https://peer.berkeley.edu/sites/default/files/
[Shahjouei and Pezeshk, 2016](http://dx.doi.org/10.1785/0120140367) | NGA_EAST_SEED_SP16 | RotD50 | 3
**Other**
[Atkinson, 2008](http://dx.doi.org/10.1785/0120070199)<br>[Atkinson & Boore, 2011](http://dx.doi.org/10.1785/0120100270) | ATKINSON_08_PRIME | horizontal | 4
[Atkinson & Boore, 2006](http://dx.doi.org/10.1785/0120050245) | *AB_06_\*<br>140BAR\|200BAR<br>none\|_AB\|_J* | horizontal | 4
[Atkinson & Boore, 2006](http://dx.doi.org/10.1785/0120050245) | _AB\_06\_\*<br>140BAR\|200BAR<br>none\|\_AB\|\_J_ | horizontal | 4
[Atkinson & Boore, 2006](http://dx.doi.org/10.1785/0120050245)<br>[Atkinson & Boore, 2011](http://dx.doi.org/10.1785/0120100270) | AB_06_PRIME | horizontal | 4
[Campbell, 2003](http://dx.doi.org/10.1785/0120020002) | CAMPBELL_03<br>CAMPBELL_03_AB<br>CAMPBELL_03_J | Geometric mean | 4
[Frankel et al., 1996](https://pubs.usgs.gov/of/1996/532/) | FRANKEL_96<br>FRANKEL_96_AB<br>FRANKEL_96_J | not specified | 4
......@@ -112,24 +112,24 @@ for individual NGA-East component model IDs
### Subduction GMMs
*Note: See the [GMM javadocs](https://earthquake.usgs.gov/nshmp/docs/nshmp-lib/gov/usgs/earthquake/nshmp/gmm/Gmm.html)
for a comprehensive list of GMM IDs.*
_Note: See the [GMM javadocs](https://earthquake.usgs.gov/nshmp/docs/nshmp-lib/gov/usgs/earthquake/nshmp/gmm/Gmm.html)
for a comprehensive list of GMM IDs._
Reference | ID | Component | Notes
:---------|:---|:----------|:------:
**NGA-Subduction**
[Abrahamson & Gülerce, 2020](https://peer.berkeley.edu/sites/default/files/2020_25.pdf) | *AG_20_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|_BASIN* | RotD50
[Kuehn et al., 2020](https://peer.berkeley.edu/sites/default/files/2020_04_kuehn_final.pdf) | *KBCG_20_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|_BASIN* | RotD50
[Parker et al., 2020](https://peer.berkeley.edu/sites/default/files/2020_03_parker_final.pdf) | *PSHAB_20_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|_BASIN* | RotD50
[Abrahamson & Gülerce, 2020](https://peer.berkeley.edu/sites/default/files/2020_25.pdf) | _AG\_20\_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|\_BASIN_ | RotD50
[Kuehn et al., 2020](https://peer.berkeley.edu/sites/default/files/2020_04_kuehn_final.pdf) | _KBCG\_20\_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|\_BASIN_ | RotD50
[Parker et al., 2020](https://peer.berkeley.edu/sites/default/files/2020_03_parker_final.pdf) | _PSHAB\_20\_\*<br>GLOBAL\|CASCADIA\|ALASKA<br>INTERFACE\|SLAB<br>no basin\|\_BASIN_ | RotD50
**Other**
[Atkinson & Boore, 2003](http://dx.doi.org/10.1785/0120020156) | *AB_03\*<br>GLOBAL\|CASCADIA<br>INTERFACE\|SLAB<br>none\|_LOW_SAT*| horizontal |
[Atkinson & Boore, 2003](http://dx.doi.org/10.1785/0120020156) | _AB\_03\*<br>GLOBAL\|CASCADIA<br>INTERFACE\|SLAB<br>none\|\_LOW_SAT_| horizontal |
[Atkinson & Macias, 2009](http://dx.doi.org/10.1785/0120080147) | AM_09_INTERFACE<br>AM_09_INTERFACE_BASIN | Geometric mean | 1
BC Hydro<br>[Abrahamson et al., 2016](http://dx.doi.org/10.1193/051712EQS188MR) | *BCHYDRO_12_\*<br>INTERFACE\|SLAB<br>none\|_BASIN<br>none\|_BACKARC* | Geometric mean |
BC Hydro NGA<br>[Abrahamson et al., 2018](https://peer.berkeley.edu/sites/default/files/2018_02_abrahamson_9.10.18.pdf)² | *BCHYDRO_18_NGA_\*<br>INTERFACE\|SLAB<br>none\|_NO_EPI* | Geometric mean | 3
BC Hydro<br>[Abrahamson et al., 2016](http://dx.doi.org/10.1193/051712EQS188MR) | _BCHYDRO\_12\_\*<br>INTERFACE\|SLAB<br>none\|\_BASIN<br>none\|\_BACKARC_ | Geometric mean |
BC Hydro NGA<br>[Abrahamson et al., 2018](https://peer.berkeley.edu/sites/default/files/2018_02_abrahamson_9.10.18.pdf)² | _BCHYDRO\_18\_NGA\_\*<br>INTERFACE\|SLAB<br>none\|\_NO_EPI_ | Geometric mean | 3
[McVerry et al., 2000](http://doi.org/10.5459/BNZSEE.39.1.1-58) | MCVERRY_00_INTERFACE<br>MCVERRY_00_SLAB<br>MCVERRY_00_VOLCANIC | Max-horizontal,<br>also supports geometric mean | 4
[Youngs et al., 1997](http://dx.doi.org/10.1785/gssrl.68.1.58) | YOUNGS_97_INTERFACE<br>YOUNGS_97_SLAB | Geometric mean |
[Zhao et al., 2006](http://dx.doi.org/10.1785/0120050122) | *ZHAO_06_\*<br>INTERFACE\|SLAB<br>none\|_BASIN* | Geometric mean |
[Zhao et al., 2016](http://dx.doi.org/10.1785/0120150034)<br>[Zhao et al., 2016](http://dx.doi.org/10.1785/0120150056) | ZHAO_16_INTERFACE<br>ZHAO_16_SLAB<br>*ZHAO_16_UPPER_MANTLE* | Geometric mean<br>(random orientation) | 5
[Zhao et al., 2006](http://dx.doi.org/10.1785/0120050122) | _ZHAO\_06\_\*<br>INTERFACE\|SLAB<br>none\|\_BASIN_ | Geometric mean |
[Zhao et al., 2016](http://dx.doi.org/10.1785/0120150034)<br>[Zhao et al., 2016](http://dx.doi.org/10.1785/0120150056) | ZHAO_16_INTERFACE<br>ZHAO_16_SLAB<br>_ZHAO_16_UPPER_MANTLE_ | Geometric mean<br>(random orientation) | 5
¹ Interface only
² Likely to be superseded by the final EQ Spectra paper
......
......@@ -3,7 +3,7 @@
The following page details the logic trees of epistemic uncertainty considered in NSHMs supported
by *nshmp-haz*. Logic trees are represented in a NSHM using files ending in `-tree.json`.
[[_TOC_]]
[[*TOC*]]
## Terminology
......@@ -15,34 +15,34 @@ alternative models.
| Description | 2008 | 2014 | 2018 |
|:----------- |:----- |:---- |:---- |
| CEUS | __0.1__ : AB_06 (140 bar)<br>__0.1__ : AB_06 (200 bar)<br>__0.1__ : CAMPBELL_03<br>__0.1__ : FRANKEL_96<br>__0.1__ : SILVA_02<br>__0.2__ : SOMERVILLE_01<br>__0.2__ : TORO_97<br>__0.1__ : TP_05 | __0.22__ : AB_06'<br>__0.08__ : ATKINSON_08'<br>__0.11__ : CAMPBELL_03<br>__0.06__ : FRANKEL_96<br>__0.15__ : PEZESHK_11<br>__0.06__ : SILVA_02<br>__0.10__ : SOMERVILLE_01<br>__0.11__ : TORO_97<br>__0.11__ : TP_05 | __0.667__ : NGA_EAST_USGS (17)<br>__0.333__ : NGA_EAST_SEEDS (14)<br>(common aleatory variability) |
| Sigma Epistemic | _(none)_ | _(no change)_ | __0.2__ : USGS Panel<br>__0.8__ : EPRI |
| Site Aleatory | _(none)_ | _(no change)_ | __0.185, 0.63, 0.185__ : Site ± σ |
| CEUS | **0.1** : AB_06 (140 bar)<br>**0.1** : AB_06 (200 bar)<br>**0.1** : CAMPBELL_03<br>**0.1** : FRANKEL_96<br>**0.1** : SILVA_02<br>**0.2** : SOMERVILLE_01<br>**0.2** : TORO_97<br>**0.1** : TP_05 | **0.22** : AB_06'<br>**0.08** : ATKINSON_08'<br>**0.11** : CAMPBELL_03<br>**0.06** : FRANKEL_96<br>**0.15** : PEZESHK_11<br>**0.06** : SILVA_02<br>**0.10** : SOMERVILLE_01<br>**0.11** : TORO_97<br>**0.11** : TP_05 | **0.667** : NGA_EAST_USGS (17)<br>**0.333** : NGA_EAST_SEEDS (14)<br>(common aleatory variability) |
| Sigma Epistemic | *(none)* | *(no change)* | **0.2** : USGS Panel<br>**0.8** : EPRI |
| Site Aleatory | *(none)* | *(no change)* | **0.185, 0.63, 0.185** : Site ± σ |
## Active Crustal Ground Motion Models
| Description | 2008 | 2014 | 2018 |
|:----------- |:----- |:---- |:---- |
| WUS | __0.3333__ : BA_08<br>__0.3333__ : CB_08<br>__0.3334__ : CY_08 | __0.22__ : ASK_14<br>__0.22__ : BSSA_14<br>__0.22__ : CB_14<br>__0.22__ : CY_14<br>__0.22__ : IDRISS_14 | __0.25__ : ASK_14<br>__0.25__ : BSSA_14<br>__0.25__ : CB_14<br>__0.25__ : CY_14 |
| Mean Epistemic | NGA-West1 (M,R)<br>__0.185__ : epi+<br>__0.630__ : off<br>__0.185__ : epi- | NGA-West2 (M,R)<br>__0.185__ : epi+<br>__0.630__ : off<br>__0.185__ : epi- | _(no change)_ |
| WUS | **0.3333** : BA_08<br>**0.3333** : CB_08<br>**0.3334** : CY_08 | **0.22** : ASK_14<br>**0.22** : BSSA_14<br>**0.22** : CB_14<br>**0.22** : CY_14<br>**0.22** : IDRISS_14 | **0.25** : ASK_14<br>**0.25** : BSSA_14<br>**0.25** : CB_14<br>**0.25** : CY_14 |
| Mean Epistemic | NGA-West1 (M,R)<br>**0.185** : epi+<br>**0.630** : off<br>**0.185** : epi- | NGA-West2 (M,R)<br>**0.185** : epi+<br>**0.630** : off<br>**0.185** : epi- | *(no change)* |
## Subduction Ground Motion Models
| Description | 2008 | 2014 | 2018 |
|:----------- |:----- |:---- |:---- |
| Cascadia<br>(interface) | __0.25__ : AB_03 (global)<br>__0.25__ : YOUNGS_97<br>__0.50__ : ZHAO_06 | __0.1__ : AB_03 (global)<br>__0.3__ : AM_09<br>__0.3__ : BCHYDRO_12<br>__0.3__ : ZHAO_06 | __0.3333__ : AM_09<br>__0.3334__ : BCHYDRO_12<br>__0.3333__ : ZHAO_06 |
| Cascadia<br>(slab) | __0.25__ : AB_03 (global)<br>__0.25__ : AB_03 (cascadia)<br>__0.50__ : YOUNGS_97 | __0.1665__ : AB_03 (global, mod)<br>__0.1665__ : AB_03 (cascadia, mod)<br>__0.3330__ : BCHYDRO_12<br>__0.3340__ : ZHAO_06 | __0.5__ : BCHYDRO_12<br>__0.5__ : ZHAO_06 |
| Cascadia<br>(interface) | **0.25** : AB_03 (global)<br>**0.25** : YOUNGS_97<br>**0.50** : ZHAO_06 | **0.1** : AB_03 (global)<br>**0.3** : AM_09<br>**0.3** : BCHYDRO_12<br>**0.3** : ZHAO_06 | **0.3333** : AM_09<br>**0.3334** : BCHYDRO_12<br>**0.3333** : ZHAO_06 |
| Cascadia<br>(slab) | **0.25** : AB_03 (global)<br>**0.25** : AB_03 (cascadia)<br>**0.50** : YOUNGS_97 | **0.1665** : AB_03 (global, mod)<br>**0.1665** : AB_03 (cascadia, mod)<br>**0.3330** : BCHYDRO_12<br>**0.3340** : ZHAO_06 | **0.5** : BCHYDRO_12<br>**0.5** : ZHAO_06 |
## Fault Source Model (CEUS)
| Model | Description | 2008 | 2014 | 2018 |
|:----- |:----------- |:---- |:---- |:---- |
| Deformation | | __1.0__ : GEO | __0.1__ : BIRD<br>__0.8__ : GEO<br>__0.1__ : ZENG | _(no change)_ |
| Rupture | | __0.5__ : Full<br> __0.5__ : Partial | _(no change)_ | _(no change)_ |
| Magnitude Scaling | | __1.0__ : Somerville-01 (area) | _(no change)_ | _(no change)_ |
| Maximum M¹ | Partial: epistemic | __0.2, 0.6, 0.2__ : M ± 0.2 | _(no change)_ | _(no change)_ |
| | Full : epistemic | __0.2, 0.6, 0.2__ : M ± 0.2 | _(no change)_ | _(no change)_ |
| | Full : aleatory | M ± 0.24 (±2σ normal PDF) | _(no change)_ | _(no change)_ |
| Deformation | | **1.0** : GEO | **0.1** : BIRD<br>**0.8** : GEO<br>**0.1** : ZENG | *(no change)* |
| Rupture | | **0.5** : Full<br> **0.5** : Partial | *(no change)* | *(no change)* |
| Magnitude Scaling | | **1.0** : Somerville-01 (area) | *(no change)* | *(no change)* |
| Maximum M¹ | Partial: epistemic | **0.2, 0.6, 0.2** : M ± 0.2 | *(no change)* | *(no change)* |
| | Full : epistemic | **0.2, 0.6, 0.2** : M ± 0.2 | *(no change)* | *(no change)* |
| | Full : aleatory | M ± 0.24 (±2σ normal PDF) | *(no change)* | *(no change)* |
¹ There are a very limited number of fault sources in CEUS
......@@ -50,59 +50,59 @@ alternative models.
| Model | Description | 2008 | 2014 | 2018 |
|:----- |:----------- |:---- |:---- |:---- |
| Deformation | | __1.0__ : GEO | __0.1__ : BIRD<br>__0.8__ : GEO<br>__0.1__ : ZENG | _(no change)_ |
| Rupture | Partial | __0.333__ : IMW, __0.5__ : PNW | _(no change)_ | _(no change)_ |
| | Full | __0.667__ : IMW, __0.5__ : PNW | _(no change)_ | _(no change)_ |
| Magnitude Scaling | | __1.0__ : WC_94 (length) | _(no change)_ | _(no change)_ |
| Maximum M | Partial: epistemic | __0.2, 0.6, 0.2__ : M ± 0.2 | _(no change)_ | _(no change)_ |
| | Full : epistemic | __0.2, 0.6, 0.2__ : M ± 0.2 | _(no change)_ | _(no change)_ |
| | Full : aleatory | M ± 0.24 (±2σ normal PDF) | _(no change)_ | _(no change)_ |
| Dip | Reverse & Strike-Slip | __1.0__ : assigned | _(no change)_ | _(no change)_ |
| | Normal | __0.2, 0.6, 0.2__ : 50 ± 10° | __0.2, 0.6, 0.2__ : 50±15° | _(no change)_ |
| Deformation | | **1.0** : GEO | **0.1** : BIRD<br>**0.8** : GEO<br>**0.1** : ZENG | *(no change)* |
| Rupture | Partial | **0.333** : IMW, **0.5** : PNW | *(no change)* | *(no change)* |
| | Full | **0.667** : IMW, **0.5** : PNW | *(no change)* | *(no change)* |
| Magnitude Scaling | | **1.0** : WC_94 (length) | *(no change)* | *(no change)* |
| Maximum M | Partial: epistemic | **0.2, 0.6, 0.2** : M ± 0.2 | *(no change)* | *(no change)* |
| | Full : epistemic | **0.2, 0.6, 0.2** : M ± 0.2 | *(no change)* | *(no change)* |
| | Full : aleatory | M ± 0.24 (±2σ normal PDF) | *(no change)* | *(no change)* |
| Dip | Reverse & Strike-Slip | **1.0** : assigned | *(no change)* | *(no change)* |
| | Normal | **0.2, 0.6, 0.2** : 50 ± 10° | **0.2, 0.6, 0.2** : 50±15° | *(no change)* |
## Grid Source Model
| Model | Description | 2008 | 2014 | 2018 |
|:----- |:----------- |:---- |:---- |:---- |
| Maximum M | WUS (exceptions) | __1.0__ : 7.0 | __0.9__ : 7.5 (truncated)<br>__0.1__ : 8.0 (tapered) | _(no change)_ |
| | CEUS (craton) | __0.1__ : 6.6<br>__0.2__ : 6.8<br>__0.5__ : 7.0<br>__0.2__ : 7.2 | __0.2__ : 6.5<br>__0.5__ : 7.0<br>__0.2__ : 7.5<br>__0.1__ : 8.0 | _(no change)_ |
| Smoothing | | __1.0__ : Fixed |__0.4__ : Adaptive<br>__0.6__ : Fixed | _(no change)_ |
| Magnitude Scaling | CEUS & WUS | __1.0__ : WC_94 (length) | _(no change)_ | _(no change)_ |
| Focal Mechanisms | Spatially Varying | __1.0__ : assigned | _(no change)_ | _(no change)_ |
| Depth (zTor) | WUS, M < 6.5 | __1.0__ : 5.0 km | _(no change)_ | _(no change)_ |
| | WUS, M ≥ 6.5 | __1.0__ : 1.0 km | _(no change)_ | _(no change)_ |
| | CEUS, All M | __1.0__ : 5.0 km | _(no change)_ | _(no change)_ |
| Maximum M | WUS (exceptions) | **1.0** : 7.0 | **0.9** : 7.5 (truncated)<br>**0.1** : 8.0 (tapered) | *(no change)* |
| | CEUS (craton) | **0.1** : 6.6<br>**0.2** : 6.8<br>**0.5** : 7.0<br>**0.2** : 7.2 | **0.2** : 6.5<br>**0.5** : 7.0<br>**0.2** : 7.5<br>**0.1** : 8.0 | *(no change)* |
| Smoothing | | **1.0** : Fixed |**0.4** : Adaptive<br>**0.6** : Fixed | *(no change)* |
| Magnitude Scaling | CEUS & WUS | **1.0** : WC_94 (length) | *(no change)* | *(no change)* |
| Focal Mechanisms | Spatially Varying | **1.0** : assigned | *(no change)* | *(no change)* |
| Depth (zTor) | WUS, M < 6.5 | **1.0** : 5.0 km | *(no change)* | *(no change)* |
| | WUS, M ≥ 6.5 | **1.0** : 1.0 km | *(no change)* | *(no change)* |
| | CEUS, All M | **1.0** : 5.0 km | *(no change)* | *(no change)* |
## Fault Source Model (CA, UCERF3)
| Model | 2014 | 2018 |
|:----- |:---- |:---- |
| Fault | __0.5__ : FM3.1<br> __0.5__ : FM3.2 | _(no change)_ |
| Deformation | __0.1__ : ABM<br>__0.3__ : BIRD<br>__0.3__ : GEO<br>__0.3__ : ZENG | _(no change)_ |
| Scaling Relationship<br>(mag-area & slip-length)| __0.2__ : ELLS_B<br>__0.2__ : ELLS_B (sqrt-L)<br>__0.2__ : HB_08<br>__0.2__ : SHAW_09<br>__0.2__ : SHAW_09 (csd) | _(no change)_ |
| Slip Distribution | __0.5__ : Tapered<br>__0.5__ : Boxcar | _(no change)_ |
| M ≥ 5 rate (yr⁻¹) | __0.1__ : 6.5<br>__0.6__ : 7.9<br>__0.3__ : 9.6 | _(no change)_ |
| Inversion Constraint | __1.0__ : UCERF2 (CH) | _(no change)_ |
| Fault Mo Rate | __1.0__ : off | _(no change)_ |
| Fault | **0.5** : FM3.1<br> **0.5** : FM3.2 | *(no change)* |
| Deformation | **0.1** : ABM<br>**0.3** : BIRD<br>**0.3** : GEO<br>**0.3** : ZENG | *(no change)* |
| Scaling Relationship<br>(mag-area & slip-length)| **0.2** : ELLS_B<br>**0.2** : ELLS_B (sqrt-L)<br>**0.2** : HB_08<br>**0.2** : SHAW_09<br>**0.2** : SHAW_09 (csd) | *(no change)* |
| Slip Distribution | **0.5** : Tapered<br>**0.5** : Boxcar | *(no change)* |
| M ≥ 5 rate (yr⁻¹) | **0.1** : 6.5<br>**0.6** : 7.9<br>**0.3** : 9.6 | *(no change)* |
| Inversion Constraint | **1.0** : UCERF2 (CH) | *(no change)* |
| Fault Mo Rate | **1.0** : off | *(no change)* |
## Grid Source Model (CA, UCERF3)
| Model | 2014 | 2018 |
|:----- |:---- |:---- |
| Grid: Maximum M | __0.1__ : 7.3<br>__0.8__ : 7.6<br>__0.1__ : 7.9 | _(no change)_ |
| Grid: Smoothing | __0.5__ : Adaptive<br>__0.5__ : Fixed | _(no change)_ |
| Grid: Focal Mechanisms | __1.0__ : assigned | _(no change)_ |
| Magnitude Scaling | __1.0__ : WC_94 (length) | _(no change)_ |
| Grid: Maximum M | **0.1** : 7.3<br>**0.8** : 7.6<br>**0.1** : 7.9 | *(no change)* |
| Grid: Smoothing | **0.5** : Adaptive<br>**0.5** : Fixed | *(no change)* |
| Grid: Focal Mechanisms | **1.0** : assigned | *(no change)* |
| Magnitude Scaling | **1.0** : WC_94 (length) | *(no change)* |
## Subduction seismic source model
| Model | 2008 | 2014 | 2018 |
|:----- |:---- |:---- |:---- |
| Rupture | __0.67__ : Full<br>__0.33__ : Partial | __1.0__ : Full<br>__0.5__ : Partial (segmented)<br>__0.5__ : Partial (unsegmented) | _(no change)_ |
| Magnitude Scaling | __1.0__ : Youngs et al. (length) | __0.334__ : Strasser et al. (2010)<br>__0.333__ : Murotani et al. (2008)<br>__0.333__ : Papazachos et al. (2004) | _(no change)_ |
| Magnitude Uncertainty | __0.2, 0.6, 0.2__ : M±0.2 | _(none)_ | _(no change)_ |
| Depth | __0.5__ : Base<br>__0.2__ : Bottom<br>__0.2__ : Middle<br>__0.1__ : Top | __0.3__ : Bottom<br>__0.5__ : Middle<br>__0.2__ : Top | _(no change)_ |
| Slab: Maximum M | __1.0__ : 7.2 | __0.9__ : 7.5<br>__0.1__ : 8.0 | _(no change)_ |
| Rupture | **0.67** : Full<br>**0.33** : Partial | **1.0** : Full<br>**0.5** : Partial (segmented)<br>**0.5** : Partial (unsegmented) | *(no change)* |
| Magnitude Scaling | **1.0** : Youngs et al. (length) | **0.334** : Strasser et al. (2010)<br>**0.333** : Murotani et al. (2008)<br>**0.333** : Papazachos et al. (2004) | *(no change)* |
| Magnitude Uncertainty | **0.2, 0.6, 0.2** : M±0.2 | *(none)* | *(no change)* |
| Depth | **0.5** : Base<br>**0.2** : Bottom<br>**0.2** : Middle<br>**0.1** : Top | **0.3** : Bottom<br>**0.5** : Middle<br>**0.2** : Top | *(no change)* |
| Slab: Maximum M | **1.0** : 7.2 | **0.9** : 7.5<br>**0.1** : 8.0 | *(no change)* |
* Full: a.k.a. 'characteristic'
* Partial: a.k.a. 'Gutenberg-Richter' or 'floating'
......
......@@ -99,7 +99,7 @@ one of the dynamic editions is likely better.
* [Model Editions](./Model-Editions.md#model-editions)
* [Logic Trees & Uncertainty](./Logic-Trees-&-Uncertainty.md#logic-trees-&-uncertainty)
* [Code Versions](./Code-Versions.md#code-versions)
* [**Documentation Index**](../README.md)
* [__Documentation Index__](../README.md)
---
![USGS logo](./images/usgs-icon.png) &nbsp;[U.S. Geological Survey](https://www.usgs.gov)
......
......@@ -139,9 +139,9 @@ See also: [Grid Source Type](./Source-Types.md#grid-sources)
Zone sources specify a single rate that is distributed over a GeoJSON `Polygon` using point source
rupture models. Presently, there is a 1:1 mapping of source zones to their associated rate files.
*__Note:__ The rate file approach will be discouraged and/or deprecated in the near future in favor
_**Note:** The rate file approach will be discouraged and/or deprecated in the near future in favor
of dynamically computing rates over a zone from a single value or `rate-tree.json` when the loading
a model.*
a model._
```text
zone/
......
......@@ -107,7 +107,7 @@ outside the 'calculation' polygon are set to zero. For an example, see the
* [Site Specification](./Site-Specification.md#site-specification)
* [Examples](../../etc/examples) (or
[on GitLab](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main/etc/examples))
* [**Documentation Index**](../README.md)
* [__Documentation Index__](../README.md)
---
![USGS logo](./images/usgs-icon.png) &nbsp;[U.S. Geological Survey](https://www.usgs.gov)
......
......@@ -12,15 +12,15 @@ geometry itself is unknown or very poorly defined.
[[_TOC_]]
Source models for use with *nshmp-haz* are defined using [JSON](https://www.json.org) and
[GeoJSON](https://geojson.org). *nshmp-haz* makes determinations about how to represent a source
Source models for use with _nshmp-haz_ are defined using [JSON](https://www.json.org) and
[GeoJSON](https://geojson.org). _nshmp-haz_ makes determinations about how to represent a source
based on a GeoJSON geometry type in conjunction with supporting JSON configuration files. Example
source configuration files, `*-config.json`, are provided with each source type description.
Configuration files must be fully specified with `null` JSON member values used to specify 'do
nothing' where appropriate. Any configuration member value in ALL_CAPS indicates the value is one
of a fixed number of options commonly referred to as an enum.
__Note on Coordinates:__ *nshmp-haz* supports longitude and latitude values in the closed ranges
__Note on Coordinates:__ _nshmp-haz_ supports longitude and latitude values in the closed ranges
`[-360°‥360°]` and `[-90°‥90°]`. Note, however, that mixing site and/or source coordinates across
the antimeridian (the -180° to 180° transition) will yield unexpected results. For Pacific models
and calculations, always use positive or negative longitudes exclusively.
......@@ -43,7 +43,7 @@ Grid sources are represented in a model using a logic tree with a `rupture-sets.
ruptures on each branch. Because gridded seismicity models may be governed by regionally
varying MFD properties (e.g. `mMax`), rupture sets for grids are defined in a JSON array.
**rupture-sets.json**: Defines an array of one or more rupture sets. Multiple rupture sets are
__rupture-sets.json__: Defines an array of one or more rupture sets. Multiple rupture sets are
used to model regional differences in MFD properties such as maximum magnitude. The `feature`
member points to the ID of a geojson feature (in the `grid-sources/features` directory) that
defines the bounds of the gridded seismicity source. A grid rupture set `mfd-tree` is never
......@@ -62,7 +62,7 @@ defined inline and always points to a tree in a
]
```
**grid-config.json**: A `grid-depth-map` defines a mapping of magnitude ranges to logic trees of
__grid-config.json__: A `grid-depth-map` defines a mapping of magnitude ranges to logic trees of
depth distributions. The map can use arbitrary names as keys, but the magnitude ranges defined by
each member must be non-overlapping. The magnitude ranges are interpreted as closed (inclusive) –
open (exclusive), e.g. [mMin..mMax). `maxDepth` constrains the maximum depth of any pseudo fault
......@@ -104,7 +104,7 @@ to upper-right). While most gridded rate files contain columns of longitude, lat
some may contain depth values (intraslab sources), maximum magnitude caps, or other values. Scaled
spatial PDFs are the preferred approach to modeling regional rate variations, however it is also
possible to define explicit MFDs at each grid node. To do so, the `spatial-pdf` member
of a **rupture-sets.json** is replaced with `grid-mfds`. See
of a __rupture-sets.json__ is replaced with `grid-mfds`. See
`2018 CONUS NSHM > active-crust > grid-sources` for examples of both approaches.
## Zone Sources
......@@ -146,7 +146,7 @@ directly.
}
```
**zone-config.json:** Zone source model configuration is identical to a grid source configuration.
__zone-config.json:__ Zone source model configuration is identical to a grid source configuration.
```json
{
......@@ -182,7 +182,7 @@ they occur in multiple locations on the fault surface with appropriately scaled
associated with finite fault models may be explicitly defined or derived from slip rates.
Fault rupture rates may be modeled using explicitly defined MFDs or logic trees of slip rate.
**fault-source.geojson**: Defines the geometry and properties of a single source. In the example
__fault-source.geojson__: Defines the geometry and properties of a single source. In the example
below the presence of a `rate-map` property indicates MFDs should be constructed from the supplied
slip rates and using the weights defined in a `rate-tree.json`.
......@@ -229,7 +229,7 @@ slip rates and using the weights defined in a `rate-tree.json`.
}
```
**fault-config.json**: Controls the point spacing on a gridded surface used to realize the fault
__fault-config.json__: Controls the point spacing on a gridded surface used to realize the fault
geometry as well as define the models to use for magnitude scaling and rupture floating. Dip
variations and an associated slip-rate scaling model are also supported for normal faults.
......@@ -243,7 +243,7 @@ variations and an associated slip-rate scaling model are also supported for norm
}
```
**rupture-set.json**: When a fault source is represented with a logic tree a
__rupture-set.json__: When a fault source is represented with a logic tree a
`rupture-set.json` defines the ruptures for each branch. A rupture set _may_ also define custom
properties and _may_ also contain a `sections` member that defines the fault sections for the
rupture set (see note on fault section stitching, [below](#fault-section-stitching)).
......@@ -281,7 +281,7 @@ as the joint probability of exceeding ground motions from each independent event
a cluster may only have an mfd-tree composed of `Mfd.Type.SINGLE` MFDs and the mfd-trees must
match across all sources in a cluster (i.e. each mfd-tree has the same IDs and weights).
**cluster-set.json** A specialized type of rupture set, this file defines the array of fault
__cluster-set.json__ A specialized type of rupture set, this file defines the array of fault
rupture sets that make up a 'cluster'. As with fault sources, the nested rupture sets in a cluster
set _may_ define `properties` and `sections` members.
......@@ -317,10 +317,10 @@ U.S. Fault system source sets require three files: `rupture_set.json`, `sections
logic tree. Note that system sources _may_ have complementary gridded seismicity source models
with matching logic trees.
**rupture-set.json**: Provides identifying information for the ruptures defined in the adjacant
__rupture-set.json__: Provides identifying information for the ruptures defined in the adjacant
sections and ruptures files.
**sections.geojson**: defines a feature collection of the fault sections in a fault network.
__sections.geojson__: defines a feature collection of the fault sections in a fault network.
Because fault sections are derived by dividing larger faults into subsections, section features
contain several properties that differ from standalone fault section source models (e.g.
`dip-direction`).
......@@ -356,7 +356,7 @@ contain several properties that differ from standalone fault section source mode
}
```
**ruptures.csv**: Defines the properties of every rupture. The last column in a rupture file
__ruptures.csv__: Defines the properties of every rupture. The last column in a rupture file
defines the ordered array of participating fault section IDs using the shorthand
`1127:1131-2411:2412`. Colons denote continous ranges of sections and hyphens denote breaks.
......@@ -383,7 +383,7 @@ using an `slab-config.json` file.
* [Magnitude Frequency Distributions (MFDs)](./Magnitude-Frequency-Distributions.md#magnitude-frequency-distributions)
* [Rupture Scaling Relations](./Rupture-Scaling-Relations.md#rupture-scaling-relations)
* [Ground Motion Models (GMMs)](./Ground-Motion-Models.md#ground-motion-models)
* [**Documentation Index**](../README.md)
* [__Documentation Index__](../README.md)
---
![USGS logo](./images/usgs-icon.png) &nbsp;[U.S. Geological Survey](https://www.usgs.gov)
......
......@@ -20,10 +20,10 @@ Each model region has a dedicated repository with version tags marking different
* [Conterminous U.S.](https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus)
* [Hawaii](https://code.usgs.gov/ghsc/nshmp/nshms/nshm-hawaii)
* Alaska - _update not yet published_
* Guam & Marianas - _update not yet published_
* Puerto Rico & U.S. Virgin Islands - _update not yet published_
* Samoa & Pacific Islands - _update not yet published_
* Alaska - *update not yet published*
* Guam & Marianas - *update not yet published*
* Puerto Rico & U.S. Virgin Islands - *update not yet published*
* Samoa & Pacific Islands - *update not yet published*
---
......
# Web Services
## Related Pages
* [Building & Running](./Building-&-Running.md#building-&-running)
* [Developer Basics](./Developer-Basics.md#developer-basics)
## Build & Run Options
* [Build and run locally](#build-and-run-locally)
* [Run with Docker](#run-with-docker)
## Build and Run Locally
Building and running *nshmp-haz* web services requires prior
installation of Git and Java. Please see the [developer basics](./Developer-Basics.md)
page for system configuration guidance.
### Building
Navigate to a location on your system where you want *nshmp-haz* code to reside, clone the
repository, and compile:
```bash
cd /path/to/project/directory
git clone https://code.usgs.gov/ghsc/nshmp/nshmp-haz.git
cd nshmp-haz
./gradlew assemble
```
This creates a single file, `build/libs/nshmp-haz.jar` that may be used to run the web services.
`./gradlew` executes the Gradle Wrapper script (there is a `gradlew.bat` equivalent for Windows
users using the native command prompt). This executes any tasks (e.g. `assemble`) after
downloading all required dependencies, including Gradle itself.
## Running Web Services
```bash
java -jar path/to/nshmp-haz.jar --model=path/to/model
```
Web service runs on [http://localhost:8080/](http://localhost:8080/)
The `--model` argument should contain the path to a single
hazard source [model](./Hazard-Model.md).
The [National Seisimic Hazard Models (NSHMs)](https://code.usgs.gov/ghsc/nshmp/nshms)
are available to download.
### Example with NSHM
```bash
# Build nshmp-haz
cd /path/to/nshmp-haz
./gradle assemble
# Download NSHM CONUS
cd ..
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus
# Run web services
cd /path/to/nshmp-haz
java -jar build/libs/nshmp-haz.jar --model=../nshm-conus
```
Open browser to [http://localhost:8080/](http://localhost:8080/).
## Run with Docker
### Docker Requirments
* [Docker](https://docs.docker.com/install/)
#### Docker Memory on Mac
By default, Docker Desktop for Mac is set to use 2 GB runtime memory. To run nshmp-haz-ws, the
memory available to Docker must be [increased](https://docs.docker.com/docker-for-mac/#advanced)
to a minimum of 4 GB.
### Docker Build Options
* [Build and run docker locally](#build-and-run-docker-locally)
* [Run from Container Registry](#run-from-container-registry)
### Build and Run Docker Locally
The Docker image may be built with the provided web service [Dockerfile](../../ws.Dockerfile).
```bash
cd /path/to/nshmp-haz
# Build docker image
docker build -f ws.Dockerfile -t nshmp-haz-ws .
# Run Docker image
docker run -p 8080:8080 -v "path/to/model:/model" nshmp-haz-ws
```
Web service runs on [http://localhost:8080/](http://localhost:8080/)
The hazard model is read in via Docker volumes.
#### Local Docker Example with NSHM
```bash
# Build docker image
cd /path/to/nshmp-haz
docker build -f ws.Dockerfile -t nshmp-haz-ws .
# Download NSHM CONUS
cd ..
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus
# Run web services
docker run -p 8080:8080 -v "$(pwd):/model" nshmp-haz-ws
```
Open browser to [http://localhost:8080/](http://localhost:8080/).
### Run from Container Registry
A public Docker image is avaialable from this repository's
[container registry](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/container_registry).
There are 3 main tags:
* `latest`: Refers to the latest updates from the main or production branch
* `staging-latest`: Refers to the
[main](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/main) branch and is the latest updates
* `production-latest`: Refers to the
[production](https://code.usgs.gov/ghsc/nshmp/nshmp-haz/-/tree/production) branch and is stable
```bash
# Pull image
docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws:latest
# Run
docker run -p 8080:8080 -v "/path/to/model:/model" code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws
```
Web service runs on [http://localhost:8080/](http://localhost:8080/)
The hazard model is read in via Docker volumes.
#### Container Registry Example with NSHM
```bash
# Pull image
docker pull code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws:latest
# Download NSHM CONUS
cd ..
git clone https://code.usgs.gov/ghsc/nshmp/nshms/nshm-conus
# Run web services
docker run -p 8080:8080 -v "$(pwd):/model" code.usgs.gov:5001/ghsc/nshmp/nshmp-haz/nshmp-haz-ws
```
Open browser to [http://localhost:8080/](http://localhost:8080/).
### Java Memory
When running **nshmp-haz** web services with Docker
the initial (Xms) and maximum (Xmx) JVM memory sizes can
be set with the environment flag (-e, -env):
```bash
docker run -p <PORT>:8080 -e JAVA_OPTS="-Xms<INITIAL> -Xmx<MAX>" -d usgs/nshmp-haz-ws
# Example
docker run -p 8080:8080 -e JAVA_OPTS="-Xms1g -Xmx8g" -d usgs/nshmp-haz-ws
```
Where `<INITIAL>` and `<MAX >`should be set to the desired initial and maximum memory sizes,
respectively.
---
* [**Documentation Index**](../README.md)
---
![USGS logo](./images/usgs-icon.png) &nbsp;[U.S. Geological Survey](https://www.usgs.gov)
National Seismic Hazard Mapping Project ([NSHMP](https://earthquake.usgs.gov/hazards/))
......@@ -49,4 +49,4 @@ In the next example, we'll override the model supplied configuration with a cust
---
* [**Documentation Index**](../../../docs/README.md)
* [__Documentation Index__](../../../docs/README.md)
......@@ -47,4 +47,4 @@ __Results directory structure:__
---
* [**Documentation Index**](../../../docs/README.md)
* [__Documentation Index__](../../../docs/README.md)
......@@ -45,4 +45,4 @@ __Results directory structure:__
---
* [**Documentation Index**](../../../docs/README.md)
* [__Documentation Index__](../../../docs/README.md)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment