Accessing CyberShake Duration Data

From SCECpedia
Revision as of 21:08, 23 October 2017 by Scottcal (talk | contribs)
Jump to navigationJump to search

This page details how to access CyberShake duration data.

Duration data is a relatively new addition to the CyberShake codebase, starting with Study 15.12.

Types of duration data

In CyberShake, we calculate the following duration metrics, independently for the X and Y components:

  • Energy integral (integral of the velocity squared)
  • Signification durations for 5-75%, 5-95%, and 20-80% for velocity
  • Arias intensity (pi/2g times the integral of the acceleration squared)
  • Signification durations for 5-75%, 5-95%, and 20-80% for acceleration
  • Cumulative absolute velocity (CAV) (integral of the absolute value of the acceleration).

A reference document for these formulas is available here: File:durationMetrics.docx.

Accessing database data

We have only populated the database for Study 15.12. For Study 17.3, duration data is only available on the filesystem.

For Study 15.12, the database contains duration data for the 8 metrics that users requested quick access to. For both the X and Y component:

  • Significant duration, 5-75%, velocity
  • Significant duration, 5-95%, velocity
  • Significant duration, 5-75%, acceleration
  • Significant duration, 5-95%, acceleration

Details about accessing this data are available at Accessing CyberShake Database Data.

Accessing file data

To access duration data which is not in the database, you must use the files on disk.

Using the retrieval script

The easiest option is to use the retrieval script at /home/scec-02/cybershk/utils/retrieve_duration.py . This script takes the run ID, source ID, rupture ID, rupture variation ID, output file, and a flag to include the header information in the output.

Finding files by hand

If you need to find files by hand, you should follow the same instructions as for finding seismogram files by hand, given here: Accessing_CyberShake_Seismograms#Locating_Seismogram_Files_by_Hand. For duration files, the filename convention is Duration_*.dur. All Duration files are in the 'new' format, and can be found in the /home/scec-04/tera3d/CyberShake/data/PPFiles/<site>/<runID> root.

Reading duration data from files

Duration files consist of the standard CyberShake header (detailed here), followed by a 4-byte integer containing the number of duration records to follow.

Each duration record has the following structure (in C):

struct duration_record {
  int type;
  int type_value;
  int component;
  float value;
};