-
Notifications
You must be signed in to change notification settings - Fork 33
Building & Running
Building and running nshmp-haz programs requires:
- Prior installation of Java, Ant, and Git
- Setting the JAVA_HOME, ANT_HOME, and PATH environment variables.
See this page for system configuration guidance.
Navigate to a location on your system where you want nshmp-haz code to reside and clone the repository:
git clone https://github.com/usgs/nshmp-haz.gitTo build nshmp-haz, navigate to the root of the repository and issue the following command: ant, which automatically reads the build.xml file.
This creates a single dist/nshmp-haz.jar with no dependencies for use in hazard calculations.
The HazardCalc program computes hazard curves at one or more sites for a variety of intensity measures. Computing hazard curves requires at least 2, and at most 3, arguments. For example:
java -cp nshmp-haz.jar org.opensha2.HazardCalc model sites [config]At a minimum, the source model and the site(s) at which to perform calculations must be specified. The source model should be specified as a path to a directory or zip file. A single site may be specified with a string; multiple sites must be specified using either a comma-delimited or GeoJSON file. Under the 2-argument scenario, model initialization and calculation configuration settings are drawn from the configuration file that must reside at the root of the model directory. Alternatively, the path to a custom configuration file may also be supplied as a third argument. It can be used to override any calculation settings, but not model initialization settings.
See the examples directory for more details.
Another convenient way to use the nshmp-haz library is via Matlab. A sample script contains the necessary instructions.
Next: Configuration
U.S. Geological Survey – National Seismic Hazard Mapping Project (NSHMP)