1. Introduction

This document describes the routines used to perform moment tensor inversion for earthquake within and near Korea.
The inversion currently takes place on a Linux machine and should behave similarly under Solaris.

Be cautioned that the scripts have not been tested on Windows/CYGWIN or MacOS-X.  The problem here is that both of these operating systems are ambivalent about whether the files TEST.sac and TEST.Sac are different.  I have tried to be careful in the scripting to avoid cases such as this, but you must experiment.

2. Scripts and Programs

Necessary Programs

  1. Download and install the latest version of Computer Programs in Seismology (ftp://ftp.eas.slu.edu/pub/rbh/PROGRAMS.330/NP330.tgz)
    Ensure that your PATH is propeerly set to find the installed programs. You can test if this is correctly done by using the system command 'which', as in
    rbh@otto:~> which gsac calxvig
    /home/rbh/PROGRAMS.310t/PROGRAMS.330/bin/gsac
    /home/rbh/PROGRAMS.310t/PROGRAMS.330/bin/calxvig

  2. Download the programs qmerge and ms2sac. These are packed as 'tgz' files
Unpack these programs using the command gunzip -c sparc.bin.tgz | tar xvf -  which will create the directory sparc.bin with qmerge and ms2sac within, or gunzip -c linux.bin.tgz | tar xvf -  which will create hte directory linux.bin with contains these programs.  Either install these programs in your ${HOME}/bin directory or change your shell PATH variable to include the sparc.bin or linux.bin directory. Ensure that you can see these programs by entering the command 'which qmerge' or 'which ms2sac'. You should see something like
rbh@otto:~> which ms2sac qmerge
/home/rbh/bin/ms2sac
/home/rbh/bin/qmerge

KMA Data

The Earthquake Information Center at KMA maintains a web site. The Korean version is always current. The following link shows how to find earthquake and station information as well as waveforms on the KMA web page:
Using the KMA Web Page.

KMA Instruments

To learn more about the instrument responses, follow the following link: INSTRUMENT . You will find the pole-zeros for the KMA instruments for use in deconvolution.


Green's Functions

This section describes the generation of Green's functions that are used for source inversion of local and regional events in the Korean Peninsula. The Green's functions are computed using the current version of Computer Programs in Seismology http://www.eas.slu.edu/Earthquake_Center/CPS/CPS330.html

To assist in organization, download the following gzipped tar file greenkorea.tgz (NOT AVAILABLE YET) and unpack it using the following command:

gunzip -c greenkorea.tgz | tar xvf - 

This will create the subdirectory GREEN in the directory where you execute the command. This is turn will have the subdirectory GREEN/KOREA.

To learn more about the contents of this distribution, follow the following link:

GREEN (NOT AVAILABLE YET)

MECH.KR

To assist in organization, download the following gzipped tar file MECH.KR.tgz and unpack it using the following command:

gunzip -c MECH.KR.tgz | tar xvf - 

This will create the subdirectory MECH.KR in the directory where you execute the command. This is turn will have the subdirectory GREEN/KOREA.

To learn more about the contents of this distribution, follow the following link: To learn more about the instrument responses, follow the following link:

MECH

MECHANISM.KR

To assist in organization, download the following gzipped tar file mechanism.tgz (NOT AVAILABLE YET) and unpack it using the following command:

gunzip -c mechanism.tgz | tar xvf - 

This will create the subdirectory MECHANISM.KR where you will place the final solutions. In addition, the scripts for using GMT to make maps is included.

To learn more about the contents of this distribution, follow the following link:

MECHANISM  (NOT AVAILABLE YET)

TEL.KR (NOT AVAILABLE YET)

the following

To assist in organization, download the following gzipped tar file teleseism.tgz (NOT AVAILABLE YET) and unpack it using the following command:

gunzip -c teleseism.tgz | tar xvf - 
This will create the subdirectory TELESEISM in the directory where you execute the command.

To learn more about the contents of this distribution, follow the following link:

TELESEISM (NOT AVAILABLE YET)

3. Event Processing

You now have everything required to process the events. Do the following:
  1. cd MECH.KR
  2. Edit the script DO, by adding an uncommented line giving the event information.  Note that KMA locations use Korea time. To convert this to the required Universal Time, subtract 9 hours, being careful about the change of day.
  3. Execute the script DO with the command DO

    The script will create a unique directory and populate it with necessary processing scripts.  For the example, if I execute ./DO, I will create the subdirectory 20060429020112.

  4. cd 20060429020112/20060429020112/Orig   to unpack the miniSEED archives that you retrieved from the KMA website.  If the file ends in .zip, use the command

    unzip 1999-01-23.zip

    If the file ends with .tar, then use the command

    cat 20060429020005_vel.tar | tar xf -

    You will find the data files for this test case in MECH.KR/SAMPLEDATA. After you do this you will see something like the following

    20060429020005BON.ELE 20060429020005SKC.ELE 20060429020006JEU.HGE
    20060429020005BON.ELN 20060429020005SKC.ELN 20060429020006JEU.HGN
    20060429020005BON.ELZ 20060429020005SKC.ELZ 20060429020006JEU.HGZ
    20060429020005BUS.HHE 20060429020005SWO.ELE 20060429020006JIN.HGE
    20060429020005BUS.HHN 20060429020005SWO.ELN 20060429020006JIN.HGN
    20060429020005BUS.HHZ 20060429020005SWO.ELZ 20060429020006JIN.HGZ
    20060429020005CEA.ELE 20060429020005ULJ.HHE 20060429020006KAN.HGE
    20060429020005CEA.ELN 20060429020005ULJ.HHN 20060429020006KAN.HGN
    20060429020005CEA.ELZ 20060429020005ULJ.HHZ 20060429020006KAN.HGZ
    20060429020005CHC.HHE 20060429020005ULL.HHE 20060429020006KWJ.HGE

    Each of these files contains the data in the miniSEED compressed format. This format consists of a header with station name, component, location, start time, sample rate, and number of samples, followed by the compressed data.


  5. Now return to the  directory above using the command
    cd ..

    For our example we will be in /home/rbh/PROGRAMS.310t/KOREA.KMA/MECH.KR/20060429020112/20060429020112 . To convert the miniSEED to SAC we run the command MS2SAC. The DO script has already placed the proper event information into this script. Note that this script also has the current coordinates of the stations. This script creates the directory Sac and converts the miniSEED to SAC and places then files in the directory Sac.  If you do an 'ls Sac' you will see entries like

    BONELE.SAC  CHJHGN.SAC  DAGHGZ.SAC  JEUHGE.SAC  MUSHGN.SAC  TABHGZ.SAC  WJUELE.SAC
    BONELN.SAC CHJHGZ.SAC DAGHHE.SAC JEUHGN.SAC MUSHGZ.SAC TEJHGE.SAC WJUELN.SAC
    BONELZ.SAC CHJHHE.SAC DAGHHN.SAC JEUHGZ.SAC PHAELE.SAC TEJHGN.SAC WJUELZ.SAC
    BONHGE.SAC CHJHHN.SAC DAGHHZ.SAC JINELE.SAC PHAELN.SAC TEJHGZ.SAC WJUHGE.SAC
    BONHGN.SAC CHJHHZ.SAC DGYHGE.SAC JINELN.SAC PHAELZ.SAC TOHHGE.SAC WJUHGN.SAC
    BONHGZ.SAC CHOELE.SAC DGYHGN.SAC JINELZ.SAC PHAHGE.SAC TOHHGN.SAC WJUHGZ.SAC


    Since my script does not have the coordinates for all stations, some of this will not hav ethe distance set properly in the SAC header.  If I do the following
    rbh@crust:~/PROGRAMS.310t/KOREA.KMA/MECH.KR/20060429020112/20060429020112> gsac
    GSAC - Computer Programs in Seismology [V1.1.21 13 SEP 2007]
    Copyright 2004, 2005, 2006, 2007 R. B. Herrmann
    GSAC> r *
    GSAC> sort down dist
    Sorting on DIST in descending order
    GSAC> lh DIST > gsac
    ULJHGE.SAC (132): DIST 62.70909
    WJUHGZ.SAC (155):
    WJUHGN.SAC (154):
    WJUHGE.SAC (153):
    WJUELZ.SAC (152):
    WJUELN.SAC (151):
    WJUELE.SAC (150):
    JINHGZ.SAC (83):
    JINHGN.SAC (82):
    JINHGE.SAC (81):
    JINELZ.SAC (80):
    JINELN.SAC (79):
    JINELE.SAC (78):
    BONHGZ.SAC (5):
    BONHGN.SAC (4):
    BONHGE.SAC (3):
    BONELZ.SAC (2):
    BONELN.SAC (1):
    BONELE.SAC (0):

    You will see that the the stations WJU JIN and BON do not have the station coordinates set in the MS2SAC script.

  6. The next step is is remove the instrument response.  To do this we use the script KMADOEVT.  This script has the event information in it again, will create a directory GOOD, and then will go into the SAC directory to remove the instrument response. The resulting SAC files will be placed into the GOOD directory.  For use in source inversion, this routine will reduce all ground motions to units of meter/sec. If you wish to study acceleration, the applicaiton of the gsac command will differentiate the trace to acceleration in units of meter/sec2 This programs requires that the responses be in MECH.KR/RESPONSE.
    KMADOEVT 

    The KMADOEVT command will test to see if the GCARC (distance in degrees) is a proper value. If it is not, then the waveform is moved ot the subdirectory Sac/BAD. This will occur if the station coordinates are not known in the script MS2SAC. The isntrument response will be removed, the file will be renamed in a StaCmp.Net.Loc.sac format and will be placed in the newly created GOOD directory.

  7. Rotate the traces to Z (vertical, positive is gound up), R (radial, positive is away from the source) and T (transverse, positive is to the right when lookin into the radial directory) . The traces will be rotated and palced into the newly created FINAL directory
    KMADOROT 

Last changed 21 November  2007