From 9703f2ed94c26d110cf3806ae56db63aa973b756 Mon Sep 17 00:00:00 2001 From: Peter Powers <pmpowers@usgs.gov> Date: Thu, 30 Nov 2017 12:58:06 -0700 Subject: [PATCH] ex readme/config updates with dir struct --- etc/examples/1-hazard-curve/README.md | 14 ++++- etc/examples/2-custom-config/README.md | 14 +++++ etc/examples/3-sites-file/README.md | 14 +++++ etc/examples/4-hazard-map/README.md | 14 +++++ etc/examples/5-complex-model/README.md | 20 +++++++ etc/examples/5-complex-model/config-map.json | 2 +- .../5-complex-model/config-sites.json | 2 +- etc/examples/6-enhanced-output/README.md | 28 ++++++++- etc/examples/7-deaggregation/README.md | 57 ++++++++++++++++++- etc/examples/8-probabilities/README.md | 16 +++++- etc/examples/8-probabilities/config-map.json | 3 +- .../8-probabilities/config-sites.json | 3 +- 12 files changed, 178 insertions(+), 9 deletions(-) diff --git a/etc/examples/1-hazard-curve/README.md b/etc/examples/1-hazard-curve/README.md index 9226bf0b3..ae19cae4e 100644 --- a/etc/examples/1-hazard-curve/README.md +++ b/etc/examples/1-hazard-curve/README.md @@ -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. diff --git a/etc/examples/2-custom-config/README.md b/etc/examples/2-custom-config/README.md index e508d0b33..42528d0f5 100644 --- a/etc/examples/2-custom-config/README.md +++ b/etc/examples/2-custom-config/README.md @@ -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) diff --git a/etc/examples/3-sites-file/README.md b/etc/examples/3-sites-file/README.md index 3b99f5fce..a69c53d0f 100644 --- a/etc/examples/3-sites-file/README.md +++ b/etc/examples/3-sites-file/README.md @@ -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) diff --git a/etc/examples/4-hazard-map/README.md b/etc/examples/4-hazard-map/README.md index c2ce5fb67..f4dd6e5e9 100644 --- a/etc/examples/4-hazard-map/README.md +++ b/etc/examples/4-hazard-map/README.md @@ -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) diff --git a/etc/examples/5-complex-model/README.md b/etc/examples/5-complex-model/README.md index 850a208ec..2cfd63b05 100644 --- a/etc/examples/5-complex-model/README.md +++ b/etc/examples/5-complex-model/README.md @@ -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) diff --git a/etc/examples/5-complex-model/config-map.json b/etc/examples/5-complex-model/config-map.json index eb5b93211..52b01318b 100644 --- a/etc/examples/5-complex-model/config-map.json +++ b/etc/examples/5-complex-model/config-map.json @@ -3,6 +3,6 @@ "imts": ["SA1P0", "SA2P0"] }, "output": { - "directory": "curves-map" + "directory": "hazout-map" } } diff --git a/etc/examples/5-complex-model/config-sites.json b/etc/examples/5-complex-model/config-sites.json index 5db53ac58..31a32a602 100644 --- a/etc/examples/5-complex-model/config-sites.json +++ b/etc/examples/5-complex-model/config-sites.json @@ -3,7 +3,7 @@ "imts": ["SA1P0", "SA2P0"] }, "output": { - "directory": "curves-sites", + "directory": "hazout-sites", "flushLimit": 1 } } diff --git a/etc/examples/6-enhanced-output/README.md b/etc/examples/6-enhanced-output/README.md index 040ccb1c2..5f6bfd7d7 100644 --- a/etc/examples/6-enhanced-output/README.md +++ b/etc/examples/6-enhanced-output/README.md @@ -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) diff --git a/etc/examples/7-deaggregation/README.md b/etc/examples/7-deaggregation/README.md index c2139daf4..d65e35c68 100644 --- a/etc/examples/7-deaggregation/README.md +++ b/etc/examples/7-deaggregation/README.md @@ -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) diff --git a/etc/examples/8-probabilities/README.md b/etc/examples/8-probabilities/README.md index 5ba695c87..acaca18e4 100644 --- a/etc/examples/8-probabilities/README.md +++ b/etc/examples/8-probabilities/README.md @@ -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 +``` + diff --git a/etc/examples/8-probabilities/config-map.json b/etc/examples/8-probabilities/config-map.json index 44e663c7e..8fe147938 100644 --- a/etc/examples/8-probabilities/config-map.json +++ b/etc/examples/8-probabilities/config-map.json @@ -1,6 +1,7 @@ { "output": { - "dataTypes": ["SOURCE"] + "dataTypes": ["SOURCE"], + "directory": "hazout-prob-map" }, "rate": { "distance": 10.0, diff --git a/etc/examples/8-probabilities/config-sites.json b/etc/examples/8-probabilities/config-sites.json index 2c5b56ccf..fa865014f 100644 --- a/etc/examples/8-probabilities/config-sites.json +++ b/etc/examples/8-probabilities/config-sites.json @@ -1,5 +1,6 @@ { "output": { - "dataTypes": ["SOURCE"] + "dataTypes": ["SOURCE"], + "directory": "hazout-rate-sites" } } -- GitLab