Opened 13 years ago

Closed 13 years ago

#236 closed task (fixed)

Write command line CyberShake disaggretion calculator

Reported by: Kevin Milner Owned by: Kevin Milner
Priority: major Milestone:
Component: cybershake Version:
Keywords: Cc: scottcal@…

Description

It would be nice to have a way of producing CyberShake? disaggregation plots through a command line interface, as opposed to using the Hazard Curve GUI as it is currently done. Then we could have plot generation included as a step in the workflow.

Change History (1)

comment:1 Changed 13 years ago by Kevin Milner

Resolution: fixed
Status: newclosed

Done! Here's the usage:

usage: DisaggregationPlotter [-?] [-e <arg>] [-i <arg>] [-o <arg>] [-p
       <arg>] [-pr <arg>] [-r <arg>] [-R <arg>] [-s <arg>] [-sgt <arg>]
       [-vel <arg>]
 -?,--help                   Display this message
 -e,--erf-id <arg>           ERF ID
 -i,--imls <arg>             Intensity Measure Levels (IMLs) to
                             disaggregate at. Multiple IMLs should be
                             comma separated.
 -o,--output-dir <arg>       Output directory
 -p,--period <arg>           Period(s) to calculate. Multiple periods
                             should be comma separated (default: 3)
 -pr,--probs <arg>           Probabilities (1 year) to disaggregate at.
                             Multiple probabilities should be comma
                             separated.
 -r,--rv-id <arg>            Rupture Variation ID
 -R,--run-id <arg>           Run ID
 -s,--site <arg>             Site short name
 -sgt,--sgt-var-id <arg>     STG Variation ID
 -vel,--vel-model-id <arg>   Velocity Model ID

It can be run on shock/opensha as such:

[cybershk@shock ~/opensha]$ ./disagg_plot_wrapper.sh --run-id 247 --period 3 --probs 4.0e-4 --imls 0.2,0.5 --output-dir /tmp

This will create 3 disaggregation plots for run 247 (SA period of 3 sec). One at a probability of 4.0e-4 (which corresponds to 2% in 50 yrs), and at IMLs of 0.2 G & 0.5 G. Note that the 2% in 50 years plot will be labelled with the corresponding IML value (for this run, .5484437450598854 G).

Future improvements include:

  • allowing plot settings to be adjusted
  • metadata included in PDF
  • labeling probability plots with prob value instead of IML value (probability is converted to IML using the hazard curve)
Note: See TracTickets for help on using tickets.