Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-haz
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-haz
Commits
7be6a472
Commit
7be6a472
authored
2 years ago
by
Powers, Peter M.
Browse files
Options
Downloads
Patches
Plain Diff
build run edits
parent
6a07b4bb
No related branches found
No related tags found
2 merge requests
!705
Production Release | nshmp-haz
,
!697
Doc edits
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/pages/Building-&-Running.md
+29
-2
29 additions, 2 deletions
docs/pages/Building-&-Running.md
with
29 additions
and
2 deletions
docs/pages/Building-&-Running.md
+
29
−
2
View file @
7be6a472
...
...
@@ -38,17 +38,18 @@ To run *nshmp-haz* web services:
```
bash
./gradlew run
# or './gradlew run -t' to recompile and relaunch when code changes
```
By default, when the web services start up, they load the 2018 NSHM for the conterminous U.S.
To use a different model run the web services using Java and specify model path:
```
bash
./gradlew assemble
java
-jar
build/libs/nshmp-haz.jar
--model
=
path/to/model
```
After startup, web services and documentation are now available at
[
http://localhost:8080/
](
http://localhost:8080/
)
.
After startup, web services and documentation are available at
<http://localhost:8080/>
.
See the
[
Matlab
](
../../etc/matlab
)
directory for examples of how to call the web services. To
run the ground motion model (GMM) web services, please use the
...
...
@@ -89,6 +90,32 @@ Disaggregations build on and output `HazardCalc` results along with other disagg
files. Disaggregations also have some independent
[
configuration
](
./Calculation-Configuration.md#calculation-configuration-parameters
)
options.
## Customizing Code
Whereas
*nshmp-haz*
contains code to run command line applications and web services, model
loading and hazard calculations are handled in the dependent library
[
*nshmp-lib*
](
https://code.usgs.gov/ghsc/nshmp/nshmp-lib
)
. To use a local, modified version of
*nshmp-lib*
, set an environment variable
`NSHMP_LIB_LOCAL=true`
and
*nshmp-haz*
will look for
*nshmp-lib*
in a directory adjacent to
*nshmp-haz*
. If
*nshmp-lib*
is located
somewhere else, modify the path specified in
[
`gradle/dependencies.gradle`
](
../../gradle/dependencies.gradle
)
. When using a local version
of
*nshmp-lib*
, first build the
*nshmp-lib*
project using
`./gradlew fatJar`
so that
required dependencies are included.
Summary of steps to check out and start running code for local development:
```
bash
# --> Set a NSHMP_LIB_LOCAL=true environment variable on your system
cd
yourProjectDirectory
git clone https://code.usgs.gov/ghsc/nshmp/nshmp-lib.git
cd
nshmp-lib
./gradlew fatJar
cd
..
git clone https://code.usgs.gov/ghsc/nshmp/nshmp-ws.git
cd
nshmp-ws
./gradlew run
```
---
## Related Pages
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment