Status
Note: any general purpose ground motion processing functionality that was in this repository is being moved to the groundmotion-processing repository so that this repository will only conctain shakemap-specific methods.
shakemap-amp-tools
Fetch, read, and process ground motion amplitude data.
Introduction
shakemap-amp-tools is a project designed to provide a number of functions ancillary to the ShakeMap project, mostly those having to do with finding and parsing strong ground motion data and converting it into the XML data format used by ShakeMap. This repository includes the following tools:
amps2xml
Convert peak ground motions in Excel format to ShakeMap XML data structure.sm2xml
Convert a directory of strong motion data files into ShakeMap xml.
Installing
If you already have a miniconda or anaconda Python 3.5 environment:
For conda package:
conda install amptools
Source code:
git clone https://github.com/usgs/shakemap-amp-tools.git
cd shakemap-amp-tools
bash intall.sh
conda activate amptools
Tools
sm2xml
This tool converts a directory of ground motion time series data into an xml file formatted for ShakeMap. The input file must be in a format supported by thegroundmotion-processing.
amps2xml
This tool converts an excel file of peak ground motion data into an xml file formatted for use by ShakeMap. Excel spreadsheets must contain only tabular (rows/columns) data.
A "complete" peak ground motion spreadsheet would look like this:
reference | Mexican National Seismic Service report dated 2010-01-01 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
station | NAME | NETID | SOURCE | LAT | LON | ELEV | DISTANCE | INTENSITY | H1 | H2 | Z | ||||||||||||
PGA | PGV | SA(0.3) | SA(1.0) | SA(3.0) | PGA | PGV | SA(0.3) | SA(1.0) | SA(3.0) | PGA | PGV | SA(0.3) | SA(1.0) | SA(3.0) | |||||||||
ACAM | Guanajuato | MX | National Seismic Service | 20.043186 | -100.716777 | 5.1 | 913.1 | 0.72 | 4.48 | 1.31 | 5.12 | 7.74 | 2.93 | 4.928 | 1.44 | 5.632 | 8.514 | 3.223 | 4.256 | 1.24 | 4.864 | 7.353 | 2.784 |
A minimum intensity only peak ground motion table would look like this:
reference | Jones and Smith, 2007. Journal of Seismology. | |||
---|---|---|---|---|
station | lat | lon | network | intensity |
ABC | 20.123 | -118.123 | MX | 4.5 |
A minimum pga only peak ground motion table would look like this:
reference | Jones and Smith, 2007. Journal of Seismology. | |||
---|---|---|---|---|
station | lat | lon | network | unk |
pga | ||||
ABC | 20.123 | -118.123 | MX | 0.5 |
Spreadsheet Requirements
The reference section in the first row is mandatory, and should consist of a cell in the first column with "reference" in it, and the cell in the second column containing the reference string.
The required columns are:
- station: Usually a short abbreviated code.
- lat: Latitude of the station where data was collected.
- lon: Longitude of the station where data was collected.
- network: Usually a short code indicating the seismic network who collected the data.
In addition to these required columns, there must be additionally at least:
- intensity: Modified Mercalli Intensity (MMI) at the station location.
AND/OR:
- channel (more on this below), containing at least one of the following:
- pga: Peak Ground Acceleration, in units of %g.
- pgv: Peak Ground Velocity, in units of cm/s.
- psa03: Peak Spectral Acceleration at 0.3 seconds, in units of %g.
- psa10: Peak Spectral Acceleration at 1.0 seconds, in units of %g.
- psa30: Peak Spectral Acceleration at 3.0 seconds, in units of %g.
The channel columns can be one of three different naming schemes:
- XXE, XXN, XXZ: Three channels named according to the scheme found at http://www.fdsn.org/seed_manual/SEEDManual_V2.4_Appendix-A.pdf where XXE/XXN are horizontal channels, and XXZ is the vertical channels.
- H1, H2, Z: Three channels where the direction of the channel is not known, where H1/H2 are horizontal channels and Z is the vertical channel.
- UNK: The "channel" to use when only summary peak ground motion values are known.
For the "XXE/XXN/XXZ" or "H1/H2/Z" naming schemes, at least one of the horizontal channels must be included.
Links to example spreadsheets: