Magnitude was the first quantitative measure of earthquake size based on seismograms. The maximum or “peak” ground motion is defined as the largest absolute value of ground motion recorded on a seismogram.

Taking the 2011-03-11 Tohoku great earthquake as an example, at first, download broad-band seismic data in vertical direction from the global seismic stations (GSN) using Web Service Fetch scripts, and then convert data format from miniseed to SAC with software mseed2sac. Next, remove the instrument response using the SAC transfer function and calculate the maximum displacement for the waveforms from the theoretically estimated P arrival time to S arrival time [Wang et al., 2017]1.

Please look over full scripts by clicking here or downloading ZIP file.

Download data

Event information

Make sure event(s) information. File with .csv format from USGS Search Earthquake Catalog is recommended.

$ vim query.csv

time,latitude,longitude,depth,mag,magType,nst,gap,dmin,rms,net,id,updated,place,type,horizontalError,depthError,magError,magNst,status,locationSource,magSource 
2011-03-11T05:46:24.120Z,38.297,142.373,29,9.1,mww,541,9.5,,1.16,official,official20110311054624120_30,2017-11-13T20:12:27.632Z,"near the east coast of Honshu, Japan",earthquake,,,,,reviewed,us,official

Fetch Data

Download miniseed and metadata using Fetch scripts with perl language, at the same time, response files (default is PZ file) are taken.

# open Download_data.csh to look over all commands 
$ perl FetchData-2017.164 --net _GSN -L 00 --chan BHZ  -s $start_time -e $end_time -o $evt_name.mseed -m $evt_name.metadata -sd . --radius "$eqla":"$eqlo":"$max_d":"$min_d"

[FetchData](http://service.iris.edu/clients/): collect time series and related metadata (version 2017.164)

-N,--net          Network code, list and wildcards (* and ?) accepted, and underline ' _ ' in front of network code is necessary
-L,--loc          Location ID, list and wildcards (* and ?) accepted
-C,--chan         Channel codes, list and wildcards (* and ?) accepted
-s starttime      Specify start time (YYYY-MM-DD,HH:MM:SS.ssssss)
-e endtime        Specify end time (YYYY-MM-DD,HH:MM:SS.ssssss)
-o outfile        Fetch time series data and write to output file
-m metafile       Write basic metadata to specified file
-sd sacpzdir      Fetch SAC P&Zs and write files to sacpzdir
--radius lat:lon:maxradius[:minradius]  Specify circular region with optional minimum radius

$ csh Download_data.csh

Convert to SAC

Convert miniseed to SAC by mseed2sac.

# open csh Convert_data.csh to look over all commmands
mseed2sac -E "$year,$origin_julian,$hhmmss/$eqla/$eqlo/$dep/Japan" -m $evt_name.metadata $evt_name.mseed

mseed2sac converts miniSEED waveform data to SAC format, so miniSEED file must be exist.

-E event
   Specify event parameters to add to the SAC file in the following format:
   "Time[/Lat][/Lon][/Depth][/Name]"
-m metafile
   Specify a file containing metadata such as coordinates, elevation, component orientation, scaling factor, etc.

$ csh Convert_data.csh

Red star and green triangles indicate the location of event and global seismic stations, respectively.

Remove instrument response

# open Remove_ir.csh to look over all commands
$ transfer from polezero subtype $respfile to none freqlimits 0.001 0.002 40 50

TRANSFER: Performs deconvolution to remove an instrument response and convolution to apply another instrument response.

COMMENTS: After transferring instrument response type to NONE, IDEP (dependent variable) in the SAC header is usually set to DISPLACEMENT (NM). But if remove instrument response using polezero(PZ) file, the unit of displacement is almost always meters.

Calculate maximum displacement

First, cut P wave from the whole waveform by marking the phase arrivals with Taup.

# open Remove_ir.csh to look over all commands
$ taup_setsac -mod prem -ph P-0,S-1,Pdiff-7,PcP-8,ScS-9 -evdpkm $sacfile
$ sac
sac> r *MBWA*.SAC 
sac> cut T0 T1
sac> w append .cut
sac> r *MBWA*.SAC *MBWA*.cut 
sac> p1

TauP_SetSac uses the depth and distance information in SAC file headers to put theoretical arrival times into the t0–t9 header variables. The SAC files must have EVDP and O marker set. Also, if GCARC or DIST isn’t set then Taup_setSac can calculate a distance only if STLA, STLO, EVLA and EVLO are set.

-mod[el] modelname -- use velocity model "modelname" for calculations
-ph phase list     -- comma separated phase list,
                      use phase-# to specify the sac header
-evdpkm            -- sac depth header is in km, default is meters

Next, read maximum and minimum value of displacement, and compare absolute value of them.

![](https://raw.githubusercontent.com/YQ-ERICUG/eri_cug.github.io/master/waveform2.png)

$ csh Remove_ir.csh

Now, the information we needed is saved in the file Max_disp_gcarc.txt. The value of P wave maximum amplitude of the great event varies from $10^{-4}$ to $10^{-1}$ m (see below figure).


  1. Wang, D., H. Kawakatsu, J. Zhuang, J. Mori, T. Maeda, H. Tsuruoka, and X. Zhao (2017), Automated determination of magnitude and source length of large earthquakes using backprojection and P wave amplitudes, Geophys. Res. Lett., 44, doi:10.1002/2017GL073801. ↩︎