From d16f7480db0c9da0336f422b9526505c5ceffc45 Mon Sep 17 00:00:00 2001 From: Peter Powers <pmpowers@usgs.gov> Date: Tue, 8 Feb 2022 12:41:57 -0700 Subject: [PATCH] example readme fixes --- etc/examples/3-sites-file/README.md | 2 +- etc/examples/4-hazard-map/README.md | 14 +++-- etc/examples/5-complex-model/README.md | 20 ++++-- etc/examples/6-enhanced-output/README.md | 2 +- etc/examples/7-disaggregation/README.md | 69 +++++++-------------- etc/examples/7-disaggregation/sites.csv | 5 ++ etc/examples/7-disaggregation/sites.geojson | 53 ---------------- 7 files changed, 54 insertions(+), 111 deletions(-) create mode 100644 etc/examples/7-disaggregation/sites.csv delete mode 100644 etc/examples/7-disaggregation/sites.geojson diff --git a/etc/examples/3-sites-file/README.md b/etc/examples/3-sites-file/README.md index 97139d49d..97ec338b4 100644 --- a/etc/examples/3-sites-file/README.md +++ b/etc/examples/3-sites-file/README.md @@ -24,7 +24,7 @@ __Results directory structure:__ ```text 3-sites-file/ └─ hazout/ - ├─ config.json + ├─ calc-config.json ├─ HazardCalc.log ├─ PGA/ │ ├─ curves.csv diff --git a/etc/examples/4-hazard-map/README.md b/etc/examples/4-hazard-map/README.md index da3708ea2..641feee17 100644 --- a/etc/examples/4-hazard-map/README.md +++ b/etc/examples/4-hazard-map/README.md @@ -16,14 +16,20 @@ __Results directory structure:__ ```text 4-hazard-map/ └─ hazout/ - ├─ config.json + ├─ calc-config.json ├─ HazardCalc.log ├─ PGA/ - │ └─ curves.csv + │ ├─ curves.csv + │ ├─ curves-truncated.csv + │ └─ map.csv ├─ SA0P2/ - │ └─ curves.csv + │ ├─ curves.csv + │ ├─ curves-truncated.csv + │ └─ map.csv └─ SA1P0/ - └─ curves.csv + ├─ curves.csv + ├─ curves-truncated.csv + └─ map.csv ``` <!-- markdownlint-disable MD001 --> diff --git a/etc/examples/5-complex-model/README.md b/etc/examples/5-complex-model/README.md index f6fc8b2fc..29a3ee9b4 100644 --- a/etc/examples/5-complex-model/README.md +++ b/etc/examples/5-complex-model/README.md @@ -47,20 +47,28 @@ __Results directory structure:__ ```text 5-complex-model/ ├─ hazout-sites/ - │ ├─ config.json + │ ├─ calc-config.json │ ├─ HazardCalc.log │ ├─ SA1P0/ - │ │ └─ curves.csv + │ │ ├─ curves.csv + │ │ ├─ curves-truncated.csv + │ │ └─ map.csv │ └─ SA2P0/ - │ └─ curves.csv + │ ├─ curves.csv + │ ├─ curves-truncated.csv + │ └─ map.csv │ └─ hazout-map/ - ├─ config.json + ├─ calc-config.json ├─ HazardCalc.log ├─ SA1P0/ - │ └─ curves.csv + │ ├─ curves.csv + │ ├─ curves-truncated.csv + │ └─ map.csv └─ SA2P0/ - └─ curves.csv + ├─ curves.csv + ├─ curves-truncated.csv + └─ map.csv ``` <!-- markdownlint-disable MD001 --> diff --git a/etc/examples/6-enhanced-output/README.md b/etc/examples/6-enhanced-output/README.md index 4283327e0..c20c6d251 100644 --- a/etc/examples/6-enhanced-output/README.md +++ b/etc/examples/6-enhanced-output/README.md @@ -31,7 +31,7 @@ __Results directory structure:__ ```text 6-enhanced-output/ └─ hazout/ - ├─ config.json + ├─ calc-config.json ├─ HazardCalc.log ├─ PGA/ │ ├─ curves-truncated.csv diff --git a/etc/examples/7-disaggregation/README.md b/etc/examples/7-disaggregation/README.md index ea60c780c..64e40934d 100644 --- a/etc/examples/7-disaggregation/README.md +++ b/etc/examples/7-disaggregation/README.md @@ -3,77 +3,54 @@ __Working directory:__ `/path/to/nshmp-haz/etc/examples/7-disaggregation` To perform a disaggregation of hazard, one must use the program `DisaggCalc`. Internally, -`DisaggCalc` calls `HazardCalc` and then reprocesses the data to generate a comma-delimited -file of distance, magnitude, and epsilon bins, and a text file of summary statistics and primary -contributing sources. For this, it can be helpful to create a second system alias: +`DisaggCalc` calls `HazardCalc` and then reprocesses the data to generate output files of +disaggregation summary statistics and primary contributing sources. For this, it can be helpful +to create a second system alias: ```Shell alias disagg='java -Xms4g -Xmx8g -cp /path/to/nshmp-haz/build/libs/nshmp-haz.jar gov.usgs.earthquake.nshmp.DisaggCalc' ``` -`DisaggCalc` is similar to `HazardCalc` in every way except that the return-period of interest -must be specified. For example, execute: +The command line arguments for `DisaggCalc` are the same as those for `HazardCalc`. The target +return period for a disaggregation is specified in the config +[`disagg.returnPeriod`](../../../docs/pages/Calculation-Configuration.md#calculation-configuration-parameters) +field. For compute the disaggregation in this example, execute: ```Shell -disagg ../../../../nshm-conus sites.geojson 2475 config.json +disagg ../../../../nshm-conus sites.csv config.json ``` -The results of the disaggregation are saved along with hazard curves in `disagg` directories. -As with `HazardCalc`, if the `GMM` data type has been specified (as it has in the +The results of the disaggregation are saved alongside hazard curves in a `disagg` directory. +Disaggregation results are stored in JSON format with one file for each site. The results for +each IMT are stored within that file as well. As with `HazardCalc`, if the `GMM` data type has +been specified (as it has in the [config](../../../docs/pages/Calculation-Configuration.md#calculation-configuration) file for this example) additional disaggregation results for each GMM are generated as well. Disaggregations by individual `SOURCE` type are also possible. +Note that `DisaggCalc` will only process a CSV file of sites (not GeoJSON). + __Results directory structure:__ ```text 7-disaggregation/ └─ hazout/ - ├─ config.json + ├─ calc-config.json ├─ DisaggCalc.log + ├─ disagg/Los Angeles CA.json + │ ├─ Los Angeles CA.json + │ ├─ Salt Lake City UT.json + │ ├─ San Francisco CA.json + │ └─ Seattle WA.json ├─ PGA/ │ ├─ curves-truncated.csv │ ├─ curves.csv - │ ├─ disagg/ - │ │ ├─ 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/ │ ├─ AM_09_INTERFACE_BASIN/ - │ │ ├─ curves.csv - │ │ └─ disagg/ - │ │ ├─ San Francisco CA/ - │ │ │ ├─ data.csv - │ │ │ └─ summary.txt - │ │ └─ Seattle WA/ - │ │ ├─ data.csv - │ │ └─ summary.txt + │ │ └─ curves.csv │ ├─ ... - │ ├─ CB_14_BASIN/ - │ │ ├─ curves.csv - │ │ └─ disagg/ - │ │ ├─ 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 - │ └─ ... + │ └─ ZHAO_06_SLAB_BASIN/ + │ └─ curves.csv ├─ SA0P1/ │ └─ ... └─ ... diff --git a/etc/examples/7-disaggregation/sites.csv b/etc/examples/7-disaggregation/sites.csv new file mode 100644 index 000000000..bed28dd3d --- /dev/null +++ b/etc/examples/7-disaggregation/sites.csv @@ -0,0 +1,5 @@ +name, lon, lat +Los Angeles CA, -118.25, 34.05 +San Francisco CA, -122.40, 37.75 +Seattle WA, -122.30, 47.60 +Salt Lake City UT, -111.90, 40.75 diff --git a/etc/examples/7-disaggregation/sites.geojson b/etc/examples/7-disaggregation/sites.geojson deleted file mode 100644 index 2275ce3bb..000000000 --- a/etc/examples/7-disaggregation/sites.geojson +++ /dev/null @@ -1,53 +0,0 @@ -{ - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [-118.25, 34.05] - }, - "properties": { - "marker-size": "small", - "marker-color": "#ff0080", - "title": "Los Angeles CA" - } - }, - { - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [-122.40, 37.75] - }, - "properties": { - "marker-size": "small", - "marker-color": "#ff0080", - "title": "San Francisco CA" - } - }, - { - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [-122.30, 47.60] - }, - "properties": { - "marker-size": "small", - "marker-color": "#ff0080", - "title": "Seattle WA" - } - }, - { - "type": "Feature", - "geometry": { - "type": "Point", - "coordinates": [-111.90, 40.75] - }, - "properties": { - "marker-size": "small", - "marker-color": "#ff0080", - "title": "Salt Lake City UT" - } - } - ] -} -- GitLab