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

ex readme/config updates with dir struct

parent 6786c25e
No related branches found
No related tags found
1 merge request!270Deagg by source, hazout, and geojson
......@@ -11,11 +11,21 @@ hazard ../../peer/models/Set1-Case1 "Test Site, -122.0, 38.0"
The PEER models, such as that designated above, consist of simple cases for different source types commonly encountered in a PSHA and are included in the nshmp-haz repository to support testing. See the [PEER directory](../../peer/) for more information.
The result of this calculation should be available as a single comma-delimited file containing several total mean hazard curves for PGA in a newly created 'curves' directory. In this example, the calculation configuration was derived from the model directory and the site was specified as a comma-delimited string. The string must have the form: `name,lon,lat[,vs30,vsInf[,z1p0,z2p5]]`, where `vs30`, `vsInf`, `z1p0`, and `z2p5` are optional. See the [site specification](https://github.com/usgs/nshmp-haz/wiki/sites) page for more details.
The result of this calculation should be available as a single comma-delimited file containing several total mean hazard curves for PGA in a newly created `hazout` directory. In this example, the calculation configuration was derived from the model directory and the site was specified as a comma-delimited string. The string must have the form: `name,lon,lat[,vs30,vsInf[,z1p0,z2p5]]`, where `vs30`, `vsInf`, `z1p0`, and `z2p5` are optional. See the [site specification](https://github.com/usgs/nshmp-haz/wiki/sites) page for more details.
Note that not all [calculation configuration](https://github.com/usgs/nshmp-haz/wiki/Configuration) parameters need be supplied; see the [configuration file](../../peer/models/Set1-Case1/config.json) for this example model.
Also note that all output is written to a `curves` directory by default, but the output destination can be specified via the [`output.directory`](https://github.com/usgs/nshmp-haz/wiki/configuration#config-output) parameter. In addition to hazard curves, the calculation configuration and a log of the calculation are also saved.
Also note that all output is written to a `hazout` directory by default, but the output destination can be specified via the [`output.directory`](https://github.com/usgs/nshmp-haz/wiki/configuration#config-output) parameter. In addition to hazard curves, the calculation configuration and a log of the calculation are also saved.
__Results directory structure:__
```
1-hazard-curve/
└─ hazout/
├─ config.json
├─ HazardCalc.log
└─ PGA/
└─ curves.csv
```
In the next example, we'll override the model supplied configuration with a custom file.
......
......@@ -18,4 +18,18 @@ In this example we've overridden the configuration supplied by the model. Specif
See the [configuration specification](https://github.com/usgs/nshmp-haz/wiki/configuration) for details on default values and supported options and formats.
__Results directory structure:__
```
2-custom-config/
└─ hazout/
├─ config.json
├─ HazardCalc.log
├─ PGA/
│ └─ curves.csv
├─ SA0P2/
│ └─ curves.csv
└─ SA1P0/
└─ curves.csv
```
#### Next: [Example 3 – Using a custom sites file](../3-sites-file)
......@@ -19,4 +19,18 @@ The [site specification](https://github.com/usgs/nshmp-haz/wiki/sites) wiki page
Note that both formats ([CSV](sites.csv) and [GeoJSON](sites.geojson)) are elegantly rendered by GitHub.
__Results directory structure:__
```
3-sites-file/
└─ hazout/
├─ config.json
├─ HazardCalc.log
├─ PGA/
│ └─ curves.csv
├─ SA0P2/
│ └─ curves.csv
└─ SA1P0/
└─ curves.csv
```
#### Next: [Example 4 – A simple hazard map](../4-hazard-map)
......@@ -9,4 +9,18 @@ A hazard map is just a collection of values plucked from a lot of hazard curves.
hazard ../../peer/models/Set1-Case1 map.geojson config.json
```
__Results directory structure:__
```
4-hazard-map/
└─ hazout/
├─ config.json
├─ HazardCalc.log
├─ PGA/
│ └─ curves.csv
├─ SA0P2/
│ └─ curves.csv
└─ SA1P0/
└─ curves.csv
```
#### Next: [Example 5 – A more complex model](../5-complex-model)
......@@ -33,4 +33,24 @@ hazard ../../../../nshm-cous-2008/Western\ US map.geojson config-map.json
This computes 121 curves over a 2° by 2° area and will give you a sense of how long a larger map might take. Note that in the above two examples we specified different output directories in the config files for each calculation.
__Results directory structure:__
```
5-complex-model/
├─ hazout-sites/
│ ├─ config.json
│ ├─ HazardCalc.log
│ ├─ SA1P0/
│ │ └─ curves.csv
│ └─ SA2P0/
│ └─ curves.csv
└─ hazout-map/
├─ config.json
├─ HazardCalc.log
├─ SA1P0/
│ └─ curves.csv
└─ SA2P0/
└─ curves.csv
```
#### Next: [Example 6 – Enhanced output](../6-enhanced-output)
......@@ -3,6 +3,6 @@
"imts": ["SA1P0", "SA2P0"]
},
"output": {
"directory": "curves-map"
"directory": "hazout-map"
}
}
......@@ -3,7 +3,7 @@
"imts": ["SA1P0", "SA2P0"]
},
"output": {
"directory": "curves-sites",
"directory": "hazout-sites",
"flushLimit": 1
}
}
......@@ -11,7 +11,33 @@ hazard ../../../../nshm-cous-2008/Western\ US sites.geojson config.json
The [config](https://github.com/usgs/nshmp-haz/blob/master/etc/examples/6-enhanced-output/config.json) file for this example specified `GMM` and `SOURCE` as [output curve types](https://github.com/usgs/nshmp-haz/wiki/configuration#calculation-configuration-parameters). Note that the output curves directory now contains additional directories of curves by source type and GMM. We also specified an [output flush limit](https://github.com/usgs/nshmp-haz/wiki/configuration#calculation-configuration-parameters) of `1`. Doing so gives feedback on how long it takes each site calculation to run on a particular system.
See the `nshmp-haz` wiki and JavDocs for more information on source types ([Wiki](https://github.com/usgs/nshmp-haz/wiki/source-types), [JavaDoc](http://usgs.github.io/nshmp-haz/javadoc/index.html?gov/usgs/earthquake/nshmp/eq/model/SourceType.html)) and GMMs ([Wiki](https://github.com/usgs/nshmp-haz/wiki/ground-motion-models), [JavaDoc](http://usgs.github.io/nshmp-haz/javadoc/index.html?gov/usgs/earthquake/nshmp/gmm/Gmm.html)).
See the `nshmp-haz` wiki and Javacocs for more information on source types ([Wiki](https://github.com/usgs/nshmp-haz/wiki/source-types), [JavaDoc](http://usgs.github.io/nshmp-haz/javadoc/index.html?gov/usgs/earthquake/nshmp/eq/model/SourceType.html)) and GMMs ([Wiki](https://github.com/usgs/nshmp-haz/wiki/ground-motion-models), [JavaDoc](http://usgs.github.io/nshmp-haz/javadoc/index.html?gov/usgs/earthquake/nshmp/gmm/Gmm.html)).
__Results directory structure:__
```
6-enhanced-output/
└─ hazout/
├─ config.json
├─ HazardCalc.log
├─ PGA/
│ ├─ curves.csv
│ ├─ gmm/
│ │ ├─ AB_03_CASCADIA_SLAB/
│ │ │ └─ curves.csv
│ │ ├─ ...
│ │ └─ ZHAO_06_INTERFACE/
│ │ └─ curves.csv
│ └─ source/
│ ├─ FAULT/
│ │ └─ curves.csv
│ ├─ ...
│ └─ SLAB/
│ └─ curves.csv
├─ SA0P2/
│ └─ ...
└─ SA1P0/
└─ ...
```
#### Next: [Example 7 – Deaggregation](../7-deaggregation)
......@@ -15,9 +15,64 @@ alias deagg='java -Xms1g -Xmx4g -cp /path/to/nshmp-haz/build/libs/nshmp-haz.jar
deagg ../../../../nshm-cous-2008/Western\ US sites.geojson 2475 config.json
```
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.
The results of the deaggregation are saved along with hazard curves in `deagg` directories. As with `HazardCalc`, if the `GMM` ddata type 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. Deaggregations by individual `SOURCE` type are also possible.
See the following pages for more information on [deaggregation](https://github.com/usgs/nshmp-haz/wiki/about-deaggregation) and the meaning of [epsilon](https://github.com/usgs/nshmp-haz/wiki/what-is-epsilon%3F).
__Results directory structure:__
```
7-deaggregation/
└─ hazout/
├─ config.json
├─ DeaggCalc.log
├─ PGA/
│ ├─ curves.csv
│ ├─ deagg/
│ │ ├─ Los Angeles CA/
│ │ │ ├─ data.csv
│ │ │ └─ summary.txt
│ │ ├─ Salt Lake City UT/
│ │ │ ├─ data.csv
│ │ │ └─ summary.txt
│ │ ├─ San Francisco CA/
│ │ │ ├─ data.csv
│ │ │ └─ summary.txt
│ │ └─ Seattle WA/
│ │ ├─ data.csv
│ │ └─ summary.txt
│ └─ gmm/
│ ├─ AB_03_CASCADIA_SLAB/
│ │ ├─ curves.csv
│ │ └─ deagg/
│ │ ├─ San Francisco CA/
│ │ │ ├─ data.csv
│ │ │ └─ summary.txt
│ │ └─ Seattle WA/
│ │ ├─ data.csv
│ │ └─ summary.txt
│ ├─ ...
│ ├─ CB_08/
│ │ ├─ curves.csv
│ │ └─ deagg/
│ │ ├─ Los Angeles CA/
│ │ │ ├─ data.csv
│ │ │ └─ dsummary.txt
│ │ ├─ Salt Lake City UT/
│ │ │ ├─ data.csv
│ │ │ └─ summary.txt
│ │ ├─ San Francisco CA/
│ │ │ ├─ data.csv
│ │ │ └─ summary.txt
│ │ └─ Seattle WA/
│ │ ├─ data.csv
│ │ └─ summary.txt
│ └─ ...
├─ SA0P2/
│ └─ ...
└─ SA1P0/
└─ ...
```
Note that in the output above, there are only deaggregation results for subduction GMMs (e.g. `AB_03_CASCADIA_SLAB`) for sites closer to the Cascadia subduction zone; empty results will not be saved.
#### Next: [Example 8 – Earthquake probabilities and rates](../8-probabilities)
......@@ -25,4 +25,18 @@ rate ../../../../nshm-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.
Like `HazardCalc`, `RateCalc` observes the `config.output.dataTypes` `SOURCE` option and will include a `source` directory with rates or probabilities for all contributing source types.
__Results directory structure:__
```
8-probabilities/
├─ hazout-rate-sites/
│ ├─ config.json
│ ├─ RateCalc.log
│ └─ rates.csv
└─ hazout-prob-map/
├─ config.json
├─ RateCalc.log
└─ probs.csv
```
{
"output": {
"dataTypes": ["SOURCE"]
"dataTypes": ["SOURCE"],
"directory": "hazout-prob-map"
},
"rate": {
"distance": 10.0,
......
{
"output": {
"dataTypes": ["SOURCE"]
"dataTypes": ["SOURCE"],
"directory": "hazout-rate-sites"
}
}
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