nshmp-lib
API Documentation: https://ghsc.code-pages.usgs.gov/nshmp/nshmp-lib/
nshmp-lib is a U.S. Geological Survey (USGS) developed Java library that supports probabilistic seismic hazard (PSHA) and related analyses. This project includes all the code required to load, process and query USGS National Seismic Hazard Models (NSHMs). nshmp-lib is used by command line applications and web services found in the nshmp-haz project. See that project for details on running PSHA calculations.
The project uses Gradle for building and testing. To run unit tests and create a JAR file
for use in other projects, run ./gradlew build
from the root of the repository.
(or ./gradlew.bat build
if using Windows).
The current published version of the code is 1.0.0 with IPDS record: IP-139141.
See also:
- nshmp-haz and related documentation
- Project Javadocs
Suggested citation: Powers, P.M., Clayton, B.S., and Altekruse, J.M., 2022, nshmp-lib: National Seismic Hazard Model processing library. U.S. Geological Survey software release, doi: 10.5066/P9DKFJ5V.
Installation
There are two available packages to install in a Gradle project:
nhsmp-lib
and nshmp-gmm
.
Add the following to the project's Gradle build file:
repositories {
mavenCentral()
maven {
url "https://code.usgs.gov/api/v4/groups/1352/-/packages/maven"
name "NSHMP GitLab Group"
}
}
dependencies {
// Installs nshmp-lib package
implementation "ghsc:nshmp-lib:LIB_VERSION"
// Install nshmp-gmm package (a subset of nshmp-lib)
implementation "ghsc:nshmp-lib:GMM_VERSION"
}
Where LIB_VERSION
and GMM_VERSION
are the corresponding versions to install.
See the registry for available versions.