Difference between revisions of "CyberShake Hazard Calculation"
Line 6: | Line 6: | ||
[http://opensha.usc.edu/dev/opensha-complete/nightly/opensha-complete.jar OpenSHA_complete.jar nightly build] | [http://opensha.usc.edu/dev/opensha-complete/nightly/opensha-complete.jar OpenSHA_complete.jar nightly build] | ||
+ | |||
+ | You can also obtain the source code directly and compile it yourself, either via an ant build script or via eclipse. For details on this approach, see http://opensha.usc.edu/trac/wiki/SettingUpEclipse | ||
+ | |||
+ | == Hazard Curve Calculation == | ||
+ | |||
+ | Hazard curve calculation/plotting is done via the org.opensha.sha.cybershake.plot.HazardCurvePlotter OpenSHA class. Here is the usage: | ||
+ | |||
+ | <code> | ||
+ | kevin@steel:/tmp$ java -cp OpenSHA_complete.jar org.opensha.sha.cybershake.plot.HazardCurvePlotter --help | ||
+ | usage: HazardCurvePlotter [-?] [-af <arg>] [-benchmark] [-c] [-cmp <arg>] | ||
+ | [-comp <arg>] [-cvmvs] [-e <arg>] [-ef <arg>] [-f] [-fvs <arg>] [-h | ||
+ | <arg>] [-imid <arg>] [-imt <arg>] [-n] [-novm] [-o <arg>] [-p | ||
+ | <arg>] [-pf <arg>] [-pl <arg>] [-R <arg>] [-r <arg>] [-s <arg>] | ||
+ | [-sgt <arg>] [-sgtsym] [-t <arg>] [-v <arg>] [-vel <arg>] [-w | ||
+ | <arg>] | ||
+ | -?,--help Display this message | ||
+ | -af,--atten-rel-file <arg> XML Attenuation Relationship description file(s) for comparison. Multiple files should be comma separated | ||
+ | -benchmark,--benchmark-test-recalc Forces recalculation of hazard curves to test calculation speed. Newly recalculated curves are not kept and the original curves are plotted. | ||
+ | -c,--calc-only Only calculate and insert the CyberShake curves, don't make plots. If a curve already exists, it will be skipped. | ||
+ | -cmp,--component <arg> Intensity measure component. Options: GEOM,X,Y,RotD100,RotD50, Default: GEOM | ||
+ | -comp,--compare-to <arg> Compare to aspecific Run ID (or multiple IDs, comma separated) | ||
+ | -cvmvs,--cvm-vs30 Option to use Vs30 value from the velocity model itself in GMPE calculations rather than, for example, the Wills 2006 value. | ||
+ | -e,--erf-id <arg> ERF ID | ||
+ | -ef,--erf-file <arg> XML ERF description file for comparison | ||
+ | -f,--force-add Flag to add curves to db without prompt | ||
+ | -fvs,--force-vs30 <arg> Option to force the given Vs30 value to be used in GMPE calculations. | ||
+ | -h,--height <arg> Plot height (default = 500) | ||
+ | -imid,--im-type-id <arg> Intensity measure type ID. If not supplied, will be detected from im type/component/period parameters | ||
+ | -imt,--im-type <arg> Intensity measure type. Options: SA, Default: SA | ||
+ | -n,--no-add Flag to not automatically calculate curves not in the database | ||
+ | -novm,--no-vm-colors Disables Velocity Model coloring | ||
+ | -o,--output-dir <arg> Output directory | ||
+ | -p,--period <arg> Period(s) to calculate. Multiple periods should be comma separated (default: 3) | ||
+ | -pf,--password-file <arg> Path to a file that contains the username and password for inserting curves into the database. Format should be "user:pass" | ||
+ | -pl,--plot-chars-file <arg> Specify the path to a plot characteristics XML file | ||
+ | -R,--run-id <arg> Run ID | ||
+ | -r,--rv-id <arg> Rupture Variation ID | ||
+ | -s,--site <arg> Site short name | ||
+ | -sgt,--sgt-var-id <arg> STG Variation ID | ||
+ | -sgtsym,--sgt-colors Enables SGT specific symbols | ||
+ | -t,--type <arg> Plot save type. Options are png, pdf, jpg, and txt. Multiple types can be comma separated (default is pdf) | ||
+ | -v,--vs30 <arg> Specify default Vs30 for sites with no Vs30 data, or leave blank for default value. Otherwise, you will be prompted to enter vs30 interactively if needed. | ||
+ | -vel,--vel-model-id <arg> Velocity Model ID | ||
+ | -w,--width <arg> Plot width (default = 600) | ||
+ | </code> |
Revision as of 22:26, 7 March 2016
CyberShake Hazard Curve/Disaggregation Calculation
Common Setup
The tools mentioned below are part of the OpenSHA platform (http://www.opensha.org). The easiest way to obtain the code needed for these tools is to download the complete OpenSHA jar file nightly build from here:
OpenSHA_complete.jar nightly build
You can also obtain the source code directly and compile it yourself, either via an ant build script or via eclipse. For details on this approach, see http://opensha.usc.edu/trac/wiki/SettingUpEclipse
Hazard Curve Calculation
Hazard curve calculation/plotting is done via the org.opensha.sha.cybershake.plot.HazardCurvePlotter OpenSHA class. Here is the usage:
kevin@steel:/tmp$ java -cp OpenSHA_complete.jar org.opensha.sha.cybershake.plot.HazardCurvePlotter --help
usage: HazardCurvePlotter [-?] [-af <arg>] [-benchmark] [-c] [-cmp <arg>]
[-comp <arg>] [-cvmvs] [-e <arg>] [-ef <arg>] [-f] [-fvs <arg>] [-h
<arg>] [-imid <arg>] [-imt <arg>] [-n] [-novm] [-o <arg>] [-p
<arg>] [-pf <arg>] [-pl <arg>] [-R <arg>] [-r <arg>] [-s <arg>]
[-sgt <arg>] [-sgtsym] [-t <arg>] [-v <arg>] [-vel <arg>] [-w
<arg>]
-?,--help Display this message
-af,--atten-rel-file <arg> XML Attenuation Relationship description file(s) for comparison. Multiple files should be comma separated
-benchmark,--benchmark-test-recalc Forces recalculation of hazard curves to test calculation speed. Newly recalculated curves are not kept and the original curves are plotted.
-c,--calc-only Only calculate and insert the CyberShake curves, don't make plots. If a curve already exists, it will be skipped.
-cmp,--component <arg> Intensity measure component. Options: GEOM,X,Y,RotD100,RotD50, Default: GEOM
-comp,--compare-to <arg> Compare to aspecific Run ID (or multiple IDs, comma separated)
-cvmvs,--cvm-vs30 Option to use Vs30 value from the velocity model itself in GMPE calculations rather than, for example, the Wills 2006 value.
-e,--erf-id <arg> ERF ID
-ef,--erf-file <arg> XML ERF description file for comparison
-f,--force-add Flag to add curves to db without prompt
-fvs,--force-vs30 <arg> Option to force the given Vs30 value to be used in GMPE calculations.
-h,--height <arg> Plot height (default = 500)
-imid,--im-type-id <arg> Intensity measure type ID. If not supplied, will be detected from im type/component/period parameters
-imt,--im-type <arg> Intensity measure type. Options: SA, Default: SA
-n,--no-add Flag to not automatically calculate curves not in the database
-novm,--no-vm-colors Disables Velocity Model coloring
-o,--output-dir <arg> Output directory
-p,--period <arg> Period(s) to calculate. Multiple periods should be comma separated (default: 3)
-pf,--password-file <arg> Path to a file that contains the username and password for inserting curves into the database. Format should be "user:pass"
-pl,--plot-chars-file <arg> Specify the path to a plot characteristics XML file
-R,--run-id <arg> Run ID
-r,--rv-id <arg> Rupture Variation ID
-s,--site <arg> Site short name
-sgt,--sgt-var-id <arg> STG Variation ID
-sgtsym,--sgt-colors Enables SGT specific symbols
-t,--type <arg> Plot save type. Options are png, pdf, jpg, and txt. Multiple types can be comma separated (default is pdf)
-v,--vs30 <arg> Specify default Vs30 for sites with no Vs30 data, or leave blank for default value. Otherwise, you will be prompted to enter vs30 interactively if needed.
-vel,--vel-model-id <arg> Velocity Model ID
-w,--width <arg> Plot width (default = 600)