Mtinv PDF
Mtinv PDF
Mtinv PDF
2. Introduction
2.1 What is the MTINV toolkit?
The moment tensor inversion methodology originated from Gilbert (1970). Since then, there have been numerous studies extending the method into the time-domain, for solving higher order source terms and more recently the use of three-dimensional Earth models. For a general review read Jost and Herrman (1989). The trick in this methodology is to use long-period regional-distance seismic waves. The source process can be reduced to a simple delta function spike in space and time. The wave propagation is also simplified because filtering regional seismograms to long-periods (or low frequencies), result in waves that have only propagated in a few wave length cycles that can be easily predicted using relatively simple one-dimensional layered Earth models. Canceling out all of these complex effects leaves the robust extraction of the radiation pattern. We actually solve for a more generalized moment tensor with a simple constraints added that the source has no isotropic component although this constraint can be lifted for estimating the moment tensor of mining collapses, volcanic or explosion sources. The MTINV toolkit is a collection of computer codes written to invert for the moment tensor of an earthquake given the three components of ground motion recorded at regional seismic stations (e.g., Ichinose et al., 2003). The computer codes are organized to generate moment tensor solutions for a range of source depths and origin times because of the trade-off between these two quantities. Selection criteria can be developed or a built-in default fitness
functions can be used for near-real time notification purposes but typically requires human review below some magnitude threshold. The codes are also modularized for allowing flexibility for customization and upgrades. An online man pages are available and they are in HTML format. Gilbrt, F. (1970). Excitation of the normal modes of the earth by earthquake sources, Geophys. J. R. Astr. Soc. 77, 883-914. Jost, M. L. and R. B. Herrmann (1989). A students guide to and review of moment tensors, Seismological Research Letters, 86(2), 37-57. Gene A. Ichinose, John G. Anderson, Ken D. Smith, and Yuehua Zeng (2003). Source Parameters of Eastern California and Western Nevada Earthquakes from Regional Moment Tensor Inversion, Bull. . Seismol. Soc. of America, 93, 61 - 84.
2.2 Overview
The directory structure for MTINV toolkit is based on Unix and is free form. Place the source code anywhere and compile (e.g., /Users/MyHomeDirectory/. The C-shell or extended Cshell environmental path for the executable directory ~/mtinv/bin should be set. Also set the MANPATH environmental path variable. In the input files the ~/mtinv/data directory path (station and velocity model database) should be included. This allows the download of data and analysis with use of this toolkit in any directory location. Typically, directories are made with the name of the seismic event or project and a unique identifier (e.g., origin date and time). This way many events for some local area can be grouped in one directory. Within this directory, subdirectories child directories are made for the seismogram data (in SAC format) and instrument response in the form of simple text files in SAC pole zero format (see tutorial examples). Shell scripts can be made to run the toolkit and should be run in the parent directory and all paths should be relative to this directory or in absolute path form. The output will be in both the current parent directory (text files and postscript/PDF) and a new child directory named ./MyEventName_OriginTime/plotmech is created with text output and an automatically generated GMT shell script that plots the variation of moment tensor as a function of origin time and source depth with the size of the mechanism scaled by the variance reduction modulated by the % double couple. In the case you are using mtinv for full moment tensor, the mechanism is scaled only by the variance reduction. The following programs functions or subroutines are modularized and split to provide optimal flexibility. For the best scheme, there are two major shell scripts, which can run these programs. The first runs mkgrnlib that generates the Greens function libraries. The second shell-script combines the functions of glib2inv, sacdata2inv, and finally mtinv in a loop (See Figure 1).
Figure 1. Flowchart of the MTINV Toolkit Mkgrnlib generates the Greens function libraries as a function of depth. They are stored in station specific binary files in the form of the ten fundamental faulting orientations (RSS is
radial component strike-slip, RDS is radial dip-and-strike-slip, RDD is radial component dip slip, REP is the radial component explosive component, ZSS is vertical strike-slip, ZDS, ZDD, ZEP, TSS-transverse component strike-slip, TDS). The program inputs include the station and source locations, directory path pointer to the modeldb files and station database files. The number of points and sampling rate need to be set to so that the Greens function length in time is as long or longer than the expected slowest traveling waves. Typically for full waveform, the slowest waves travel around 1 km/s therefore a station 300 km away would need at least 300 seconds. For a NPTS of 1024 time points, a sampling rate of at least 0.3 samples/sec is needed. One could also over sample at 0.15 samples/sec and 2048 points and later use decimate to higher sampling rates. This is accomplished later in the program glib2inv that will filter and interpolate/decimate the synthetics to match that of the data. Version 2 of the code also includes a reduction velocity so that the first time sample of the Greens function can be delayed from the origin time to before the first P-wave arrival that avoids wasted computation time particularly for the larger distance range. The reduction velocity is also handy for the separate inversion of Pnl and surface waves. Glib2inv reads an input file for the moment tensor inversion (stations used including band-pass corner frequencies, number of samples and sampling rate) and the output Greens function library created by mkgrnlib and generates a processed and filter library for the moment tensor inversion. All input files are in text form and keyed to the 1-8 character station code and the 1- 4 character network ID (fully qualified by the FDSN or any dummy code). Sacdata2inv reads an input file for the moment tensor inversion (same as that used for glib2inv) and generates a processed and filtered version of the data in the form of a binary input file from SAC files unarchived from RDSEED or elsewhere. The program requires the directory path locations for the SAC formatted data files and SAC pole-zero response files. Given a station and network character pair, the program will automatically figure out the appropriate files and load the data and do the instrument correction. Please follow the RDSEED SAC file and PZ file naming convention. A simple tool to rename the sac files is provided in version 2. SAC file also require some basic header information including kstnm, kcmpnm, knetwk, cmpaz, cmpinc, and khole. Mtinv reads output from sacdata2inv and glib2inv, performs the inversion for each source depth and generates output. The input file (glib2inv.par), the same parameter input read by sacdata2inv and glib2inv, can be modified to remove certain stations completely or just turn stations off in the inversion yet still have a prediction made using the current solution. The forward calculation is still an option in mtinv. Just add any pure double couple solution in the EV line of the parameters file. Changing any parameters, for example, changing the filter bands requires re-running both glib2inv and sacdata2inv. The Greens functions do not need to be recalculated in makeglib, only the two programs (sacdata2inv and glib2inv) are rerun to apply any changes. The origin time shift can be introduced in mtinv version 2 without having to rerun glin2inv and sacdata2inv. Version 2 also has the correct calculation for the deviatoric and full moment tensor including the isotropic component. Additionally a distance normalization option has been added to mtinv and also a 1-degree of freedom (isotropic only) inversion has been added in version 2. For estimating origin time and source depth a loop in the shell script provides (at best) one second increments in origin time without recalculation or reprocessing of the Greens functions. Only the data are shifted in time within mtinv without reprocessing the data windows
therefore time shifts should be kept to within a few seconds because over-shifting may cause edge effects from windowing and Fourier-domain filtering.
4.3. Free form text files for input into GMT script plotmech.csh. The GMT script is automatically generated by mtinv, just run and view the postscript or PDF output plot showing the variation of moment tensor as a function of source depth and origin time.
3. REQUIREMENTS
3.1 Software Requirements
C and Fortran77 compilers or compatible compilers o GCC version > 3.4.6 o G77 version > 3.4.6 o GNU make version > 3.8 C-shell or Extended C-shell Generic Mapping Tools (GMT) version > 3.4 o psmeca RDSEED version >= 4.6 Any Postscript to PDF converted and PS/PDF viewer o Ghostscript and ghostview (any) o Evince (Linux FC > 4) o Acrobat reader (any) o XV (unix) o Xpdf (Linux) o Gvv (Linux FC) o Preview (mac os x)
4. INSTALLATION
Step one: Download mtinv.version.tar.gz o for example, download to your home directory ! cd /Users/MyHomeDirectory/ o ftp (to be determined)
o useraname: o password: o cd /pub o binary o get mtinv.version.tar.gz (where version is the current number) o get mtinv_examples.tar.gz o bye Step two: Uncompress using gzip or uncompress and untar o gzip d mtinv.version.tar.gz o tar xvf mtinv.version.tar Step three: compile o cd /Users/MyHomeDirectory/mtinv.version o make Step four: Add environmental variables to your ~/.tcshrc or ~/.cshrc shell resource files o set PATH = ( $PATH /Users/MyHomeDirectory/mtinv.version/bin ) o set MANPATH = ( $MANPATH /Users/MyHomeDirectory/mtinv.version/man ) Step 4 run examples o cd /Users/MyHomeDirectory/ o gzip d mtinv_examples.tar.gz o tar xvf mtinv_examples.tar o cd /Users/MyHomeDirectory/mtinv_examples
> cd /Users/MyHomeDirectory/mtinv_examples > mkdir 20070309_Bridgeport o make some directory/folder for the event analysis. > cd 20070309_Bridgeport o go to the analysis folder and make a SAC data and SAC Pole Zero directories manually or go to the next step to use the script unpack.csh
> mkdir IRIS > cd IRIS > unpack.csh anza.seed o this C-shell script unpacks/unarchives the seed file into SAC files and station database named rdseed.stations. o this step can be skipped and you can put upack.csh in the makeglib.csh script or unpack the seed file manually
Edit the file makeglib.csh with your favorite text editor (e.g., > vi makeglib.csh). o The script generates a parameter file. In this case the name is wus.par. Make sure stadb= and modeldb= paths are set correctly. o Enter the model name, starting depth, depth increment, and ending depth, event latitude, longitude, sampling rate of the Greens functions (later can be decimated), number of time samples, max frequencies, reduction velocity. o The script then executes mkgrnlib and uses the parameter file to generate the Greens function libraries for a specific station code and network. o Version 2 includes the tool makepar. This tool will scan the direcoty for Greens function libraries and geneates a generic run.csh script for the inversion.
> makeglib.csh finishes o use ls to examine *.glib output files o open, examine and modify the autogenerated run.csh script if needed.
Make or edit the shell script run.csh if necessary (e.g., > vi run.csh). The script is automatically set DEGFREE=5 for solving for a deviatoric moment tensor (major and minor double couple + CLVD) which is the recommended setting for all tectonic sources. The advance user can use the setting DEGFREE=1 that will only invert for pure isotropic sources or DEGFREE=6 for full moment tensor (isotropic + deviatoric). The script will generate a parameter file for 3 toolkit codes: glib2inv, sacdata2inv, and mtinv. The par file can have any name. See the man pages for the format. The first line tagged CM is a comment for the event that get printed as a title for output files. The second line tagged OT is the origin time. Be careful with the format, the date and time are one string separated by commas. The EV tagged line is only needed if the user would like to do a forward calculation assuming a pure double couple source.
The following lines are the station parameters. Check and modify the run.csh file so that the system dependent plotting and graphics routines are available.
Use your favorite postscript or pdf viewer to view plotmech.ps or plotmech.pdf o You may need to edit the bottom of plotmech.csh if the defaults are not available.
Figure 2. Results script is auto-generated, using output from multiple runs save in results.out file. The script uses GMT to generate a postscript plot that shows the best solution at each origin time shift.
Figure 3. Find the largest mechanism that has the highest percent double couple and highest percent variance reduction, and read off the source depth (Z) on the x-axis and origin time (OT) on the y-axis. In this case the highest variance reduction (VRED) is 84.43% and highest double couple (DC) is 99% at (OT=03:17:31 Z=10 km). The OT shift in second is relative to the best guess time of the earthquake origin (03hr 17min and 32 sec) while negative shifts are subtracted and positive shifts are subtracted.
Figure 4. Alternatively view the output files email.xxx.yyy.txt with a text editor to find the best fit mechanisms for each origin time interval and select the mechanism with the highest percent double couple and variance reduction.
Figure 5. Predicted and observed waveform fits. Use your favorite postscript or pdf viewer to view the waveform fits for the best fit.
Figure 6. Postscript map produced by the automatically generated C-shell script gmtmap.csh by mtinv gmtmap flag option.
Figure 7. Moment tensor solution for the 2008/04/26 Reno, Nevada earthquake. The map was generated using the GMT C-shell script called gmtmap.csh that was automatically created by the program mtinv. The parameter file glib2inv.par used by mtinv only has 4 stations turned on shown in red triangles. The blue triangles are stations that are in the parameter file but turned off so that they are only predicted but not used in the inversion.
Figure 8. The sensitivity plot for origin time shift made by the script results.csh. The best solution is at 0 seconds origin time shift (06hr 40min 11.0sec). The depth is 4 km and the %DC is 85% at this time shift.
Figure 9. A plot made by the plotmech.csh script using the output files in the ./plotmech directory. The best solution (highest variance reduction and highest double couple) is in the range of 4-8 km. The origin time may range from -2 to 1 second or between 06:40:11 and 06:40:13. Note that the solution only represents a 4 station solution.
Figure 10. Waveform fits. Red represents stations used in the solution and blue are predicted.
Figure 12. 1991/09/14 Hoya underground nuclear test at Nevada test site. Example of moment tensor inversion using 6 degrees of freedom (Full Moment Tensor).
Figure 13. 1991/09/14 Hoya underground nuclear test at Nevada test site.
Figure 14. 1991/09/14 Hoya underground nuclear test at Nevada test site.
NAME
glib2inv
SYNOPSIS
glib2inv par= [no]verbose [no]dumpsac [no]dumpgrn [no]special
DESCRIPTION
Reads the Green's function library (as a function of depth) for a single source station pair and process the Green's functions (interpolate/decimate and bandpass filter) for moment tensor inversion.
REQUIRED PARAMETERS
par={string} The file name of the parameter file. below (PARAMETER FILE FORMAT). See format of this file
OPTIONAL PARAMETERS
[no]verbose Verbosy output for debugging is verbose and for no verbosy put is noverbose [optional, default verbose off]. out-
[no]dumpgrn Write out "Dump" the Green's functions as SAC formatted binary files [optional, default nodumpgrn]. [no]dumpsac Write out "Dump" the Green's functions as SAC formatted binary files [optional, default nodumpsac]. The focal mechanism, depth, and moment is applied from the input parameter file EV line (see format below).
CM
OT
EV
A 'EV ' in columns 1-3 is followed by six free formatted floating point values: strike, dip, rake, Mw, event_longitude, event_latitude, and event_depth. Only event_longitude and event_latitude need to be set for the correct calculation of the source and receiver azimuth and distance. Should be the same as the evla= and evlo= values used to calculate the Green's function library using "mkgrnlib". Other values can be set to zero and are only used to forward calculate synthetic ground displacements when the dump option is set (dumpsac).
All other lines are for station and synthetic data processing parameters. There are 18 columns in the following order: sta, net, model, np, pas, lf, hf, nt, dt, tr, tt, grdmo, mulfac, used, ts, Zmulfac, Rmulfac, Tmulfac. sta= station code (see stadb file). net= network code (see stadb file). model= velocity model name (without .mod extension) np= number of poles (0,1,2,3,4,5,...) for filter Butterworth bandpass
pas= number of passes (1 or 2) for Butterworth bandpass filter lf= low frequency corner in Hz for Butterworth bandpass filter hf= high frequency corner in Hz for Butterworth bandpass filter nt= number of points (in power of 2) dt= sampling rate in sec/sample tr= rise time or duration of ramp in trapezoid function in seconds tt= duration of boxcar portion of trapezoid function in (tt=0 then triangle function of duration 2*tr) seconds
grdmo= Ground motion type is either 'd' for displacement or 'v' for velocity (no default) mulfac= Multiplcation factor applied to all components for this station. Useful for applying gain corrections easily. Default is 1. used= Use this station for inversion 'y' or just make a tion 'n' ts= Time shift for all components in seconds. preduc-
Negative is back-
Example
glib2inv par=glib2inv.par noverbos
SEE ALSO
mkgrnlib(1), grnlib2sac(1), sacdata2inv(1), mtinv(1) rdseed(1) MTINV Version 2.0 20 Feb 2009 GLIB2INV(1)
NAME
grnlib2sac
SYNOPSIS
grnlib2sac glib= z= [no]dumpgn [no]verbose tr= tt= [no]noise type= if noise nMw= seed= if type=0 Mxx= Myy= Mzz= Mxy Mxz= Myz= Mo= if type=1 str= dip= rak= Mw= if type=2 str= dip= rak= Mw= Piso=
DESCRPTION
Computes the ground displacements (z,r,t) given one type of source input, type=0 is the tensor input, type=1 is the focal mechanism and seismic moment, or type=2 which seperates the moment into isotropic and double couple. The synthetic seismograms can be convolved with a source time function (ramp rise time and boxcar time lengths). The program reads the Green's function library (as a function of depth) for a single source station pair. The output are SAC formatted binary files. Use sac2xy.c to get the raw ASCII data. The program is ideal for when quick forward calculations are needed to check recorded data. Version 2 include a feature that adds noise relative to a moment magnitude.
REQUIRED PARAMETERS
glib={string} The file name of the Green's function library ".glib" file. z={float} The source depth. Must be a depth computed in the Green's function library ".glib" file. See par file from mkgrnlib
OPTIONAL PARAMETERS
[no]dumpgrn write out only Green's functions for z= depth. [no]verbose verbosy output for diagnosis tr={float} The ramp rise time in seconds. If tr=0 and tt>0 then the source
time function is a boxcar. tt={float} The boxcar rise time in seconds. source time function is a triangle. [no]noise add white Gaussian noise nMw={float} If noise then enter the level of the noise in units freq band of interest seed={integer} If noise then enter the random seed for noise type={integer} Source Input Mode Type where type=0 Input Moment Tensor, type=1 Input Pure Deviatoric Source (Strike/Dip/Rake) and type=2 Input Pure Deviatoric source plus isotropic component If type=0 Mxx={float} Myy={float} Mzz={float} Mxy={float} Mxz={float} Myz={float} Normalized Moment Tensor Elements If type=0 Mo={float} Total Seismic Moment in Dyne Cm. If type=1 str={float} dip={float} rake={float} Fault Strike, dip, and rake in degrees. If type=1 Mw={float} Scalar seismic moment magnitude. If type=2 str={float} dip={float} rake={float} Fault Strike, dip, and rake in degrees. of Mw for If tt=0 and tr>0 then the
Aki's convention.
Aki's convention.
If type=2 Mw= Piso= Total Moment Magnitude and The percent of the total moment allo-
SEE ALSO
mkgrnlib(1), grnlib2sac(1), sacdata2inv(1), mtinv(1) rdseed(1) MTINV Version 2.0 20 Feb 2009 GRNLIB2SAC(1)
NAME Mkgrnlib
station pair - Makes the Green's function library for a single source
SYNOPSIS
mkgrnlib par= stnm= net= or mkgrnlib stnm= net= velmod= zrange= evla= evlo= dt= nt= fmax= t0= redv= damp= kmax= eps= smin= modeldb= stadb= [no]verbose [no]dump
DESCRIPTION
mkgrnlib reads in a parameter file and/or command line arguments which points to a station database file in rdseed format, a 1D velocity model file in simple ASCII column format, and several parameters including source and receiver latitude and longitude, number of points, sampling rate, and source depth interval. The program then computes the Green's functions using the f-k reflectivity methodology of Zeng and Anderson (1995). The output is a binary formatted file with the Green's functions as a function of depth and the ten (ZSS, ZDS, ZDD, ZEP, RSS, RDS, RDD, REP, TSS, TDS) fundamental faulting orientations.
REQUIRED PARAMETERS
stnm={string} The station code name in the same capitalization and spelling as typed in column one of the station database file [required no default]. The path to the station database for is defined by the parameter stadb. The station database file is in rdseed format. Try rdseed -S -f foobar.seed to extract the station file. The station code has an eight character length limit. net={string} The network code name (see www.FDSN.org) in the same capitalization and spelling as typed in column 2 of the the station database file [required no default]. The station database file is in rdseed format. Try rdseed -S -f foobar.seed to extract the station file. The network code has an eight character length limit. velmod={string} The file name of the velocity model without the .mod extension. The path is defined by modeldb (see below). [required no default]. zrange={floating point number},{floating point number},{floating point number} The minimum, interval and maximum values of the centroid source
depth in (kilometers) for the Green's function library [required no default]. evla={floating point number} The earthquake latitude in decimal degrees format [required no default]. evlo={floating point number} The earthquake longitude in decimal degrees format [required default]. dt={floating point number} The Green's function [required no default].
no
sampling
rate
in
seconds
per
sample
nt={integer number} The number of points for the Green's functions. Must be a power of 2 (i.e., 64, 128, 256, 512, 1024, 2048(maximum)) [required no default]. eps={floating point number} Error tolerance. Typically values of eps=0.001 to eps=0.000001 are adequate. When kmax or fmax are not set properly mkgrnlib will exit and ask to reset these values. This feature can be controlled by eps and smin. [required no default]. smin={floating point number} Error tolerance. Typically values of smin=0.001 to smin=0.000001 are adequate. When kmax or fmax are not set properly mkgrnlib will exit and ask to reset these values. This feature can be controlled by eps and smin. [required no default]. modeldb={string} The path default].
to
the
model
database
directory.
[required
no
stadb={string} The path and file name to the station database. rdseed format. [required no default].
The file is
in
OPTIONAL PARAMETERS
par={string} The name of the parameter file [optional no default]. all or some of the parameters to be defined in a file Allows rather
without loss of information. This speeds calculation time significantly. Typically fmax can be set to 0.5 seconds when inverting 100 to 10 sec period waves [optional, default is Nyquist frequency=1/(2*dt)]. t0={floating point number} The time of the first sample in the Green's function, (t0=0 is the earthquake origin time) [optional, default is t0=0.0] redv={floating point number} The reduction velocity in km/sec [optional, default is redv=-1.0 (no reduction velocity)]. To avoid wasting time computing Green's function for times before the first arrival particularly when the origin-time is used as the time of the first sample at large distances. The reduction velocity can move the time of the first sample to a later time based on a horizontal apparent velocity. damp={floating point number} The value damp is for the exp(-damp*(pi/twin)*t) exponential function for dampening the rap around effects in the time domain. When the length of the time history is too short, then the seismic surface waves may rap around to the beginning of the Green's function because of the cyclic nature of the FFT [optional, default off damp=1.0]. kmax={integer number} Similar to fmax but for maximum spatial frequency (k=wave number). Warning low fmax and kmax values may led to instability and inaccuracies in the calculations. [optional, default is kmax=10000000]. Typically kmax=20000 is adequate for most moment tensor inversions. verbose={integer=1 or 0} Verbosy output for debugging is verbose=1 and for no verbosy output is verbose=0 [optional, default no verbose=0]. dump={integer=1 or 0} Write out "Dump" the Green's functions as SAC files [optional, default no dump=0].
formatted
binary
EXAMPLE
To calculate the Green's functions of an earthquake in Anza, California (latitude=33.529, longitude=-116.573) at the UC Berkeley digital seismograph station Columbia (CMB.BK) within the central Sierra Nevada, California, for depths of 2 to 22 km in 2 km increments (i.e., 2,4,6,8,10,12,14,16,18,20,and 22 km). The Western U.S. velocity model is used and the time histories will be computed up to 0.5 Hz, at a sampling rate of 0.2 samples per second and a total of 1024 points (204.8 seconds). mkgrnlib evla=33.529 evlo=-116.573 zrange=2,2,22 velmod=wus \ dt=0.2 nt=1024 fmax=0.5 eps=0.0005 smin=0.0005 \ modeldb=/Users/ichinose/mtinv.v0.9/modeldb/ \ stadb=/Users/ichinose/mtinv.v0.9/stadb/station_database.txt
SEE ALSO
glib2inv(1), grnlib2sac(1), sacdata2inv(1), mtinv(1) rdseed(1)
20 Feb 2009
MKGRNLIB(1)
NAME
mtinv - moment tensor inversion
SYNOPSIS
mtinv par= mtdegfree=(1,5,6) [no]verbose [no]dumpsac path=[./plotmech] [no]fwd [no]gmtmap ts0= fixz= [no]test_mode [no]shift ctol= FixISOZ= [no]WgtCovarResid output[no]norm
DESCRIPTION
mtinv reads the same input file used by glib2inv and sacdata2inv to generate processed and filtered data and Green's function input files and performs an inversion for the 5 or 6 moment tensor elements in a least squares sense (by Singular Value Decomposition). The response or fitness of percent double couple and variance reduction are checked for each source depth and an ASCII formatted E-mail file is generated with the best fit. A postscript plot is also generated with the waveform fit. Typically sacdata2inv and mtinv can be run inside a C-shell script looped over origin time values to estimate the optimal origin time and centroid depth.
REQUIRED PARAMETERS
par={string} The file name of the parameter file. below (PARAMETER FILE FORMAT). See format of this file
mtdegfree={integer=1, 5 or 6} The number of degrees of freedom for the moment tensor. If mtdegfree=5 then Mzz is equal to -(Mxx+Myy) and the trace of (Mij) is assume zero. The isotropic component is also assume zero. When mtdegfree=1 the moment tensor solution is constrained to be only Misotropic=Mxx=Myy=Mzz while the off diagonal elements are Mxy=Mxz=Myz=0. When mtdegfree=6 the solution includes all 6 unqiue elements of the tensor. ts0={float} The number of seconds to shift all of the data relative to the origin time. The data are shifted within mtinv and not windowed again by sacdata2inv saving much time.
OPTIONAL PARAMETERS
[no]verbose Verbosy output for debugging is verbose and for no verbosy output is verbose [optional, default noverbose]. [no]dumpsac Write out "Dump" the processed data as SAC formatted files and synthetics [optional, default nodumpsac]. binary
outputpath=[./plotmech] This is the path for the plot mechanism files GMT C-shell script and individual solution files for plotting the mechanism solution version origin time shift and depth with the mechanism size scaled to the variance reduction and modulated by the percent double couple. Default is ./plotmech/ [no]fwd Use the EV line in the parameter input file for a forward cacluation of the pure double couple focal mechanism and moment. All the plots and output files are made as in the inversion. Default is inversion mode. Forward calculation is off. [no]gmtmap Make a GMT C-shell script that plots a map with the event and station locations. The solution is also shown. mtinv needs to be run with the current best origin time shift that results with the best fitting depth. Topography can be shown in the map by setting some C-shell environment variables. Defautl off. setenv MTINV_GMT_GRID_FILE /my/topography.grid setenv MTINV_GMT_INT_FILE /my/topography.shade setenv MTINV_GMT_CPT_FILE /my/togography.colorpal fixz= Do an inversion with the depth fixed. depth. Default off. Program checks for valid
[no]test_mode A test mode that forces deviatoric solution. [no]norm Distance normalization. Defautl is off. Normalizes the
data
[no]shift Shift the data by the maximum of the cross correlation between data and synthetics computed from the best fitting solution. Default is off. ctol= When the shift option is on, this is the minimum correlation coefficient allowed to shift the data. If the correlation is larger than ctol=(0.0 to 1.0) then the data is shifted to the lag time for this maximum correlation. Default off.
[no]WgtCovarResid Weight the covariance matrix by the variance of the residuals. Otherwise weight by the variance of the data. Default off, always weight variance by the data.
# CM
A '#' in the first column signifies that the following is a non printing comment A 'CM ' in columns 1-3 marks the beginning of a comment, typically the region, area, city and country name for reference purposes only. A 'OT ' in columns 1-3 is followed by the earthquake origin time string in year/month/day,hour:minute:seconds format, (e.g., 2005/06/12,15:41:46.000 ). Origin time is required for setting the origin time in the synthetics and shifting the observed seismograms in time to improve the fit the synthetics and percent double couple component. A 'EV ' in columns 1-3 is followed by six free formatted floating point values: strike, dip, rake, Mw, event_longitude, event_latitude, and event_depth. Only event_longitude and event_latitude need to be set for the correct calculation of the source and receiver azimuth and distance. Should be the same as the evla= and evlo= values used to calculate the Green's function library using "mkgrnlib". Other values can be set to zero and are only used to forward calculate synthetic ground displacements when the dump option is set (nodumpsac).
OT
EV
All other lines are for station and synthetic data processing parameters. There are 18 columns in the following order: sta, net, model, np, pas, lf, hf, nt, dt, tr, tt, grdmo, mulfac, used, ts, Zmulfac, Rmulfac, Tmulfac. sta= station code (see stadb file). net= network code (see stadb file). model= velocity model name (without .mod extension) np= number of poles (0,1,2,3,4,5,...) for filter Butterworth bandpass
pas= number of passes (1 or 2) for Butterworth bandpass filter lf= low frequency corner in Hz for Butterworth bandpass filter hf= high frequency corner in Hz for Butterworth bandpass filter nt= number of points (in power of 2) dt= sampling rate in sec/sample tr= rise time or duration of ramp in trapezoid function in seconds tt= duration of boxcar portion of trapezoid function in (tt=0 then triangle function of duration 2*tr) grdmo= seconds
for velocity (no default) mulfac= Multiplcation factor applied to all components for this station. Useful for applying gain corrections easily. Default is 1. used= Use this station for inversion 'y' or just make a tion 'n' preduc-
ts= Time shift for all components in seconds. Negative is backward time shift in time and positive shifts are forward shift in time. Default is 0; Zmulfac= Vertical component multplication factor Rmulfac= Radial component multplication factor Tmulfac= Transverse component multplication facto
Z 14 d d 1.0 1.0 y y 0.0 1.0 0.0 1.0 1.0 1.0 1.0 1.0
noverbose nodumpsac
SEE ALSO
glib2inv(1), sac.h mt.h MTINV version 2.0 grnlib2sac(1), mkgrnlib(1), sacdata2inv(1), rdseed(1), MTINV(1)
20 Feb 2009
NAME
sacdata2inv
- processes and filters the SAC formatted data files for moment tensor inversion by mtinv
SYNOPSIS
sacdata2inv par= path= respdir= [no]verbose [no]dumpsac
DESCRIPTION
sacdata2inv takes input from both the command line and the parameter file from glib2inv about the station information and SAC formatted binary file locations and generates input files for moment tensor inversion using "mtinv". The directories of the SAC files and Sac Pole and Zero response correction files are scanned automatically. The data files are processed, detrended, bandpass filtered, interpolated, windowed, scaled to the correct units, tapered and rotated into the Vertical, Radial and Transverse (Z,R,T) coordinate system.
REQUIRED PARAMETERS
par={string} The file name of the parameter file. below (PARAMETER FILE FORMAT). See format of this file
path={string} The relative or absolute path to where the SAC files are stored. Use rdseed -d -p -f myrdseed.seed to extract SAC and SAC pole zero files from a seed file. respdir={string} The relative or absolute path to where the SAC pole zero files are stored. Use rdseed -d -p -f myrdseed.seed to extract SAC and SAC pole zero files from a seed file.
OPTIONAL PARAMETERS
[no]verbose Verbosy output for debugging is verbose and for no verbosy put is noverbose [optional, default no verbose]. [no]dumpsac Write out "Dump" the processed files [optional, default nodump]. out-
CM
A 'CM ' in columns 1-3 marks the beginning of a comment, typically the region, area, city and country name for reference purposes only. A 'OT ' in columns 1-3 is followed by the earthquake origin time string in year/month/day,hour:minute:seconds format, (e.g., 2005/06/12,15:41:46.000 ). Origin time is required for setting the origin time in the synthetics and shifting the observed seismograms in time to improve the fit the synthetics and percent double couple component. A 'EV ' in columns 1-3 is followed by six free formatted floating point values: strike, dip, rake, Mw, event_longitude, event_latitude, and event_depth. Only event_longitude and event_latitude need to be set for the correct calculation of the source and receiver azimuth and distance. Should be the same as the evla= and evlo= values used to calculate the Green's function library using "mkgrnlib". Other values can be set to zero and are only used to forward calculate synthetic ground displacements when the dump option is set (dumpsac). parame-
OT
EV
All other lines are for station and synthetic data processing ters. There are 18 columns in the following order:
sta, net, model, np, pas, lf, hf, nt, dt, tr, tt, grdmo, mulfac, used, ts, Zmulfac, Rmulfac, Tmulfac. sta= station code (see stadb file). net= network code (see stadb file). model= velocity model name (without .mod extension) np= number filter of poles (0,1,2,3,4,5,...) for Butterworth bandpass
pas= number of passes (1 or 2) for Butterworth bandpass filter lf= low frequency corner in Hz for Butterworth bandpass filter hf= high frequency corner in Hz for Butterworth bandpass filter nt= number of points (in power of 2) dt= sampling rate in sec/sample tr= rise time or duration of ramp in trapezoid function in onds sec-
used= Use this station for inversion 'y' or just make a preduction 'n'
ts= Time shift for all components in seconds. Negative is backward time shift in time and positive shifts are forward shift in time. Default is 0; Zmulfac= Vertical component multplication factor Rmulfac= Radial component multplication factor Tmulfac= Transverse component multplication factor
Z 14 d 1.0 d 1.0 y 0.0 1.0 y 0.0 1.0 1.0 1.0 1.0 1.0
SEE ALSO
glib2inv(1), grnlib2sac(1), mkgrnlib(1), mtinv(1), rdseed(1),
20 Feb 2009
SACDATA2INV(1)
NAME
sacmerge
SYNOPSIS
sacmerge f1= f2=
DESCRIPTION
Merges two Seismic Analysis Code (SAC) binary formatted files into a single SAC file. Typically real-time seismic data are split into packets/segments and sent through the Internet. Packets may get lost or arrive too late for posting causing drop outs. If you run unpack.csh on data ordered from IRIS and data are segmented into 2 or more files then use this program to merge the files into a single file for processing in SACDATA2INV(1).
REQUIRED PARAMETERS
f1={string} the first sac file f2={string} the second sac file to be merged with the first
SEE ALSO
sacdata2inv(1), unpack.csh(1)
20 Feb 2009
SACMERGE(1)
NAME
sacswapbytes
SYNOPSIS
sacswapbytes {sac binary files}
DESCRIPTION
Motorola and IBM processors (CPU's) were designed to read and write bits from left to right like humans but Intel decided to do it from right to left (backwards). This is called computer Endianess... bigendian (Motorola/IBM) and little-endian (Intel). Therefore files written from one type of processor/computer will need to have its byteorder byte-swapped in order for it to be readable on another type of computer. This includes Seismic Analysis Code (SAC) binary formatted files. This program performs an intelligent assessment of the file type and converts if necessary. NOTE... if you created sac files using rdseed then those sac files inherit the native byte order of that computer. SACSWAPBYTES is only necessary if those files were transferred to another type of computer with different architecture. Also note that SAC2000 performs this function automatically but beware that upon writing the files over using SAC2000 it inherits the native byte-order.
REQUIRED PARAMETERS
none
SEE ALSO
sacdata2inv(1), knet2sac(1)
20 Feb 2009
SACSWAPBYTES(1)
NAME
unpack.csh
SYNOPSIS
unpack.csh {seed file}
DESCRIPTION
A C-Shell script which "unpacks" or extracts SAC binary formatted files, SAC Pole Zero instrument response files, and station information among other things that rdseed can extract.
REQUIRED PARAMETERS
seed file name
SEE ALSO
sacdata2inv(1), sacmerge(1), sacswapbytes(1), rdseed
20 Feb 2009
UNPACK.CSH(1)
NAME
renamesac
SYNOPSIS
renamesac {sac files}
DESCRIPTION
Renamesac simply renames SAC formatted binary files using a convention similar to that used by RDSEED. SACDATA2INV requires that sac data files have at least a .SAC or .sac file extension and that the station and network of the data are in the filename separated by periods. The program reads the sac file header and uses the fields to create a file name. For example, 2005.344.00.08.41.6311.GE.CSS..BHE.R.SAC Remember that the SAC Pole-zero files also need to have a specific name format. For example, SAC_PZs_GE_CSS_BHE__1999.202.00.00.00.0000
REQUIRED PARAMETERS
sac file name