Skip to content
Snippets Groups Projects
Commit c163da70 authored by Powers, Peter M.'s avatar Powers, Peter M.
Browse files

eq rate and prob example

parent 73fcfe4c
No related branches found
No related tags found
1 merge request!210EQ rate and probability calculator
......@@ -18,3 +18,6 @@ deagg ../../../../nshmp-model-cous-2008/Western\ US sites.geojson 2475 config.js
The results of the deaggregation are saved to a `deagg` directory along with hazard curves. As with `HazardCalc`, if `GMM` has been specified (as it has in the [config](https://github.com/usgs/nshmp-haz/blob/master/etc/examples/7-deaggregation/config.json) file for this example) additional deaggregation results for each GMM are generated as well.
See the USGS website for more information on [deaggregation](http://geohazards.usgs.gov/deaggint/2008/documentation.php) and the meaning of [epsilon](http://geohazards.usgs.gov/deaggint/2002/documentation/epsilon.php).
#### Next: [Example 8 – Earthquake probabilities and rates](../8-probabilities)
Example 8: Earthquake probabilities and rates
---------------------------------------------
__Working directory:__ `/path/to/nshmp-haz/etc/examples/8-probabilities`
`nshmp-haz` can also calculate earthquake probabilities and rates at a location. As with the `HazardCalc` and `DeaggCalc` programs, `RateCalc` takes a model, a site data file or string, and an optional config file, which will control whether the distributions generated are incremental or cumulative, and whether the distribution values are expressed as annual rates or Poisson probabilities. The default (no config supplied) settings are for incremental annual-rates. The `config.rate` elements also specify the cutoff `distance`, within which all sources should be included, and a `timespan` used for conversion to Poisson probabilities.
For this example, the following system alias is helpful:
```Shell
alias rate='java -Xms1024m -Xmx4096m -cp /path/to/nshmp-haz/dist/nshmp-haz.jar org.opensha2.RateCalc'
```
Assuming a copy of the 2008 USGS NSHM is available (see [Example 5](../5-complex-model)), execute:
```Shell
rate ../../../../nshmp-model-cous-2008/Western\ US sites.csv config-sites.json
```
to generate incremental, annual-rate output for a list of sites, or
```Shell
rate ../../../../nshmp-model-cous-2008/Western\ US map.geojson config-map.json
```
to generate a map of cumulative Poisson probabilities (i.e. P ≥ M).
Unless an output directory is specified in a supplied config, output will be placed in either an `eq-rate` or `eq-prob` directory. Like `HazardCalc`, `RateCalc` observes the `config.output.curveTypes` `SOURCE` option and will include a `source` directory with rates or probabilities for all contributing source types.
{
"output": {
"curveTypes": ["SOURCE"]
},
"rate": {
"distance": 10.0,
"values": "POISSON_PROBABILITY",
"distribution": "CUMULATIVE",
"timespan": 50.0
}
}
{
"output": {
"curveTypes": ["SOURCE"]
}
}
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[
[-123.0, 37.0],
[-121.0, 37.0],
[-121.0, 39.0],
[-123.0, 39.0],
[-123.0, 37.0]
]]
},
"properties": {
"spacing": 0.2,
"title": "San Francisco Bay Area"
}
}
]
}
name, lon, lat
Fresno CA, -119.75, 36.75
Los Angeles CA, -118.25, 34.05
Oakland CA, -122.25, 37.80
San Francisco CA, -122.40, 37.75
San Jose CA, -121.90, 37.35
Santa Rosa CA, -122.70, 38.45
Vallejo CA, -122.25, 38.10
Las Vegas NV, -115.15, 36.20
Reno NV, -119.80, 39.55
Eugene OR, -123.10, 44.05
Salt Lake City UT, -111.90, 40.75
Tacoma WA, -122.45, 47.25
Jackson WY, -110.75, 43.50
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