Seisan PDF
Seisan PDF
Seisan PDF
Version 10.5
Editors
(1)
Lars Ottemoller lars.ottemoller@geo.uib.no
Peter Voss(2) pv@geus.dk
Jens Havskov(1) jens.havskov@geo.uib.no
(1) Department of Earth Science (2) Geological Survey of Denmark and Greenland
University of Bergen ster Voldgade 10
Allgaten 41 1350 Copenhagen K
5007 Bergen Denmark
Norway
http://seisan.info
November 2016
2
Cover
The figure on the cover shows the output from the new plotpolarity program, which can be used to make
or modify polarity readings.
Citiation
If you need to cite this manual : Ottemoller, Voss and Havskov, SEISAN EARTHQUAKE ANALYSIS
SOFTWARE FOR WINDOWS, SOLARIS, LINUX and MACOSX, 2016.
Copyright
2016
c Ottem
oller, Voss and Havskov.
Contents
1 Introduction 1
1.1 Changes in the SEISAN alpha version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Changes in the SEISAN new version, 10.5 (2016-11-18) . . . . . . . . . . . . . . . . . . . . 2
1.3 SEISAN version 10.4.1 (2016-06-08) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 SEISAN version 10.4 (2016-03-31) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Information about SEISAN online . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Structure of SEISAN 7
2.1 Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 The database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 Phase data and hypocenters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.2 Waveform data and formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.3 Continuous waveform data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 File types used with SEISAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4 Upper and lower case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.5 Moving data between Sun, Linux, MacOSX and Windows . . . . . . . . . . . . . . . . . . 16
3 Installation 17
3.1 Unix (SOLARIS and Linux) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.2 MacOSX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 Cygwin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.4 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.5 Database directories for your own system, MAKEREA . . . . . . . . . . . . . . . . . . . . 23
3.6 Default parameter files for the main programs . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.7 Color settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.8 Compiling SEISAN programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
i
ii CONTENTS
3.8.1 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.8.2 Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.8.3 MacOSX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.8.4 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.9 Program Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.10 Setting general SEISAN defaults, SEISAN.DEF . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.11 Format description in parmater files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5 Using SEISAN 59
5.1 Short user guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.1.1 Routine processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.1.2 Source parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.1.3 Crustal structure and Q . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.1.4 Magnitudes in SEISAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.1.5 Catalog and database work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.1.6 Seismic hazard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2 Getting data into the database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2.1 System with digital data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2.2 System without digital data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.2.3 Database security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.2.4 Data base tools, content and checks . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.2.5 High accuracy in SEISAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.3 Interactive work with earthquake locations, EEV command . . . . . . . . . . . . . . . . . 71
5.4 How EEV works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.5 Instrument response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.6 Working with catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.6.1 Explosions in SEISAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.7 Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.8 General Work with SEISAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.9 Graphics in SEISAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.10 Logging in SEISAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.11 Known problems in SEISAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
CONTENTS iii
9 Distance trace plot with GMT, TRACE PLOT (Unix only) 165
32 Wadati 379
40 FK Analysis 423
43 Correlation of waveform signals, CORR and detection of event clusters XCLUST 447
45 Acknowledgments 459
E Changelog 497
E.1 SEISAN version 10.3 (2015-01-17) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
CONTENTS ix
Introduction
The SEISAN seismic analysis system is a complete set of programs and a simple database for analyzing
earthquakes from analog and digital data. With SEISAN it is possible using local and global earthquakes
to enter phase readings manually or pick them with a cursor, locate events, edit events, determine
spectral parameters, seismic moment, azimuth of arrival from 3-component stations and plot epicenters.
The system consists of a set of programs tied to the same database. Using the search programs it is
possible to use different criteria to search the database for particular events and work with this subset
without extracting the events. Most of the programs can operate both in a conventional way (using a
single file with many events), or in a database manner. Additionally, SEISAN contains some integrated
research type programs like coda Q, synthetic modeling, moment tenesor inversion and a complete system
for seismic hazard calculation.
The data is organized in a database like structure using the file system. The smallest basic unit is a file
(the S-file) containing original phase readings (arrival times, amplitude, period, azimuth, and apparent
velocity) for one event. The name of that file is also the event ID, which is the key to all information
about the event in the database. Although the database in reality only consists of a large number of
sub-directories and files (all of which the user has access to), the intention is that by using the surrounding
software, the user should rarely need to access the files directly, but rather do all work from the users
own directory. Included with SEISAN there is a test data set, a training document using the test data
of many events and a tutorial using just the 2 events included with the software. In addtion, there
is a document illustrating seismogram analysis using SEISAN. See chapter 5. To get an idea of how
SEISAN works, new users can take a look at a SEISAN webinar that was arranged by IRIS in 2014 (see
https://www.youtube.com/watch?v=KJH3ktGL_K0 or file seisan webinar iris 2014.mov on the SEISAN
ftp server).
SEISAN runs under Sun Solaris, Linux, MacOSX and Windows. The programs are mostly written in
Fortran, a few in C and almost all source codes is given, so the user should be able to fix bugs and make
modifications. The programs have been compiled and linked with system compilers and linkers on SUN,
GNU compiler on Linux, Windows and MaxOSX. For graphics, X is used on Unix systems and DISLIN
(www.dislin.de) used under Windows. No format conversion is needed to move data files (binary and
ASCII) between the systems if one of the standard formats (SEISAN, GSE2.0, SEED, SAC, GURALP)
is used. The GUI Seisan Explorer is written in Qt and is used on Linux, MacOSX and Windows.
BE AWARE: A SEISAN S-file must not contain symbols requiring 2 bytes or more (the case with some
country letters). The system will crash. A fix will be made in next version.
1
2 CHAPTER 1. INTRODUCTION
This manual resides in the directory INF (see below), when the system has been implemented on your
computer. The file is called seisan.pdf (Adobe PDF).
The SEISAN system is built of programs made by many different individuals without whom it would
never have been possible to make SEISAN. Acknowledgement is made throughout this manual where
appropriate or in the acknowledgement section at the end. SEISAN now contains so many programs that
when a new version is released, it is not possible to check all the options in all programs and we rely on
the user to help finding the bugs, please report!
SEISAN is freely available for all non-commercial use.
In this manual names of computer programs are given with capital letters, names of files and command
line options are given by typewriter font.
EEV has new options: ste and std for setting and unsetting start flags, ep to see the print.out file
A new program PLOTFOC to plot fault plane solutions from a CAT-file without need for relocating
event. Also in EEV with command foo.
A new option in EEV to compare the P and T axis of two fault plane solutions, fd
A new version of the AUTO program that can run anyone or a combination of the programs
AUTOPHASE, AUTOPIC, HYP, AUTOMAG, AUTORATIO, FPFIT and HASH in loop of many
events
MULPLT multi trace mode: A label is now showing the id of the OP and the last action and the
id of the OP preforming the action. The label is not shown if MULPLT MULTI LABEL is zero in
MULPLT.DEF
MULPLT multi trace mode: If one right click on station/channel code, MULPLT will now select
all stations/channels plotted above, if one did not left click on one of the station/channels above.
MULPLT: If NSORT DISTANCE is set in MULPLT.DEF, all stations are plotted in distance order
after epicenter, subsidiary after location of station with first phase pick.
GMAP: Fix bug setting default MSIZE, fix bug when sorting event id Q
Logging: One can now turn logging off; set SEISAN LOGGING to 0.0 in SEISAN.DEF
A new program, COMPARE HYP has been added. The program compares hypocenters and magni-
tudes from two data sets of idential evenrs and calculates average differences. Used e.g. to evaluate
effect of changing a model or location program.
Updating the sfiles is now possible from MULPLT, option appears after locate command
A new section has been added to the manual regarding response files
The order of which a respose file is found has been changed. SEISAN will now first look for a SEED
RESP file that is valid for the selected data, before it looks for a matching SEISAN/SAC/GSE
response file. Previously, SEED RESP files was checked last. The change in order is due to the
addition of SEED network and location codes and sinces RESP files include an expiere date, which
SEISAN/SAC/GSE response files does not.
HYP has a new option for finding and eliminating travel time outliers, EEV commands lr and ur
ftp.geo.uib.no ( or 129.177.55.28)
Login: ftp
Password: <your email address>
The files are stored in the directory /pub/seismo/SOFTWARE/SEISAN.
SEISAN mailing lists
There is a mailing list, which is set-up to improve the exchange of information and questions on SEISAN.
We strongly recommend that all users subscribe to the SEISAN list. The list is:
seisan@geo.uib.no
The purpose of the list is:
To subscribe to the list, send an email to seisan-join@uib.no or to seisan-request@uib.no with
subject/body subscribe.
Subscription can also be done online via http://mailman.uib.no/listinfo/seisan. As a member of
the list, it is possible to look through the archive (since 2008) for questions and answers on SEISAN.
Anyone is welcome to reply to questions and a response to a question should be send to the complete
mailing list.
6 CHAPTER 1. INTRODUCTION
Chapter 2
Structure of SEISAN
2.1 Directories
The whole SEISAN system is located in subdirectories residing under the main directory SEISMO. For
more details, see chapter 3 on installation. The system contains the following main subdirectories:
REA: Earthquake readings and full epicenter solutions in a database
WOR: The users work directory, initially empty
TMP Temporal storage of files, initially empty
PRO: Programs, source code and executables
LIB: Libraries and subroutines
INC: Include files for programs and subroutines in PRO and LIB
COM: Command procedures
DAT: Default and parameter files, e.g. station coordinates
WAV: Digital waveform data files
CAL: System calibration files
INF: Documentation and information
ISO: Macroseismic information
SUP: Supplementary files and programs
In the following, the above subdirectories will mostly be called directories to avoid always referring to
SEISMO. All directories use capital letters, however this only makes a difference in the Unix versions.
The directory structure is used as a tree like structure for quick access to individual files in the REA
directory, which therefore will appear as a simple database to the user. The next section is a description
of the database directories; the other directories are described in chapter 44. Figure 2.1 shows the tree
structure of SEISAN.
7
8 CHAPTER 2. STRUCTURE OF SEISAN
Figure 2.1: Structure of SEISAN. Note that BERGE under WAV is optional and
DELET (not shown) under REA has a similar directory structure as e.g. NAO.
2.2. THE DATABASE 9
contains all events deleted from any of the databases (here BERGE/BER and NAO). Filenames are
identical between all platforms.
The REA directory contains phase readings and derived source information like hypocenters, fault plane
solutions etc. The REA directory has one or several subdirectories corresponding to separate databases
(see Figure 2.1 for an example with two databases). The database names can have between 3 and 5
characters. If less than 5 characters are used, the character is added in the file system to make it 5.
The user does not have to put the when running a program, they will be added by the software. If
a directory is made manually, the must be put in. It is assumed that a database is always present in
the system. The name of the default database is given by an environmental variable (see section 3.1),
however if not set, it will default to AGA for agency. Here, BER will be used as an example throughout
the manual. A database has a duplicate storage of the events. For quick reference and interactive work
the events are stored in single files (S-files) in yearly directories and monthly subdirectories. When new
data is entered into the database, it comes in as individual event files. However, once the interactive
work has finished, the single event files are overwritten with the final location and additionally stored in
monthly files, which are only changed when updating (UPDATE command, see section 14). The monthly
files, called CAT-files for catalog, are stored separately in the CAT directory and primarily used for quick
searching and backup for the single files. In addition to the event data, there is also a LOG directory in
each database to keep a log of the data processing, see section 14.
S-file database structure
The structure for the single file storage is as follows (Windows example):
\REA\BER \ Main readings directory, all data
\REA\BER \1999\ Data for 1999
\REA\BER \1999\01\ Data for January 1999, each event in one file
On Unix, the last line would have been /REA/BER /1999/01
The structure works back year 0000. Each event contains original phase readings in the Nordic format (
Appendix A. ) which includes file names of all corresponding waveform files. One event is one file. Each
event has an ID line. The ID line contains a unique ID, which will follow the event through all COLLECT
and SPLIT operations (see section 12 and 13). The ID line also contains status information about the
event like last action, when it was updated etc. The ID-number can be fixed, which is useful if data
is taken out from the database, processed on another computer and later put back into the database,
since otherwise the ID of an event might be changed and the existing file would not be overwritten. An
example of an S-file name is :
27-1112-11L.S199401
The S-files are used as input for the location program and, when making a permanent update, also for
output, see 7. The letter in front of the . indicates the event type and can be L, R or D for local,
regional or distant event respectively. It is the same indicator as given in the header line of the S-file, see
the Nordic format page 465. The remaining numbers give (in order) day, hr, min, sec, year and month.
As mentioned above, the system can contain many other databases, which may function exactly like the
BER directory. A data base can be used to store a subset of data or data from different networks. Data
can be moved between databases or in and out of the databases, for details, see description on EEV (5.3
and 5.4).
Monthly location files, the CAT directory
10 CHAPTER 2. STRUCTURE OF SEISAN
Events located in monthly files are in a directory called /SEISMO/REA/BER /CAT in addition to the
individual S-files. Additional databases like e.g. NAO will have epicenters stored under
/SEISMO/REA/NAO /CAT. The monthly epicenter files are called 199901.CAT for e.g. January 1999.
Although the files generated by SEISAN normally are monthly files, the CAT directory can also contain
yearly files or any other time interval. The only rule is that the name of the file must give the year and
month of the first event in the file. This is because the search program SELECT uses the file names
to search requested time intervals. If a user has a historical catalog, this can be added as an individual
file. If the historical catalog starts in 1820, the file name would be 182001.CAT. The files in CAT do not
need to be continuous in time, but they must not have overlaps in time and each file must have data in
chronological order. The format of the CAT files is the same as for the S-files. Additionally, CAT files
can also be compact files, meaning just the header lines of the S-files (see also section 2.3).
SEISAN works with various waveform formats including SEISAN, GSE2.0, SEED/MINISEED, GURALP
gcf(single channel files), Helmberger format and SAC binary and SAC ASCII. The SEISAN format is
described in Appendix B, while for a format description of GSE and SAC the user is referred to GSETT-3
[1997] and Goldstein [1999], respectively. The SEED format is described in IRIS Consortium [1993]. The
GSE reading routines are based on the codeco routines written by Urs Kradolfer, Klaus Stammler and
Karl Koch. The routines read GSE2.0 only, not GSE2.1. The format description of GSE2.0 is given in:
http://www.seismo.ethz.ch/prod/autodrm/manual/CRP243.OpsAnx3.A4.pdf. The different formats
can be used in parallel by several programs. With MULPLT for example it is possible to plot data in
the four formats at the same time. Other formats can be added by adding reading routines and adding
the respective calls to LIB/wave.for . Note that SAC binary files can also be used on Windows from
SEISAN version 8.2. To use other formats, a conversion program must be used first, see section 19.
In general it is recommended to keep the waveform data in one format only, mainly for simplicity and
maintenance reasons. There may be different arguments for or against one or the other format depending
on the users preferences and requirements. SAC and GSE are widely used formats and therefore may
be attractive. SEISAN is a multi-trace binary format with direct read access to individual traces. The
SEISAN format is probably your best choice if your main processing system is SEISAN and because it is
easily used on all computer platforms. SAC is a single trace binary or ASCII format with a large number
of header parameters. The SAC format is widely used in research-oriented programs. GSE is a multi-
trace ASCII waveform format that includes various sub-formats. It is widely used for data exchange.
Although the GSE format can keep any number of traces, it is recommended to include no more than
3 traces in a single file depending on the number of samples, since when reading a particular trace, the
whole file may have to be read.
For the future, the SEED/MINISEED format might be the best option since most data centers use
it. However, the SEISAN implementation should probably be tested a bit more. SEISAN cannot read
SEED files using all options possible in SEED, but data from the largest data centers as well as many
observatories have been used for testing. With respect to MINISEED, there are probably less problems
since MINISEED is simpler than SEED. SEISAN can also write MININSEED (program WAVETOOL),
but cannot write SEED (unless GSE2SEED is used). The WAV directory contains files with digital
waveform data. The directory normally has no subdirectories or any other organization. However, in
case of large databases, WAV can be subdivided, see below. In addition any directory can contain
waveform data, it has to be specified in SEISAN.DEF (section 3.10). The amount of data that can be
stored is only limited by the disk size. The analysis system will always look in WAV for particular files
if they are not in the users own directory. Waveform files will automatically be transferred to WAV on
initial registration into the database (see MULPLT). Registration is the process of automatically creating
2.2. THE DATABASE 11
an S-file in the database with the name of the waveform file and header information. Phase pickings are
done later. See section 8.
There is normally no requirement for particular filenames for the waveform files in WAV or elsewhere,
however many programs will make file names like:
yyyy-mm-dd-hhmm-ssT.NETWO nnn e.g. 1995-01-23-1230-20T.BERGE 013
With the abbreviations yyyy: year, mm: month, dd: day, hh: hour, mm: minute, ss: second, T: file type
indicator (normally S), NETWO: maximum 5 letter network code and nnn: number of channels.
Recommended file type indicators are: S: Standard SEISAN, R: Resampled, A: Appended, M:
Miniseed/SEED
WAV database: In case a large number of waveform data is stored, it might be an advantage to also
split up the WAV directory in subdirectories. This is done in the same way as in the REA directory,
e.g. waveform files for BER from July 1994 would be found in WAV/BER /1994/07. Programs that use
waveform files will automatically search, in order, the current directory, TMP, WAV and the monthly
WAV directory. How it is a requirement for all programs running outside EEV that the waveform data
is in the default data base since only that one is searced. When storing in the WAV database, it
is a requirement that the waveform names by default start with either yymm (like 9902)
,yyyymmdd (like 19990101) or yyyy-mm (like 1999-02). If this is not the case, the position in
the file name of year (including century) and month must be specified in SEISAN.DEF, see parameter
CONT YEAR MONTH POSTION FILE. In this case all cont files must have the type file name.
Waveform files created on Windows and Linux SEISAN version 7 or newer cannot be read on older
SEISAN versions.
The SEISAN binary waveform format is explained in Appendix B. The files are written and read with the
same Fortran statements on all platforms, however the internal structure and byte order are different. As
of SEISAN version 5.1, files written on either machine can be read on the other and there is no need for
any conversion when the binary waveform files are moved between Sun, Linux, MaxOSX and Windows.
Compression of waveform data
Waveform files can be stored in compressed format. The compression must be done by the user. Programs
that access the compressed waveform files copy the file to the TMP directory, and uncompress there. The
uncompressed file remains afterwards and will be found the next time one of the programs is looking for
the same waveform file. The content of the TMP directory has to be deleted manually. On Unix, you
may automatically delete the content of the TMP directory by a cronjob, see manual pages on crontab.
On Unix the compression formats supported include gzip, compress, bzip2 and zip. So far, no automatic
decompression is supported on Windows (will be put in). With the introduction of SEED format, there is
less need for external compression since the SEED data usually is compressed and therefore decompressed
on the fly when read.
Component codes
The SEISAN waveform format until version 8.2 has used 4 characters for the component code. The
first character indicates the type of sensor, for example B for broadband, S for short-period or L for
longperiod. For acceleration data the first character has to be A because SEISAN assumes that the
corresponding response has been given as acceleration response. The fourth character has to give the
channel orientation, Z is used for vertical, E for east-west and N for north-south. Other orientation
of the horizontal components is possible in GSE, SEED and SEISAN are not understood by SEISAN. If
data are rotated, T is used for transverse and R for radial. The second and third characters can be
chosen by the user. From SEISAN version 8.2, only 3 characters are used, the first 2 and the last. These
12 CHAPTER 2. STRUCTURE OF SEISAN
3 characters are then defined according to the SEED standard. SEED location codes and network codes
are now also stored in the SEISAN format and are displayed when plotting the traces with MULPLT. No
other programs, except some conversion programs, use network and location codes The component code
is part of the response filename and is used to find the response corresponding to a given station and
component. The network code is not part of the response files (except for SEED format) and not used,
so it is up to the user to put in the correct response which cannot be the same for two location codes at
the same site. Program WAVFIX can be used to change station and/or component codes as written in
SEISAN format files, but will not handle location or network codes.
The Nordic format only has space for two characters for the component code. The definition in SEISAN
is that these are the first and fourth character of the waveform component code. This means that the
relation between the component code in the Nordic file and the waveform data is non-unique. D The GSE
and SEED waveform formats have three characters for the channel code, see GSETT-3 [1997] and IRIS
Consortium [1993] for the detailed definition of the component codes. SEISAN, when reading waveform
data in either GSE or SEED format internally keeps the first two characters and moves the third to fourth,
so for example BHZ becomes BH Z, however the user will only see the name as BH. Data files in SEED
also have a location code, which allows to distinguish for example between two BHZ components (for
example a 30 second and 120 second sensor with the same sampling rate and high gain) at the same site.
Z. When converting between SEISAN and SEED/MiniSEED, station, network and location codes are
preserved while SAC and GSE only partly can store this information.. SAC has more than four characters
for the component code and sacsei.def has to be used to define the conversion. However, normally SAC
data will have three character component codes as well. Conversion of component codes from SEISAN
to SAC is also defined in sacsei.def.
When converting between SEISAN and other waveform formats, component conversion is defined in the
respective definition files, see section on conversion programs.
In SEISAN one can plot or extract continous data from either a standard SEISAN database or from a
BUD or a SeiscomP archive.
Continous data in a BUD or SeiscomP archive
SEISAN reading BUD and SeisComp archives
We have implemented archive reading in SEISAN. The reading routines using Chad Trabant software
have been implemented by Ruben Luis. Reading continuous data:
This works just like reading SEISAN continuous data, except there are no S-files, only the archive files.
All the same functions are available:
Plotting, zooming and extracting segments and registering events.
Read archive data as an event from eev:
A reference to a segment is made in the s-file and it is treated as if it was a file. When a keyword for
archive (ARC) is found, the reading is directed to the archive instead of to a file. The archive reference
is e.g.
where ARC indicate archive, STAT is station code, COM is component, LO is location code YYYY
MMDD HHMM SS is start time and DUR is duration in secs.
Thus the segment in archive with given start time and duration is considered a file. If later plots require
2.2. THE DATABASE 13
less data than the segment referenced, the whole segment is still read, like reading the whole trace in a
file in archive with given start time and duration. A mixture of archive references and file names can be
used.
The archive reference can also use wildcards to reference many channels, like e.g. just writing ARC and
the rest of the line blank, all channels in the archive will be selected.
Station is blank or *, component, network and location are blank: All channels defined in SEISAN.DEF
will be plotted with start time and duration given in ARC line (if not blank, see next option). If a
component is given, only that component will be selected. If a network is given, only that network will
be chosen. If a location code is given, only channels with that location code is selected.
Start time and or durations blank: Start time will be origin time - a time given in SEISAN.DEF
(ARC START), duration will be a time given in SEISAN.DEF (ARC DURATION).
Station is P: All channels for all stations listed in the S-file found in the archive will be plotted. There
is no requirement for the station to have any other information than the station name, component code
is not used. So a new station can easily be added.
Station begins with indicates virtual network as defined in SEISAN.DEF. This can also be inserted
with arc command in EEV.
Plotting all stations without an archive reference line: If parameter ARC BY DEFAULT in SEISAN.DEF
is set to 1, all channels in the archive will be selected.
NOTE: An ARC line can be inserted/edited in the S-file from EEV by command arc.
The archive is defined in SEISAN.DEF, where each channel is given by a ARC_CHAN text string: SSSSS-
CCCNNLL, where SSSSS is the station, CCC is the component, NN the network and LL the location.
These lines can be generated with program sample read wav, which will make a list of all channels in
a given set of files (it thus requres to have one of several single files with the channels needed). The
directory of the archive is given by ARC_ARCHIVE, see e.g.:
where each channel is defined as well as the location of the archive. The specification is the same for
both BUD and SeisComp archives. ONLY one archive type can be used at the same time and the archive
type, ARC TYPE is given in SEISAN.DEF.
Groups of channels can be defined as virtual networks. The virtual network names will be show in the
station selection when using arc option in MULPLT. The definition is done in SEISAN.DEF:
The virtual network name has to start with a to make them visible as such in the station selection.
Archive reading works on both Linux and Windows.
Continous data in a SEISAN database
In SEISAN continuous data has no special format. Continuous data is simply ordinary waveform files
that follow each other in time. In order to treat the data as continuous, the data can be put into a
SEISAN continuous data base. Such a data base is made as follows:
- For each waveform file from a station or network, an S-file is created. The S-files only contain
reference to the waveform file(s). Program AUTOREG can be used to create the S-files.
- The waveform data is optionally put into the corresponding waveform station directories, however
they can also be in WAV or working directory. For large data sets it is strongly recommended to
use the WAV database structure.
If e.g. data is to be stored from 3 different stations (three componet files), create 3 databases under
WAV and REA with the name of the stations (program MAKEREA). If the continuous data consist of
20-minute files, this would mean about 2200 files pr month, which is a reasonable number. It is now
possible for some programs (MULPLT, WAVETOOL) to get access to any or all of the traces in the
continuous data base and plot and extract data. If the continuous data is archived from a real-time
system it is best to have one database per station as it will at times be necessary to backfill gaps as data
may not have arrived in real-time.
Note that waveform files in a SEISAN continuous structure must contain the year and month which is
used to located the corresponding year-month structure. The default start of the file names accepted are:
ccmm ccyy-mm ccyymm
where cc is century, yy is year and mm is month. If year and month are placed diffenrently in the file name,
their location must tbe specified in SEISAN.DEF, parmeter CONT YEAR MONTH POSTION FILE.
It is also possible to store the data without having a database for each station:
Alternative 1: If the 3 stations have waveform files starting at about the same time and the same
duration, they can be merged to 9 channel files and only one continuous data base is made. This
may work well for data from a temporary deploymeny where all data is there when the data is put
into database.
Alternative 2: If the 3 stations have waveform files starting at about the same time and the same
duration, the 3 waveform files can be listed in the S-file and only one data base is needed.
Alternative 3: If the files are in individual channel files, 9 waveform files can be listed in the S-file
and only one continuous database is needed.
The waveform files in a continuous data base can have different formats for different stations and one
S-file can refer to more than one waveform file, provided they start at about the same time and have the
same duration.
2.3. FILE TYPES USED WITH SEISAN 15
A simpler way to use smaller quantities of continuous data is to make a list of these files with DIRF
and an application program can then use that list to work with the data. Currently two programs have
special options for this kind of continuous data. The MULPLT program will plot data from several files
as if it was one file in one continues trace the RESAMP program will resample the data from several files
and put it into one output file.
1. \SEISMO\REA\TEST \1993\09\29-2228-26D.S199309
2. \SEISMO\REA\TEST \1994\06\16-1841-57D.S199406
16 CHAPTER 2. STRUCTURE OF SEISAN
3. \SEISMO\REA\TEST \1996\06\03-1955-40D.S199606
Installation
SEISAN has been tested and compiled for Windows (/Vista/7/8/10), Solaris, Redhat Linux and MacOSX.
The SEISAN GUI Seisan Exporer is provided for Windows, it must be compiled for Linux and it has
not been tested for Solaris or MacOSX.
Upgrade from previous versions
Before you start, take a backup copy of your DAT directory. Note that when you upgrade, many parameter
files will be overwritten so make sure old parameter files are copied before putting in a new version of
SEISAN. The most important are in DAT: STATION0.HYP, SEISAN.DEF, MULPLT.DEF. Also the Unix
setup file SEISAN.csh and SEISAN.bash is overwritten. You may also want to keep copies of PRO, LIB
and INC to keep a copy of the old source code, especially if you have done any modifications to the code.
You can keep almost all of your parameter files, only SEISAN.DEF has been changed. Check this file and
change to your system. Some individual program parameter files like for SPEC have changed.
How to get SEISAN
SEISAN can be downloaded using a browser from ftp://ftp.geo.uib.no/pub/seismo/SOFTWARE/SEISAN/
or on command line with ftpftp.geo.uib.no login is ftp and password is your email address. On the
AFTP server go to /pub/seismo/SOFTWARE/SEISAN. Use binary mode for the compressed files (tar and
zip). Before copying, check the readme file for latest updates, changes and current content of the directory.
The directory will at least contain the following files:
seisan X.Y .unix.tar.gz a compressed tar file, whole distribution with executables and test
data, X.Y stands for the latest distribution number and Unix for
the respective Unix system (solaris or linux).
seisan. X.Y.exe Windows distribution an install file
seisan X.Y.pdf The SEISAN manual, Adobe PDF
seitrain X Y.pdf SEISAN training course
testdata X.Y.tar.gz SEISAN data for the training course
Alternatively SEISAN might be obtained on a CD with the same content as above (write to
jens@geo.uib.no).
Section 3.8 gives additional information about modifications and recompilation.
17
18 CHAPTER 3. INSTALLATION
computer, with the programs REMODL and SETBRN otherwise HYP will crash.
5. Set system parameters
If you are doing an update, some of the following settings can be skipped.
Activate SEISAN:
csh/tcsh shell :
In your .cshrc file, the aliases and paths used by SEISAN are defined by adding the line
source /home/seismo/COM/SEISAN.csh
where ../seismo is the directory below which SEISAN has been installed. The SEISAN.csh script file
assumes that you are running either csh or tcsh as your shell.
bash shell :
If you are using the bash shell add this line to your .bashrc file :
. /home/seismo/COM/SEISAN.bash
bash might include a select program, if that is the case on your pc you also need to add this line in
your .bashrc file :
alias select="/home/seismo/PRO/select"
to use the SEISAN SELECT program.
If you are using another shell you need to modify the script accordingly or change the shell. It is assumed
that X-windows is installed.
SEISAN path for programs:
In order for programs and subroutines to know the path to the SEISAN program directory, this must be
defined in the file .SEISAN in COM. Edit that file and set the environmental variable SEISAN TOP
to the name of the top directory, meaning the directory structure below and including seismo e.g.
/top/users/seismo. This variable is then used to set the path to SEISAN directories.
Search path for libraries:
To run the NANSEI conversion program under Solaris, the SEISAN LIB directory needs to be included
in the environmental variable LD LIBRARY PATH. The LIB directory as default is already added to the
library search path in the SEISAN.csh file.
SEISAN path for databases, parameter files etc:
The SEISAN database can be under the same top directory as programs, however it can also be different.
This is practical if several users have their own databases, but use the same software. Set environmental
variable SEISAN TOP to top directory e.g. /top/users/seismo.
SEISAN agency:
In SEISAN.csh also set the environmental variable AGENCY (upper case) to your 3-letter agency code
(upper case). This variable is only used by program MACROIN from EEV in connection with entering
macroseismic data so for most users ignore this setting.
SEISAN default database:
To locate the default database directory (here BER) set environmental variable DEF BASE in SEISAN.csh.
If not set, the name AGA is used. The data bases are found under SEISAN TOP.
SEISAN editor used in EEV:
The default editor is vi, any other editor can be set with the environmental variable SEISAN EDITOR.
SEISAN calibration file directory:
By default, calibration files are in CAL, but they can be in a directory set with variable LOCAL CAL.
The directory name must be complete like /home/users/calibration/
SEISARCH
20 CHAPTER 3. INSTALLATION
Gives the architecture, can be either solaris, linux32, linux64, macosx or windows. Used in Makefile when
compiling.
SACAUX
Path to SAC aux directory, required by the SAC routines for reading and writing, although not really
used.
SACLIB
Specify path and filename to SAC libraries, only needed when you compile programs (Unix) and you
have the libraries installed on your system.
Printer for Postscript plots:
The hard copy files from programs are sent to the printer from within the programs using the standard
lpr command. In the SEISAN.csh file, define lpr using the standard environmental variable PRINTER.
Remember that the printer must accept Postscript. PostScript files can also be viewed and printed on
most printers outside SEISAN using GhostView, however in that cases files cannot be printed from within
a program.
Scaling for Postscript plots:
By default, plots will be in A4 size. This can be changed by setting the environmental variables
SEISAN PSSCALE X and SEISAN PSSCALE Y. The default for A4 size is 1.0 for both variables. For
Letter size the Y-scaling can be set to 0.9.
Seisan Extension:
User specific code can be implemented by making use of the environmental variable SEISAN EXTENSION.
The idea is that programs read this variable, if set to the user specific string, the users source code will
be used instead of the default. An example could be the computation of error ellipses. Currently used
codes are: BGS.
6. Testdata The testdata set can be extracted from the file testdata X.Y.tar.Z. Use programs uncom-
press and tar to extract the data in the SEISAN top directory (keep subdirectory structure). SEISAN has
2 test events always installed with the software (from June 1996) so it is always possible to test SEISAN
without installing test data. See the SEISAN tutortial, which only uses the 2 test evenrts.
Dimensions
Most dimensions are set in file seidim.inc in the INC directory. In order to change dimensions, first
change in the include file and then recompile the whole SEISAN distribution. The most important
dimensions are:
Number of points in one trace 2 400 000
Number of points in memory buffer 30 000 000
Number of lines in NORDIC format file 10 000
Maximum number of traces in one plot 1 000
Maximum number of events in one month 200 000
Maximum number of calibration files 4 000
Maximum number of epicenters in epimap 90 000
Maximum number of lines in index file made with dirf: 99 999
SEISAN has been tested with much larger dimensions, like 10 000 000 for number of points in one trace,
however large dimensions might slow down the speed due to swapping (particularly if memory is not
large) so a smaller dimension has been chosen. For continuous data, SEISAN works with many files so
smaller dimensions can be used. For the PC version, dimensions may be different from above, check
seidim.inc.
3.2. MACOSX 21
Note: In case programs dont work, you might have to recompile, see section 3.8.
Some Ubuntu users are missing the libg2c.so.0 library file, it can be installed with the command (you
might need to be online):
sudo apt-get install gcc
If this does not work, also try:
sudo apt-get install libg2c0
On at 64 bit computer the IASP files in DAT must be regenerated if you have the files from a 32 bit
computer, with the programs REMODL and SETBRN otherwise HYP will crash.
Graphics problem: On Solaris, if no colors, make sure color setting is 8 bit. Can be set with command
m64config -depth 8. See Solaris manual.
Multiple users on Linux/Unix
If two or more users are working with EEV at the same time with the same user, there is a risk that
the S-file names are being mixed up so an event from one year suddenly gets the S-file name from
another year. This is caused by both users using the same environmental variable for the S-file (should
be changed !). The solution is that each users has his/her own account, which in any case is the most
convenient. indexProblem: S-file changed name indexMultiple users on Linux/Unix indexWrong S-file
name indexS-file changed name
3.2 MacOSX
The MacOSX version does not come pre-compiled, and will have to be compiled by the user. Please see
section 3.8 and 3.8.3 for details.
3.3 Cygwin
As alternative to running SEISAN directly under Windows, it can also be compiled and used under
Cygwin. The cygwin website http://www.cygwin.com explains:
Cygwin is a Linux-like environment for Windows. It consists of two parts:
A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API
functionality.
A collection of tools which provide Linux look and feel. The Cygwin DLL currently works with
all recent, commercially released x86 32 bit and 64 bit versions of Windows, with the exception of
Windows CE.
It is attractive to use SEISAN with Cygwin as it looks like the Unix version. Under Cygwin SEISAN
uses X graphics, which requires the Cygwin X server (part of Cygwin). This is likely to work better
than the native Windows graphics, which has seen some problems with recent versions of Windows. The
compilation under Cygwin is like Solaris and Linux, which means on the software side there are fewer
differences to take care of.
Cygwin can be downloaded and installed from the website. However, to be able to compile SEISAN a
number of non-default packages have to be included:
22 CHAPTER 3. INSTALLATION
Devel: g77
Devel: make
Libs: libncurses-devel
Shells: tcsh
X11: xorg-x11-base
X11: xorg-x11-deve
Editors: vim
Utils: diffutils
The choice of packages is done through the Cygwin installation tool. With some of the packages, additional
required packages will be selected by default and must be installed.
To install SEISAN under Cygwin, use the Linux distribution and set SEISARCH to linux32 or linux64.
You have to compile as described for Linux below.
Under Cygwin, you can use csh or tcsh, which will allow to use the SEISAN.csh. If your default is bash,
(t)csh can be started from the command line. The X server is started using command startx from the
Cygwin prompt. See the Cygwin documentation for more details.
3.4 Windows
It is assumed that you transferred the Windows distribution from Internet to a directory on the PC.
In the following, it is assumed that you install on disk drive C. The windows graphics work with any
resolution, small fonts should be used, however, SEISAN is designed to work with 1024x768 or more.
SEISAN has not been tested on Windows XP or earlier Windows versions., Vistaand W8 has problems
with some graphics programs.
Using install script
Click on seisan v?.?.? windows.msi and follow the instructions, use all defaults. If you later want to
change some environmental variables, see instructions below. If SEISAN already is installed, a window
comes up for a possible upgrade or removal of SEISAN. A new version cannot be installed witout removing
the old one. SEISAN is now completely installed. Optionally, some parmeters can be set, se below.
OPTIONAL: Change environmental variables SEISAN EDITOR, SEISAN PSSCALE X,
SEISAN PSSCALE Y and DEF BASE (see UNIX section for definition) using control panel - system -
advanced and select environmental variables. The defaults are respectively
SEISMO, notepad, A4 and AGA. SEISAN TOP would be set as set SEISAN TOP=\SEISMO, but could
also be e.g. test\best\analysis or d:\seisan. Note there is one blank character at the end and the
first character MUST be \ or the second :. If no seismo directory, it could e.g. be just E:. The Unix
variable AGENCY is not used on the PC.
3.5. DATABASE DIRECTORIES FOR YOUR OWN SYSTEM, MAKEREA 23
Optional: If you want to recompile, you need the Fortran Gnu compilers installed, see section on compi-
lation below.
Printer:
It is assumed that a Postscript printer is connected to the PC, either directly or by a network. When a
program sends a plot to the printer, it issues the command SEISANPR. In the COM directory, there is a
file called SEISANPR.BAT containing the print command. Several suggestions are made in that file, the
default is to use COPY filename PRN. If you do not have a PostScript printer, it is possible to view and
print PostScript files with GhostViev, a public domain software available from many sites, e.g. . Other
software is also awailable to view PostScript files.
http://www.seas.ucla.edu/~ee5cta/ghostView/
http://www.cs.wisc.edu/~ghost/gsview/get47.htm
http://www.geo.uib.no/Seismologi/SOFTWARE/
Testdata:
The testdata set can be extracted from the file seisan test data.tar.gz with for example the WinZIP
program. Extract the data to the SEISAN top directory. To use the test data base as the default
DEF BASE must be set to TEST (done by default during installation).
Running SEISAN on a PC with data on a Unix system, or the other way around.
With SAMBA, a disk can be mounted between different platforms, for example a Unix file system under
Windows. The SEISAN TOP must then be set to the name of the Unix disk a seen on the PC. All files can
be read directly from the Unix disk, however the files IASP91 platform.HED and IASP91 platform.TBL
must be present. SEISAN works out which of these files to use. With SAMBA, PC users can then access
a Unix SEISAN data base directly using the programs on the PC.
Running SEISAN on networked PCs
SEISAN on one PC can be accessed from another PC. This can be an advantage if several users share
the same data base. On the client PC, name the server PC disk where seisan is installed e.g. Z:. Then
set seisan top=z:\.
Potential problems
Program takes a long time to load: If the program is large, it might use disk swap files, which can take
a lot of time. Reduce array size (seidim.inc in INC) and recompile.
Commands like P or L do not work in EEV. If swapping takes place, some damaged swap files or other
files might remain which prevents the program from starting. Clean disk with command SCANDISK.
Graphics problem: Graphics programs write text to a console window. If there is a program crash,
the error message goes to the console window, which then disappears.
Once you start locating events, the location program HYP will look for an input file with station co-
ordinates, location parameters and crustal model. This file is located in the DAT directory and called
STATION0.HYP. To edit the file, move to the DAT directory by using command DA and edit the file. For
more information about this file, see section 7. If you want to keep the original file for test purposes, first
copy it to a file with another name.
When plotting epicenters (command EPIMAP) input files with map-contours for the EPIMAP program
are used (type *.MAP). These files are also located in the DAT directory. If you want to use more detailed
map contours, you must get hold of your own data and put them into file called e.g. MYMAP.MAP. In
the DAT directory there are two sets of contours: WORLD.MAP and EUROPE.MAP, a more detailed
European map than found in WORLD.MAP. Detailed map files in SEISAN format for the whole world
is found at the SEISAN ftp site and the SEISAN CD.
The plotting program MULPLT can use a default file for those stations, which are to be routinely plotted,
as well as other default information. This is defined in MULPLT.DEF in DAT, see example file. MULPLT.DEF
also defines which keys are assigned to which phases and what character is used for the mouse. An example
is given in DAT, see also example in 8.
Both the MULPLT.DEF and STATION0.HYP can also be in the working directory. Programs always look
there first and on a multi-user system, this enables different users to have their own setup. It also makes
it possible to work with different setups by just changing directory.
The AUTOPIC PROGRAM requires AUTOPIC.INP in the DAT directory.
Most SEISAN program use the SEISAN.DEF file (in DAT, see section 3.10) where many general parameters
are set.
The bulletin program requires a front page with whatever you like and some set for fonts can be made.
The text of this page is located in the BUL.INP file in the DAT directory.
All programs using color can use a color definition file called COLOR.DEF. The file can be located in the
current working directory or in DAT. Programs will first look in the working directory, then in DAT. If no
COLOR.DEF file is given, default is used. Be careful with color setting, unexpected results might occur,
like getting a blank screen when plotting white traces on a white background. Several color settings are
universal like setting colors for titles, however several color settings are specific for particular programs,
see example file below. Since colors can also be used for the Postscript file, there is an option for using
color on the screen but not for Postscript, since it is more likely that the user will have a color screen
than a color Postscript plotter. Sending a color plot file to a black and white laser printer results in a
plot with gray tones.
The COLOR.DEF file:
This file is for defining SEISAN color objects and for setting the size(of full screen) of the graphics window
for individual programs. If no file available, default colors, as given at end of line below, will be used.
The entries can come in any order, however the keyword MUST appear as shown below. If an object
color is not defined, it will retain its default value. If a black or white background and no colors are
chosen, all colors will be reset accordingly.
3.7. COLOR SETTINGS 25
size_focmec 70
size_lsq 60
size_mag 60
size of mulplt 0 ! set in MULPLT.DEF
size_presp 65
size_rmsdep 50
size_spec 80
size_ttplot 60
size_wad_plot 60
This section describes how to compile SEISAN or individual SEISAN programs. In the following subsec-
tions guidelines for indivudual operating systems are given.
The SEISAN distribution for all platforms includes the executables. Therefore in general it is not neces-
sary to recompile. However, you may have the source distribution or you might want to modify some of
the programs for your own needs or remove bugs and will have to compile programs.
The SEISAN programs on all platforms can be compiled using the make utility. On all platforms there is
a Makefile in both the PRO and LIB directories and the Makefile is the same for all operating systems
supported. The file might not need any modification, however the following parameters must be set
correctly:
SEISARCH (environmental variable): This variable is used as keyword for the compilation, and can be
linux32, linux64, solaris, macosx, macosxppc or windows. While the gfortran option should work on
all platforms, the other keywords allow to have specific compile options. The keywords are also used to
define which programs are compiled and installed in addition to the default list of programs. See chapter
7 for differences between the platforms. (Note: Without setting SEISARCH, the compilation will not
work since make will not know what SEISARCH is). On Linux/Unix system SEISARCH is set in the files
SEISAN.csh or SEISAN.bash in COM while on Windows it is set in the Makefile itself or it can be set
manually as an environmental variable. Most of the programs are the same on all platforms, but not all.
The compilation can now be started from the PRO directory by starting make all. From the Makefile in
the PRO directory, the Makefile in the LIB directory is started to create the object libraries. A SEISAN
archive in LIB for SEISAN routines is created, seisan.a and in libmseed, an archive libmeseed.a is
made. The archives contains all library subroutines, and you can easily link to the archives if you want
to use SEISAN subroutines in your own programs. Finally all programs are compiled.
Single programs can be recompiled by starting make program . If you do changes in the LIB directory
you need to compile using make all, which will also create the archive file. Then you can recompile
individual programs in PRO as explained above.
Note that on all platforms the Chad Trabant MiniSeed library is used (new from version 9.0). In the
distribution they are located in file libmseed.c in LIB and 4 include files in INC (see seisan.all in
INF). The libmseed.c file contains all subroutines in the original Trabant distribution and all include
files from Trabant distribution are in INC. The current version of the Trabant distribution is 2.6.1. If
you want to use different version, the same process as described above must be done.
Seisan Explorer
The compilation of the SEISAN GUI Seisan Explorer is described in the following subsections.
3.8. COMPILING SEISAN PROGRAMS 27
3.8.1 Linux
Step 3 and 4 is not needed if Qt Creator is used. The qmake program is a part of the QtSDK. You need
qmake in your path. Alternatively, you can specify full path to qmake.
3.8.2 Solaris
3.8.3 MacOSX
The compilation of SEISAN on a Mac is basically the same as for Solaris/Linux, in COM/SEISAN.bash
or COM/SEISAN.csh, set SEISARCH to macosx (Intel-based=newer Macs) or macosxppc (PowerPC
based).
You may also need to change the line $(fc) seed.for to $(fc) -fno-range-check seed.for in LIB/Makefile
If you have gcc/gfortran 4+ installed and your Mac is Intel-based, you should now be able to compile.
You also need X-windows, which should be preinstalled or on the installation disk for OSX 10.5 and
higher (for earlier versions, they can be downloaded and installed).
New Mac computers are 64 bit, this URL is also showing how to tell if you Intel based is 32 bit: http:
//support.apple.com/kb/ht3696.
Additional hints on MacOSX 10
In order to compile and link Seisan off the source distribution, you need to have gcc/gfortran and Xcode
installed.
We recommend you install the following:
brew package manager: Copy the following line in the Terminal and press Enter: /usr/bin/ruby -e $(curl
-fsSL https://raw.githubusercontent.com/Homebrew /install/master/install)
gcc compilers: Upon successful installation of brew, execute brew install gcc from the terminal.
XCODE: Either install it from the Mac store under
https://itunes.apple.com/us/app/xcode/id4977998x5?ls=1&mt=12#
or from the terminal when you are automatically asked for it.
X11 Quartz: Download the dmg-file, doubleclick and install:
https://dl.bintray.com/xquartz/legacy-downloads/SL/XQuartz-2.7.8.dmg
The compilation procedure is the same as for Linux. However, for more details see INF/readme macosx.txt.
Seisan Explorer
The GUI Seisan Explorer have not been tested on Mac!
3.8.4 Windows
Step 3 and 4 is not needed if Qt Creator is used. The qmake program is a part of the QtSDK. You need
qmake in your path. Alternatively, you can specify full path to qmake.
This file is for defaults for SEISAN and called SEISAN.DEF. The name must
be in upper case on Sun. The following shows the parameters which can be set.
The file can contain any lines in any order, only the lines with
recognized keywords and a non blank field under Par 1 will be read. The
comments have no importance.
30 CHAPTER 3. INSTALLATION
KEYWORD............Comments.............Par 1.....Par 2
#
# seisan cont dat abase
#
CONT_BASE REA continuous base RUND
CONT_BASE REA continuous base JMI
CONT_BASE REA continuous base NSS
CONT_BEFORE start min before 20.
CONT_AFTER start min after 1.
#
# position in file name where year yyyy and month mm starts
#
CONT_YEAR_MONTH_POSTION_FILE
#
# archive
#
ARC_CHAN SFJD LHZIU10
ARC_CHAN KBS LHZGE10
ARC_CHAN DAG LHZGE
ARC_CHAN TULEGLHZDK
ARC_CHAN BSD LHZDK
ARC_CHAN BORG LHZII10 20020101 20150202
ARC_ARCHIVE ./archive
ARC_DURATION 10000.0
ARC_START_TIME 100.0
ARC_TYPE 1.0
ARC_BY_DEFAULT 0.0
#
# virtual networks NAME SCNL
# several networks can be defined
#
ARC_VIRTUAL_NETWORK _DK BSD LHZDK
ARC_VIRTUAL_NETWORK _NO KBS LHZGE10
# ...
#
# PREM velocity and density model, Q model not known, Q is average along path,
# not Q in layer. Q might be distance dependent. Kappas are low values.
#
SPEC KAPPA p and kappa s 0.01 0.02
SPEC Q BELOW 1 HZ, P,S 1.0 1.0
#
# depth vp vs Q0p Qal Q0s Qal dens
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 3.0 5.8 3.2 500. 0.7 400. 0.7 2.6
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 15.0 6.8 3.9 500. 0.7 400. 0.7 2.9
3.10. SETTING GENERAL SEISAN DEFAULTS, SEISAN.DEF 31
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 24.0 8.1 4.5 500. 0.7 400. 0.7 3.4
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 80.0 8.1 4.5 500. 0.7 400. 0.7 3.4
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 171. 8.0 4.4 500. 0.7 400. 0.7 3.4
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 220. 8.6 4.6 500. 0.7 400. 0.7 3.4
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 271. 8.7 4.7 500. 0.7 400. 0.7 3.5
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 371. 8.9 4.8 500. 0.7 400. 0.7 3.5
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 400. 9.1 4.9 500. 0.7 400. 0.7 3.7
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 471. 9.5 5.1 500. 0.7 400. 0.7 3.8
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 571. 10.0 5.4 500. 0.7 400. 0.7 3.9
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 600. 10.2 5.5 500. 0.7 400. 0.7 4.0
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 670. 10.3 5.6 500. 0.7 400. 0.7 4.0
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 771. 11.1 6.2 500. 0.7 400. 0.7 4.4
SPEC MODEL h,vp,vs,qp,qap,qs,qas,d 871. 11.2 6.3 500. 0.7 400. 0.7 4.5
# order to select magnitudes as given here from top (high priortiy) to bottom (low priority)
MAGNITUDE_ORDER WGCM
MAGNITUDE_ORDER LBER
32 CHAPTER 3. INSTALLATION
MAGNITUDE_ORDER WBER
GMAP_AUTO_SHOW_OLD_LOCATION 0:no,1:yes 1.
GMAP_AUTO_OLD_LOCATION_COLOR ffff0000
GMAP_AUTO_SHOW_PATH 0: no, 1:yes 1.
GMAP_AUTO_PATH_COLOR ff929292
GMAP_AUTO_PATH_WIDTH 2.5
GMAP_AUTO_FILE_ACTION 0: no, 1:yes 0.
GMAP_AUTO_ACTION cp gmap.cur.kml /inetpub/www/html/seismo/nnsn
# e.g. GMAP_AUTO_ACTION ncftpput -u seismo -p passwd ftp.server /home/seismo/www gmap.cur.km
CONT AFTER: Minutes to read into the memory after the data that is plotted
CONT YEAR MONTH POSTION FILE: Position in cont file name where year yyyy and month mm
starts, all files must have the same format.
COPY WAV DIR: Normally, waveform files are copied to WAV when registering an event. If this param-
eter is set, waveform files can be copied to the WAV data base specified. Max 5 characters.
CURSOR: Select cursor: 0. for pointer, 1 for cross and 2 for crosshair (Unix only, on PC only pointer is
available)).
EEV COMMENT: Comments entered can then be used with EEV command ic. There can be any number
of comments, max length 40 chars.
EPIMAP MAP FILE: The map coordinates file to use with MAP option in EEV
Epimap projection. The projection number used by EPIMAP, see EPIMAP program for choices.
EPIMAP STATIONS: One letter indicator for plotting stations, in first column. See EPIMAP program
for codes. A is all.
FOCMEC MAXSOL: Maximum number of solutions in FOCMEC grid search, default is 100, however,
it may be required to allow for more solutions.
FONT: Select font available on X system. To check available fonts use command xlsfonts or xfontsel
and xfd -fn font to display a font. (Unix only)
HIGH ACCURACY: Setting it to 1.0 enables high accuracy operation. This parameter affects programs
MULPLT, HYP and UPDATE
HYPO71 OFFSET: Apply offset in degree to station and epicenter locations, required for example when
not all stations are either east or west of 0 longitude.
MAGNITUDE ORDER: A list of magnitude type and agency (e.g., LBER for ML from agency BER)
can be given to specify the order of magnitudes for selection. The order is given by listing different
magnitudes from top to bottom, where the magnitude at the top has highest priority and the bottom one
the lowest. It is possible to leave either magnitude or agency blank in which case the blank represents a
wildcard. This parameter is currently used by the program norcsv only.
MAP LAT BORDER, map lon border: These parameters are used with command MAP and GMTMAP
in EEV, which plot a map centered on current epicenter. The two parameters give the distance in degrees
from the epicenter that the map should be plotted. If both set to 0. EEV will ask for the parameters.
MERGE WAVEFORM: The network code given to waveform files merged with MULPLT when running
from EEV. See MULPLT and EEV. Also used in WAVETOOL and SEISEI. Max 5 characters.
SPECTRAL GEO DEPTHS and HERKIJ DISTANCE. See MULPLT spectral section for explanation.
Parameters used to calculate geometrical spreading.
SPEC KAPPA: P and S kappa values used with spec model.
SPEC Q BELOW 1 HZ: P and S values (X) for how Q is a function of frequency below the paramter value
X. The Q-function is as follows: if X=0.0 then Q=Q0*f**qalpha. If X 0.0, then Q=Q0*(1+f/X)**qalpha
whwere f is frequency. These parameters are only active if the spec model is used, de default is X=1.0. The
default is thus no frequecy dependense below 1 Hz. See also MULPLT, MULPLT.DEF and AUTOMAG.
SPEC MODEL: Gives depth, p-velocity, s-velocity, qp0, qpalpha, qs0, qsalpha and density. One line per
layer in incresing depths. Format after column 40 is 8f5.0
3.10. SETTING GENERAL SEISAN DEFAULTS, SEISAN.DEF 35
123456.. (Position)
3.11. FORMAT DESCRIPTION IN PARMATER FILES 37
Fn.k: Real number format: E.g. f7.3 is a real number occupying 7 places like 111.111 and the decimal
point is 3 places from the right. Any real number can occupy the 7 places like
1234567 (Position)
1.1
1.1
1.1
All of these will be read as 1.1. If there is no decimal place given, it is automatically put k places from
the right. Like the number 1234 read with f4.2 will be read as 12.34. nX . Spaces. Like 5x means 5
spaces.
An: Character format: Like A5 means reading 5 characters
Combining format specifications, example
This chapter referes to Seisan Explorer (SE) Version 2.5.0, compiled with Qt Version 4.8.4
The core part of the SE code is written by yind Natvik, Department of Earth Science, University of
Bergen, Norway. The functions are mainly written by Peter Voss.
Introduction
Seisan Explorer (hereafter called SE) is a new graphical user interface for SEISAN written in C++/QT.
It is supported on Windows, Linux and UNIX platforms. In its current version, it replaces the old
SEISAN graphical interface for Windows, but the intention is that SE will be the main graphical user
interface for SEISAN through which most of the current processing by EEV and MULPLT will take place.
However, remaking MULPLT requires a large effort so the current MULPLT is used for now. In the following
description, it is assumed that the user is familiar with SEISAN.
Problems
Please report bugs and questions to seisan@geo.uib.no
Installation:
Windows:
SE is installed together with Seisan.
Linux:
SE need to be compiled on Linux/UNIX platforms. Please see section 3.8.
Mac and Solaris:
SE has not been tested or compiled on Mac or Solaris.
Memory requirements:
When opening a database, SE will load the contents of all S-files into memory. Opening a database of
100.000 events will require 350+ megabytes of memory
How SE works:
SE loads S-files from a SEISAN database. Only the S-files that falls within a user specified time interval
are read. You may also load an index file or a local database. In this case, the currently set time interval
is ignored, and time interval is adjusted automatically to fit the loaded data All information in the S-files
is stored in memory for fast access. SE is dimensioned for up to one million events. In contrast to EEV,
39
40 CHAPTER 4. SEISAN EXPLORER USER GUIDE
SE can read in data for several months or years, thereby giving the user the opportunity to work with
large datasets without any artificial time boundaries. A subset of the data in each S-file is displayed in
rows in the Event List view as demonstrated on the front page and in Figure 4.1.
When a database has been loaded, the user can select one or several events for further action, a bit like
EEV. The Event List view columns can to a certain degree be customized (EventList/Select Columns).
A Log view is available where most system messages are shown.
An overview of the SE application:
The application can present two views, the Event List view and the Log view. The Event List view is
shown in the figure below. The program also has a title bar at the top and a status bar at the bottom.
The title bar shows the currently opened database and the number of events loaded.
The left part of the status bar shows messages. Status bar messages will only be displayed for a few
seconds and then disappear since they might soon be replaces by another message. The right part of
the status bar shows permanent information which is the current time interval and the current operator
code.
The Event List view
41
When a database is loaded into SE, the Event List view will be populated (see Figure 4.1), and the
first event will automatically be selected. To navigate, use mouse, arrow keys or the scroll bars. Click
on an event to select it. Several events can be selected as needed using standard selection procedures.
Some items in the event list view may be displayed with a grey background colour. This indicates that
additional information will pop up if hovering over these items with the mouse pointer.
In the Event List view you can:
Search for an event by time: From Event List view, just start typing the desired date (type as
yyyymmddhhmmss), and the event nearest in time will be the selected. Press Enter when finished
searching.
Navigate to a particular row number by typing 0 followed by the row number (what in EEV was
called event number) and press Enter.
Navigate between selected events using the commands N (next), and Shift+N (previous).
Search event(s) by time association: Use shortcut A and all events associated with each other within
given time window (default 200 seconds) are selected.
Executing actions. Right-click inside the Event List view to bring up the Event List menu. The menu
shows all available actions and their corresponding shortcuts. The current actions are:
Associate events (A): Find events occurring within a given time interval (default 200s).
Copy to file (C): Copy highlighted events to file se-select.out.out (located in work directory).
Edit STATIONx.HYP file (Shift+S): The STATION file associated with current event (default) or
any other station file can be edited.
EEV (): Launch EEV with current event. Some EEV commands will be disabled and it is not
possible to move to another event is EEV.
Locate (L): Locate current event with HYP. A change from EEV is that the user will be given the
option of updating the event in which case the S-file is overwritten.
Merge (M): Merge one or more events into a destination event. Note: To mark events for merging,
first mark the destination event. Then mark one or more events while holding down the Ctrl key.
Plot with mulplt (P): MULPLT is started in all default mode so no questions are asked. Results of
picks are put back in S-file and SE.
Plot with mulplt (show plot menu) (Shift-P): The mulplt plot menu will be shown so all defaults is
not used.
42 CHAPTER 4. SEISAN EXPLORER USER GUIDE
Other actions:
Refresh view (F5): Refreshes the current Event List view. Does not reload the database.
Load event file into Explorer (F3): Reads a single S-file into SE. The S-file must belong to the
currently opened database, but it can be outside of the current time interval.
Unload event from Explorer (F4): Unloads an event from SE. This action does not remove the
event from the SEISAN database.
Select all events, (Ctrl+A). Select all events in view.
Set filter (Ctrl+F): Apply a filter to the event list.
Note that most actions are disabled while SE is busy loading a database.
Sorting data in the Event List view.
The default sorting is by date/time. However, the eventlist can also be sorted by the contents of any
other column to sort by this column. Simply click on the header of any column and all events displayed
are in the order of the clicked column. The order can also be reversed by clicking the header again. E.g.
clicking twice on the depth column will order events by increasing depth. Columns with text will be
sorted alphabetically.
Event List menu
Under this menu we find options for dealing with the Event List view . They are:
Set filter. This means setting criteria for selection of a subset of the Event List View, see details
below. E.g., all events larger than a particular magnitude can be selected and only those will then
appear in the Event List view.
Remove filter. Return to the original unfiltered view.
Select columns. Select columns to show.
Auto resize columns. Automatically resize the column widths (based on what is currently visible
in the view).
selection is made, the selected events are shown in the Event List View, and further processing can be
done with these events. Selections are made using logical expressions built from tokens.
The selection filter has two parts, one filter to include events, and one filter to exclude events. When
applying the selection filter, the include expression is executed first and will return a list of all events
that matches that expression. Next, the exclude filter will be applied if it has been defined. The exclude
filter will be applied only to the result of the include filter, thereby reducing the resulting event list
further. This can e.g. be used to select all events between 4 and 8 in magnitude but exclude events with
magnitude 5 to 6. Both filters are defined in the same way with logical expressions. See examples below.
To createa filter, press Ctrl-F, or use the Event List menu to bring up the filter dialog (see figure 4.2).
Click the Edit buttons to bring up the expression builder.
The expression builder is used to define the include/exclude expressions. In expression builder, you may
get explanation and examples for each token by right-clicking the token button. An include expression
is mandatory. The use of an exclude expression is usually optional. When you are done creating and
testing the filter, you may save the filter to a .flt file. The filter can then be loaded again later as needed.
The filters description is also saved.
45
Properties
Operators
Values
Functions
Properties:
These are properties in the S-file, like latitude, agency and magnitudes. Property names always start
with a dollar sign, like $Agency.
Values:
Values are numbers or strings.
Operators:
The following logical operators are supported: =, <, <=, >, >=, AND, OR. In addition parentheses are
also supported.
Functions:
Functions take a set of parameters. The return value is the logical value true or false. All functions
take their parameters inside square brackets.
An example of a simple expression is
which selects events between 55 and 70 degrees N and with magnitude larger than 2.
An example of an expression with a function is
which selects all events with agency ber and latitude from 30 to 60.
Rules for writing a valid expression:
The expression generally has to be constructed by one or more logical statements of type $property = value.
The statements must be bound together by AND/OR operators to form an expression that evaluates
to true or false when executed.
Spaces are needed around all tokens (except for the right/left parenthesis).
Capitalization of the expression is generally not important, so $agency = "ber" is eqal to $AGENCY = "BER".
String values are treated in a case-insensitive way.
String values must be enclosed in double quotes.
Decimal numbers are not required to have a decimal point. So 10.0 can be written as 10.
Arguments to functions are separated by commas.
46 CHAPTER 4. SEISAN EXPLORER USER GUIDE
A function may take a logical expression as an argument. These expressions must adhere to the
same rules as a normal expression. view.
The expression builder will check the expression for errors when pressing the OK button. If any errors
are detected, an error message will appear, and the error will have to be corrected.
There is a special keyword IncludeAll, that can be used in the include filter to include all events. If
this keyword is used then an exclude expression is mandatory. Also note that this keyword must be used
alone. It cannot be combined with other tokens.
Magnitudes in selection filter.
Since most events has several types of magnitudes, it can sometimes be difficult to select on magnitude
criteria. SEISAN therefore optionally has a unique magnitude (or main magnitude) for each event called
M. M is assigned to one of the magnitudes given for the event according to criteria for event type and
event agency as set up in SEISAN.DEF, see xx. The selection criteria can use either the unique magnitude
or a combination of magnitudes types and magnitude agencies.
The Log view.
The Log view (Figure 4.4) shows all important messages from SE. Information messages are black,
warnings are blue, and errors are in red colour. Every time an error occurs, it will be logged here, and
SE will automatically switch to the Log view to make the user aware of the error. The log view has a
menu that can be activated by right-clicking anywhere in the view.
The menu has commands for common tasks such as clearing the view, or saving it to a file. If the Log
47
view holds lines with errors/warnings for S-files, then it is possible to edit these S-files directly from the
log view by right-clicking the line.
The work directory.
SE will always use a specific work directory where the log file and all output is written, e.g. from
hypocenter locations. This work directory is independent from where SE is started, whether from the
desktop or a particular directory. The work directory is by default WOR, but an alternative directory
can be set (File/Set Work Directory). The work directory is also the local directory where MULPLT
will look for waveform files irrespective of from which directory SE has been started. The current work
directory is shown in the Log view when SE is started. Multiple running copies of SE should not share
the same work directory. Therefore - when SE starts up
- it will look for the existence of a lock file called se-workdir.lock in its work directory. If it does not
exist, then it will be created to signal that directory is now in use. If it exists, then this may indicate
that another user is currently using the work directory. In this case a dialog box with a warning appears
(see Figure 4.5). The user will be allowed to remove the lock file (if he is sure that none else is actually
using the work directory), or select a new work directory, or exit the program. Any lock file created by
SE will automatically be deleted when the program is closed. If SE should crash, then the lock file will
be left in the work directory. In this case it can safely be deleted manually.
Multiple running copies of SE should not share the same work directory. Therefore - when SE starts up
- it will look for the existence of a lock file called se-workdir.lock in its work directory. If it does not
exist, then it will be created to signal that directory is now in use. If it exists, then this may indicate
that another user is currently using the work directory. In this case a dialog box with a warning appears
(see Figure 4.5).
The user will be allowed to remove the lock file (if he is sure that none else is actually using the work
directory), or continue to select a new work directory. Any lock file created by SE will automatically
be deleted when the program is closed. If SE should crash, then the lock file will be left in the work
directory. In this case it can safely be removed manually.
Open a database.
Databases are opened under File/Open. The choices are: Default Database (as set by DEF BASE), Local
Database, Database, Catalog File and Index File. The Database option will open a dialog box
showing the REA directory with all databases (standard 5 letter directories), and one can be selected.
A new option - compared to EEV - is that a database (the year month structure) can be located under
any directory, not just REA. It can be selected by navigating the file system from the dialog box. This
arbitrary structure must have corresponding waveform files in WAV, SE working directory or a named
directory (see SEISAN.DEF) and cannot use the WAV structure since it is not placed in a standard REA
48 CHAPTER 4. SEISAN EXPLORER USER GUIDE
structure.
The Catalog File option makes it possible to open a catalog file. SE will extract the S-Files inside
the cat-file to a user-selectable folder, and then open the folder as a local database. When closing the
database, user will be prompted to save any changes back to the catalog file. The folder will not be
automatically removed when the database is closed. It will have to be deleted manually.
SE can be configured to automatically open the last used database on start-up (see File/Configure).
Local data base in SE, access to EEV and reading waveform files.
Case 1: Default working directory
The default working directory in SE (example Windows) is \seismo \WOR \. A local data base can then
be opened in any other directory. The waveform files must then be in WAV or WOR. If they are in the
local data base directory, they can be found if parameter WAVEFORM DIRS is set in SEISAN.DEF like
WAVEFORM DIRS Waveform directory \seismo \wor \test
where the location of the waveform files are given as \seismo \wor \test , which also can be the local
data base directory.
EEV will not work since EEV will look in SE working directory.
Case 2: Directory with local data base is set as SE working directory
In SE the working directory can be set under file > File/Set Work Directory... When set to the
directory of the local data base, EEV will work and waveform files will be found if in WAV or local data
base directory. WAVEFORM DIRS does not need to be set. However, no other local data base can be
opened (a bug to be fixed).
Setting a time interval.
When a database is being opened, SE will suggest a default time interval. The default time interval has
an End date equal to the current date, and the Start date is set to the current date minus 30 days
(this value is user configurable). Both start-date and end-date can be modified by the user (see Figure
4.6). The default time span between start-date and end-date can be set under File/Configure. The
time interval can be changed at any time by pressing ctrl-t or using the main menu (File/Set Time
Interval). If the time interval is changed when a database is open, then the user will be prompted to
reload the database.
Special functions have been written for SE, see below. To add new functions the two functions Sample
function A and Sample function B can be used. Add changed in the source code of sample function A.cpp
or sample function B.cpp and recompile. If you wish to change the widget we recommend to use Qt
Creator, see http://qt-project.org/wiki/Category:Tools::QtCreator. Sample function A show
how to get values in the event list. Sample function B show how to use the plotting widget QCustomPlot
(see also http://www.workslikeclockwork.com/index.php/components/qt-plotting-widget/ ).
Functions
The functions are operations dealing will all data in the Event View, and not the data manually selected.
The functions are:
With the function Gutenberg-Richter relation a histogram showing the number of events in selected
magnitude intervals can be plotted. Furthermore, the b-value can be computed from the incremental and
cumulative values using linear regression. An example is seen in figure 4.7.
With the function Poisson distribution, it can be tested whether or not the earthquakes in the event list
49
are Poisson distributed. The function plot a histogram of the number of earthquakes in yearly intervals,
and its coorsponding Poisson distribution. An example is seen in figure 4.8.
With the function Completeness check the years of completeness for selected magnitude intervals can be
estimated. The output of the analysis done with this function is stored in the function se-completeness.out.
An example is seen in figure 4.9.
With the function Weichert method, the b-value can be estimated. This function use the file se-completeness.out
as input (see 4.9). An example is seen in figure 4.10.
With the function Tempo-spatial hypocenter distribution, the latitude or longitude or depth of the events
in the event list can be plotted over time. An example is seen in figure 4.11
With the function change-event-type the events in the event list can be changed to E-explosion or P-
possibel explosion or V-volcanic or Q-known earthquake. An example is seen in figure 4.12
With the function change-model-indicator the earth model of events in the event list can be changed. An
example is seen in figure 4.13
With the function mag-vs-mag magnitudes can be compared. An example is seen in figure 4.14
With the function events-per-year the number of events per year can be plotted in selected intervals. An
example is seen in figure 4.15
With the function Time of day the number of events in the event list can be plottes with respect to the
hypocenter time. An example is seen in figure 4.16
With the function Time of day versus time of year one can check, if e.g. there is an encreasing number
of explosions at noon in a specific period. An example is seen in figure 4.17
With the function Time of day versus distance one can check if e.g. a mining area is making explosions.
An example is seen in figure 4.18
With the function Simple Waveform Viewer waveform files in the Ascii Helmberger format. Use OutW
51
Figure 4.12: These event types are available E,P,V,Q and blank, here the Q
is shown. se-change-event-type
53
command in MULPLT to generate waveform data file mulplt.wav in Ascii Helmberger format. An
example is seen in figure 4.19
58 CHAPTER 4. SEISAN EXPLORER USER GUIDE
Chapter 5
Using SEISAN
Once the system has been installed, it is ready to use. Usually all work should be done in the WOR
directory or on a multi user system from your own directory. To move to WOR, type WO. Unless you
have to do system work, it will not be necessary to move to any other directories. However to do so, just
type the first two letters of the directory name like DA to move to the DAT directory. On a PC the Edit
editor is default (invoked with command edit), and on SUN the vi editor.
The system has two basic modes of operation. The first is to work interactively with the database. That
means jumping around from event to event, plotting, interactive phase picking, locating, deleting, typing,
editing or appending events (S-files). This mode is invoked with the command EEV, which uses several
programs, controlled by a driver program and is intended for testing and editing of single events. Once
the input data seems OK, the second mode of operation can be used.
The second mode is more like traditional data analysis where single programs are made to work on the
whole or part of the database. In this mode the updated S-files and CAT-files are created. Examples are
also plotting of epicenters, waveform data or searching for data fulfilling certain criteria.
The system comes with a test data set from different networks, mainly the Norwegian National Network
for the time periods 199309 to 200002. The data has waveform data in different formats. The data set
includes events from both local and teleseismic distances. The installation of test data is separate from
installation of SEISAN.
If you want to try the system, go directly to section 5.3 to get a feeling for how the system works.
User guide
A short user guide is found in the following section 5.1.
Tutorial
The document SEISAN tutorial is an introductory tutorial for new SEISAN users. It does not require
installation any test data since only the test data included with SEISAN is used. It is given as a PDF
document in INF. Or here:
http://seisan.info/seisan-tutorial.pdf
Computer exercises
The document Introduction to SEISAN and Computer exercises in processing earthquake data which is
a more complete tutorial for both new users as well as experienced users, is included in the distribution.
The testdata used in the exercises need to be installed, see chapter 3. It covers a lot more topics than
59
60 CHAPTER 5. USING SEISAN
the tutorial. The document is given as PDF file (seitrain.pdf) in the INF directory. Or here:
ftp://ftp.geo.uib.no/pub/seismo/SOFTWARE/SEISAN/seitrain.pdf
WEBINAR
To get an idea of how SEISAN works, new users can take a look at a SEISAN webinar that was arranged by
IRIS in 2014 (see https://www.youtube.com/watch?v=KJH3ktGL_K0 or fileseisan webinar iris 2014.mov
on the SEISAN ftp server).
Illustration of earthquake ananlysis using SEISAN
SEISAN also has document illustrating the steps involved when analyzing seismic records. This is
more a demonstration than a course. Examples are given for local, regional and teleseismic earth-
quakes. This is done by giving representative screen plots together with explanatory texts that follow
the figures. This document is part of the New Manual of Seismological Observatory Practice manual
(http://bib.telegrafenberg.de/publizieren/vertrieb/nmsop/). All the data used are also included with
the test data. In SEISAN, the document is found in INF: nmsop is11.7 seisan.pdf. Or here:
http://seisan.info/INF/nmsop_is11.7_seisan.pdf
SEISAN problems
Some of the most common problems have been collected in the index under the header Problem and
in section 5.11.
- Determination of back azimuth and apprent velocity using arrays and networks
The main work of a seismic observatory is to quickly process and organize incoming data from different
sources. SEISAN has a simple time ordered database (see later section) and a set of programs for these
tasks. The most important programs are:
EEV: The EEV program is the interactive program for working with single events in the database. The
program is used to navigate in the database to find a given event as well as for housekeeping (splitting,
merging and deleting events). Once an event has been selected, a large number of options are available
5.1. SHORT USER GUIDE 61
like phase picking, earthquake location, fault plane solution, macroseismic information etc. All results of
the interactive processing are stored in the database (S-files).
MULPLT: This is the general plotting and signal analysis program and can be used to pick phases and
amplitudes, correct for instrument response, produce Wood-Anderson seismograms for determining Ml,
simulate WWSSN SP and LP records, determine azimuth of arrival for 3 component stations, rotate
seismograms, display theoretical arrival times for IASP91 phases to help identifying global phases and do
spectral analysis. MULPLT can be used from EEV or as a stand-alone program.
FK and PFIT Determining apparent velocity and back azimuth using an array of a local /regional
network.
HYP: This is the general program for hypocenter location and is based on HYPOCENTER [Lienert et al.,
1986; Lienert and Havskov, 1995]. The program can use nearly all common crustal and global phases
(8 character ISC codes), locate teleseismic events using the IASP91 model and use observed azimuth
and apparent velocity. The program can therefore be used with all types of input data whether from
single stations or arrays. HYP can be used from EEV or as a stand-alone program. Apparent velocity is
currently only used for starting location.
EPIMAP: This is the general hypocenter plotting program for making epicenter maps and hypocenter
profiles. The hypocenters can be plotted with elliptical error ellipses and EPIMAP can also be used for
interactive selection of events in polygon areas. For plotting hypocenters, there is also an interface to
GMT.
BUL: The function of this program is to produce a bulletin. The user can tailor the appearance to local
needs and the program can produce bulletins of hypocenters only or both hypocenters and phase readings.
In addition to the above programs, several programs are available for database creation, input and output
of large data sets and conversion and manipulation of waveform data.
In order to get an idea of how routine processing works, some examples of routine processing will be
given below.
Case A: Telemetry network with 32 channel central recording
The network generates waveform event files, which are transferred to SEISAN. The tasks are:
1: Convert waveform files to SEISAN format or any of the other formats used by SEISAN. It is likely
that the format is MiniSEED in which case no conversion is needed. (many events can be converted
in one operation). Inspect events with MULPLT. From MULPLT, false triggers are deleted and
real events are put into the database. Events are at this stage identified as local, regional or distant.
Phase picks can be done at this stage, but is usually done later.
2: Interactive phase picking, earthquake location, magnitude etc done with EEV. Automatic phase
picking is also possible at this stage.
3: Database is updated (UPDATE) once a suitable interval has been processed interactively, usually
a month. Updating means permanently storing the hypocenters etc in the database.
4: Make hypocenter maps with EPIMAP.
5: Produce a bulletin with BUL.
to the same event. There are now two options. The first is to merge the waveform files for corresponding
events and then put the events into the database. The second option is to put all real events into the
database and then do the merging from EEV.
Case C: A mix of stations and networks and additional phase readings
The steps are as in case B except that before step 2, the additional phase data is put into the database.
In this case the merging of events must be done with EEV
Case D: A network recording all data in continuous mode into a SEISAN continuous data base. In
addition, there is likely to be network wide triggering put into SEISAN. In this case it is a question of
inspecting the triggers with EEV/MULPLT as above and possibly extract additional data out of the
continuous data base and put it into the event data base.
It should be noted that data collection and step 1 to 3 is fully automated using SEISNET [Ottem
oller
and Havskov, 1999].
Example of using EEV for interactive processing:
Find event in default database nearest the given date and time: EEV 1999020303
Once EEV is started, an EEV prompt is given and different EEV options are available. Examples are:
E: Edit event, P: Plot event, L: Locate event, F: Make fault plane solution, d2201: Find event nearest
day 22 at 01 hour, MAP: Start EPIMAP to show earthquake location and SAC: Start SAC processing
of event using all parameter and waveform data from SEISAN database.
The above examples have mostly described the interactive processing of single events. However, once the
data is in the database, operations can be done on the whole database, for any time interval or for events
fulfilling certain criteria (like magnitude, area etc). Examples are relocating events, extracting data and
determining coda Q.
The routine processing normally produces magnitudes and hypocenters. The fault plane solution can
be determined using polarities and one event (Snoke et. al., 1984). Composite fault plane solutions
can also be made. In addtion there are 3 more programs for makeing fault plane solutions, 2 of which
also can use amplitude ratios. A second way of determining fault plane solution is to synthetically
model the waveforms using the modeling programs. In addition, seismic moment, stress drop and seismic
source radius can be determined by doing spectral analysis or spectral modeling. This can also be done
automatically with AUTOSIG. The moment tensor of local earthquakes can be determined by inverting
the amplitudes of the Pg and Sg waves [Ebel and Bonjer, 1990]
The full wave modeling programs integrated with SEISAN, are written by Bouchon [1981] and Herrmann
(Herrmann,1996). The ray-tracing program is based on WKBJ and written by Chapman et al. [1988] and
integrated with SEISAN by Valerie Maupin. All the above programs are executed from EEV in order to
use known source parameters.
Momnet tensor inversion can be made in EEV using the Dreger (2003) programs.
A large database can be a good source of information for determining structural parameters and SEISAN
provides several programs to determine the crustal structure and Q. Using seismic arrival times, it is
possible to invert for the crustal structure using the VELEST program [Kissling et al., 1994]. It is also
5.1. SHORT USER GUIDE 63
possible to do forward modeling using the location program for a large number earthquakes, since it at
the end of a run, a summary of average station travel time residuals and event RMS is given. A special
option of HYP is to locate a data set with all permutation of a given range of models in order to find the
model giving the lowest RMS.
Deep earthquakes under a local network produce clear phase conversion at crustal interfaces [Chiu et al.,
1986]. They can be modeled with one of the full wave modeling programs both with respect to amplitude
and arrival time.
SEISAN can, when displaying surface waves, make spectral files ready to be processed for surface wave
dispersion with Herrmanns programs (Herrmann, 1996).
Attenuation can be determined using the coda Q method for local earthquakes (CODAQ). The coda
Q program will calculate q for a series of events and stations at given frequencies. Average values are
calculated and a q vs f curve is fitted to the calculated values. The principle for calculation is the
standard coda q method, whereby a coda window is bandpass filtered, an envelope fitted and the coda q
at the corresponding frequency calculated [Havskov et al., 1989]. The SPEC program will determine Q by
calculating spectral ratios or the near surface attenuation using the spectral decay method. An alternative
is to use spectral modeling where Q, stress drop and seismic moment are modeled simultaneously. The
AUTOMAG program can do a grid search for find the best attenuation parameters that will fit a series
of eartquakes.
The QLG program will make an inverison of the Lg spectra for a series of earthquakes to find Q.
Magnitudes are dealt with in many different programs in SEISAN and this section intends to give an
overview.
SEISAN can calculate most standard international magnitudes: Local magnitude Ml, coda magnitude
Mc, body wave magnitudes mb and mB (broadband), surface wave magnitudes Ms and MS (broad
band) and moment magnitude Mw. The magnitudes are calculated in HYP as median of the station
magntudes. Optionally, also averages can be calculated. For more details on the parameters used and
the exact formulas, see program HYP.
Parameters for magnitudes
The input parameters used for calculating magnitudes are amplitudes and periods, code length and seis-
mic moment M0. Amplitude and coda length can be obtained manually from MULPLT while automatic
amplitudes for Ml can be obtained with programs EEV (command am), programs AUTOSIG and AU-
TOMAG. Seismic moments are obtained from spectra manually with MULPLT or automatically with
AUTOSIG and AUTOMAG. Moments can also be obtained from moment tensor inversion using EEV.
The amplitudes are stored as phases with the following names Ml: IAML mb IAmb mB IVmB BB Ms
IAMs 20 MS IVMs BB
while the moments obtained by spectral analysis are stored in the SPEC lines and in the MOM lines
for moment obtained by moment tensor inversion. While the magnitudes are calculated for all channels,
only the average magnitude is stored on the header lines (except for Mw from spectral analysis, where
magnitudes corresponding to each moment is stored on the SPEC line). The parameters to calculated Ml
and Mc are given in STATION0.HYP file. The parameters for calculating spectral magnitude are given
in MULPLT.DEF and/or SEISAN.DEF. Parameters for calculating Mw from moment tensor inversion
is generated by EEV (using the model in STATION0.HYP) and stored in the S-file. The remaining
magnitudes have fixed parameters. Changing Ml and Mc parameters will result in new magnitudes
64 CHAPTER 5. USING SEISAN
being calculated with the next update of the S-file. For the spectral magnitudes only changes cause by
hypocentral distance, density and velocity will affect the recalculation of magnitude. If the attenuation
change, the spectra must be recalculated.
Storing magnitudes
Magnitudes are written on the type one header line. On the main first header line there is room for 3
magnitudes, see example below
1998 812 1410 26.8 L 36.755-121.462 8.0FFBGS 4 1.3 4.6LTES 4.9WTES 5.0WHRV
where magnitude is given by type (e.g. L for Ml), size and a 3 letter agency. When the location program
HYP is operated, the magnitudes are overwritten EXCEPT for the 3. magnitude on the header line
which never will be deleted by any program. The intention with this is to be able to store an external
reference magnitude. If more than 3 magnitudes are calculated (2 if a magnitude in 3. position), a new
type one line is written with exactly the same origin time and location agency
1998 812 1410 27.0 L 36.755-121.462 8.0FFBGS 4 1.7 4.6LTES 4.7CTES 5.0WHRV1
1998 812 1410 27.0 L BGS 4.9WTES 1
There is thus room for only 6 magnitudes calculated by SEISAN. More magnitudes can be stored on
more type 1 lines which must have different location agency and/or origin time compared to the first
header line.
Searching for events using magnitude criteria
Program SELECT can search for a combination of magnitudes of different type, size and agency. SELECT
can also optionally search for magnitudes on all header lines. SeisanEplorer (SE) can also search for a
magnitude combination, but only among the 6 prime magnitudes. Manipulating magnitudes
There can be a need to convert one magnitude to another. The MAG program can make magnitude
relations (also using all header lines). This magnitude relation can then be used, also by MAG, to
convert one magnitude to another and write it back to the S-file. Since some programs (like EPIMAP)
uses the magnitude in the first position on the header line, MAG can also be used to move any one of
the magnitudes to that position. Program NORHEAD can move magnitudes from following header lines
up to empty magnitude spaces on the first line. Program REPORT can move magnitudes around on the
header line according to user choices. This moving around of magnitudes is now not needed for some
programs. There is now a magnitude in SEISAN simply called M, which is unique magnitude returned
according to priorities given in SEISAN.DEF
MAGNITUDE_ORDER WGCM
MAGNITUDE_ORDER LBER
MAGNITUDE_ORDER WBER
where the order to select magnitudes as given here from top (high priority) to bottom (low priority).
Only a few programs use this facility: SE, CLUSTER and ASSO. Plotting magnitude information
Magnitude sizes are plotted on all epicentral and hypocentral plotting programs. Relations between
magnitudes can be plotted with MAG, b-value can be calculated and plotted with SE (standard method
and Wiechert method) and BVALUE. A completeness check can be plotted with SE.
Other programs using magnitudes
5.1. SHORT USER GUIDE 65
CLUSTER cleans a catalog for foreshocks and aftershocks, partly based on magnitudes. ASSO is a
program that merges events in two catalogs based on both time and magnitudes.
Calculating magnitude relations
The Ml attenuation function can be calculated by inverting amplitude reading from many events suing
program MAG2. A coda wave relation can be made with MAG. Attenuation to be used with spectral Mw
can be determined using QLG, SPEC and CODAQ. QLG is the recommended program. AUTOMAG
can also be made to make some initial tests for the best Q to fit the Brune spectrum.
The magnitude implementation in SEISAN has been adjusted (version 8.3) to the new IASPEI standard.
Amplitude based magnitude identification
Over the years there has been different ways of identifying the amplitudes used for magnitudes. Originally,
amplitudes were not identified with any specific magnitude and only the period and distance was used
to find out which kind of magnitude should be calculated, like Ml or Ms. Later different amplitude
type phase names were used to identify which type of magnitude should be calculated and now only one
IASPEI name is used for the amplitude phase name. However, SEISAN is backwards compatible and
will use all the old amplitude phase identifiers. Below is given all identifiers used.
Local magnitude ML:
Phases accepted: Blank, L, S, Sg, SG, AMPL, AML, AMP and IAML (standard)
Distance range: TEST(113) < distance < 100 , before version 10.5 the lower distance was TEST(57)
Depth range is handled by the attenuation function, SEISAN has two attenuation functions TEST(108)
is used to specify which one is used. Default TEST(108) is 0 the Gutenberg and Richter [1956]
attenuation function as recommended by IASPEI.
Phases accepted: Blank, P, AMPB, AMB, AMPb, AMb, AMP, IAmb (standard)
Distance range: TEST(114) distance 160 , before version 10.5 there was no distance limits.
TEST(114) is 20 by default
Depth < TEST(115), before version 10.5 there was no depth limit. TEST(115) is 60 km by default
Several parameters used for magnitude determination is controlled by the TEST values set in the STA-
TION0.HYP (local events), STATIOND.HYP (distant event) or other model dependent STATION file.
See the HYP chapter 7.1 for default TEST values. The above values are:
TEST(57) 1500km
TEST(113) 20
TEST(114) 20
TEST(115) 60 km
The underlined values are hardcoded in SEISAN.
Example showing mb, mB, Ms and MS amplitude and period readings with estimated magnitudes, on
the BSD station respectively:
2015 1117 0710 30.8 D 39.919 20.421136.3 DNK 21 0.6 6.5sDNK 6.1SDNK 5.8bDNK1
STAT SP IPHASW D HRMM SECON CODA AMPLIT PERI AZIMU VELO AIN AR TRES W DIS CAZ7
BSD HZ IAmb 714 18.53 194.3 0.98 1739 348
BSD HZ IVmB_BB 714 14.54 2995.7 3.96 1739 348
BSD HZ IAMs_20 722 15.83 97917.0 18.0 1739 348
BSD HZ IVMs_BB 722 13.06 43913.8 12.3 1739 348
Once a large database has been created, several programs are used to manipulate and analyze the data.
The catalog can be searched for a large number of parameters. Selection criteria are: Magnitude range,
magnitude types, event types (e.g. local, distant, volcanic, explosion), latitude, longitude and depth
range, RMS of travel time residuals, number of stations used in the location, felt events, number of
polarities, presence of certain stations etc. Events can also be selected in an area with the program used
for hypocentral plots.
5.2. GETTING DATA INTO THE DATABASE 67
A very useful source of data is the ISC. Data from ISC CD ROMs can be read and converted to SEISAN
format (hypocenters and phase data) and put into a database. The data can then be used for e.g.
seismic hazard, fault plane solution or it can be relocated. A general task with catalogs is to homogenize
magnitudes. Magnitude relations between e.g. Mb and Ms or Ms from one agency to Ms from another
agency can be done with the program MAG. The program will also convert one magnitude to another
once the linear regression has been determined. Event statistics can be made with STATIS and b-values
calculated with BVALUE. The number of events as a function of time is plotted with CATSTAT.
Probabilistic earthquake hazard computations is done, using the EQRISK program [McGuire, 1976] or
the CRISIS2012 program [Ordaz, 1991, 1999]. EQRISK computes seismic hazard in terms of probabilities
of exceedence vs earthquake intensity measures such as peak ground acceleration (PGA), for a given site
or a grid of sites for up to eight different return periods. The site amplification is calculated with the
SPEC program. This is used for making spectra of many seismic signals in a semiautomatic manner.
The program is intended for two purposes: (1) making relative spectra for a series of pairs of stations
terminated by the average spectra, (2) Making a series of spectra for a number of stations and events.
The spectra can be corrected for distance, q, and instrument response.
This section involves a large number of programs and a more detailed description is given in section 34.
This means that the original data is individual digital event waveform files generated by some data
acquisition system. The waveform data can be stored in SEISAN, GSE and SAC format as single or
multi trace files. The files that are used in conjunction with the database are normally stored in WAV
but can also be in the users directory, e.g. WOR. The normal scenario would be that multiplexed
files would be transferred from a digital field station, demultiplexed and converted to SEISAN waveform
format. Programs are provided to convert from most of the popular waveform formats like MINISEED,
GSE, PCSUDS and from commercial recorders. It is most practical to initially put the files in WOR,
check the events for false triggers, save the true events in WAV, make the corresponding S-file and a
hardcopy of the digital data.
All of this can be done with the program MULPLT. The program plots channels from a single waveform
file. The user can then interactively decide if this is an event to keep, in which case an S-file is created
in the database and the event is moved to WAV.
68 CHAPTER 5. USING SEISAN
Alternatively, all new waveform files can be auto-registered into the database (AUTOREG) and all
checking takes place from EEV.
When digital data is the input to the analysis system, MULPLT is the program to use to get data into the
database. From there on further analysis can be done with EEV (picking phases, locating and editing).
MULPLT is also the program used with EEV. For more details on MULPLT, see detailed description in
section 8.
Metadata: SEED or dataless SEED
To get SEED or dataless SEED metadata into a SEISAN database, you need the RDSEED program from
IRIS. SEISAN include an old version of RDSEED, find the newest at:
http://www.iris.edu/dms/nodes/dmc/software/downloads/rdseed/
First you need to extract the Staion information from the SEED or dataless SEED file, use the command:
rdseed -S -f <file>
Then you need to extract the response information from the SEED or dataless SEED file, use the com-
mand:
rdseed -R -f <file>
Now you must list the response file, use the command:
dirf RESP.*
Then you run the program RDSEED2SEISAN, this program give a output file rdseed.STATION0.HYP
with station coordiantes that you can add to your STATION0.HYP file in the DAT folder. And it gives a
output file rdseed.SEISAN.DEF with ARC CHAN lines that can be added to you SEISAN.DEF file in DAT,
if you wish to store the data in an archive (e.g. BUD or SCP).
Finally you must move the RESP file to the CAL folder.
Waveform data: SEED or miniseed data
To get SEED or miniseed waveform data into a SEISAN database, you need the RDSEED program from
IRIS (see URL above). And the DATASELECT program from IRIS if you wish to use an archive for the
data:
https://seiscode.iris.washington.edu/
First you need to extract the miniseed data from the SEED, use the command:
rdseed -o 4 -f <file>
Then you need to send the data to the archive defined in the SEISAN.DEF file.
This is done using the program DATASELECT that you need to download from: https://seiscode.
iris.washington.edu/projects/dataselect/wiki
For a SeiscomP archive, use the command for waveform data:
dataselect -A archive-path/%Y/%n/%s/%c.D/%n.%s.%l.%c.D.%Y.%j mini.seed
For other types of data use: E:Detection data, L:Log data, T:Timing data, C:Calibration data, R:Response
data, O:Opaque data. See http://www.seiscomp3.org/doc/jakarta/current/apps/slarchive.html.
For a BUD archive, use the command:
dataselect -BUD archive-path mini.seed
Where archive-path must be the same path as ARC ARCHIVE that is defined in SEISAN.DAT.
5.2. GETTING DATA INTO THE DATABASE 69
To plot the archived waveform data use the command textttarc in eev, before you call MULPLT
In this case the user would get phase data from other sources, e.g. analog seismograms or files with
readings from other stations and agencies. These files are assumed to be written in Nordic Format.
Conversion can be done from other formats like ISC, NEIC and HYPO71.
If a user already has a file with one or several events in Nordic Format, this file can be split up into single
files which are copied (from any directory) into the database by using the command SPLIT. Creating a
new file in Nordic Format can also be done with the program NEWEVE (use command NEWEVE).
The SPLIT program then reads the NEWEVE output file and writes out single S-files with correct names
either in the current directory (default) or in the database specified (BER or another). The reason that
the database specifically must be given is that the user should not accidentally put data into the database
(see section 13).
Duplicate ID:
Since the database consists of single files with names corresponding to time down to the second as well
as the event type (L, R or D) it will sometimes happen that two events will get the same name. Thus
copying in a new event with the same name could overwrite the existing event, and the user would never
know. In SEISAN, from version 5.0, some security has been put in. New data can enter the database with
4 programs: SPLIT, EEV, MULPLT and AUTOREG. With all programs, the user will be prompted if a
new event is about to overwrite an existing event. Both SPLIT and EEV have the possibility to create
alternative IDs if the user wants both the new and old event, while MULPLT and AUTOREG just offers
the possibility to skip a double event. If a new ID is created, an attempt will be made to use a time one
second later. If that also corresponds to an existing event, the next second is attempted etc. This allows
for 60 events to be registered in the database with the same minute and event type. If an event has got
the ID changed, the header line in the file is NOT changed, however the ID line is of course changed.
This will be indicated on the ID line with a d at the end of the ID number.
Deleting events:
Event here means S-file in the database. Events are only deleted when using EEV, either with the
EEV delete command D or the EEV append command A. In both cases, the deleted event is stored in
the DELET database before being deleted from whatever database. Even if the system contains many
databases, there is only one DELET database. This means that deleted events from different databases
are mixed in DELET. In order to restore an event, enter DELET database with EEV and copy the deleted
event back with the C command. It is up to the user to manually clean up the DELET database.
There is one more final security. If an event has been deleted from a database, but an UPDATE has not
yet been made, the event might be in the CAT part of the database and can be extracted by SELECT
or the editor.
In the REA directory, a binary file called REA.LOG contains information about number of events in all
data base. Initially the file has no information, but each time programs EEV, HYP, UPD, CHECK BASE
or COLLECT are executed, the information is updated for the months accessed. The information can be
displayed with program BASE, which first shows available data bases and the user, can then select one
to get info for particular months. Make sure to use right case for data base names, always in upper case
on Unix systems. The program is still a bit experimental !!
Check content of S-files for magnitudes and residuals etc, program CHECKRE:
The program can read data bases or CAT files and check events for large residuals, abnormal depths
etch. The program is intended for quality control, the parameters hardwired in the program might not
suit all. Check program source listing.
Check for data base related errors, program CHECK BASE
The data base depends on error free S-files and that there is a correspondence between the S-file name
and the event ID. This should normally be ok, however errors can occur during editing or there can be
program crashed producing errors. The program reads the data base and checks for:
Missing ID lines: If ID line is missing, it can be put in manually or doing an UPDATE.
No correspondence between ID line and S-file name: A serious error has occurred. try to find out what
is correct, the ID or the file name. An UPDATE cures the problem, however data might be lost.
Error in S-file: All parameters are checked and files with non standard parameters are indicated. The
error can be a number in a wrong position. The errors should be corrected.
For all the above 3 cases, an index file is generated with bad S-files and EEV can the be used directly
with the index file to access the bad S-files. THIS ONLY WORKS WITH ONE DATA BASE AT A
TIME.
It is recommended to run check base in case of system crash or as a security, just before an UPDATE.
SEISAN can use higher accuracy than the default. The goal is to have an accuracy of 1 ms in time and
1 m in location.
In order to write out the high accuracy numbers, a new parameter has been added to SEISAN.DEF. The
parameter is HIGH ACCURACY. Setting it to 1.0 enables high accuracy operation. This parameter
affects the programs MULPLT, FK, HYP and UPDATE.
Station locations: The station file looks like before except that in order to get higher accuracy of station
locations, the minutes of latitude and longitude are specified without the point. E.g. the minutes 22.122
can now be written as 22122 in the same columns as before while if the point is given, only 2 decimals
can be used as 22.12. This changes do not affect any old station coordinates. Programs reading station
coordinates, will use high accuracy input if available.
EPIMAP will always read in high accuracy mode, if any high accuracy data is present, whether station
locations or hypocenters.
FK will always read high accuracy station coordinates, if available and FK can therefore now be used
with very small arrays.
Programs with output affected by high accuracy mode:
MULPLT will write the phase readings as f6.3 instead of f5.2 like e.g. 11.234 instead of 11.23. For normal
5.3. INTERACTIVE WORK WITH EARTHQUAKE LOCATIONS, EEV COMMAND 71
use, this is not needed and the files look better if high accuracy mode is not used.
HYP and UPDATE writes an extra high accuracy hypocenter line which has been given type H. An
example is
1996 6 3 2006 35.5 D 46.787 153.722 33.0 TES 15 1.9 3.4STES 5.8BTES 5.6BPDE1
1996 6 3 2006 35.511 46.78711 153.72245 33.011 1.923 H
The format is
Column
1 -15 As type 1 line
16 Free
17 Seconds, f6.3
23 Free
24-32 Latitude, f9.5
33 Free
34-44 Longitude, f10.5
44 Free
45-52 Depth, f8.3
53 Free
54-59 RMS, f6.3
60-79 Free
80 H
The EEV program reads the file names of all S-files in the database monthly directory (or local directory
or index file), positions the pointer at the first event and asks for a command to be performed for the
current event or to find another event. If the command is to use a program, control is handed over to
that program, which on completion hands control back to EEV. In this way, many different independent
programs can be used from within EEV, e.g. several different location programs can be installed.
EEV can be started in several ways:
EEV with one month in default database: EEV yyyymm.
E.g. EEV 199201 would work on January 1992 on the standard BER database. It is here also possible
to give a more precise start time like EEV 1992011520 to start with the first event at or after January
15 at 20 hrs.
EEV with one month in alternative database: EEV yyyymm BASE.
BASE is the database. To work on the NAO base, the command would be EEV 199201 NAO.
EEV with several months in default database: EEV yyyymm YYYYMM
yyyymm is start year and month and YYYYMM is end year and month.
EEV with several months in alternative database: EEV yyyymm YYYYMM BASE
yyyymm is start year and month and YYYYMM is end year and month.
EEV to work with events is local directory: EEV
Only the S-files in local directory will be used.
EEV to work with an index file: EEV index.out
EEV can work with an index file and the command would be EEV index.out, where index.out is the
index file name (can have any name as long as it contains a . except when used with HYP). For
information on index files, see 11.
Databases can have 1-5 letter names and the user specify 1-5 letters. The real names in the directory
structure are always 5 letters so if the user specifies e.g. a base name of BA, the real name will be BA
. The full 5-letter name can also be used.
The commands in EEV mainly use only one letter unless a date or a number has to be given. To get a
short explanation, type ? and you will get:
-----------------------------------------------------------------------
Help on EEV
-----------------------------------------------------------------------
IFP: Input fault plane solution strike, dip, rake, Ag., Prog, Q.
INPUTX: Input of xnear and xfar, RESET TEST 107 must be 1.0
INVRAD: Make moment ternsor inversion with Invrad
Jyyyymm BAS:Jump to year yy and month mm in base BAS
L: Locate event, will also calculate magnitude if not
locatable but distance is present, Hypocenter
LR: Reject outliers and locate, see also command UR
LL: Locate current and next event together
Lxx: Locate current and event xx together
M: Input model indicator on header line
MTD: Delete all mt and synt lines
MTE: Edit MT parameters in S-file
MTP: Make Moment Tensor (MT) parameters
MTG: Make Greens function for MT
MTI: Invert for MT solution
MAC: Input macroseismic information
MACROMAP: Make a GMT based map of felt information, Unix only
MAP: Make a map of current location with EPIMAP
MAPF: ------------------------------------- showing fps if there
MODELS: List MODEL.DEF file in DAT
NEW: Add a new event to data base
WKBJ: Make synthetic seismograms with WKBJ program
O: Operating system command, e.g. ols is ls, ocd test is cd test
do not currently work on command with prompt input like epimap and
collect
P: Plot event, also make hard copies and pic phases
PO: Plot event with defaults, multi trace mode
POL: Plot vertical channels P onset with polarities
POO: Plot event with defaults, single trace mode
PB: Plot Bouch synthetics
PH: Plot Herrmann synthetics
PW: Plot wkbj synthetics
PM: Plot moment tensor synthetics
PD: Plot extracted data file mulplt.wav
PG: Ploty Greenss functions when doing MT
PF(IT): Get back azimuth and app. Velocity for network P-arrival
PITSA: Start Pitsa program (not on PC)
PRINT: Print S-file on printer
PMAC: Macroseismic Windows program
PMM: Plot moment vs time
PML: Plot Ml vs distance
PP: Plot picture file in PIC or in local dir
PS: Plot spectra and WA pickssk made with command AM
PSPEC: Same as PS
PUT: Register event
Q: Quit EEV
QUARRY: Quarry check command
R: Rename event type, must be L, R or D
REG: Register event
5.4. HOW EEV WORKS 75
jh feb 10 2017
AUTOMAG and AM: Automatic amplitude for Ml and automatic spectral analysis. Only S-waves are
used and fixed windows are used.The results are overwriting result in S-file. For more details see program
AUTOMAG.
AMI: AUTOMAG, but questions about spectral window and window for Ml are asked. Type of spectrum
(P or S) is also asked.
AUTOPHASE and AP: Automatic phase picking with Lomax picker.
AUTORATIO and AR: Automatically calculates amplitudes from spectra and time domain for use with
FOCMEC.
B: Back one event
BOUCH: Run Bouchons modeling program
BOUSEI: Make SEISAN file from Bouchon synthetic file
C: Copy events
There are two options, copy the event to another database given by a 1-5 letter name (upper case) or
to a file EEV.OUT in your working directory. Several files can be extracted within one EEV session to
the same EEV.OUT file. A new EEV session deletes the previous eev.out file. The C option can be used
to recover files from the DELET database of deleted events. In addition to making the EEV.OUT file,
an index file is also made called indexeev.out. THIS FILE IS NOT DELETED WHEN EEV STARTS
UP since the intention is to be able to use EEV to make an index file of interesting events from several
months. You can then start eev with the selected events with command EEV eevindex.out. Note: The
other data base can also be a local data base ,, in which case EEV should not operate on the same local
data base. CM: Copy many files to eev.out. The copying starts at current file and the user is asked for
the number of files to copy. COMMENT: Comment are written into S-file, terminated by a blank line.
DXXXXX; The D-command is used to jump to another event at a given date and time, normally only
day is used: The hour can optionally be specified. E.g. d2205 will find the event nearest in time after
day 22 at 05 hours. If both day and hour is used 4 digits MUST be given e.g. 0708. Highest accuracy is
the nearest minute.
D: Delete event You are asked for confirmation. After the event has been deleted, all S-file names are
read in again and all event numbers after the deleted event are therefore changed. The deleted event
is automatically saved in the DELET database. If the event is present in the CAT file, it remains
there until the next update is done, see UPDATE command in 14.
DD: Duplicates the header line
DUP: Duplicates an event in the database. The duplicated event has an ID, which is one second different
from the original event. The command can be used to split an event in two and then manually deleting
phase lines in each. E: Edit the event. As default on SUN vi is used and on PC edit is used. The editor
can be changed, see section 3. When control goes back to EEV, the file is checked for possible typing
errors or other format problems. If a problem is encountered, the line with the problem is displayed with
an indication of where the mistake might be, and the user is returned to the editor. Alternatively the
error can be ignored. The file is also checked for missing iD and consistency between file name and ID.
Problem: Some editors will keep a backup copy of the original file so 2 files might be present with one
e.g. with the additional extension .BAK. EEV (from version 7.2) will only use the original file, but there
is no check on what backup files might accumulate.
EM: Edit ISO file in ISO directory. The ISO file name must be listed in the S-file.
Eyyyymm: Giving this command will make the current EEV session end with year yyyy and month mm
5.4. HOW EEV WORKS 77
within the same data base. When EEV gets to the end of the month, pressing return will move EEV to
the first event of the following month instead of to the first event of the same month.
EXP: Input of explosion information. This command creates 3 new lines (see format description in
Appendix A) and changes the main header line event type to explosion (E). The user is asked for location,
time, charge and comments. The explosion agency is used to classify types of sites and can be used by
SELECT for searching. If no event is available, a new event must be created with EEV command NEW.-
F: Make a fault plane solution. The program uses polarities. See section 23.1 for more details.
FO: Just plot a solution in S-file. It must have data so it can be located. Polarities are shown.
FOO: Plot solutions even if no phases in S-file. Polarities are not plotted.
FD: Calculate the difference in orientation of P and T axis of any two fps
FI: Fault plane solution using PINV
FH: Fault plane solution using HASH.
FP: Fault plane solution using FPFIT.
FQ: Enter quality of fault plane solution. It is also possible to order the solutions so the prime comes
first.
FIX: Fix or unfix depth. It is also possible to give the depth.
GMTMAP: Start gmtmap.exp program (not included in SEISAN) to plot GMT map. GMTMAP auto-
matically creates a map using GMT. (UNIX only)
GMAP: Make an epicenter map of current event using Google Earth or Google Map. It is also possible
to make maps with many epicenters using GMAP outside EEV, see section 10.3 for more details.
GRID:. Hypocenter is started up and will ask for the grid: Latitude and longitude range and grid spacing.
A maximum of 71 points can be used in each direction. The point with the lowest RMS is found and
the corresponding location and residual is printed on the screen. It is now optionally possible to plot
the contours on the screen. The map coordinates used are as defined in SEISAN.DEF. Note that the grid
search is using exactly the same parameters as Hypocenter. This includes all weights and phase types.
The depth is fixed to the depth given in the S-file header line. For more details and an example, see
application note epi.pdf in INF.
H: Locate with Hypoinverse, no database update is made, no Nordic output format file.
HERRMAN: Herrmanns modeling programs, only on Sun, might work on Linux, not tested.
HERSEI: Make a SEISAN waveform file from output of Herrmann modeling, only tested on Sun.
HYPO71: Locate with HYPO71. The database is not updated (not well tested on PC).
IASP: Generate a file with theoretical arrival times for the current event for stations listed in S-file. .
The command will only work if the event has an epicenter and origin time in header line or a subsequent
type 1 line, see also HERSEI: Make a SEISAN waveform file from output of Herrmann modeling, only
tested on Sun.
HYPO71: Locate with HYPO71. The database is not updated (not well tested on PC).
IASP: Generate a file with theoretical arrival times for the current event for stations listed in S-file. .
The command will only work if the event has an epicenter and origin time in header line or a subsequent
type 1 line, see also INPUTEPI and INPUTONE. These theoretical times will then be displayed with
mulplt, the next time command P is used in EEV. The theoretical times are listed in file iasp.out. See
78 CHAPTER 5. USING SEISAN
section 30.3 for more information. The command can also be used directly from MULPLT and in this
case theoretical travel times are calculated for all stations in waveform file(s).
IC: Enter one of predefined comments. The comments are given in SEISAN.DEF and any number of
comments can be predefined. Example:
enter number
IL: Makes a location with the ISC location program. For more info, see section 7.3
INPUTONE: Makes an additional type one line (hypocenter line) in the file. Enter the data exactly
under the columns indicated. The line will be entered exactly as written, so it is possible to enter any
part of the information.
INPUTEPI: Works like INPUTONE, except that it overwrites information on the first header line if
non-blank information is given. Use INPUTEPI to add information to the first header line like e.g. the
depth. If existing nonblank characters on the line are to be replaced by blanks (e.g. remove a magnitude),
use underscore .
INPUTX: Makes a comment line with xnear, xfar and start depth values. Note that RESET TEST(107)
must be set for this option to work.
INVRAD: Runs the moment tensor inversion program, see section 23.7.
Jyyyymm BAS: This command makes it possible to change month and database during an EEV session
by giving a new year yyyy and month mm and optionally a new database BAS. If no database is given,
the same database is assumed.
L: Locate event with HYPOCENTER (same as HYP). The location does not update the S-file.
LR: Reject outliers and locate. Outliers remain in file. Can be removed with command UR. see
HYPOCENTER section for more details.
Lxx: Locate current event with event number xx. This is used to check if two events belong together.
5.4. HOW EEV WORKS 79
2007 1 5 1652 23.3 D 55.991-159.065 13.5 BER 19 1.2 5.3SBER 5.5BBER 5.4BPDE
Figure 5.1: The linear fit of P-arrival times to a plane wave. For more details, see
Havskov and Ottem
oller [2010].
Back azimuth =358.8 Apparent velocity =19.81 corr =-0.99 rms = 0.03
Relative to the reference station, the above output gives relative P-times and relative x and y-coordinates
(km). It is also seen that only 14 station were available within 1000 km from the reference station HYA.
These results are also available in an output file array.out. See also array processing section 6.29 on
FK-analysis.
PMM: Plot moment as a function of time. The values are taken from the SPEC lines. The intention is
to get an idea if the attenuation is correct by seeing the trend. If the line has a negative slope, then the
Q value is too and vise versa. On top of the plot the corresponding Q correction needed to make the
moment distance independent is shown. It is calculated at a third of the corner frequency. This value
is only an indication. On the plot it is possible to click on a symbold to get the corresponding channel
5.4. HOW EEV WORKS 81
used.
PML: Plot Ml as a function of distance. The plot can be used to judge any diance biars in the magnitude
calculations. On the plot it is possible to click on a symbold to get the corresponding channel used.
PUT: Register event. This option is mainly meant to be used with the SEISNET data collection system.
The command cleans up the S-file for all SEISNET operations. It removes commented out ID-lines
and copies the waveform files given for the event from the current directory to WAV. The command
is equivalent to the register command in MULPLT. If events are auto registered with AUTOREG, the
command can be used to clean up and inspect incoming data without using MULPLT directly.
PMAC: Windows only program PROMAC for processing macroseismic information to calculate intensities
from felt information and model the macroseismic intensities. The program can also plot associated
pictures (in directory PIC). All information is stored in the S-file. The program was written by Bladimir
Moreno, and has a separate manual, see INF directory. Program must be installed separately, zip file in
SUP.
P: Plot event with MULPLT
PO: Use MULPLT with defaults. This means that no questions will be asked and the plot appears in
multi trace mode with default channels and default filters as given in the MULPLT.DEF file in DAT. Useful
option for routine inspection of raw data.
POO: Same as PO with the difference that the user enters MULPLT single mode directly.
POL: Plot vertical channels P onset with polarities using program PLOTPOLARITY 24.
PP: Plot picture files with file names stored on type P-lines. The picture files must be in working directory
or PIC directory. Several files can be defined in the S-file and the user will be prompted for which one
to plot. The system command used for displaying the file must be defined in SEISAN.DEF, parameter
PLOT PICTURE COMMAND bitmap types and PLOT PDF COMMAND for PDF files. An example
is found for test event JUNE 3, 1996 at 19:55.
PRINT: The current S-file is printed on the default printer, to set up printer command, see SEISAN.DEF
(section 3.10).
PS: Plot spectra and WA picks made with AM command. The bad fits that the user wants to deselect
can be deleted interactively.
Q: Quit EEV
REG: Same as PUT.
R: Rename event type - Giving an event a new type requires changing the header in the S-file and the
S-file name. All this is done with R-command. You are prompted for a new type (can be the same in
which case nothing is done). A new S-file is made and the old deleted. The CAT-file is NOT changed so
if no UPDATE is done, the event there will remain with wrong type. Event types are L: Local event, R:
Regional event and D: Distant event. Change events id - By adding a second charater to the event type
the event id will be changed too. E.g. changing the event to a local explosion one must type LE. Use
LB to replace the E with a blank. Standard event ids are: E = Explosion, P = Probable explosion, V
= Volcanic and Q = Confirmed earthquake
RMSDEP: Calculates and plots RMS as a function of depth for current event. Note: Program starts by
reading STATION0.HYP so if current events uses e.g. STATION1.HYP, STATION0.HYP must be there
also.
SAC: Convert all data to SAC format and starts the SAC processing system ( not distributed with
82 CHAPTER 5. USING SEISAN
possible to keep all files in a working directory by not specifying database when splitting up. Another
simple way is to use the Copy function in EEV and copy directly from a named data base to the local
data base. Programs will then look for S-files in the current directory instead of in the database.
In addition to working with index files, there is also the possibility of storing data in different databases.
By default, the data is always stored in BER. However, the user can also create another database structure
(file structure) with another name and programs and procedures will work on that database too. There
are some restrictions: The new database, which is a subdirectory under SEISMO/REA, just like BER,
MUST have a 1-5 letter name. Currently, the alternative database is used in our Institute to store data
from other agencies like NAO, which in some cases are copied to our own database (C-command under
EEV). The name DELET is reserved for the DELET database, which is always present.
The RESP filename must match the waveform data, so if the waveform data does not include network
code and location code, then filename must be e.g.: RESP..BER..BHZ
The SEED response files can include multiple changes of response and must have valid Start and End
dates for the time of the data that are processed. For the current response the End date must be set
to No Ending Time.
SEISAN will use this scheme until it finds a valid response file:
In the very unlikely case where a selected data window covers two different response files, the response
file belonging to the first part of the data is used.
The RESP program (section 41) can be used to generate the response files. The filenames for the response
files are STATTCOMP.YYYY-MM-DD-hhmm FOR where STATT is station code, COMP is component,
YYYY is year, MM is month, DD is day, hh is hour, mm is minute and FOR is the format indicator
which can be SEI or GSE. If FOR is not given, the format is SEISAN. An example is BER S Z.1999-
05-05-1244.. You should take a backup of the response files before you run the program (see chapter
3).
The response files can be located in CAL, or, if many files are available optionally also in a subdirectory
structure. This optional structure simply consist of a subdirectory for each station and the subdirectory
name must have 5 letters so base BER would have the name BER . The system automatically locates
the response files whether all are in CAL or in the subdirectory structure.
The response file can store the response in different ways:
1 SEISAN format:
a Parameters used for calculating the response: Generator constant, filters etc. In addition,
the response (amplitude and phase) at 30 frequencies is listed. In this case the response is
calculated from the parameters.
b Incomplete set of parameters or no parameters and the response at 30 frequencies. In this case
the response is calculated by interpolation of the 30 values.
c Poles and zeros: No discrete values are given and the response is calculated directly from the
poles and zeros. The number of poles and zeros in the SEISAN format is limited.
2 GSE CAL2 format:
a Poles and zeros, number is unlimited, the response is directly calculated from the poles and
zeros.
b Pairs of frequency amplitude phase, number of pairs is unlimited, the response is calculated
by interpolation.
5.6. WORKING WITH CATALOGS 87
3 SEED
Poles and zeros (only Transfer function type A (Laplace Transform (Rad/sec)), number of poles
and zeros are unlimited, the response is directly calculated from the poles and zeros. Only
reads SEED response in ASCII format as written out by rdseed, not dataless SEED volumes.
The command to extract the files is rdseed R f seed filename. Standard filename such
as RESP.IU.TRIS.10.BHZ are understood. Files are read from CAL directory. Note that if e.g.
the horizontal channels are rotated the R flag by rdseed will not provide this information.
4 SAC format: SEISAN can use SAC PAZ files as created by rdseed. The files have to be names in
the standard SEISAN way, but have to end on SAC.
NOTE: When rotating signals, it is in SEISAN assumed that the response is the same on all 3 channels.
!!!!
Response files can be plotted from MULPLT showing the actual response information that is used with
a given trace. Response files can also be plotted directly with program PRESP, see below.
All or a subset of the response files can be printed out in a table with program PR RESP. The program
must be executed from the directory with the response files. Make a listing (file filenr.lis) of files to print
out with DIRF and run the program. It will produce an output file ready for printing.
A response file can be plotted with the program PRESP. The program is started with commandpresp
filename, where filename is the response file name. If no file name is given, the program asks for a filename
or number. If a DIRF has been made and the list of files in filenr.lis is available, a response file can then
be selected with a number. The program produces a PostScript output file with name presp.eps.
It is often convenient to have multiple solutions of hypocenters in the database S-files or the CAT-files.
Typically data has been entered from different sources and merged to form a single catalog. The first
hypocenter line in the file is then considered the prime hypocenter estimate and this is the one used by e.g.
EPIMAP to plot the hypocenters. The order of the hypocenters can be rearranged by CAT AGA. Several
programs use all the hypocenter lines. The magnitude correlation program will search any hypocenter
line and the database selection program SELECT will optionally also use all the hypocenter lines. When
the data base is updated with a new location and magnitude (UPDATE, section 14), it is only the first
hypocenter line which is overwritten. If there is a magnitude in the 3 position, it is left unchanged
unless it has the same agency as used for updating. This is useful in normal observatory practice, where
it is common to put in some external agency magnitude which then must be left unchanged. If more
magnitudes than 3 are calculated, they will be placed on a subsequent hypocenter line identified by having
the same year, month, day and hypocenter agency as given on the first line. In order to merge different
catalogs, it might be an advantage to put all the data into a complete database where each event is one
file, even when only hypocenters are available. This is done by first splitting up the catalogs with SPLIT
and then using EEV to merge the events. Since there is no requirement for monthly directories to have
data, this methodology can also work for historical catalogs. The data can then subsequently be put into
the CAT database without relocation using the UPD command.
88 CHAPTER 5. USING SEISAN
Many catalogs are contaminated by explosions and in SEISAN, explosions can be dealt with in several
ways. In the data base, confirmed explosion are marked with E and probable explosions with P. These
indicators are mostly put in when the operator first registers the event. However, there is also a possibility
to automatically identify events which are probable explosions. This is done with program EXFILTER
(section 37). In the data base S-files, there is a special format for recording explosion information
(command EXP in EEV). The explosion site there can be assigned a three letter code, which can be used
by SELECT to find explosions from specific sites. In this format it is also possible to store the explosion
charge and explosion location and origin time separately from the calculated location and origin time.
5.7 Printing
All SEISAN programs, that produce graphical output, also generate Postscript files with the file suffix
eps (note this was plt before version 8.1). These can be directly sent to a Postscript printer. It seems
that programs like Microsoft Word dont like the SEISAN Postscript and you will need to convert your
files to another Postscript, this can be done for example with the program ghostscript using pswrite as
output device.
Note: On Solaris 7, both the lpr and the lp command for sending files to the printer, dont create a copy
of the file before sending it (bug in Solaris). This means that a plot file can be overwritten before being
sent to the printer. Therefore when SEISAN on Unix is sending plots, the system waits for 5 seconds
after a file is sent to the plotter before continuing. This is most important when plotting continuous data
or a large number of files with MULPLT.
Note that the end time is inclusive, this means that e.g. 198806 includes all of June 1988.
Thus most programs will work from any given date-time to any other given date-time. Programs that
work directly on the S-files in the database (e.g. COLLECT) can work with any time interval in which
the database structure has been created. THERE IS NO REQUIREMENT THAT THERE IS DATA
5.9. GRAPHICS IN SEISAN 89
IN THE INDIVIDUAL MONTHLY DIRECTORIES, ONLY THAT THEY EXIST. There are usually 4
options for database, either the standard base (often by default), the users own subset of the standard
base (an INDEX file or S-files in local directory) or another database. If the user has his own database
specified by an INDEX file, the event IDs must be in that INDEX file. Since the index file gives complete
file name of event files, the index file can work on a subset of the main database.
Note that most of the programs are used as stand-alone programs, disregarding the database structure.
If one for example prefers to have all events gathered in one file rather than split into many files and
directories most programs will therefore work.
EEV
MULPLT continuoues
EEV:
90 CHAPTER 5. USING SEISAN
For each event a log file is created in the LOG folder in the database folder. The log file name is linked
to the sfile name, like:
S-file: /seisan/REA/TEST_/1996/06/06-0648-30R.S199606
Log file: /seisan/REA/TEST_/LOG/1996/06/06-0648-30R.S199606.LOG
To see the content of the current log file type log in EEV.
The log file contain information on when a change was done, who the operator was and what the action
was. The sfile is listed in the log file to show changes.
MULPLT cont mode:
Logging in MULPLT cont mode is described on page 122, the log files are stored in the LOG folder in
the database folder.
1: Channels with orientation code 1 and 2 are handled as N and E. If the orientation of 1 and 2 i s off
North and East the estimated azimuth will be wrong.
2: The Nordic format (Appendix A) does not include location id. One is thereofre n ot able to
distinguish phase readings done on stations with two one more similar channels with differen location
id.
3: The iterative inversion done by the location program HYPOCENTER, does in some cases end up
in a local minimum and not the best solution. See page 104.
4: If waveform data from a three component sensor is rotated it is assumed that the response is t he
same on all three rotated channels (Z,R,T).
5: The Nordic format (Appendix A) does not include instrument code. So, if a station is equipt with
both a seismometer HHZ and a acceleroemter HNZ, one will not be able to distinguish between
phase readings.
This section gives user manuals for programs and command procedures used with SEISAN. Not all are
as detailed as one could want, however many questions from programs should be self-explanatory. Most
programs will produce output files with the extension .out and proceeding by the name of the program.
E.g. output from collect, will be collect.out. Running a program twice will erase the earlier output
files. If these files are to be used later, remember to rename them before running a program again. There
are several programs, which have separate manuals in the INF directory.
91
92 CHAPTER 6. DESCRIPTION OF PROGRAMS AND COMMANDS
Chapter 7
7.1.1 Phases
The program also uses observed station azimuths as given in the Nordic Format. Station azimuths can
be obtained with either 3-component stations or array stations or by using a local network as an array
(see EEV pfit option) This means that the program can locate with one station if it has at least two
phases like P, S and azimuth. Azimuth residuals contribute to the overall rms, see TEST(52) and section
on weight. In order to locate with one station, azimuth and P and S, TEST(56) MUST be set to 1.
Note that the depth then will be fixed to the starting depth. So if the starting depth is larger than the
hypocentral distance, no solution is possible and the starting depth must be set to a value smaller then
93
94CHAPTER 7. HYPOCENTER LOCATION PROGRAMS: HYPOCENTER, HYPO71 AND HYPOINVERSE
the hypocentral distance. This can be done in the STATION0.HYP file or individually in the S-file. Known
problem: If Azimuth on one station and P and S on another station, HYP might not locate properly.
NOTE: XNEAR must be larger than the distance to the station. If TEST(58) is set to a value lower
than the apparent velocity associated with the backazimuth, no location will be made.
7.1.3 Magnitudes
where a,b,c,d are constants, log10 is logarithm to the base 10, amp is maximum ground amplitude
(zeropeak) in nm and dist is hypocentral distance in km (RESET TEST 75-78). The default constants
are for California [Hutton and Boore, 1987] which gives the following relation
It is here assumed that the gain of the Wood-Anderson instrument is 2080. An amplitude of 1mm of
the Wood Anderson seismogram is then 106 nm/2080 and inserting this amplitude above together with a
distance of 100 km gives magnitude 3 as originally defined by Richter. It is assumed that the maximum
amplitude is picked on a seismogram simulating the original Wood-Anderson seismogram, see program
MULPLT. SEISAN uses hypocentral distance, while the original Ml scale used epicentral distance (no
deep earthquakes in California). We use hypocentral distance so Ml also can be used for deep earthquakes,
but the user should be aware that the Ml relation for deep earthquakes might be different from the relation
for shallow earthquakes.
Local magnitudes are only calculated for events with epicentral distance LESS THAN
TEST(57) (default 1500 km) and if the period is less than 5.0 secs. All amplitudes for the
phases L, S , Sg, SG, AMP, and AML, AMPL, IAML or blank are used. This means that if an ampli-
tude is picked on both Lg and Sg, both will be used. The period is not used. The many possible phase
names is a result of changes over time and thus to ensure that Ml is calculated correctly with older data.
From version 8.3, MULPLT produces the standard IASPEI name IAML.
Coda magnitude Mc
The coda magnitude is calculated using
7.1. THE HYPOCENTER PROGRAM, HYP 95
where coda is coda length in secs and a,b and are constants (RESET TEST 7-9). If a is given as a
negative number, the following formula will be used
where T is period. Amplitude is in micrometer and distance in degrees, however in the Nordic format nm
and km are used and the program converts. Ms is only calculated if the period is larger than 10.0 seconds
in which case the program automatically assumes that Ms is the wanted magnitude. The phase used can
be AMS, AMPS, AMP or blank. The current version of MULPLT produces the standard IASPEI name
IAMs 20. The many possible phase names are a result of changes over time and thus to ensure that Ms
is calculated correctly with older data. It is assumed that the amplitude has been picked on a WWSSN
standard LP trace and that the period is in the range 18 22s (see program MULPLT). Ms will be
calculated even if the period is outside this range, but it will not be correct according to the standard.
The distance range is between TEST(114) and 100 deg. before version 10.5, there were no distance limits.
TEST(114)=20 deg by default. Depth must be less than TEST(115). Before version 10.5, there were no
depth limit. TEST(115) is 60 km by default.
Broadband surface wave magnitude MS (IASPEI code MS BB, but SEISAN uses MS for simplicity, new
from SEISAN version 8.3)
MS is calculated using the standard
or
where Vmax is the maximum velocity. The IASPEI definition is to use velocity and the period is thus
not needed but read for information. The velocity is in micrometer/s and distance in degrees, however
in the Nordic format nm/s and km are used and the program converts when calculating magnitudes.
MS is only calculated if the period is larger than 3 seconds and less then 60 seconds, distance must be
larger than or equal to 222 km (2 degrees) and less or equal to 160 degrees. The depth must be less than
TEST(115) (default 60 km). Before version 10.5, there was no check of depth. The phase used to report
the amplitude and period must be called IVMs BB which the current version of MULPLT produces. The
biggest advantage using MS compared to Ms, is that any period in the range 2 60s can be used.
Body wave magnitude mb
96CHAPTER 7. HYPOCENTER LOCATION PROGRAMS: HYPOCENTER, HYPO71 AND HYPOINVERSE
mb is calculated using
where Q is a hardwired function of distance and depth and amp is the amplitude in nm. There are two
possibilities: The default (set by REST TEST(108) is the standard Gutenberg and Richter (1956) curve
while alternatively the Veith-Clawson curve can be used [Veith and Clawson, 1972]. Before SEISAN
version 8.3, Veith-Clawson was always used. mb is only calculated if the epicentral distance is less than
or equal to 100 degrees and larger than or equal to TEST(113), default 20 deg (IASPEI standard and
SEISAN default is 20 degrees).Before version 10.5, the lower distance was TEST(57) (defualt 1500 km).
The period must be smaller than 3 si an dlarger then 0.2 s and the phase is P, AMP, AMb, AMB, AMPB,
AMPb, blank character or IAmb. The current version of MULPLT produces the standard IASPEI name
IAmb. The many possible phase names are a result of changes over time and thus to ensure that mb is
calculated correctly with older data.
Broad band body wave magnitude mB (new from SEISAN version 8.3)
The broad band magnitude mB (official IASPEI name is mB BB) is calculated using
or
where Vmax is the maximum velocity and Q is a hardwired function of distance and depth. The IASPEI
standard is to use velocity and SEISAN store the velocity in nm/s. There are two possibilities for the
atteneuation function: The default (set by RESET TEST(108) is the standard Gutenberg and Richter
(1956) curve while alternatively the Veith-Clawson curve can be used [Veith and Clawson, 1972]. mB is
only calculated if the epicentral distance is less than or equal to 100 degrees and larger than or equal to
TEST(113) (IASPEI standard and SEISAN default 2 degrees. Before version 10.5, the lower limit was
TEST(57), default 1500 km) and the period is larger than 0.2s and less than 30s and the phase name
is IVmB BB . The current version of MULPLT produces the standard IASPEI name IVmB BB. The
biggest advantage using mB compared to mb, is that the mB scale does not saturate before magnitude 8.
Moment magnitude Mw
Mw is calculated as
M w = 2/3 log10 (moment) 9.1
where moment is in Nm (see also section 8.12). When an event is relocated, the moment is also recalcu-
lated according to revised hypocentral distance.
NOTE: If an amplitude has a given period between 5 and 10 secs, it is not used for Ml and mb magnitude
calculation, see above. If an event is not located, there will normally be no magnitude calculation and all
magnitude and distance information is deleted from the output S-file (hyp.out) except, the magnitude
in the 3rd position on the header line if it has an agency different from the default agency. The only
exception is that if a coda is given, the epicentral distance is retained and coda magnitude will therefore
be calculated. This means that for events, which cannot be located, it is still possible to calculate coda
magnitudes by manually entering the epicentral distance on the line containing the coda length.
7.1. THE HYPOCENTER PROGRAM, HYP 97
On the first header line, there is room for 3 magnitudes. If there is a magnitude in the 3rd position,
it is not overwritten unless the default agency is overwritten, so there will often only be room for 2
calculated magnitudes on the first header line. If more magnitudes are calculated, they will be written
on a subsequent hypocenter line, which is identified by having the same year, month, day and hypocenter
agency as the first header line. This means that there is room for a total of 6 magnitudes, which can
each, be updated when relocating. Hypocenter info and all 6 magnitudes can be printed out on one line
with program REPORT.
All magnitudes can have a station dependent correction given in the station file. This correction does
not affect the Mc in print.out file. Mb and mB use the same correction and Ms and MS use the same
correction. Only calculate magnitude: If TEST(106) is set to 1.0, only magnitudes are calculated,
provided a distance is given.
Uncertainty in absolute times often makes it necessary to be able to use the difference in time between
two arrivals such as P and S or P and L. If no absolute times are available, the calculated origin time
will be close to that at the first arrival station and is of course meaningless. However, a perfectly good
epicenter and depth can still be obtained from P-S or P-L differences alone. To enable this feature, set
the weight for the P phase input record to 9. This P is then assigned a weight of 0, effectively disabling
its use. However, a time residual and azimuth, etc., will still be calculated for it, enabling an assessment
to be made of its absolute time. A search will then be made of the entire input phase set for an S or
L phase at the same station. If such a phase is found, its variables are used to store the observed and
calculated difference times and their derivatives, and its weight (0-4) is used for the difference phase.
DONT SET IT TO 9!! If two or more such phases (e.g., SN, SG, LG, etc.) are found, all their differences
with the P time will be used instead of their absolute times. Blanks will appear beneath hrmn in the
residual summary for all such phases, while the observed and calculated difference times with the first P
will appear beneath t-obs and t-cal.
NB. There must be at least one phase with absolute time to get a location.
When locating globally, the program uses the IASPEI91 travel time software described by Buland and
Chapman (1983) and Kennett and Engdahl (1991). The global model is used if the distance indicator
in the S-file is D. If the distance idicator is R, the local model is used unless there are distant stations
(distance larger then TEST(57) in which case the global model is used.
HYP evaluates all the IASPEI91 phases (up to 60) at each delta, and searches for the phase specified in
the 4-character phase identifier. If no phase is found, the phase is given a weight of -1, which effectively
removes it from the phase set. If a phase is labeled as P , S , PKP or SKS , and this phase is not
in the IASPEI91 list, the first arrival phase having P or S as its first letter is used, or PKP, SKS as its
first 3 letters. In addition, include the PKiK phases in this search for PKP and SKiK phases in the
search for SKP . The IASPEI91 phase set currently includes: P, Pdiff, PKP, PKiKP, pP, pPdiff, pPKP,
pPKiKP, Sp, sPdiff, sPKP, sPKiKP, PP, PP, S, Sdiff, SKS, sP, pSdiff, pSKS, Ss, sSdiff, sSKS, SS, SS,
PS, PKS, SP, SKP, SKiKP, PcP, PcS, ScP, ScS, PKKP, PKKS, SKKP, and SKKS.
Long phase names:
Normally SEISAN and the Nordic format assume up to 4 character phase names. However, when working
with global phases, the phase name length can in a few cases be up to the ISC standard of 8 characters.
98CHAPTER 7. HYPOCENTER LOCATION PROGRAMS: HYPOCENTER, HYPO71 AND HYPOINVERSE
The program then uses column 9 for weight (normally blank) and column 11-18 for the phase. In this
case it is not possible to give a polarity.
1. Multiple phases at two stations, but no azimuths. This is a non-unique case, even though four
different arrivals are present.
2. Less than three phases from three different stations and no azimuths.
3. A single phase at one station with an azimuth.
Note that if phases are weighted out due to large distance or a bad fit during the first iteration, there
might not be a location even if more than 3 stations are available.
Weighting:
A number of different weights may be used to calculate the solution.
1. User specified weights: These are calculated using the HYPO71 style weight number 0 to 4, read
with each phase, where 0 corresponds to w1=1.0, 1 to w1=0.75, 2 to w1=0.5, 3 to w1=0.25 and 4
to w1=0. Uncertain time is 9 meaning that absolute time is not used, see also use of S-P times on
previous page.
2. Distance weighting: This is given by the formula w2=(xfar-delta)(xfar-xnear) where delta is the
distance (km) of the event from the station and xnear and xfar are read from the station file,
STATION0.HYP.
3. Bisquare weighting: This scheme, described by Anderson [1982] calculates residual weights, see
details in HYP manual.
4 Azimuth weighting: Azimuth residuals are divided by test(52), which is the error in azimuth that
corresponds to a one-second error in arrival time. For example, if test(52)=5 (default), a phase
residual of 5 degrees will become a residual of 1 (5/test(52)) in the parameter corrections and rms
calculation.
All the above weights are multiplied together to calculate the weight used in the inversion. If the user-
specified weight, w1, is changed by (2) or (3) above, changed to zero by the consistency check, or set
to -1 because the phase is not recognized, an asterisk will appear after the final weight in the residual
printout.
Outliers can be hard to spot since the residuals from one or several outliers tend to be distributed over all
residuals. The problem is particularly large when dealing with automatic picks (A in column 16 of phase
line) where gross mistakes, like picking P at S, can occur. One possibility is to use residual weighting
but often more drastic means are needed. Fernando Carrilho (fernando.carrilho@ipma.pt) has made an
algorithm for HYP which effectively finds and remove and/or weight out large outliers. Only P and
7.1. THE HYPOCENTER PROGRAM, HYP 99
S-phases will be checked. The procedure works for both local and distant events although it is mainly
meant to be used with local events. The principle is the following:
Run the location in a loop (iterations) of a maximum of 15 steps
For each step:
- Weight out residuals larger then 99
-S-phase: If residual larger than 1.5*rms and larger than RESET TEST(109) it is weighted out. If in a
following iteration it is smaller than 1.5*rms, and smaller then RESET TEST(109), it is included again.
If 1.5*rms is less than 0.6 and the residual is less than 1.0, the data is always used. Default value of
RESET TEST(109) is 0.8.
-P-phase: Same as for the S-phase but only after the 2. iteration.
The loop will be terminated if any of 2 conditions are met:
-rms is less than 0.3 and iteration is more then 5.
-Change in rms from one step to the next is less than 0.05 and iteration is larger than 4.
The phases with high residuals are now weighted out. They can also be removed from the S-file if the
residuals are larger than a user defined value given in RESET TEST(110) (default value of 3 ), however
this is only possible for the phases flagged as automatic.
There is also an option for keeping only the phase with the lowest residual if the same phase has been
picked on several components of the same station. Phases will be deleted for both manual and automatic
phase picks. Set RESET TEST(111)=1.0. Default value is 1.0.
There is an option for testing for Sg phases. If RESET TEST(112) is set to 1.0, there will be an additional
iteration loop, where all S- phases which are only labeled S have been changed to Sg. At the end, the
data set with the highest number of accepted phases will be used and all Ss will be S or Sg. The phases
which already have two letters like SG or SN will not be changed. This option will not be used for distant
or regional events.
The default values are the ones best fitting automatic operation using AUTOPIC in the Portuguese
network. Increasing the values of test(109) and test(110) will increase the number of accepted phases.
The parameter test(57) is used to determine whether a layered model or IASPEI91 software is used
to calculate the travel times and their derivatives. For the initial starting location, the distances from
each station are calculated and IASPEI91 is used if any of them exceed test(57). However, this can be
overridden by the distance indicator in column 22 of the Nordic header record. If this is L, a crustal model
is used regardless of distance, whereas if it is D, IASPEI91 is used, while R has no effect i.e., test(57) is
still used. So if either a crustal model or IASPEI91 tables are wanted, use either L or D respectively.
The program uses a starting location algorithm (reset test(56)) which tests the rms of all starting locations
and select the minimum rms solution, see HYP manual.
User defined start location: If an S is written in the input S-file at column 45 of the epicenter line, the
location starts at the location (epicenter) given on the header line. If an S is written in column 44 on
100CHAPTER 7. HYPOCENTER LOCATION PROGRAMS: HYPOCENTER, HYPO71 AND HYPOINVERSE
header line, the depth iteration will start at depth given on the header line. If N is written in column 45,
the nearest station will be used irrespective of global settings.
Starting depth:
If no event specific start depth is given in S-file, the starting depth is taken from the first number on the
control line (see later) in the HYPO71 style. However, there is often problems obtaining a reliable depth
due to local minima. This can be manually checked with program RMSDEP from EEV. HYP can also
be set up to locate the same event starting with a range of different start depths, and then choose the
one with the lowest RMS. This can significantly improve the reliability of depth determination. Selecting
3 to 5 different start depth is often enough. This option is set on the control line in the station file.
Fixing location:
Using F instead of S, fixes the position (depth and location).
Do not locate event:
If a * is written in column 45, the event is not located, can be used if an external location is to be kept
unchanged.
Only calculate magntudes and update spectral values
Set TEST(106) to 1.0
Fixing origin time:
Using an F in column 11 of header line will fix the origin time given on the header line.
If both depth and location are fixed, but not the origin time, new origin time and residuals will be
calculated. This can be useful when working with readings from a few stations which should be checked
against known locations. If e.g. distant events are read, it is often the practice to put in the PDE
location on the header line and calculate residuals relative to the observations. When the UPDATE is
made, the agency of the location is NOT changed, assuming that if both depth and epicenter are fixed,
the hypocenter must come from an external agency.
By default, an event is located using the STATION0.HYP input file. However, each event can use its own
model (with all the location parameters) which is specified with one character in column 21 on the Nordic
input file header line. The model then has a corresponding name. If e.g. the model is called W, the
corresponding input station file will be called STATIONW.HYP. It is therefore possible to have as many
different station files, as there are printable characters. Note that if a different model x has been specified
and is not present, the program will stop with the message STATIONx.HYP does not exist. The file
MODEL.DEF in DAT can be used to assign the single character a name, which can be listed from EEV.
The format in MODEL.DEF is one line per model, the model indicator is given in column 1, column 2 is
blank and the model name is given in columns 3 to 80. The MODEL.DEF is for information onlya
HYP has an option to locate a data set for a large number of different models and then determined
which model gives the lowest average RMS for the data set. This might be a useful option, particularly
when a sparse data set is available. In order to use this option, an additional input parameter file
h models.par is given. When this file is in the working directory, HYP will switch to multiple model
7.1. THE HYPOCENTER PROGRAM, HYP 101
mode SO ONLY HAVE THIS FILE IN WORKING DIRECTORY IF MULTIPLE MODEL MODE IS
INTENDED. When using this option, all events must use the same STATIONx.HYP file, otherwise the
program fails. The input MUST be from a single file, NOT from the data base. THE PROGRAM
MUST RUN IN NON INTERACTIVE MODE. Below is an example of an input file.
The first line is info only. Layer # is also only for information. For each layer, there is a start P-velocity
(start vp), increment in velocity (delta vp) and number of increments (# delta). The following inputs are
then the same for layer depths. There must be an entry for each layer even if no variation is used. In the
above example, no variation in layer thickness is tested for. An example input file is given in DAT. The
parameters for location not set in h model.par like Vp/Vs, Lg velocity etc remain unchanged. When
HYP starts up, it will print out how many permutations are required. If more than a few thousand,
reduce the number of models. In any case it is an advantage to first try with just a few models to get a
feeling for how sensitive the data is for model changes.
An output file h models.out is generated, see example below. For each model tested, one output line is
given with the RMS and the model. In the example below only the last 5 models are shown. Since many
models can have very similar average RMS, the best 10 models are printed at the end.
0.946 4.95 0.00 6.70 4.00 7.20 24.50 7.90 32.00 8.20 40.00
2.607 4.95 0.00 6.70 4.00 7.20 24.50 7.90 32.00 8.30 40.00
0.934 4.95 0.00 6.70 4.00 7.20 24.50 8.00 32.00 8.10 40.00
0.994 4.95 0.00 6.70 4.00 7.20 24.50 8.00 32.00 8.20 40.00
2.677 4.95 0.00 6.70 4.00 7.20 24.50 8.00 32.00 8.30 40.00
0.771 4.95 0.00 6.50 4.00 7.10 24.50 7.80 32.00 8.10 40.00
0.766 4.85 0.00 6.50 4.00 7.00 23.50 7.80 32.00 8.10 40.00
0.767 4.85 0.00 6.50 4.00 7.00 24.50 7.80 32.00 8.10 40.00
0.769 4.85 0.00 6.50 4.00 7.10 23.50 7.80 32.00 8.10 40.00
0.766 4.85 0.00 6.50 4.00 7.10 24.50 7.80 32.00 8.10 40.00
0.772 4.85 0.00 6.50 4.00 7.20 24.50 7.80 32.00 8.10 40.00
0.771 4.95 0.00 6.50 4.00 6.90 22.50 7.80 32.00 8.10 40.00
0.771 4.95 0.00 6.50 4.00 7.00 22.50 7.80 32.00 8.10 40.00
0.770 4.95 0.00 6.50 4.00 7.00 23.50 7.80 32.00 8.10 40.00
0.771 4.95 0.00 6.50 4.00 7.00 24.50 7.80 32.00 8.10 40.00
The program is started with command HYP from the prompt line (interactive mode) or with L in EEV.
HYP can also be started with an argument like hyp input.dat, where input.dat is an S-file. The first
102CHAPTER 7. HYPOCENTER LOCATION PROGRAMS: HYPOCENTER, HYPO71 AND HYPOINVERSE
event in the S-file will then be located without further user interaction. Other prompt options (mainly
used in connection with EEV) are
-seisanexp Use with SE
-update Stop at end of run, ask if update and overwrite input file
-op XXX Operator XXX to use in -update option chosen
Below follows an example of running outside EEV, explanations are in lower case. Note that the
STATION0.HYP file MUST be present in the DAT directory for HYP to know that it is working with
a SEISAN database. If not present, HYP will only ask for an input file name, see HYP manual.
HYP
Arrival time data input, select one:
In interactive mode, as shown above, event date is printed out for each event and action is taken as in
EEV for the options available. If HYP run on a single file, the options above are available meaning that
HYP can select and locate different events in a single file using the event number. If HYP runs on a
database, the EEV options D and B are also available, but not shown. If the option of no interactive
input is chosen, the program will locate from beginning to end without any more user interaction. This
is a useful option for testing a subset of the database with different models etc. without changing the
7.1. THE HYPOCENTER PROGRAM, HYP 103
database. Note that the input file or database is never overwritten by HYP.
ALL TYPE ONE LINES WITH SAME AGENCY AS GIVEN IN STATIONX.HYP FILE WILL BE
DELETED SO THERE WILL NEVER BE MORE THAN ONE TYPE 1 LINE IN OUTPUT WITH
CURRENT AGENCY (except possibly a second magnitude line with a different type magnitude as given
on main header line).
Problems: Sometimes HYP will not locate an event, look in the print.out file to see what happened.
In some cases, the initial location was put beyond the limits set by the parameters. If e.g. an event is
defined as a local event and no readings are to be used further away than 2000 km (distance weighting,
see following table or TEST(41)) then no location will be attempted. Try to change the event type to D
and see if the event locates. In a few other cases it might be an advantage to use a starting location.
Station input is given in near standard HYPO71 format in the file STATION0.HYP in directory DAT. If
however the user wants to try a different model without changing the standard model in DAT, this is
possible by having a STATION0.HYP file in the working directory, since the program always looks there
first for the STATION0.HYP file (see example at end of this section). Another possibility is to use another
model for just one event by setting a flag in the phase input file, see below.
Below is an example of a STATION0.HYP file. The format is close to the HYPO71 format with one extra
line at the bottom. The test parameters 2-13 are as in HYPO71, see also HYPOCENTER manual section
4.1.2.
Comments are given after !s
104CHAPTER 7. HYPOCENTER LOCATION PROGRAMS: HYPOCENTER, HYPO71 AND HYPOINVERSE
RESET TEST(01)=0.3
RESET TEST(03)=0.6
RESET TEST(06)=0.1
RESET TEST(07)= 3.0
RESET TEST(08)=2.6
RESET TEST(09)=0.001
RESET TEST(11)=50.0
RESET TEST(13)=5.0
RESET TEST(50)=1.0
! one and only one blank line here
UPP 5951.50N 1737.60E 14 ! station lines
COP 5541.00N 1226.00E 13
KBS 7855.08N 1155.44E 46
EBH 5614890N 330490W 375 ! high accuracy lat-lon
OSG 6029.80N 252.55E-100
01A06049.43N 1049.95E 426
BERGE6057.12N 1133.15E 100 ! 5 char station name
-BEBGE6157.12N 1133.15E1100 ! 5 char station name and at 1100 m
...
The command GET STAT (get stat station-code) can be used to check that a station is present in the
station file and that the coordinates are correct.
NOTE: The format for the minutes is f5.3. Normally minutes are given as e.g. 20.22, however if a higher
accuracy is needed, it can be written without the point as 20222 meaning 20.222 ccording to the format
f5.3. See also section 5.3.5. east or west (E or W)
altitude in m, in some rare cases, the station is deeper than 1000 m in which case the minus sign has to
be put in column 1
P-delay in secs, S-delay is the same multiplied by Vp/Vs as given below. Since it is a delay, it is subtracted
7.1. THE HYPOCENTER PROGRAM, HYP 105
Density and Q is only used by modeling programs and moment tensor inversion. In this way the station
file is a complete model file for making synthtic seismgrams. NB: Moho cannot be the last layer, there
MUST be one layer below interface marked with N.
The line with ** indicates optional Vs, density, Qp and Qs. This is information only used with modeling,
see section 29. Format for additional info is 25x,4f10.1.
Format of control line: 3f5.0,f5.2,i5,2f5.1 Information is:
start depth in km, used if no range of start depths specified (see below)
xnear: distance at which distance weighting start
xfar: distance at which distance weighting is zero, beyond xfar, the phase is not used (local events only)
Vp/Vs ratio
number of start depths
start depth of range of start depths
increment in start depths
NB: If these parameters are used, the fixed initial start depth is not used
The input at the bottom is reporting agency used for both hypocenter and magnitudes.
Since the program locates distant events, max distance, reset test(41) must be set to a large value. To
avoid that local events move out in the blue, the parameters xnear and xfar must be set not larger than
2000 to 3000 km. Xnear and xfar are only used for local events (flag L) and regional events if the local
crustal model is used.
HYP will assign reasonable default values for RESET TEST parameter. Below is shown a summary. For
full details see HYP manual. The number to the left is the control parameter and D indicates the default
value. The most important parameter are given in bold.
7-9: Duration magnitude coefficients used for calculating the coda magnitude, as MAG = TEST(7)
+ TEST(8) * LOG(T) + TEST(9) * DELTA where T is the coda length in seconds, DELTA
is the hypocentral distance in km. D: 7: -0.87, 8: 2.0, 9: 0.0035 [Lee et al., 1972] If test(8)
is negative, its positive value will be used and log(T) will be squared. Note however, that the
individual stations magnitude values printed out during the run of HYP still will be using the
unsquared log(T).
11: Maximum no of iterations in the least-squares rms minimization, D: 99.0
13: Increment in km for auxiliary rms, D: 20.0 km. To disable (save some computation time), set
to 0.0.
30: Initial damping factor, D: 0.005
31: Max degs of freedom: Set to 3 for determining origin time and hypocenter, set to 2 for fixed
depth solution (depth on phase headers), -2 fix all events to starting depth in STATION0.HYP, 1
to fix all hypocenters to value on phase headers, 0 to fix hypocenters and origin times to values
on phase headers. D:3.0
32: Magnitude of parameter changes (km) below which convergence is assumed, D: 0.05
34: Minimum spread to normalize residuals, D: 0.1, do not change
35: Bisquare weighting width, D: 4.685, do not change
36: RMS residual low limit for bisquare weighting for local events, D: 0.0
37: Maximum number of increases in damping before fixing depth, D: 10.0
38: Least squares errors (0.0), damped least squares errors (1.0) with initial test(30) damping value,
D: 0.0
39: Factor by which damping is increased when RMS increases, D: 4.0
40: Depth origin of coordinate system, 0: sea level, 1:maximum elevation station in station list, D:
0.0
41: Maximum distance (km) from nearest station at which hypocentral solutions will be generated,
D: 20000.
43: Maximum rms for an event to be used in average station residual calculation - doesnt affect
the final hypocenter solution, D:1.5
44: Rg phase velocity in km/sec, D: 3.0
45: Minimum rms difference between the location on the header line and the new location for the
event to be used for average difference in location, D: 50.0
46: Minimum number of non zereo weight phases for event ot be included in average difference in
location, D: 3.0 Prevent depth to go below Moho and Conrad for n and b phases respectively,
1: enabled, 0: disabled, D: 0.0
49: T-phase velocity, D: 1.48 km/sec
50: Flag for using azimuth phases, 0 disables. Disabling the azimuths also means that they are not
used for a starting location. A better solution will often be to set the azimuth error, TEST(52)
to a large value, effectively disabling them.D: 1.0 (enabled).
51: Lg phase velocity in km/sec, D: 3.5.
52: Relative weighting of error in azimuth used in azimuth inversion (degrees). The default value
of 10 means that an error of 10 degrees will give the same contribution to the rms residual as
a travel time error of 1 sec, D: 5.0
53: Critical distance phases moved to by start loc. if Pn or Sn, D: 130.0 km
56: A value of 1.0 enables the starting location algorithm, STARTLOC. Estimates are then obtained
from apparent velocity, distance, azimuths, etc. If test(56)=0.0 epicenter is taken 0.2 km from
the first arrival station. D: 1.0 MUST BE SET TO 1.0 TO LOCATE WITH ONE STATION
ONLY.
57: Distance (geocentric km) beyond which IASPEI91 tables are used to calculate travel times for
regional events. Can be overridden by the distance letter L in the Nordic format. D: 1500 km
7.1. THE HYPOCENTER PROGRAM, HYP 107
58: Maximum apparent velocity (km/sec) for phase data to be used. This option was added to
selectively disable some of the PKP phases, which have large errors due to their steep angle of
incidence. Their velocities were almost always 25 km/s, D: 100.0 (effectively disabled)
59: Critical distance for PKP core phases to be used in starting location, D: 13000 km
60: Seconds by which the arrival time difference between two adjacent stations can exceed the travel
time between them. Setting this to 0 disables the initial consistency check. D: 5.0
61: Multiple of apparent velocity regression residual rms at which arrival times are weighted to zero
during start location determination. Reducing this value will cause arrivals to be rejected when
they do not conform to the plane wave set of arrivals which is characteristic of distant events.
Unless you are getting a lot of messages xxx removed: Apparent velocity deviation =.., in
the output, it is recommend against changing this default value. However, you can disable this
feature by setting test(61)=0.0, D: 2.0
62: Use of IASP91 phases.0: Only calculate basic phases, 1: calculate all, D: 1.0
63: Types of phases used when calculating travel time, D: 0.0
64: Allow temporary increase in RMS by this factor, D: 2.0
65: Number of iterations for which increased rms is allowed, D: 3.0
66: Print out of travel time calculation errors (1=y,0=n), D: 0.0
67: Recognize blank phases as P (y=1,n=0), D: 0.0
68: Apparent P-velocity(km/sec) to calculate start depth from pP-P, D: 5.0
69: Distance (deg) beyond which PKiKP or PKP is used as first arrival instead of Pdif D: 110.0
70: Maximum depth that the hypocenter is allowed to move to, D: 700 km
71: Sort output according to distance,(y=1,n=0), D: 1.0
72: Auto phase identification for distant events (y=1,n=0), D: 0.0
73: Number of iterations with first Ps before autophase id., D: 3.0
74: Print input phase data in print.out (y=1,n=0), 0.0
75-78 Ml magnitude coefficients. Ml = TEST(75)*log10(amp) + TEST(76)*log10(dist) +
TEST(77)*dist + TEST(78) where amp is amplitude in nm and dist hypocentral distance
in km. The defaults are Ml = 1.0 * log10(amp) + 1.11*log10(dist) + 0.00189*dist - 2.09 which
is close to the original Richter definition [Hutton and Boore, 1987].
79: Minimum number of stations to attempt a solution,D: 1.0
80: Minimum number of phases (azimuth is counted as a phase) to attempt a solution, D: 3.0
81: Disable location of local events if 0.0, D: 1.0
82: Disable location of regional events if 0.0, D: 1.0
83: Disable location of distant events if 0.0, D: 1.0
84: Disable ellipticity correction for distant events if 0.0, D: 1.0
85: A priori error(sec) of local events. This affects the error estimates, particularly when few
stations are present. D: 0.1. See TEST(91) for distant eqrtquakes.
86: Number of degrees of freedom in estimating test(85) for loc. ev., D: 8.0
87: Confidence level that the solution will lie outside the confidence ellipse defined by the covariance
matrix . The default value corresponds to 90 %confidence., D: 0.1
88: RMS residual(sec) at which residual weighting is applied for distant events. Set to 0.0 to disable.
D: 10000.0
89: Use depth phases (y=1,n=0), D: 1.0
90: Use of core phases (y=1,n=0), D: 1.0
91: Same as TEST(85) for distant events,D 1.0
92: Number of degrees of freedom for test(91), D: 8.0
93: Output longitude to always be positive (y=1,n=0), 0.0
94: Value of residual below which zero weight phases (w=4) is used again, D. 0.0
95: Disable use of core phases between 135 and 150 deg, 1: disabled, 0: enabled, D: 0.0
108CHAPTER 7. HYPOCENTER LOCATION PROGRAMS: HYPOCENTER, HYPO71 AND HYPOINVERSE
Output from the program is a CAT-file (hyp.out) and the original HYPOCENTER print file (print.out)
with more detailed information. The hyp.out file can be plotted directly using EPIMAP. In addition,
there is also the HYPO71 style summary file, hypsum.out. NOTE: In print.out and hypsum.out, year
is only given with 2 digits. Magnitude in hypsum.out and print.out are only coda magnitude and will
be different from same magnitude in hyp.out if a magnitude correction has been used.
When HYP is executed from EEV, the print.out file has no station listing. In all other cases, there is
a station listing.
Some explanation is given below, for details see HYP manual
The output in print.out first shows the content of the TEST parameters in the STATION0.HYP file.
After that comes some routine output from the starting location algorithm. Then follows the output
from the iterations, which should be self-explanatory. The location is then given on one line containing
origin time, latitude longitude (deg min), depth, number of phases, the number of degrees of freedom in
the spatial solution (maximum 3), rms damping and errors, error estimates, resolution matrix. Last are
the station lines with the following abbreviations:
7.2. HYPO71 (SUN ONLY) 109
stn : Station
dist : Distance in km
azm : Azimuth at the source
ain : Angle of incidence at the source
phs : Phase specified by user
calcphs: Phase used by program
w : Input weight
hrmn : Hour minute
t-sec: Arrival time sec
t-obs: Observed travel time
t-cal: Calculated travel time
res : Residual
wt : Weight usedi by program, normalized to 1.0
di : importance of phase in %
A station weight wt=-1 means that the phase travel time could not be calculated. The output phases can
be e.g. PN2, where 2 means that the phase calculated has been refracted in layer 2 and PN5 refracted
in layer 5. The input phase is then just P and a local model is used.
Any change in the input phase ID is signified by an asterisk (*) before the phase ID.
If amplitudes are available, Ml, Mb. Mw or Ms will be calculated, and all stations calculating Ml, Mb,
Mw or MS will additionally be displayed at the end of the interactive printout.
Change of day:
If the origin time of the located event occur on the day before the time in the header line, the time in the
header line is changed to the previous day and all phase arrivals are changed accordingly. This means
that some hour values will be more than 23 since phase arrival times refer to the main header.
Seismic moments etc: After locating an event, HYP will check if there is spectral information (Moment
etc, see MULPLT) available in the S-file and average values will be calculated and written into the output
file.
7.1.16 Problems
If no location or an obviously wrong location is obtained, check print.out. Common problems are:
- Wrong location: Program gets into a local minimum. Use the individual event start location option
(S in header line). If the problem happen often, try either option for start location (nearest station
or start location routine). If dept is the problem, try a range of start depths (set in STATION0.HYP)
- No location: The program iterates outside the maximum distance set for a local or regional event
(RESET TEST 57) or the initial start location is outside limits. Use a fixed start location or check
readings to get a better start location.
local earthquakes written by Lee et al. [1972] using a stepwise statistical regression procedure outlined
in Draper and Smith [1966]. The users manuals were originally released by the authors as a series
of open-file reports of the U.S. Geological Survey and contain a full description of input and output
parameters and usage. The SEISAN version of the program is essentially the same as the original, the
only differences being in the input and output facility. Input data required are phase arrival times, station
co-ordinates and a crustal velocity model. SEISAN extracts the arrival information from a Nordic format
phase readings file and the station and velocity information from the station input file STATION0.HYP,
found either in the SEISAN data directory, DAT, or the local directory. The format of the STATION0.HYP
file is described in this manual in the section on the HYPOCENTER algorithm (7.1). HYPO71 supports
13 test variables that influence how the program goes about locating the earthquakes. The default values
for these variables were developed for the large and closely spaced networks in central California. These
variables are defined at the start of the STATION0.HYP file by the values of TEST(01) to TEST(13). Brief
definitions for each of these variables can be found below and full definitions can be found in the HYPO71
manual.
SEISAN constructs a HYPO71 format input file called hypo71.input, containing the station co-ordinates,
thickness and velocity for each layer of the crustal model and phase arrival times, then runs the HYPO71
algorithm. The HYPO71 program generates a single output file called hypo71.output. SEISAN reads the
information contained in this output file to create two further output files: hypo71.out, a Nordic format
phase readings file containing the calculated location; and hypo71.brief, a summary file containing
origin time, epicenter, depth, magnitude and station residuals.
There are a number of limitations to the current version.
The program is designed to run from eev and can only be used for one event at a time; there is no
facility for multiple event or batch location/relocation.
HYPO71 is not included with the UPDATE command, so the database cannot be updated.
Errors will result if the input phase readings contain arrivals from two different days, i.e. either
side of midnight
All stations must have the same sign of latitude or longitude, so if stations extend across the
Greenwich meridian and/or the equator and an offset should be added to allow for this.
EXAMPLE RUN
Phase names
Only single character phase names are supported, denoted by P or S.
Weighting
Two weighting options may be used.
1 User specified weights assigned by a single integer value in the range 0 to 4 for a given phase. These
will assign a weighting factor of 1, 0.75, 0.5, 0.25 or 0.0 to that phase. Also, a weighting of 9 will
assign the absolute time a weighting of 0.0 but will allow the use of relative times if a valid S-arrival
is found for that station. The relative arrival time will be assigned the weight of the S-phase.
2 Distance weighting as given by the relationship w = (xf ar )/(xf ar xnear). By default the
parameters xnear and xfar are read from the STATION0.HYP file. However, they can also be defined
in the s-file and are used if RESET TEST(107) is set to 1. The paramters are specified in the s-file
by a type-3 line, e.g.
XNEAR 150.0 XFAR 300.0 SDEP 7.5
Errors
The standard error output from the HYPO71 program is contained in an additional line in the Nordic
format readings output, hypo71.out, defined by the characters 83 in columns 79 and 80.
The HYPO71 error line format is defined as follows:
Columns Format Description
2-14 A13 HYPO71 errors
19 A1 Location quality, Q
21-23 A1*A1 QS and QD rating
25-27 I3 Number phases used
28-30 I3 Distance to closest station
32-34 I3 Azimuthal gap
36 A1 1. (Always output?)
38-41 F4.2 RMS
43-46 F4.1 ERH (km)
48-51 F4.1 ERZ (km)
79-80 A2 83
P 2
RMS is defined as [ i R /N ] whereRi is the time residual at the ith station. ERH is the standard
error in the epicenter in km given by [SDX 2 + SDY 2 ], where SDX and SDY are the standard errors
in latitude and longitude. ERZ is the standard error in the focal depth in km. The location quality, Q,
is a measure intended to indicate the general quality of the solution and is defined by a single character.
Q Epicenter Focal Depth
A excellent good
B good fair
C fair poor
D poor poor
Q is taken as the average of QS and QD, where QS is a statistical measure of the solution and QD is
rated according to the station distribution.
QS RMS (S) ERH (km) ERZ (km)
A < 0.15 1.0 2.0
B < 0.30 2.5 5.0
C < 0.50 5.0
D Other
QD N Gap DMIN
A 6 90 Depth or 5 km
B 6 135 2*Depth or 10 km
C 6 180 50 km
D Other
Magnitude
Both duration and amplitude can be used to calculate magnitudes as with HYPOCENTER (see above
for details). Duration, amplitude and period for each station are used to give a magnitude value for each
station. These values are averaged to give the event magnitudes.
The test variables
7.3. THE HYPOINVERSE PROGRAM, HYPINV 113
name HYPINV (original version was HYP in conflict with HYP for HYPOCENTER) and can be run
according to the original manual [Klein, 2014] and will not be described here. With a new driver program
HYPINV SEISAN, Hypoinverse can be run using Nordic files as input and output. Only the archive
format for input and output is used directly with Hypoinverse.
The program does not work well at large distances ( > 1000km) so use it only for local earthquakes.
If original data, station and control files are available, it is just typing HYPINV and the program will
run according to the manual. If none of these files are available, they can be made with the conversion
programs, see below.
HYPINV can be operated in 3 ways:
Alternative 1: Manually do all steps:
1: Convert a CAT file a Hypoinverse input file with the program NORHIN, e.g. norhin collect.out.
The input file in Nordic format is converted to a file norhin.out in Hypoinverse format. The following
limitations and additions apply:
2. Make the control files with the program MAKEHIN. This creates the instruction file hypinst, station
file hypinv.sta and model file hypinv.mod. These files are standard HYPOINVERSE files. The infor-
mation is taken from the STATION0.HYP file in either the working directory or DAT. MAKEHIN cannot
work with an alternative STATIONx.HYP file. If the hypinv.sta or hypinst files are present, they will not
be generated. This allows for changes in the Hypocenter parameters to be used in subsequent runs. On
the other hand, if the STATION0.HYP file is changed, the hypinst and hypinv.sta files must be deleted
before the changes in STATION0.HYP will be used. The following parameters are partly generated from
STATION0.HYP:
Vp/Vs
7.3. THE HYPOINVERSE PROGRAM, HYPINV 115
Start depth
Distance weighting starts at iteration 4, starts at HYPOCENTER parameter xnear and is zero at
approximately xfar. However that assumes that xnear is further away than the second closest sta-
tion. Hypoinverse parameter DISCUT is set to xnear, DISW1 is set to 1, and DISW2 = xfar/xnear.
See Hypoinverse manual for details.
3. Type HYPINV and the program runs. There is a one-line output per event on the screen and the full
output is in a file called print.out.
The output file from HYPINV is now hypinv.out and it can be converted back to Nordic format with
program HINNOR, however, some of the original information is lost (like e.g. amplitudes). To avoid this,
see alternative 2. HINNOR transfers the following information:
Error line with gap and erz (vertical error) and erh (horizontal error). The Nordic values erlat and
erlon are both replaced by erh.
Magnitudes L and C in Hyoinverse file. If program HYPIN SEISAN is used, the magnitudes are
overwritten with the original values.
Residuals.
Angle of incidence.
Azimuth.
Weights used.
Polarity.
Coda length.
Alternative 2: Run the whole process using the driver program HYPINV SEISAN. The program does
the following:
Run NORHIN
Run MAKEHIN
Run HINNOR
Generate an output file in Nordic format hypinv seisan.out that contains the new HYPINV
location with corresponding residuals etc as well as all the original information in the Nordic input
file like amplitudes, spectral information etc. The only thing lost is the original P and S phase
names. All the R and D events skipped by NORHIN are put back in. To keep track of the events,
the ID is used. The ID line will get the action flag HIN. The original magnitudes, agencies and
number of stations are kept.
116CHAPTER 7. HYPOCENTER LOCATION PROGRAMS: HYPOCENTER, HYPO71 AND HYPOINVERSE
Using alternative 2 makes it very easy since Nordic file is both input and output.
Alternative 3: Running HYPINV from EEV using the command H. The steps are:
It is thus possible to use HYPINV to update the data base of local events with the limitations mentioned
under alternative 1.
Note: Hypoinverse use residual weighing by default so rms and errors might be smaller than locating
with Hypocenter.
Magnitudes
No magnitudes are transferred from Nordic files to Hypoinverse files. Coda magnitude is calculated
with Hypoinverse using the Hypoinverse default relations. If the magnitudes have to be updated due to
significantly changed location, it must be done with SEISAN EEV command u and with the hypocenter
fixed so the original HYPINV location is preserved.
How to run Hypoinverse with other parameters
Hypoinverse has many options of which the multiple models might be the most interesting. Generate
the standard input files as in alternative 1 and then modify them according to the Hypoinverse manual.
Then run HYPINV directly or, as the hypinst file is not changed if it exists, using alternative 2 or 3.
sectionHYP ISC (Unix and Linux only)
Program written by Richard Luckett
ISC has for many years used a standard procedure to locate earthquakes and the ISC locations have often
been used as a reference. The earth model used is the Bullen tables. ISC has recently rewritten the old
location program and it was therefore possible to also port it to SEISAN. The purpose is that it should
be possible to compare standard ISC locations with location using other programs and models. The
implementation in SEISAN was done using the standard hyp program where only the location routines
have been changed. The program then behaves almost identical to HYP and uses the same format input
and output files.
Parameter files: STASTION0.HYP is used for station coordinates, magnitude scales and agency code.
The crustal model information is not used and only the RESET TEST parameters related to magnitude
are used. In addition, there is a new parameter file (in DAT) iscloc.def with parameters specific for
the ISC location routines, see file for explanation of parameters.
Input data files: Just like for HYP
Output files: Hyp.out is like before, print.out is different.
Not all crustal phases used with HYP may be available. The weights used in SEISAN do not apply since
the program uses residual weighing only, see parameter file.
Magnitudes are calculated exactly like in SEISAN.
In eev, the command to locate with HYP ISC is il.
For more information about the ISC location program, see http://www.isc.ac.uk/Documents/Location/
Chapter 8
This program is the general plotting and signal analysis program. The program is capable of doing
general phase picking, correct for instrument response, and produce Wood-Anderson seismograms for
determining Ml, synthetic traces for Mb and Ms, determine azimuth of arrival for 3 component stations,
do spectral analysis and particle motion. The program can also read in theoretical arrival times for global
phases for help in identifying phases. If a quick location is needed based on a waveform file only, mulplt
can both pick the phases and locate the event. MULPLT operates either as a database independent
program (started with command MULPLT) or in connection with the database (started from EEV with
command P or PO). If the program works independently of EEV, it will create an output file mulplt.out
in Nordic format with the readings and results of spectral analysis. This file can directly be used with
e.g. HYP. MULPLT reads and plots one channel at a time. This can be very time consuming when
replotting traces and from SEISAN version 8.2, a certain number traces are kept in a memory buffer in
order to speed up replotting and reprocessing The data is stored in one large array the size of which is
determined at the time of compilation so for systems with many or long traces, it might have to be larger
and for systems with little memory it might have to be smaller. The dimension is set in file seidim.inc in
directory ./INC using variable max mem sample. A typical value is 30 000 000.
Note on Seed/Miniseed reading
The routines will put in zeros for gaps
If an overlap occurs, the block with the overlap will be discarded and zeros inserted.
If a block is out of time sequence, the block will be discarded, this is like a large negative overlap.
The channel start time will be considered the time of the first block found for that channel. If a block
then occurs before the start time the block will be discarded.
Starting MULPLT from prompt line
Giving the command mulplt -h, will show the basic options:
117
118 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
## Options ##
-help Print this list
-h Same as -help
-plotdefault Will plot data directly with default values
-qdp Same as -plotdefault
-po Same as -plotdefault
-version SEISAN version
Examples:
1) mulplt
enter values
2) mulplt -plotdefault -sfile /home/seismo/REA/TEST_/1996/06/03-1955-40D.S199606
Filename, number, filenr.lis(all): The program asks for a file name or file number of a waveform file. To
use the number, it is assumed that a list of files has first been created and numbered in a file filenr.lis
using command DIRF, see section 15. By giving the number, the file corresponding to the selected
number is used. By giving a ?, the list with numbers is displayed and a new number can be given. If
many files are to be plotted with one command (hard copy only), give filenr.lis for file name and all
events in FILENR.LIS will be plotted. There will only be one question about filter and then all events
are plotted with all channels and the chosen filter.
Cont: Plot from a continuous data base. The program will use all data bases defined in SEISAN.DEF. A
question will be given for absolute start time and window length. See also 8.5. Conts: Plot from a large
SEED volume. A SEED file too large to be read in can be plotted in parts. A question will be given for
file name or number. The file is then read and available data is displayed. Start time and window length
is then entered.
arc: Plot for a BUD or SeisComp archive
Plot from a continuous archive. The program will use all channels defined in SEISAN.DEF. A question
will be given for absolute start time and window length. See also 8.5. Then follows a display showing all
stations and virtual networks that are defined in SEISAN.DEF before a channel selection is made. It is
possible to combine selection of stations with one or more virtual networks. MULPLT removes duplicates
in case a station should be selected more than once. See also secion Working with many channels in
MULPLT a bit later.
can be given. If many files are to be plotted with one command (hard copy only), give filenr.lis for
file name and all events in FILENR.LIS will be plotted. There will only be one question about filter and
then all events are plotted with all channels and the chosen filter.
Hardcopies assume a PostScript printer. For each event plotted, a plot-file called mulplt.eps is
generated. The plot files are sent directly to the printer from within the program with the seisan print
command as soon as the plot is finished for one event but before the program is finished. In Unix, this is
lpr or lp while on PC, the command is given in a .bat file in COM (see installation section). This means
that the same plot-file is overwritten for each event plot. For setting up the printer, see installation,
chapter 3.
In multitrace mode, many traces (number limited by the SEISAN system definitions, see chapter 3) can
be plotted. If the plot is made via EEV, all picks are also displayed.
Location of waveform file:
Mulplt will search in current directory first. If not found there, the WAV directory is searched. If the
SEISAN.DEF file has been set up, MULPLT will thereafter try to locate the waveform file in one of the
databases or specific directory given in the SEISAN.DEF file (located in DAT or working directory).
Format of waveform files:MULPLT can, on all platforms, use SEISAN, GSE, SAC ASCII and binary,
GURALP (one channel files), HelMberger Format and SEED. If started from EEV, files in different
formats can be used at the same time.
Time gaps in waveform files:
Only SEED format has running time headers and therefore the only format where a possible time gap, in
one file, can exist. SEISAN will replace missing data intervals with zeros. For a SEISAN continuous data
base, it is assumed that a gap of less than 2 s between files is not a gap. Larger gaps will be replaced by
zeros.
In order to process events more easily using SEISNET, EEV and MULPLT have been tightly integrated.
When MULPLT is called from EEV, command f will plot the next event in the database, to go back to
the same event in EEV, use quit. The event can be plotted with default parameters from EEV using
PO. If PO has been selected, the f command in MULPLT multi trace mode will show the plot of the
next event with default options. This is a fast way of plotting waveform files going through S-files in a
database. The command poo does the same as po except that tyou start in single trace mode.
If several waveform files are available, the user will graphically be shown the files and can select one or
several Files can optionally be displayed in alphabetical order (see MULPLT.DEF). If more than 75 files,
several selection screens will be shown. A maximum of 1000 files can be used if the PO option has been
used, all default channels will be used.
Plotting from EEV, a file with a list of waveform files can also be used as input. The filename must
end with LIST. The filename could be e.g. 2002-02-02-1310-20S.BER LIST. The format is the filenr.lis
format so the file can be created with DIRF. The LIST file can be in local directory, WAV or any other
directory as specified for normal waveform files. The intention with the list option is to be able group
many waveform files in one group without the need to merge the files or list them all in the S-file. The
limit of number of files in the LIST files is 1000 and up to 10 LIST files can be used for the same event.
There is currently no automated facility to create and include LIST files in the S-file.
8.3. WORKING WITH MANY CHANNELS IN MULPLT 121
In addition, in multitrace mode, the radius can be changed (command R) and a center station can be
entered (command S). If command S is given and there is no radius defined, the user will also be asked
for radius.
Plotting stations from an archive: Very many channels can be specified in the archive (currently
max 3000). All channels will initially be available to the the user and the starts times etc read in. This
can take some time, so in order to avoid first reading the channels and then selecting channels present
with data, it is possible to preselect which channels should be checked (first station selection screen when
122 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
using arc). A furhter reduction in the number of channels to check is to use the option above for distance
to a station or a point. This distance check is done before the channles are checked.
Archive referencing in S-files is described in section 2.2.3. An example of an archive reference line is:
which is referring to one channel (station STAT, component COM, network NT, date-time and duration
DUR (s)). With many channels, this referencing becomes a bit cumbersome and some wild cards can
then be used:
Station is blank or *, component, network and location are blank: All channels defined in SEISAN.DEF
will be plotted with start time and duration given in ARC line (if not blank, see next option). If a
component is given, only that component will be selected. If a network is given, only that network will
be chosen. If a location code is given, only channels with that location code is selected.
Start time and or durations blank: Start time will be origin time - a time given in SEISAN.DEF
(ARC START), duration will be a time given in SEISAN.DEF (ARC DURATION).
Station is P: All channels for all stations listed in the S-file found in the archive will be plotted. There
is no requirement for the station to have any other information than the station name, component code
is not used. So a new station can easily be added.
Plotting all stations without an archive reference line: If parameter ARC BY DEFAULT in SEISAN.DEF
is set to 1, all channels in the archive will be selected. Setting it to 2, only stations with readings are
plotted.
NOTE: An ARC line can be inserted/edited in the S-file from EEV by command arc.If ther eis ARC
line(s) in the S-file, these will determine what is plotted and not the parameters in SEISAN.DEF. If .e.g.
the station name in ARC line is X, no channels will be plotted (assuming there is no station with name
X) and only otyher possible waveform file names will be used.
Optionally, the archive channel specification lines can have a time interval of validity. This is to avoid
unnecessary checking of archive files if the archive has channels from different time periods. The format
is: yyyymmddhh for both start and end time, only as much info as needed has to be specified. If start
time is blank, start time is very early, if end time is blank, no end time. The start end end times are
written in columns 61-70 and 71-80 respectively.
How to specify many channels in a separate file, the LIST file: In some formats, a waveform
file can only have one channel (e.g. SAC). Referencing hundreds of waveform files (or ARC references) in
an S-file is not practical. These file names can be collected in a separate file in filenr.lis format. The file
name must end with LIST like e.g. 2012-12-01-1044-22.BERGEN LIST and the filename is referenced
as a waveform file in the S-file and also stored in the usual place of the waveform files. Up to 10 LIST
files can be referenced in the S-file so a large network can be broken up in regions, each with a LIST file,
which then can be selected separately in the file selection screen. There is no specific software, except
DIRF, to create LIST files.
processing is not possible in this mode except for selecting time windows for event extraction, see below.
Using this option the program asks for the following input:
Low and high cut for filter: Give values or return for no filter. A band pass cannot always be used with
a low frequency low cut(filter unstable) so if e.g. a LP record is to be simulated, use filter limit 0 to 0.1
Hz. The zero means it is a low pass filter, not bandpass. A filter 10 to 0 would mean a high pass filter.
Seconds pr line: Number of seconds on each line.
End time: This question only appear if plotting from EEV. The list of files is then the list of events
belonging to the data base used. Give end time as e.g. 2000050203
Max count: The absolute maximum count to be used for full scale. Since many lines and possibly many
pagers are plotted, it is not possible to use autoscaling, and like on a seismogram, a fixed value must be
set.
Lines pr page: Number of lines per page.
Station code: Station code (max 5 characters)
Componet code: The component code, max 4 characters.
MULPLT will plot from the first file given from the filenr.lis file and then continue to plot as long as
more file names are given in filenr.lis. Alternatively if plotting from EEV, it will start with the current
event and continue until the end time. So if a month of data files are given, a month of seismograms will
be displayed. There is no requirement that the input files follow each other in time (no time gaps) since
each file is plotted on the page where it belongs in time. However, the files must be time ordered. The
continuous option can therefore be used to check availability and timing of continuous data. Discrete
events can also be plotted in this mode if one want to get a display of when the events occurred. However,
if filtering, it is assumed that the files follow each other in time since a few points are carried over from
one file to the next to make the filtering continuous. Figure 8.5 shows an example.
Selecting time windows for event extraction in continuous one channel mode:
To extract events shown in the continuous plot one can mark a given time window by typing s and e
at the start and end of the required time window (see Figure 8.1). Selected time windows are, when
plotting is finished, written to the file mulplt.ext and to the screen as wavetool command lines. By
executing mulplt.ext (type sh ./mulplt.ext or source mulplt.exe in UNIX, on PC the name will be
mulplt.ext.bat so just typing the name mulplt.ext will start the extract process) the time windows
given in mulplt.ext, are extracted from the continuous database defined in SEISAN.DEF. The data files
are extracted in the local directory. These files can now be registrated in a REA database with autoreg.
One cannot delete a Start or End time mark. So, if another time window is required pick the new
window and delete the line in mulplt.ext with the old time window before data is extracted.
The time marks is written to the file mulplt.ext for data to be extracted and processed. Type s and
e to add time marks.
If the SEISAN LOGGING parameter is set to 1 in SEISAN.DEF the analysis done with this option, will be
saved in a log file in REA/BASE /LOG/YEAR/MM. BASE is the default database, YEAR and MM is the year and
month the analysis was done. The log files are named mulplt.cont.data-time.log, where date-time is
the time of the analysis. Logging is on by default.
124 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
Figure 8.1: Example of time marks at the Start and End of an event recorded
at the KBS station. The time marks is witten to the file mulplt.ext for data to be
extracted and processed. Type s and e to add time marks.
8.5. COMMANDS IN MULPLT, OVERVIEW 125
Most commands are given by pressing one key, however several commands can
also be given by clicking in the appropriate menu box on top of the screen.
If the full menu is not displayed, select the menu on top right part of the
screen. The following commands are available, first given by the single
letter command and if also available as a mouse click, the letters in the
menu box is shown. COMMANDS ARE CASE SENSITIVE.
c: Read coda.
d: Del W: Delete waveform file(s), cursor outside area of trace plot, file(s)
must be in working directory, else no files displayed. If done
from EEV, only file names in S-file are deleted.
e: Phase E
i: Phase I
M: Merge: Merge waveform file, mulplt called from EEV, only if files are
In working directory.
y: AllC: Toggle to and from all channel mode. All channels are only
for one station, for more stations use u.
>: Print: Will make a hardcopy of all channels of current event with
the last selected filter, only in multitrace mode.
<: Same as D
Filter options: The fixed filters (4/8 pole Butterworth) are placed
on keys z,x,v,b,n,m with the following frequencies:
z: 01-.1: 0.01 - 0.1 Hz Pressing key once gives a 4 pole filter one way
x: .1-1.: 0.10 - 1.0 Hz Pressing the key twice, and the filter also
v: 1 - 5: 1.0 - 5.0 Hz go the other way and it is now an 8 pole filter.
; 2 - 4: 2.0 - 4.0 Hz
b: 5-10 : 5.0 - 10.0 Hz From menu, only 4 pole filters are used.
n: 10-15: 10.0 - 15.0 Hz
m: 15-23: 15.0 - 23.0 Hz
Combining options: Note that you can select several options together.
E.g. V and S will first filter the signal and then
make the spectrum.
Saving observations: When you go to the next trace or another event (F),
the readings are saved in the S-file. They are also
saved when you pick the next trace in Multi mode.
Filters in MULPLT
All filters in MULPLT are Butterworth filters in time domain. When a filter is selected. using a hotkey
or from the menu, the filter is only run one way, forward in time, and the number of poles is then 4.
This will make a small phase delay where the first onset might appear a bit later, so if possible, read
on unfiltered traces. If a 2 way filter is desired, press the filter key twice and the filter will also run
130 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
backwards in time and the filter will be similar to an 8 poles filter. This gives theoretically a zero phase
shift filter, however in practice, some of the onset energy is seen well before the first arrival, so it seems
to distort the arrival times much more than using the 4 pole filter. When the program asks for a non
fixed filter like when using the . (Filt) command, the filter is always 4 poles by default. However, it
is now also possible to interactively select number of poles and number of passes (1: forwards, 2: both
ways) using the command. Press and the user is asked for filter frequencies, number of poles (10,
but more then 4 and the filter might become unstable for high sample rates) and number of passes. In
addition LP (low pass), HP (high pass) and BR (band reject) filters can be used. E.g for a 5-10 Hz filter
some of the choices are:
WHEN PLOTTING, THE FILTER LIMITS, NUMBER OF POLES AND NUMBER OF PASSES IS
WRITTEN ON THE SCREEN.
For band pass filters, the number of poles for both frequencies is the same. When doing spectral analysis
or response removal and specifying a filter before, the filtering is done in time domain and the filter has
the number of poles specified by the user, default 4. NOTE:When reading polarities, DO NOT USE
FILTER, if possible.
Filtering and instrument correction: Since filtering is done in time domain, there is an added stability
filter in frequency domain to avoid low frequency blow up. This filter is a 4 pole HP filter at 1/5 the
filter low frequency corner.
Filter limitations: For frequencies below 0.5 Hz, only 4 pole BP and BR filters can be used. If the user
try to select another number of poles, the number of poles is set to 4.
Filtered output: Extracting data with WAVETOOL, option Out. It is only possible to use 4 pole BP
filters, forward in time, using any other filter and the data is not filtered. Using option OutW any filter
can be used but then only Ascii Helmberger format is possible. WAVETOOL can then convert to any
other desired format.
Prior to version 9.1 MULPLT used a 4 pole Butterworth filter in time domain and an 8 pole Butterworth
filter in frequency domain. The filters in frequency domain were use in connection with instrument
response correction and spectral analysis. It has turned out that the frequency domain filters distorted
the signal in some cases, particularly for narrow band and low frequencies. Therefore, frequency domain
filters are no longer generally used. The change in filter setup, might change Ml magnitudes by 0.05 to
0.1 depending on which filter (if any) was used.
Displaying uncertain time
In each trace header in the SEISAN waveform file, there is a flag to indicate if the time might be uncertain
(see Appendix B). If that flag has been set, the message UNCERTAIN TIME will be displayed on top
of the trace. Currently this flag is only put into the waveform files if the data comes from a SEISLOG
system that has detected a timing error or if the data is converted from SEED/MiniSEED data. Simlarly
plotting SEED/MiniSeed data, uncertain time will be displayed if that flag is set in any block in the time
window read in for a particular trace.
Below is some more detailed description of some of the options. The one letter command is given with
the menu command in parenthesis:
8.5. COMMANDS IN MULPLT, OVERVIEW 131
Figure 8.2: An example of using MULPLT in multitrace plot mode. Notice that start
and stop times are different for different channels. The horizontal line at the start of the
plot is the DC level. The small number above each trace to the right is the max absolute
count with the DC-level subtracted and the small number to the left above the trace is
the DC level. If plotting from EEV, the phase picks available are shown.
132 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
Figure 8.3: Examples of MULPLT with theoretical arrival times of some global phases.
Short period seismograms are shown. The theoretical phases are marked with onset y
below the trace and the read phases are marked normally above the trace.
8.5. COMMANDS IN MULPLT, OVERVIEW 133
1 KONO L N
2 KONO L E
3 KONO L Z
10 15 20 25 30 35 40
Figure 8.4: Example of MULPLT with theoretical arrival times showing global phases
on a long period seismogram. The filter used from 0.01 to 0.1 Hz. Without filtering,
almost nothing would have been seen on this broadband station.
134 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
0: 8
0:38
1: 8
1:38
2: 8
2:38
3: 8
3:38
4: 8
4:38
5: 8
5:38
MIN
10 15 20 25 30 35
Figure 8.6: Example of the menu, which can be displayed on top of the plot.
To apply filters, first make a selection of options (filter, window, channel selection) and then execute by
pressing R(Plot) (or selecting a zoom window). Figure 8.2 shows an example.
Single trace mode:
In this mode, one trace is initially displayed on top of the screen, see example on Figure 8.7. The traces
used are the ones earlier selected and will be displayed one by one. Several options are now possible as
can be seen on the menu. Normally no hardcopies are made in single trace mode since it is intended for
fast routine work. However, by starting MULPLT in multitrace mode (option 2) and then go to single
trace mode (command T(Toggl)), hard copy files are made.
Multitrace mode:
In this mode hard copies can be made. If option 2 is used, both screen plot and hard copy files are made.
If replot is made, only the last plot is available in the hard copy file. If option 3 is used, which is only
hardcopy, there will be additional questions about, window length, start time, scaling and filters. If the
scaling is set so that the plot occupies more than one page, several pages will be printed. If in this mode,
filenr.lis is given as file name, the program assumes that all the files should be plotted and the only
questions will be about the scaling and filters. All channels in each file will be plotted. This option is
useful for plotting a large number of events with a single command.
All channel mode
In this mode, all channels for selected stations are displayed in a new window. This mode is particularly
useful for working with three component data. By selecting one or several stations in multrace mode, all
components for those stations will be displayed in new window by pressing y or ALLC on menu. Similarly
in single trace mode, prsssing y or ALLC will display all channels for that station. The user can then go
back to e.g. multitrace window and select another station to work with in three component mode.
Multiple screens in multitrace mode
If many channels are available (like more than 30), it might be difficult to distinguish all and the channels
can be displayed in multiple screens. The number of channels per screen is set in MULPLT.DEF. The number
of windows or screens for a particular data set is given in top left hand corner as e.g. Win 2 of 7 meaning
current window is number 2 of 7 windows. To move to the next window, use TAB or NextW in menu.
In each window, normal operation can be done. Channels selected will be kept. Using a large data set,
the user can then view each window separately, select the channels of interest and when all channels have
been viewed, only the selected channels will remain for display. It is possible to togle between showing
all channels and multiple screens by pressing N.
Plotting stations in a given distance range When many stations are available, it might be useful to only
plot only the stations nearest the epicenter or a particular location. For this option to work, parameter
MULPLT AREA in MULPLT.DEF must be set to a value larger than 0.0. for more information, see
section Working with many channels in MULPLT
Channel order in multitrace mode:
Normally channels are plotted in alphabetical order according to station name, see parameter CHAN-
NEL SORTING in MULPLT.DEF. They can also be plotted in the order they are stored in the waveform
136 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
file(s) (option NSORT DISTANCE set in MULPLT.DEF). By setting the channel order parameter in the
MULPLT.DEF file, it is also possible to plot the channels in distance or time order. If MULPLT is started
from EEV (and distance ordering is set), the channels will be plotted in distance order provided distances
are given in file. . Since there is no consideration for channels for the same station, the channels for one
station, will be plotted in the same order as given in the waveform file. If a station is not found in the
S-file, it will be plotted last. If plotting is done with MULPLT directly with a waveform file, the plotting
order will be the start times as given in the waveform file header. Channel ordering can be turned on
with the key - or pressing (Dist). If set in the MULPLT.DEF file, it is set when MULPLT starts up. It
cannot be turned off for a given event when set from MULPLT but the flag is returned to the default
value for the next event.
Plotting from continuous data base
If a continuous data base is set up (see section 2.2.3), it is then possible to plot all traces from the
continuous data base with MULPLT. When MULPLT starts up, use option cont and the user is prompted
for a start time and interval. MULPLT will now check all continuous data bases for available data in
required interval and display the available data. The forward (next) or back option will display previous
or next window respectively. There is an 25 % overlap between windows. If no data is available for
the whole window, no trace is shown. If the beginning and the end is available, a line will join the two
segments. If only end or beginning is available, only the available data is shown. All normal operation
can be done on the window plotted so it is possible to e.g. extract data. If the register option is used,
the whole window is extracted from the continuous data base as one file, copied to WAV and the S-file
created.
1. Unprocessed waveform files are available in a work directory and have to be inspected and possibly
put into the database. No S-files have been made.
2. Raw data has already been put into a SEISAN database with S-files and corresponding waveform
files in some work directory, the data has not been checked. This process has most likely been done
with the automatic data collection software SEISNET [Ottemoller and Havskov, 1999], however,
events can also have been auto registered with program AUTOREG.
3. Registering from continuous data: SEISAN continuous data base, BUD or SeisComp archives or a
large SEED file.
In both cases above, the aim is to inspect an event and decide if the event is real and should be put into
the database using option p. All work must be done from the directory where the raw waveform files are
located. The process of putting an event into the database results in creating the S-file (option1), giving
the event identifiers and copying the waveform files of registered events to the waveform directory.By
pushing p(Regis), the user will be prompted for distance indicator, which has to be L, R or D for local,
regional or distant event. It is possible here to enter 2 characters like LE or LV for local explosion or
local volcanic event. The event type or event ID can be any character. Four characters are predefined
and should only be used if the following definition correspond: P(probable explosion), E(explosion),
Q(confirmed earthquake) or V(Volcanic event). If the user enter L, R or D in lower case, the case will
8.6. REGISTERING NEW EVENTS INTO SEISAN 137
automatically be changed to upper case. The same also happends with E, P, Q and V. A third cahracter
can optionally be entered for the model indcator which is put into column 21 of the header line. The
volcanic events have a sub classification which can be entered when registering an event as volcanic, see
section 39. The process of registering the event into the database implies that a new S-file is created or
registered and in the S-file. An operator ID will be asked and the operator ID will be put on the ID-line.
The question about operator will only be asked for the first event since it is assumed that all subsequent
events are put into the same database by the same operator. The event ID, can later be used with the
SELECT program to select out particular event types. When first putting an event into the database,
the user is also prompted for database.
Option (1)
Data is available as waveform files only and a list of files must be made first with DIRF. Main option
0, 1 or 2 can be used for plotting. The p option creates the S-file and copies the waveform file to the
WAV directory. The waveform file remains in the working directory. Unwanted waveform files can also
be deleted so that when all events have been put in, only waveform files of real events remain in working
directory. These can then be plotted with one run of MULPLT, see section 8.1.
Option (2)
Data is available already in a database, however since the data has not been inspected, the waveform files
are still in a work directory. In EEV, the first unprocessed event in the month is found with command
ss and MULPLT is started with command po to invoke all defaults. If the event is to remain in the
database, it must be registered with option p. The process and the questions are the same as in option
(1) except that the S-file is not created since it is already there. The S-file is cleaned for all processing
information from SEISNET if present. This normally also includes automatic phase picks. However, they
can be kept if parameter REG KEEP AUTO is set in the SEISAN.DEF file. The status of the files also
changes to being newly registered as under option (1) (see definition of processing codes in Appendix 1)
and waveform file(s) copied to WAV. Before registering, it might be an advantage to merge waveform
files and delete unwanted files (could be false triggers), see section 8.5. Files can only be merged and
deleted in working directory with commands Delw and Merge (Menu). Delw command only deletes the
waveform file names in the S-file. In this process of putting new events into the database, it is also an
advantage to delete unwanted events. This is done with option S(Del S). The S-file is deleted, but the
waveform files remain in the working directory.
Option (3)
When reading continuous data, an output file can be made with the Out option and that output file
can be registered. However, it is also possible to do this in a single operation using the Register option
like above. The selected time window is then extracted, the waveform file copied to WAV and the S-file
registration made. In addition to the questions above, additional questions are given:
Output channels on screen: s
No output, just register: n
No output, jusr ARC line: a
Output all channels: enter
These option are intended to be used with routine operation when many channels are present and the
user only view a few, like all vertical channels, but want to extract (and register a file with all channels).
For ARC archive, the user might want to work directly with the archive from EEV and thus not extract
out a waveform file but only create a reference to the archive.
Preprocessing of data while registering new events, option (1)
138 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
Normally a series of events are registered first and MULPLT terminated. Then EEV is started up for
interactive picking and location. However, if preliminary processing is desired while registering the event,
this is also possible.
Phase picks:If phases are picked before the event is registered, these readings are saved in the database
at the time of registration. After the event has been registered, MULPLT automatically goes to the next
event in FILENR.LIS and no more phase picking can be done.
Processing with a given program: Optionally MULPLT can, after registration, start any program pro-
cessing the newly registered event. E.g. the AUTOPIC program can be started or a program reading
amplitudes etc. The program name is defined in MULPLT.DEF.
Locating the event: As the final step after registration, the event can optionally be located and the
location optionally placed in the database.
The above options have been put in on the suggestion of Brian Baptie, who is using it for rapid processing
of volcanic events, where in most cases the operator only wants to look at the event once.
8.8 Theoretical arrival times for global and local phases and
location
In order to assist in identifying seismic phases, there is an option for displaying the theoretical arrival
times of several global (using IASP91) and regional phases while picking phases (using layered model in
STATION0.HYP). The steps to do so are the following:
1 Before entering MULPLT from EEV, the theoretical travel times can be calculated for the current
event. This assumes that the origin time and hypocenter is given in the header line or a subsequent
type one line. If not, enter manually (from e.g. PDE) or use the EEV command INPUTEPI or
INPUTONE. Then proceed to calculate the theoretical arrival times using EEV command IASP
with the IASPEI91 traveltime tables (for more details, see section 30.4). The same command is
also available inside MULPLT in multitrace mode. All arrival times (or a subset, see 30.4) for all
stations in current S-file will now be calculated with program IASP if call from EEV. If call from
MULPLT times will be calculated for all stations in waveform file(s). In bothe ases, the times are
stored in file iasp.out (no importance for the user, just for information). See Figure 8.2 for an
example in multitrace mode. Note that very many theoretical phases can be generated if the S-file
has many stations. MULPLT will stop if more phases are used than the dimensions are set up
for (include file seidim.inc), and you must use fewer phases (a warning is given when 500 phases
are generated) or set up SEISAN with larger dimensions, see section 3. Theoretical local crustal
phases for the current model can be calculated with program WKBJ and displayed, see section 29.
Theoretical phases can also be calculated when using the location option, see next section.
2 When a trace is displayed on the screen, all theoretical phases inside the time window will be shown.
To distinguish the theoretical phases, they are prefixed with a y and displayed below the trace
(normal phases have I, E or blank and are displayed above the trace). Position cursor where you
see a phase which you think corresponds to a theoretical phase and press y. The nearest theoretical
phase will now be placed at that position with a prefix E. Only theoretical phases selected in this
way will be written in the S-file. Note that the phase names can be up to 8 characters long, see
Appendix 1 for the definition of long phase names.
If the phases fit badly, start looking at the P-phase. If that does not fit the theoretical P-phase, change
the origin time in the S-file so that the P-arrival fits, and recalculate the theoretical phases.
PROBLEM: In multitrace mode, only one theoretical phase can be picked. Replot must be made before
picking the next.
Locate earthquake
If several phases have been read and saved in the S-file, the event can, in multitrace mode, be located with
command l (Locat), just as in EEV. The screen is cleared and the usual location rolls over the screen.
When the location is finished, the plot will reappear and the calculated travel times will be displayed as
synthetic phases (see previous section). In this way it is possible to immediately visualize the differences
between the read and calculated phases. The output files are hyp.out and print.out as usual.
done in the time domain. Filtering is needed in most cases. The steps are:
Optionally filter in time domain
Remove DC
Apply sine taper on 10 percent of the signal in each end do FFT
If data has been high pass filtered in time domain at frequency flow, then Frequency domain 4 pole low
pass Butterworth filter is added at frequency flow/5. This is for stability.
Correct for response
Do inverse FFT
Ground motion
Option g(Groun) removes the effect of the instrument and displays a ground motion seismogram. After
selecting g and the zoom window, there is a question of which type of seismogram to calculate: Dis-
placement (d), Velocity (v) or Acceleration (a). The corrected trace is shown below in nanometers(nm),
nm/sec or nm/(sec*sec) (if response information is available). Note that this might produce strange seis-
mograms, since e.g. a SP seismograph has very low gain at low frequencies so noise might be amplified
very strongly. It is therefore recommended to also do some filtering when using the g option.
Amplitude for determining Ml
For the w(WA)-option (Wood Anderson), the trace is corrected for the instrument to produce displace-
ment. The displacement trace is then multiplied with the response of the Wood-Anderson instrument
to produce a signal to look exactly like it would have been seen on a Wood-Anderson seismograph. The
maximum amplitude (nm) is read and saved to the S-file with name IAML. The Wood-Anderson re-
sponse (PAZ) is hardwired in SEISAN and it is similar to a 2 pole Butterworth high-pass filter at 3 Hz.
In SEISAN versions prior to 8.3, a fixed 8 pole bandpass filter was used (1.25 Hz - 20 Hz). Filtering is
done in the frequency domain. For noisy traces it might also be required to put a filter at the high end.
This can be specified in the MULPLT.DEF file. Unfortunately, the correct low cut filter with 2 poles will
often result in the seismogram blowing up at low frequencies and might be quite useless for earthquakes
with magnitude below 2.0 - 2.5 So in addition to the PAZ filter, a fixed bandpass filter can be added (see
MULPLT.DEF). In the standard distribution of SEISAN, this additional filter is not set A filter 1.25 - 20
Hz is recommended. In all cases where an additional filter is used, the read amplitude is corrected for
the filter gain and the true ground motion written in the S-file will be larger than the amplitude seen
on the screen. The additional default filter probably only makes a difference for very large events (Ml >
5). Other filters at a higher frequency should only be used for small events (M<1) . NOTE: In SEISAN
version 7.1.1 and earlier, the low cut filter was set by mistake to 0.8 Hz. Repicking amplitudes with the
correct filter might change magnitudes of larger events slightly.
Displaying response information
The response function for the current channel can be shown with option : (Resp), see Figure 8.11. If
no response function is given, a message is shown. If the response function is taken from the waveform
file header instead of from the CAL directory, a message is given.
Amplitude for determining mb:
Determining mb assumes that the maximum amplitudes are measured on classical 1 Hz WWSSN instru-
ments having a peak gain around 1.5 Hz. This in reality means a band limited measurement. To pick
ground amplitudes for determining Mb on instruments with a broader or more narrow frequency band,
like most high frequency SP instruments, some filtering must first be done. Using the j(mb)-option, the
trace is corrected for the instrument to produce displacement. The displacement trace is then multiplied
142 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
with the response of the SP WWSSN instrument to produce a signal to look exactly like it would have
been seen on a SP WWSSN seismograph. The unit of the amplitudes seen on the screen is nm, however
the amplitude will only represent the ground motion correctly at the frequency of the maximum gain at
1.5 Hz and for all other frequencies, the true ground motion will be larger than seen on the screen. The
maximum amplitude is now picked and displayed below the trace, corrected for the gain relative to the
gain at 1.5 Hz and written to the S-file with name IAmb. This means that the amplitude written to the
S-file generally will be larger than the amplitude displayed on the plot. The SP WWSSN response (PAZ)
is hardwired in SEISAN and cannot be modified with filters.
In SEISAN version to 8.2.1, the default filters used to simulate SP WWSSN were, by mistake, in the
band 0.9 (2 pole) to 1.8 Hz (3 poles). This will result in slightly wrong magnitudes unless the user had
put in correct new filter contants... Prior to SEISAN version 8.2, the default filters used were 0.5 Hz (8
pole) and 5.0 Hz (8 pole filter), which was close to the correct values. No correction for relative gain was
used in SEISAN versions prior to 8.3.. All of these changes could have resulted in smaller errors in mb,
which only can be corrected by repicking the amplitudes.
Amplitude for determining mB
Amplitude for mB is defined as the maximum velocity on a wide band instrument (0.2 -30 sec or 0.033
- 5 Hz). The maximum amplitude Vmax is measured on a velocity trace. Using the J(mB) option, a
velocity trace (nm/s) in the frequency band 0.033 - 5 Hz is displayed. The maximum amplitude in nm/s
(irrespective of frequency) is picked and displayed below the trace. This amplitude is now written to
the S-file with phase name IVmB BB. In principle, mB can be calculated using any instrument, but in
practice it can only be used if the P-signal is seen clearly on an unfiltered broad band velocity record.
The Butterworth filter 0.033 - 5 Hz , 8 poles, is hardwired and it cannot be modified with additional
filters.
Amplitude for determining Ms:
The attenuation function for determining Ms assumes that the amplitudes are measured on classical LP
WWSSN instruments having a peak gain around 15 second. To pick ground amplitudes for determining
Ms on instruments with a broader or more narrow frequency band, like most broad band instruments,
some filtering must first be done. Using the k(Ms)-option, the trace is corrected for the instrument to
produce displacement. The displacement trace is then multiplied with the response of the LP WWSSN
instrument to produce a signal to look exactly like it would have been seen on a LP WWSSN seismograph.
The unit of the amplitudes seen on the screen is nm, however the amplitude will only represent the ground
motion correctly at the frequency of the maximum gain at 15 seconds and for all other periods, the true
ground motion will be larger than seen on the screen. The maximum amplitude is now picked and
displayed below the trace. This amplitude is then corrected for the gain relative to the gain at 15 seconds
and written to the S-file with name IAMs 20. This means that the amplitude written to the S-file
generally will be larger than the amplitude displayed on the plot. The LP WWSSN response (PAZ) is
hardwired in SEISAN and no additional filters can be used.
The attenuation function for determining Ms assumes that the amplitudes are measured in the period
range 18 - 22 sec and it is up to the user to make sure that the the amplitude is in the correct range..
For SEISAN 8.2.1, the default filters used were in the band 0.038 (2 pole) to 0.1 Hz (1 pole). Prior to
SEISAN 8.2 default filters were 0.042 to 0.063 Hz (8 pole filter). No correction for relative gain was used
in SEISAN versions prior to 8.3. These changes might have resulted in small errors ins Ms and can only
be corrected by repicking the amplitudes.
Amplitude for determining MS
Amplitude for MS is defined as the maximum velocity on a wide band instrument (3 -60 sec or 0.017
8.10. DETERMINE AZIMUTH OF ARRIVAL (3 COMP OR ARRAY) AND COMPONENT ROTATION143
- 0.3 Hz). Using the K(MS) option, a velocity trace (nm/s) in the frequency band 0.017 - 0.3 Hz is
displayed. The maximum amplitude in nm/s (irrespective of frequency) is picked and displayed below
the trace and written to the S-file with phase name IVMs BB. In principle, MS can be calculated using
any instrument, but in practice it can only be used if the surface wave is seen clearly on an unfiltered
broad band velocity record. The big advantage with using MS is to avoid the 18-22 s limitation needed for
Ms. The Butterworth filter 0.017 - 0.3 Hz , 8 poles, is hardwired and cannot be modified with additional
filters.
Problem: If a long trace (large number of samples) is used, the instrument correction might fail (funny
result seen) due to numerical overflow in the spectral conversion. Choose a shorter window.
event to station azimuth + 180 deg. will be used if available (column 77-79). If no back-azimuth can be
found, no rotation is done and an angle of 999 deg. is displayed. If in single trace mode and choosing
the 3-component option AND the rotate option, the user will be prompted for a rotation angle and the
rotated channels will be shown in the usual 3-component plot, however, the azimuth determined is done
with the unrotated channels.
PROBLEM: In general, the R-channel will use the response of the N-channel and the T-channel will use
the response of the E-channel so for instrument response removal to be correct, the 2 channels must have
the same response curve.
1 Input is from filenr.lis: The current file is deleted and if in default mode, the plot moves on to
the next event.
2 MULPLT is started from EEV: If only one waveform file is available, the program proceeds as under
(1). The waveform file is deleted and the waveform file entry in the S-file remains. However, if more
than one waveform file is available, the user can use a menu to select which files to delete. Only
the waveform file entries in the S-file are deleted, the waveform files remain. This option is mostly
used with SEISNET.
deselected without leaving MULPLT. This option is particularly useful when comparing real and synthetic
seismograms result form moment tensor inversion, see that section later.
Output of binary waveform file, O(Out)
It is often useful to be able to select part of a waveform file and save it. The Out option makes an output
file of the traces AS DISPLAYED ON THE SCREEN with exactly the same channels, and time window
in a file with a standard SEISAN waveform name. The output format is by default SEISAN, even if
some input files have a different format. A different output format can be selected in MULPLT.DEF,
parameter MULPLT WAV OUT FORMAT. The network code in the file name will ALWAYS be the
station code if all channels are from the same station. Otherwise the network code has the default name
MERGE. Alternatively the parameter MERGE WAVEFORM can be set in SEISAN.DEF. The data is
output exactly as displayed on the last screen, so if filtering or instrument response has been made, the
output file will also be filtered or instrument corrected WITH SOME RESTRICTIONS: Not all response,
channel or filter combinations are possible. Only 4 pole band pass filters can be used, no rotated channels
and none of the magnitude simulated traces like Wood Anderson for Ml. if you want exactly what is seen
on the screen for all combinations, use option OutW. If any filtering or instrument response correction has
been done, a note will be inserted in the SEISAN waveform header so the user can see that this is no
longer the original data. The note could be e.g. Displacement 1.250- 20.0 Hz indicating that output
has been filtered and converted to displacement (nm). Note that numbers have been scaled so only if
the SEISAN file is read with standard SEISAN routines, will the numbers be correct. If the output file
is converted to ASCII by SEIASC, the number shown must be multiplied with a given scaling factor, see
SEISAN binary format description (Appendix B). There is no response information in the header other
than the short text. Since the station code is still the same, it is technically possible to correct for the
response again using the response information in the CAL directory, however, be aware that this
will give wrong results.
Option OutW:This option will output the signal exactly as seen on the screen with all the selected filter
and response combinations. It also handles rotated channels. The output file is mulplt.wav and it is an
Ascci file with real numbers in Helmberger format (readable by SEISAN). To make the file, press OutW
and wait for message mulplt.wav written in top right of the screen. For many channels and high
sample rate it could take some time since the output is Ascii. If the traces in the window do not start
and stop and stop at the ends, then dc levels will be added so all channels in the output file has same
start and stop timers. Format description is found in section moment tensor inversion.
Output of ASCII waveform file
This option only works if parameter SPECTRAL OUTPUT has been set in MULPLT.DEF. The output file
signal.out contains the last data displayed in the single trace zoom window (in ASCII and real numbers).
This option is a another way (see option O(Out) above) of getting an output file that has been filtered
or instrument response corrected. The main difference is that this file is only for one trace written in
ASCII.
Fixed scaling
Normally all traces are plotted with autoscaling. However, it is sometimes useful to be able to scale the
traces with a fixed scale in order to e.g. compare traces or override the autoscale in case a spike distorts
the autoscaling. Option *(Scale) will prompt the user for a maximum count to use for the scaling of all
traces.
Example of using MULPLT on SUN:
Comments are given with ! in front
This example shows how running MULPLT from EEV would look.
146 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
MENU
MIN
1 2 3 4
ESG E
SEC
51 52 53 54 55 56
Figure 8.7: Using MULPLT for picking phases. The top shows the original trace and
the bottom the zoomed part. Note that the amplitude has been associated with the
phase E and not the ESg. This means that if the S-phase is deleted, the amplitude will
remain.
8.11. DATA MANIPULATION COMMANDS 147
mulplt
file name, number, filenr.lis for all
filenr.lis ! plot all events in filenr.lis
Resolution in cm/sec, 0: plot all on one page (default)
0 ! scale will be different for each plot!!!
Read header from file:9101-10-0915-15S.KMY_03
Page 1
Channel: 1
Plotfile sent
Read header from file:9101-10-1510-55S.NSS_12 ! next event in list
Page 1
Channel: 1
Channel: 2
Channel: 3
Channel: 4
Channel: 5
Channel: 6
Channel: 7
Channel: 8
Channel: 9
Channel: 10
Channel: 11
Channel: 12
! etc.
Plotfile sent
Read header from file:9101-10-1510-55S.NSS_12 ! next event in list
Page 1
Channel: 1
Channel: 2
Channel: 3
Channel: 4
Channel: 5
Channel: 6
Channel: 7
Channel: 8
Channel: 9
Channel: 10
Channel: 11
Channel: 12
! etc.
8.12. SPECTRAL ANALYSIS, S(SPEC) 149
where G(r,h) is geometrical spreading, r is epicentral distance, h is hypocentral depth, D(f) the diminution
functiondue to anelastic attenuation, f is the frequency, DE the density, V the velocity at the source,
f0 the corner frequency and KK a factor of 2.0*0.6 to correct for the free surface effect and radiation
pattern.
The diminution function D(f) is written as
trtime is the travel time from the origin time to the start of the spectral window and
P (f ) = exp(pi kappa f )
is meant to account for near surface losses [Singh et al., 1982] with the constant kappa having a value of
the order 0.02 sec. Anelastic attenuation Q is assumed to be frequency dependent following the relation
Q = q0 f qalpha. For f less than 1 Hz, Q is, by default,assumed frequncy independent with the
value q0 (before Dec 2013 it was frequecy dependent for f less than 1 Hz which could lead to a small
overestimation of seismic moments for events larger than 4.5. This change is also affects other programs
using Q-correcion like SPEC, AUTOMAG and AUTOSIG). The transion of the Q from high to low
frequencies as a function of frequecy is made with the function Q=Q0*(1+f/X)**qalpha with default
paramter X=1.0. The paramter X can have other values than 1.0 if the spectral model is used, see below.
So X is the transition frequency between frequency dependent Q and frequency independent Q. Thsi
parameter is set in SEISAN.DEF For teleseismic events, only t* is used and Q must be set to zero (not
used). The t* parameter is the same as kappa and is usually set to 1.0 (same value is used for P and S).
The geometrical spreading has been defined to be dependent on the wave type with several possibilities,
all made equivalent to a distance called geo distance (GD) such that geometrical spreading is expressed
as 1/GD. There are several possibilities for GD:
Local and regional events geometrical spreading
P-waves:
GD is the hypocentral distance (HD) = sqrt(r r + h h) so body wave spreading is assumed.
150 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
S-waves:
The geometrical spreading has been made dependent on distance and depth. At short distances, the
geometrical spreading is assumed to be body wave spreading. For distances beyond the Herrmann-Kijko
distance (default of 100 km) and a shallow focus, the following relation is used:
which is commonly used [Herrmann, 1985; Herrmann and Kijko, 1983]. This relation assumes surface
wave dispersion for epicentral distances larger than 100 km. In SEISAN 100 km is the default, however
it can also be set to any other value by the parameter HERKIJ DISTANCE (see later).
The above relation breaks down if the depth is large or comparable to the epicentral distance and in
that case body wave spreading is again assumed. In order to get a smooth transition from surface
wave to body wave spreading, it is assumed that the relation changes nearly linearly from surface wave
spreading to body wave spreading between the depths GEO DEPTH1 to GEO DEPTH2. For depth
less than GEO DEPTH1(default 50 km), Herrmann-Kijko spreading is assumed, for depths larger than
GEO DEPTH2 (default 100 km), body wave spreading is assumed with the transition in between. In
each case the geometrical spreading term is given as the equivalent GD, which is also recorded in the
database. These 3 parameters can be used to change geometrical spreading. If e.g. HERKIJ DISTANCE
is 10 000 km, body wave spreading is always used. For more info, see [Havskov and Ottemoller, 2010].
Geometrical spreading for teleseismic events
The geometrical spreading is approximated with [Havskov and Ottemoller, 2010]
where . is epicentral distance in degrees. This approximation is only valid for h 100 km and . 30
degrees.
Attenuation and velocity specification for spectral analysis
The are 2 possibilities, use the value sin MULPLT.DEF or use a spectral model in SEISAN.DEF.
Use the values given in MULPLT.DEF: Since only one value can be given for attenuation (Q and kappa),
the same attenuation is used for P and S. Likewise, if the hypocenter changes depth, it will be the same
fixed values for all attenuation and velocity parameters. For a particular fixed situation e.g. where the
user always analyze shallow events and always is using the same type of spectrum (usually S), this is
adequate. However in a situation with large depth variations, it is desirable to change all parameters as
a function of depth. It might also be useful to change attenuation as a function of phase type although
there often is little difference between P and S attenuation. The value of Q is also fixed to be constant
below 1 Hz.
Use values in SEISAN.DEF: The spectral model is defined in SEISAN.DEF. In order to activate the
model, set parameter SPECTRAL MODEL in MULPLT.DEF to 1.0, then the spectral model is used
instead of the parameters in MULPLT.DEF. The model gives velocities (P and S), attenuation (P and
S) at different depths as will as kappa for P and kappa for S and the behavior of Q below 1Hz (P and
S). Remember that the attenuation given at a particular depth is NOT the attenuation at that depth
but the average between source and receiver. Values used will be interpolated between values in model
and the values used will be show in the plot and stored in the S-file. If the spec model is used, it will be
8.12. SPECTRAL ANALYSIS, S(SPEC) 151
indicated on the plot (lower right hand corner). if a spec model is not there, MULPLT.DEF values will
be used and also indicated on the plot.
From the spectral parameters, source radius and stress drop can be calculated as follows:
Sourceradius = 0.37 V /f 0
where f0 is the corner frequency and V the P or S-velocity at the source for P and S-spectra, respectively.
The spectral analysis is used in two ways. The first and most common is to make the attenuation
and instrument corrected displacement spectrum and determine the flat spectral level OM0, and corner
frequency f0 from which the seismic moment, source radius and stress drop can be calculated. The second
option is to display the instrument corrected spectrum (displacement, velocity or acceleration) and model
the spectrum for corner frequency and attenuation parameters. In this case no correction for attenuation
should be made.
Spectral analysis to determine moment, source radius and stress drop:
Select the spectral option, s(Spec). Before the spectrum comes up, you will get a question of the type of
spectrum wanted and a few other options.
best fit by grid search and the fit will be shown on the spectrum as well as the frequency range used. The
automatic frequency range determination can fail, particularly for small events so a check should be made
if the spectrum fit looks reasonable and that the frequency range is ok. Choosing a slightly different
window might fix the problem. The initial frequency range is limited by the parameter SPECTRAL
F-BAND set in MULPLT.DEF so changing this parameter migiht also help. Note that the automatic
frequency range determination will fail if the noise window before the P is not as long as the analysis
window chosen. Automtic spectra can also be done for the whole event with command automag in EEV.
The spectral analysis produces two output files:
com spec.out: The complex spectrum with some additional information needed for surface wave analysis,
must be displacement spectrum.
amp spec.out : The real spectrum given as frequencies and amplitudes. The files are only generated
if parameter SPECTRAL OUTPUT is set in MULPLT.DEF. Setting this parameter will also generate an
ASCII waveform file with the input signal used.
Power spectra: The above spectra can also be displayed as power spectra if capital letters are used. Using
e.g. V instead of v will show the power velocity spectrum.
When the spectrum comes up (see example in Figure 8.9 , the axis units are log amplitude in nanometers-
sec (displacement) versus log frequency (Hz). The cursor can be used to select the level, corner frequency
and slope by defining the spectrum with a 3 point selection. This 3-point selection is finished with f, q
or r with the same meaning as in picking mode. The spectral values are displayed on the screen once q,
f or r is pressed. The abbreviations are
General parameters
Vel: Velocity used (km/sec) (Vp or Vs)
Dens: Density (g/(cm**3)
Dist: Hypocentral distance (km)
Depth Hypocentral depth (km)
q0: q0 for spectral amplitude correction
qalpha: qalpha for spectral amplitude correction
k: kappa
q1Hz: frequency where Q(f) changes to constant Q
spec model: Spec model is used
NOTE: The veleocity is the velocity at the source, so if the dataset contains both shallow and deep
earthquakes, a single velocity will be an approximation if the spec model is not used. There are two
solutions to this problem if th evalue sin MULPLT.DEF is used. A: Use different MULPLT.DEF for
deep and shallow events. Since the the MULPLT.DEF used is taken from working directory if available,
you can have different directories when working with different depth earthquakes. B: Use the general
MULPLT.DEF in DAT and change the velocity after making the spectum in the S-file. At the next
update, the moment etc will be recalculated with the new velocity. On top of the general parameter is
indicated which kind of spectrum is assumed, P or S. In order for the program to automatically determine
which kind of spectrum to assume, there must be a P or S reading displayed on the screen near the time
window analyzed. The reading must be within 10 sec of the start of the window. If both a P and S-reading
is within 10 secs, the nearest phase is chosen. If it cannot be determined which kind of phase is analyzed,
the user will get a question to select type of phase (can also be changed later when spectral choices come
up) The determination of which phase influences the further calculation of geometrical spreading and
moment (uses P or S-velocity).
If f is selected, the spectral values together with calculated moment etc are stored in the S-file at the next
8.12. SPECTRAL ANALYSIS, S(SPEC) 153
key press (see parameters below). Spectral values in S-files accumulate, since no old values are deleted
!!!. This is because the spectrum might be made under different conditions (start time, time window
etc). The input parameters for the spectral analysis is given in file MULPLT.DEF, which can be in either
DAT or the working directory, see below. Additional parameters for geometrical spreading are given in
SEISAN.DEF in DAT.
The spectral parameters are calculated using the relations
where V is the seismic wave velocity at the source (P or S if P or S-spectrum respectively) and OM the
spectral flat level on the attenuation corrected displacement spectrum.
SPEC ITK S Z MO 13.0 ST 4.2 OM 1.5 f0 9.45 R .22 AL 2.50 WI 4.0 MW 2.6 3
SPEC ITK S Z K 0.002 T 7 GD 52 VP 6.00 DE 3.00 Q0 .0 QA 1.00 Q1 0.0 3
Note that no special line has been created in the Nordic format. Comment lines are used with SPEC at
the start of the line followed by station and component. Only the first 4 characters of the 5 character
station name is used. The station and component names are given at the start of the line. In case of a 5
character station name, the station name is shifted one character to the left. The information is:
154 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
Note: Before version 10.1, VS was written instead of Q1. However, VS was not used for anything. Note:
The component codes have not been adjusted for SEED so the location code is not included.
Note: In earlier versions (before version 7.0), the field for kappa was used for the travel time to start of
window. This can be calculated from origin time and the start time of the window.
NOTE: MOMENT IS NOT CALCULATED IF THE SPECTRUM IS NOT IN DISPLACEMENT.
When doing an UPDATE of the database or just a location with HYP, all distance dependent spectral
values are recalculated and average values written into the output file. Mw will be calculated from the
average value and written in the header line. However, the original distance dependent Q and
kappa correction is not changed, since this correction was used to modify the spectrum used for
reading parameters. Normally a small distance change has insignificant influence on the spectral level or
the corner frequency so the Q-correction should be no problem. Spectra of the same type (P, S or ?) and
from the same channel are overwritten. Only in case of UPDATE are the values written back into the
database.
Display of spectral parameters: Program MAG can read and plot relations between spectral and source
parameters. Program REPORT can read spectral parameters and combine in a table.
Potential problem with Q-correction: If the origin time in header is wrong, the Q-correction can be very
wrong.
There must be a phase line in the S-file with component and distance corresponding to the spectra made
in order for the spectral values to be calculated.
Spectral fitting
Once the spectrum has been shown (displacement, velocity or acceleration), a theoretical spectrum can be
calculated and superimposed on the observed spectrum in order to forward model either source parameters
or attenuation.
8.12. SPECTRAL ANALYSIS, S(SPEC) 155
Entering constants and modeling: The modeling can only take place when the spectrum is seen on the
screen.
Press s or S and a question will appear to enter the constants f0, k, Q0 and qa which are as defined above
except qa is Qalpha. Once these parameters have been entered (terminate with return), the theoretical
spectrum (displacement, velocity or acceleration depending on what is used for the spectrum) is calculated
and superimposed on the observed spectrum. The parameters used or calculated are displayed. S or s can
now be pressed again and a new theoretical spectrum calculated and plotted. To get out of the spectral
fitting loop, type r or q as usual.
Which constants and parameters are used: The moment is taken from the last moment calculation made
for thsi station, if any. If none, the moment is taken from the S-file if an average moment has been
calculated (see UPDATE command). If no moment is available, it can also be entered the first time the
spectrum is shown (option M). If no moment is available, no modelling can be done an da message is
given. The distance and depth is likewise taken from the S-file. If no distance is available, no modelling
can be done and a message is given. If all 4 parameters f0, k, Q, qa are entered, stress drop is calculated
with the relation given above. If the corner frequency is given as zero, the user will be asked to enter the
stress drop and the corner frequency is calculated from the stress drop. If Q is zero, no Q-correction is
made. IMPORTANT: The Q and qa used here are distinct from the Q0 and Qalpha used
for making the amplitude spectrum and both should not be used when modeling since this
would imply a Q-correction two times. The best way is to use Q0=0 and kappa=0, so that
Q is only corrected for when modeling. The distance used is everywhere is GEO DISTANCE.
The spectral parameters shown are:
Moment: Moment used
Geo dist: Geo distance used
Stress drop: Stress drop in bars
f0: Corner frequency
k: Constant used in diminution function
q: q0 used in spectral fitting
qa: qalpha used in spectral fitting
t2
P = |F DF T |2 2
T
where P is the Peterson Power spectrum, F DF T is the discrete Fourier transform, t is the sample
interval and T is the length of the time window. The factor 2 comes from the fact that only the positive
frequencies are used so only half the energy is accounted for. The total power is proportional to the
length of the time window since the noise is considered stationary, so by normalizing by T, the length of
the time window should not influence the results. This noise option is a handy method of checking the
156 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
noise characteristics of a given seismic station and compare it to global standards. This kind of analysis
can also be done with the SPEC program (section 33). For more information, see instrument.pdf in INF.
Problems: There is currently no check if a displacement seismogram has been calculated when cal-
culating the spectral parameters. If spectral analysis is done outside EEV (output in MULPLT.OUT)
or with EEV when there is no origin time and/or epicentral distance, the output results are wrong for
moment etc. Before calculating moment etc, the S-file MUST HAVE BEEN UPDATED SINCE BOTH
THE DISTANCE AND ORIGIN TIMES ARE USED. If the spectra get very high amplitude levels when
correcting for instrument, this might be caused by correcting for Q. With a Q of 100 and a distance of
10 000 km, this gives a very large correction. The Q-correction can be disabled in the MULPLT.DEF file.
If picks are made, but no readings appear in the S-file or readings appear with wrong component, the
waveform file component might not have been defined in subroutine componen.for. If poles and zeros are
used to remove the response, rotation cannot be used at the same time.
Particle motion plots can be made in multi trace mode when three components from one station are
selected. The particle motion is plotted below the rescaled trace plot. The particle motion plots are
made for the time window shown in the trace plot. The trace plot has all the normal functionality, so
it is still possible to zoom and filter. The particle motion plots can be useful when determining phase
types. No readings can be made from the trace plots.
8.13. PARTICLE MOTION PLOTS 157
F:Fin Q:Qui R:Rep Z-M:Flt G:Grd W:WA S:Spc O:Oth A:Amp H:3C C:Cod D:Del
SEC
35 40 45 50 55 60 5 10
Displacement
L
o
g 4.0
a
3.5
m
p
3.0
l
i
t 2.5
u
d 2.0
e
1.5
1.0
0.5
0.0
MENU
SEC
38 40 42 44 46 48 50 52 54 56 58 60 2 4
Max amp: 96372.7 Next filter 1.000 5.000 Select window for 3COMP
Z 9118
N 7959
E 4107
SEC
47 48
MENU
SEC
0 20 40 60 20 40 60
L P
o h
2
g a
s 150
a e
m0
100
p
l
i 50
t -2
u
d 0
e
-4 -50
-100
-6
-150
-2 -1 0 1 2 -2 -1 0 1 2
Log frequency Hz Log frequency Hz
This file is for defaults for MULPLT and called MULPLT.DEF. The name must
be in upper case on Sun. The following shows the parameters which can be set.
The file can contain any lines in any order, only the lines with
recognized keywords and a non blank field under Par 1 will be read. The
comments have no importance.
KEYWORD............Comments.............Par 1.....Par 2
X_SCREEN_SIZE Size in % of screen 90.0
PHASE NAME KEY Phase key and phase
PHASE NAME KEY
PHASE WEIGHT KEY Weight key and weight
PHASE MOUSE KEY Mouse key character
NCHAN PER SCREEN # chan pr screen
SPECTRAL Q0 Q0 440.0
SPECTRAL QALPHA Q = Q0**Qalpha 0.70
SPECTRAL KAPPA
SPECTRAL P-VELOCITY P velocity 6.2
SPECTRAL S-VELOCITY P velocity 3.6
SPECTRAL DENSITY Density
SPECTRAL MODEL 0 no 1 yes 1.0
3COMP VELOCITY velocity for 3 comp
RESOLUTIONX # points pl. screen 1500.0
RESOLUTIONHC # points pl. hc 3000.0
NSORT_DISTANCE 0: no sort, min ph.
SPECTRAL F-BAND Band to show 0.01 20.0
SPECTROGRAM COMMAND /nnsn/prog/obspy/obspy/signal/spectro.py
AUTO_LOCATE 0,1,2 0,1,2 0.0 2.0
AUTO_PROCESS 0,1,2 name 0.0 ls
SPECTRAL OUTPUT Makes a file 1.0
ML LOW CUT AND POLES
162 CHAPTER 8. TRACE PLOTTING, PHASE PICKING AND SPECTRAL ANALYSIS, MULPLT
All parameters are within column 41 and 60 and each occupying up to 10 characters.
NOTE: If any of the phase or weight keys are redefined, all previous defaults disappear.
DEFAULT CHANNEL: All channels are default if not given. For routine display, it is useful to only
select some channels.
PHASE NAME KEY: The keys associated with given phases. Remember that I, E or a blank MUST
be part of the name so it is not possible to chose a name like P, it must then be P (note the blank
in front of P). About 10 phase combinations are currently default as seen on the pick display. If a new
phase key is selected, you must define all the keys you want to use for phases including all the predefined
phases. The combined onset/phase key can be up to 9 characters.
PHASE WEIGHT KEY: The defaults are upper case 1,2,... to 0 for weights 1,2,... to 0 . Again,
choosing just one other key, and all must be redefined. The symbol must be in column 41 and the weight
in column 51. The weight is an integer 0, 1,2,3, 4 or 9.
PHASE MOUSE KEY: The default is blank. Normally no redefinition is needed since the mouse
character is defined in SEISAN. The key can be defined as a character or the ASCII code written as a
real number.
SPECTRAL P-VELOCITY: P-velocity in km/sec, default 6 km/sec
SPECTRAL S-VELOCITY: S-velocity in km/sec, default 3.5 km/sec Both above parameters must
be set separately, the Vp/Vs in STATION0.HYP is not used to calculate one from the other. The values
go into the S-file the first time spectra are calculated. if values are changed later in the MULPLT.DEF file,
8.14. SETTING MULPLT PARAMETERS, MULPLT.DEF 163
and put the location into the database. Parameter one has the options: 0: Do not locate, 1: Ask the user
if locate, 2: Locate without asking the user. Parameter 2: 0: Do not save in database, 1: Ask if saving
in database, 2: Automatically save in database. Default, no auto locate.
SPECTRAL OUTPUT: If parameter set to 1, two output files are created for each signal spectrum.
com spec.out is the complex spectrum and amp spec.out is the real spectrum. Default 0.0. In addition,
the single trace zoom window is saved in signal.out.
FILTER: Change definition of filters 1 to 7. The settings affect both the shortcut keys and the menu
boxes.
MULPLT WAV OUT FORMAT: The output format when using Out function, default is SEISAN.
The options are the same as available in WAVETOOL.
ML LOW CUT AND POLES and ML HIGH CUT AND POLES: Filter band for Wood Anderson
additional filter. Recommanded values are 1.25 Hz to 20 Hz and 4 poles. Note, poles are always 4 whatever
is specified.
BANDPASS FILTER: When using all defaults from EEV (option PO), a bandpass filter can be set.
Default is no filter. The parameters are lowcut and highcut for parameter one and two respectively. 4
poles only.
FIX FILTER: When using alldefaults from EEV (option PO), a bandpass filter can be set, see parameter
BANDPASS FILTER. The filter can be fixed with paramter FIX FILTER: 1.0 =fix filter, 0=no fix. Fixing
means that in all operation the filter will remain.
CODA AUTO: Enable automatic coda determination (YES or NO). Default is NO. If enabled, auto
coda is read with c instead of C.
AUTOCODA FILTER : Filter band for automatic coda: Default 5 to 10 Hz. AUTOCODA STA :
Auto coda short term average: Default 5.0 secs.
AUTOCODA RATIO : Autocoda ratio. Default 1.5.
MULPLT AREA : Options for plotting stations in a given distance from a midpoint. 0: do not
select option (default) 1: midpoint from s-filei epicenter, radius from MULPLT.DEF, 2: midpoint
from MULPLT.DEF, radius interactive 3: midpoint and radius from MULPLT.DEF, 4: midpoint from
MULPLT.DEF, radius interactive, 5: midpoint and radius interactive, 6: Midpoint from a station in
MULPLT.DEF, radius from MULPLT.DEF 7: Midpoint station asked at start of MULPLT, radius from
MULPLT.DEF 8: Both midpoint station and radius asked at start of MULPLT
MULPLT LAT LON : Midpoint
MULPLT STAT : Station for midpoint
MULPLT RADIUS : Radius in degrees
Chapter 9
TRACE PLOT is a simple program to create a distance trace plot using GMT programs (Generic Map-
ping Tools, http://gmt.soest.hawaii.edu/). The axes of the plot are time and distance, and the traces
are centered on the respective epicentral distance. The input to the program is a single event in Nordic
format (S-file). From the S-file, the program reads the origin time, epicenter location and the names of
the associated waveform files. TRACE PLOT reads the waveform data and writes the x-y coordinates of
the lines in the plot to a file that is then used as input to the GMT program psxy. The TRACE PLOT
program removes the DC from the data and as an option can apply a band-pass filter. The output of
the program is a Postscript file (trace plot.ps) and a batch file that can be modified and used to rerun
the GMT programs (trace plot.bat). The parameters are set in the trace plot.par file, which can
be located either in the DAT or in the working directory. An example is seen in Figure 8.10 .
The parameters in trace plot.par are:
FILTER: The pass-band filter limits can be specified through the FILTER parameter.
DISTANCE: The distance range (y-axis) for the plot.
TIME: The time range in seconds (x-axis).
AMPLITUDE SCALE: The amplitudes are scaled for every trace individually, by [amplitude/(max am-
plitude) * AMPLITUDE SCALE].
STATION SFILE ONLY: This variable can be set to 1.0 to only plot traces that are listed in the S-file,
the default is 0., which plots all traces without checking if they are present in the S-file.
TIME ORIGIN: In the current version, the origin of the time axis corresponds to the origin time of the
event.
COMPONENT: This can be used to select components for plotting, in case no component is defined,
TRACE PLOT will show all vertical component traces.
Example of trace plot.par:
KEYWORD............Comments.............Par 1.....Par 2
165
166 CHAPTER 9. DISTANCE TRACE PLOT WITH GMT, TRACE PLOT (UNIX ONLY)
Plotting epicenters
In SEISAN there are three different programs for plotting epicenters, EPIMAP, W EMAP and GMAP.
EPIMAP is the basic program for plotting epicenters in SEISAN and is the program that is called from
EEV, when you type map. W EMAP is a windows based program. GMAP is linked to the Google Earth
and Google Map Internet mapping tool.
10.1 EPIMAP
The command for plotting epicenters is EPIMAP file, where the optional file is a file with EPIMAP
commands. If file is not given, the user will be prompted for the input. The program can plot land
contours, epicenters, macroseismic intensities, stations and level contours as well as depth profiles. It is
possible to zoom in on selected areas (option by Mario Villagr an). The program has been much revised
by Jim Bolton.
Input files: Land contours and other contours
The program will look for all files ending with .MAP located in the DAT directory. The user can then
choose any one or a combination of files. The users own contour files (e.g. faults) can be added to the
DAT directory. A very detailed world map is available on the SEISAN CD and on the SEISAN web site.
Areas can be selected out of these files with program SELMAP.
Stations
Epimap will look in STATION0.HYP for station coordinates. It will search first in the working directory,
then in DAT.
Epicenters
The user will be prompted for epicenter input files. The format can be Nordic or Nordic compact.
Magnitudes are plotted proportional with symbol size unless the ellipticity option is selected in which
case the error ellipses are plotted (if smaller than 100 km). Fault plane solutions can optionally be plotted
instead of error ellipses. The first fault plan esolution found in file will be used. Name of intensity files
(SEISAN standard format, see Appendix A) are also entered here. The file name must have the 3 letters
mac after the . See also section 42.
Input files for EPIMAP can be made e.g. with the COLLECT command which collects S-files into one
file or with the SELECT command selecting data from the database using several criteria. HYP also
167
168 CHAPTER 10. PLOTTING EPICENTERS
Projection menu
===============
Enter latitude of any grid line and also the grid spacing
: 60 2 ! possible to have grid spacing at any value
Enter longitude of any grid line and also the grid spacing
: 0 4
Interactive options:
When the plot is shown, there appears in the lower left-hand corner a menu of several options:
Q: Quit
P: Profile
A: Area
Z: Zoom
Press one of the letters to continue.
P: Profile
One or several depth section windows can now be selected with the cursor. First move the cursor to where
the section shall start (from where distances are calculated), press any character to select point, move
cursor to end of profile, press any character to select. A line between the two points is now plotted. Move
the cursor to a point on the side of the line and press any character. A rectangle defined by the three
points is now drawn, which defines the area used for the section. If more than one section is wanted (up
to 9), press the number of sections instead. The selected number of profile boxes will now be plotted, all
the same size. Pressing any character will draw the depth sections auto scaled, while PRESSING THE
CHARACTER F, THE X AND Y SCALES ARE EQUAL and determined by the horizontal extension.
When the first section appears, you can either press q to quit or any other character to plot next profile
or, if the last profile, replot epicenter map and select new sections. IF YOU WANT ALL SECTIONS
TO REMAIN IN PLOT FILE, QUIT AFTER PLOTTING THE LAST PROFILE. The plot file always
stores what has been plotted so far, and is overwritten when a replot is made. It is also possible to plot
a previously defined profile by entering O. The parameters are then taken from file profile.out. This file
stores the last parameters selected by EPIMAP, but can also be edited by the user.
A: Area
Select, by clicking with the cursor, at least 3 points defining a polygon within which epicenters are
selected. A new plot is made enclosing only the polygon and showing the epicenters within the polygon.
The corresponding epicenters (S-files) are in file epimap.are. Known bug: Sometimes epicenters are still
left outside, SELECT can be used instead.
Z: Zoom
Similar to Area, however a rectangle is selected by defining just the 2 diagonal corners.
MAP files The map files consist of blocks of coordinate pairs. Each block starts with the number of pairs
in the block. The format of the header line is i4 and the following lines 10f8.3. Thus each block can at
most have 9999 pairs.
Plotting place names If option P is used when the program asks for place names or station codes, the
user will be prompted for one or several files with place names. The place name file format is:
name latitude degrees longitude degrees
eg:
The only requirement is that at least 2 blanks separate the place name and the geographical co-ordinates.
10.1. EPIMAP 171
Note that the place name can contain one or more blanks, however each blank must occur singly. An
example of a place name file is place names.macro located in DAT. Epimap contour file EPIMAP has a
simple contouring routine accepting a regular spaced grid. Below is an example (output from EQRSEI).
The top part of the file is just comments, the data starts at Fields to use. The data must come in
longitude, latitude pairs (+ value of contour) in order as shown below. The contour value is plotted
exactly as shown below. E. g. the value 117 is plotted as 117 where is blank. By specifying
117.0 , the value would be plotted as 117.0 and moved one space to the left on the plot. Currently
only programs EQRSEI (version 7.0) and CRISEI from SEISAN version 6.0 make contour files. In the
DAT directory, there is an example of an EQRSEI.OUT file
NB: In the input file shown below, the FIRST COLUMN MUST BE blank.
Test Case 1.
RISKS DESIRED .1000 .0200 .0100 .0050 .0000 .0000 .0000 .0000
The first line gives latitude and longitude of the 3 points used for selecting profile (see explanation for
interactive section), next line the azimuth calculated for the profile and the last line gives the number of
profiles. The file can be used to repeat the same profile as in an earlier run or to predefine a more exact
profile than can be selected with the cursor.
profile.num: Output of distance and depth of the profile in km. Distance is only correct in unzoomed
plots.
10.2. W EMAP, VERSION WINDOWS BASED MAP PROGRAM 173
Problems: Known bug: When selecting events with polygon, sometimes some events remain outside
Figure 10.1 and Figure 10.2 shows examples of plots made with EPIMAP.
SEISMICITY IN NORWAY 1
10
20
30
40
50
Figure 10.1: An example of using EPIMAP. The top shows epicenters plotted and the
bottom the first of a series of profiles. The frames on the top plot show the location of
the profiles.
10.3. GMAP, PLOTTING EPICENTRES WITH GOOGLE MAPS OR GOOGLE EARTH 175
SEISMICITY IN NORWAY
Magnitudes:
M = 0
M = 1
M = 2
M = 3 65.0
M = 4
M = 5
M = 6
60.0
55.0
0.0 30.0
5.0 25.0
10.0 15.0 20.0
SEISMICITY IN NORWAY
58.7
Total events: 2811
Selected events: 38
Magnitudes:
58.5
M = 0
M = 1
M = 2
M = 3
M = 4
M = 5
M = 6
58.0
Area plot...
See epimap.cor 57.7
for locations 5.4
of corners 6.0
7.0
Figure 10.2: An example of using EPIMAP with area selection. The top plot shows
where the area is selected, while the bottom plot shows the selected area.
176 CHAPTER 10. PLOTTING EPICENTERS
Figure 10.3: Example for plot using w emap (example not latest version).
10.3. GMAP, PLOTTING EPICENTRES WITH GOOGLE MAPS OR GOOGLE EARTH 177
which is the Keyhole Markup Language (KML). GMAP also convert SEISAN station and polygon files.
The input format of Google Earth is described on http://earth.google.com/kml/. GMAP required
Google Earth installed on your system to plot the output file. Download Google Earth here http:
//earth.google.com/download-earth.html (note the terms and conditions on http://pack.google.
com/intl/en/eula_print_us.html). To change the color codes se e.g. http://html-color-codes.
info/.
GMAP can run in three modes:
Type gmap in eev, a file gmap.html is created and copied to you GMAP DIR directory. When you open
the gmap.html with your browser, you will be redirected to Google Maps and a green arrow will show
the epicentre. The following parameters in SEISAN.DEF are used: GMAP DIR /home/seismo/www
GMAP TYPE MAP [MAP, SATELLITE, HYBRID or TERRAIN]
GMAP TYPE determines which type of map Google MAPS will use, you can choose between: MAP,
SATELLITE, HYBRID and TERRAIN.
This mode of GMAP is a command line version, that convert SEISAN s-files to input files for Google
Earth. It also convert SEISAN STATIONx.HYP files and polygone files.
5. Set the type of icon used for earthquakes, explosions, probable explosions and for other events.
178 CHAPTER 10. PLOTTING EPICENTERS
Example:
unix:/home/seismo/WOR: gmap
INPUT FILE NAME
select.out
Title:
West Greenland [2000;2008]
3. In Google Earth open the output file gmap.kml. See Fig. 10.4.
To make an animation for events over time use the -timespan flag. As an example explosions in the south
of Norway from 1983 to 2007 can be downloaded here: http://seis.geus.net/ber-exp.kml Press the
play button at the time slider at the top of the Google Earth. Use the ruler to control how the animation
is displayed (speed, days shown, etc.).
GMAP parameters added to SEISAN.DEF: Icon used for earthquake, explosion, probable explosion and
other events:
GMAP_ICON_QUAKE http://maps.google.com/mapfiles/kml/pal2/icon26.png
GMAP_ICON_EXPLOSION http://maps.google.com/mapfiles/kml/shapes/star.png
GMAP_ICON_PROB_EXPL http://maps.google.com/mapfiles/kml/shapes/open-diamond.png
GMAP_ICON_OTHER_EVENTS http://maps.google.com/mapfiles/kml/shapes/square.png
Events with magnitude smaller than GMAP ICON MSIZE will be plottet with size of GMAP ICON MSIZE:
GMAP_ICON_MSIZE 0.5
The scale of the earthquake icons is give by GMAP ICON XSIZE*magnitude**GMAP ICON YSIZE:
GMAP_ICON_XSIZE 0.2
GMAP_ICON_YSIZE 0.5
The scale of other events is furthermore multiplied by 2 Text can be added to the KML file, see this
example, note the text must be placed from character no 41 to no 120:
10.3. GMAP, PLOTTING EPICENTRES WITH GOOGLE MAPS OR GOOGLE EARTH 179
Figure 10.4: Example of mapping with gmap. Events in West Greenland. Note the
folder and the subfolders in the Places window.
180 CHAPTER 10. PLOTTING EPICENTERS
Figure 10.5: If the Earthquakes and data folder is selected in the Places window
S-files can be shown.
10.3. GMAP, PLOTTING EPICENTRES WITH GOOGLE MAPS OR GOOGLE EARTH 181
GMAP -help:
## Options ##
-help Print this list
-h Same as -help
-color Define color of epicenters [blue/green/yellow/
black/white]. Default color is red
To uses other colors see describtion below
-timespan Events gets timetag scroll in time domain
-nodata kml file will only contain header infomation
-errorellipse kml file will include error ellipse
-ellipsecolor Define color of ellipse in 8 digit hex code
-ellipsewidth Define width of the ellipse line, in pixels
-stat Station locations given in STATION?.HYP files
is converted to KML, output is gmapstat.kml
To change color/scale/icon edit gmapstat.kml
and change the content of Style Id=stat
-poly SEISAN polygon files like DAT/SALVADOR.MAP
is converted to KML, output is gmappoly.kml
To change color/width edit gmappoly.kml and
change the content of Style Id=poly
-out_file Define name of output file (default is gmap.kml)
-verbose Be more verbose
-version Seisan version
10.3. GMAP, PLOTTING EPICENTRES WITH GOOGLE MAPS OR GOOGLE EARTH 183
Scale:
The scale of the icons is set by the SEISAN.DEF
parameters GMAP_ICON_MSIZE, GMAP_ICON_XSIZE and
GMAP_ICON_YSIZE, see the manual for details.
Color:
Color and opacity (alpha) values are expressed in
hexadecimal notation. The range of values for any
one color is 0 to 255 (00 to ff). For alpha, 00 is
fully transparent and ff is fully opaque. The order
of expression is aabbggrr, where aa=alpha (00 to ff);
bb=blue (00 to ff); gg=green (00 to ff);
rr=red (00 to ff).For example, if you want to apply
a blue color with 50 percent opacity to an overlay,
you would specify the following:
<color>7fff0000</color>, where alpha=0x7f, blue=0xff,
green=0x00, and red=0x00. See also:
http://code.google.com/apis/kml/
documentation/kml_tags_21.html#color
Examples:
gmap -color blue -nodata -errorellise
gmap -timespan -color 7eee00ee
echo "collect.out\nDK events\n" | gmap -out_file dk.kml
The automatic GMAP, is executed by the HYP program, when e.g. an event is located in EEV.
Start EEV and locate an event. In the directory a new file gmap.cur.kml will appear, this file can be
opened with Google Earth and it will show the location of the current event and the used stations and
the raypaths.
The color of the stations is given by the travel time residual as green, yellow or red, for: residuals< 0.5s,
0.5s =<residual=< 1, 5s or residual> 1.5s, respectively.
To enable the automatic generation of Google Earth input files, add these parameters to your SEISAN.DEF
file:
Figure 10.7: Example of automatic mapping with gmap. Earthquake in West Green-
land. Blue dot is the old location and the red dot is the current location. Green and
yellow stations are stations with good and ok residuals, respectively.
10.3. GMAP, PLOTTING EPICENTRES WITH GOOGLE MAPS OR GOOGLE EARTH 185
GMAP_AUTO_STAT_RESIDAL_GOOD 0.5
GMAP_AUTO_STAT_RESIDUAL_BAD 1.5
GMAP_AUTO_STAT_COLOR_GOOD ff00ff00
GMAP_AUTO_STAT_COLOR_OK ff00ffff
GMAP_AUTO_STAT_COLOR_BAD ff0000ff
GMAP_AUTO_SHOW_OLD_LOCATION 0:no,1:yes 1.
GMAP_AUTO_OLD_LOCATION_COLOR ffff0000
GMAP_AUTO_SHOW_PATH 0: no, 1:yes 1.
GMAP_AUTO_PATH_COLOR ff929292
GMAP_AUTO_PATH_WIDTH 2.5
GMAP_AUTO_FILE_ACTION 0: no, 1:yes 0.
GMAP_AUTO_ACTION cp gmap.cur.kml /inetpub/www/html/seismo/nnsn
You can change the parameters to adjust the output file gmap.cur.kml for your system, see definition
here 3.10.
Inorder to run the display in a realtime mode, you must have an other KML file that makes Google Earth
reload the gmap.cur.kml file at short intervals. Such file could look like:
In this example the gmap.cur.kml file is reloaded every 3 second from a local C:\seismo\WOR directory
on a windows pc. And below is an other KML file is reloaded at 60min intervals from the Internet.
The above file is named gmap-automatic.kml and is found in the DAT directory.
186 CHAPTER 10. PLOTTING EPICENTERS
1: Configuration Files:
2: Installation
seis2viewer is distributed as a single .jar file (seis2viewer.jar), containing all the necessary classes
to work, including Seismicity Viewer 5.0. This file is placed in the PRO directory of seisan. To
facilitate the usage of seis2viewer, an executable script file to call seis2viewer has been created,
smap. As an example, the executable script should contain the following line:
The configuration file, seis2viewer.def, and any other required files should be placed in the DAT
directory of seisan. Alternatively, the user may have its configurations on the working directory. the
configuration file refers to a more detailed map file, europe.xyz, which will be plotted superimposed
on the built in word map (can be turned on and off on the plot). The location of this file must be
given an absolute path. In the example file, the path is given for Windows as
seismicity.lines.gray = C:/\seismo/\DAT/\europe.xyz
10.4. SEIS2VIEWER, PLOTTING HYPOCENTRES IN 3D 187
where the / is needed under Windows. The user must adjust this line to the local environment.
Detailed map files in xyz format, using standard SEISAN MAP files, can be made with program
SELMAP.
2: Automatically Generated Files seis2viewer generates a set of files to be used by Seismicity
Viewer 5.0. Although these files are, in principle, irrelevant to the user, it is nevertheless important
to mention them for reference purposes.
input-file.hyp: This file contains a translation of the event file selected by the user for
visualization in NonLinLoc format, appropriate for Seismicity Viewer. Input-file is the input
file name without extension.
input-file.hdr: This is an automatically generated grid file for the area surrounding the
events to be visualized. It is only created if the maximum distance in longitude or latitude
between events is less than 8 degrees.
Usage
seis2viewer can be used directly with a nordic file containing one or more events (e.g. select.out) as:
There are several program to search the data base or search in files. The most important is SELECT
when working from the prompt. The most sophisticated search can be made with SeisanExplorer (see
SE section). SE and SELECT have overlapping functions and both have options not found in the other.
11.1 SELECT
Whenever selective search and extraction is wanted SELECT is used. The program can run on the
CAT database, single CAT files (Nordic or Nordic compact) or the S-file data base. The output file,
select.out, will also be in Nordic format. Since the input CAT database can contain both normal and
compact files, the output will always be a normal file with blank lines between events. If however the
input is one compact file, the output will also be a compact file. Note: If SELECT is used on the CAT
database (normal operation), you need to UPDATE your S-file database in order to transfer changes
from the S-files to the CAT database. Select can work with input in 3 different ways:
The program is started by typing SELECT (parameters from screen), SELECT input file (parameters
from input file) or SELECT -options. A typical user interactive run is shown below. Comments following
!
189
190 CHAPTER 11. SEARCHING IN THE DATABASE, SELECT AND OTHERS
PARAMETERS
PARAMETERS
9 - Depth Limits
10 - RMS Limits
11 - Number of Stations Limits
12 - Hypocenter Errors Latitude Limits
13 - Hypocenter Errors Longitude Limits
14 - Hypocenter Errors Depth Limits
15 - Minimum Number of Polarities
16 - Hypocenter Agencies
17 - Magnitude Agencies
18 - Station Codes, components and distance range
19 - Polygon
20 - Use all header lines
21 - Look for wave form file names
22 - Gap range
23 - Phases
24 - Volcanic subclasses
Note above, that the second time the menu is shown, the choice of magnitude limits is shown. For each
CAT file in the catalog, the number of events in file, number of events selected from that file and the
accumulated number are listed. The last file might not show the correct number of events in file since
SELECT might stop before reading the whole file if the end time is in the middle of the file. If start time
is blank, 1980 is used. The end time can also be blank, and 2015 is used. This option is useful when
selection on whole data base or whole file.
192 CHAPTER 11. SEARCHING IN THE DATABASE, SELECT AND OTHERS
In the input database (or file) a time window must always be given. If no more selection is done, all data in
time window is selected. Further selection can be done by choosing a number and giving parameters. The
chosen parameters are then shown on the next parameter selection menu as shown above for magnitude.
Parameters can be reentered. Parameters not entered will have no influence in the selection. If several
parameters (numbered selections below) are entered, conditions for all must be true for the event to be
selected. Within each numbered selection, usually only one of the entered conditions must be fulfilled for
the event to be selected. If e.g. Ml and Mb are selected, events, which have either magnitude, will be
selected. When no more parameters are desired, press enter.
8. - Longitude Limits
Range of longitude.
9. - Depth Limits
Range of depths.
19. - Polygon
Selects events within a given polygon of at least 3 latitude-longitude pairs.
23. - Phase
Look for events with particular phases. Up to 6, 4 character phase names can be selected. The
event is selected if at least one of the phases is present for the event. For a more selective selection
based on phase, see option 18.
A special option is to make a file used for input to CODAQ using option 18. The station name CODAQ
is selcted and all stations present within the specified distance range are seleted and the output is written
in file index.codaq which then contains the event-station combinations used as input to CODAQ. For
componet selection, only the orientation code can be used. In addtion to to Z, N or E, also A can be used.
This will select all 3 components for a selected station. In example below, all components for stations
with 100 km are selected.
The CODAQ option can also be used to select events in given distance range with a given number of
stations if the number of station option is also used.
When working with historical data, it can be useful to work with catalogs of several centuries. The
century is available in the Nordic Format, so catalogs can go back to year 0. Output:
select.out: A CAT-file or compact file (depending on input) of selected events.
index.out: A list of event ids of selected events can be used with EEV or other programs accepting
index files. This could be used e.g. to work on only distant events in the database by first selecting
all distant events and then working with these directly in the database using command EEV index.out.
Index files can have any name (must contain a .) so different subsets can be available with different
index files.
Waveform names.out: A list of corresponding waveform files. It is mainly intended for copying to or from
tape specific waveform files. It has the format of the filenr.lis files and can be used directly with e.g.
MULPLT. See also program get wav for selecting waveform files from the database.
select.inp: A file with all the parameters used for the run. The file can be renamed, edited and used
as input for select. This is particularly an advantage if a complex set of selection parameters are used
and the selection is wanted again with just a small change. An example file is shown below
Polygon points (lat,lon), one pair pr line, end with blank line :
Note: The TT at STAT line indicates that all stations must be present (True) and hypocentral distance
is used (True)
This option is particular useful when using select with automated operations and has been made specifi-
cally to deal with extracting data out of the data bases using WEB based software. This option do not
have all of the above options. The following are implemented:
196 CHAPTER 11. SEARCHING IN THE DATABASE, SELECT AND OTHERS
selectc
Input file: collect.out
Search comment: Bergen
Found 634 events. Saving output file: selectc.out
11.3 Getstressdrop
Written by Bladimir Moreno, August, 2014, bladimir@cenais.cu
This is a program to search in a SEISAN Nordic file (S-file) for the calculated stress drop, make average
stress drop and Mw for each event using all channels or selected channels as well as average for the whole
data set of several events. Only channels with a stress drop of 1 bar or more is used and the upper limit of
stress drop to use in average is user selectable. The output is the average stressdrop for each event versus
magnitude Mw, average stressdrop for the whole data set and a statistics of the stress drop distribution.
In addition events can be selected in a lat-lon polygon.
In SEISAN stress drops are calculated with either MULPLT in a manual or semiautomatic way, auto-
matically with AUTOSIG and automatically with AUTOMAG (a simplified AUTOSIG) either directly
or through EEV command av. In each S-file, the average stress drop (as well as the average of other
source parameters) is calculated when the event is updated, irrespective of the value of the stressdrop.
11.3. GETSTRESSDROP 197
The stressdrop is a good indicator of the quality of the spectral fitting and stress drops less 1 and higher
than 200 bars usually indicate an unreliable spectrum. The program GETSTRESSDROP will therefore
be useful for making reliable average stress drops using only the best data and channels.
The user calls the program with command line arguments. The first argument is obligatory and the rest
are optional. The program is called in the following way:
getstressdrop <nordic.inp> [ -c <stress cut> ] [ -s <stationslist file.inp> ] [ -p <points polyg
]
Nordic.inp: an S-file, any name.
stress cut: the maximum stress drop to consider in the searching process.
stations.lis: a file (any name) with the station-channels list, with the same format as written in the
line SPEC of the S-FILES format, see example later.
points polygon.inp: a file (any name) with longitude, latitude pairs. The last point of the polygon
must be equal to the first (close polygon), see example below.
20.0 -76.7
20.0 -75.0
19.5 -75
19.5 -76.7
20.0 -76.7
Output getstressdrop histo.out: number of stressdrops in steps of 10 bars, can be plotted with LSQ.
getstressdrop mw.out: list of earthquake magnitudes Mw versus stressdrop, can be plotted with LSQ.
Example run
getstressdrop eev.out
1996 6 6 0648 23.8 L 63.005 3.955 8.0 TES 5 2.9 2.8LTES 2.7WTES 3.0LNAO1
SPEC FOO S Z MO 13.5 ST 26.2 OM 1.5 f0 12.7 R0.1754 AL 0.00 WI 10.0 MW 2.9 3
SPECHASK S Z MO 12.9 ST 7.7 OM 0.7 f0 13.0 R0.1713 AL 0.00 WI 10.0 MW 2.6 3
SPEC EGD S Z MO 12.9 ST 24.1 OM 0.6 f0 20.0 R0.1114 AL 0.00 WI 10.0 MW 2.5 3
SPEC ASK S Z MO 13.0 ST113.0 OM 1.7 f0 17.5 R0.0738 AL 0.00 WI 20.0 MW 2.6 3
SPEC EGD S Z MO 13.1 ST 35.7 OM 1.8 f0 10.9 R0.1185 AL 0.00 WI 20.0 MW 2.7 3
SPEC BLS5S Z MO 13.2 ST 5.8 OM 1.8 f0 5.66 R0.2281 AL 0.00 WI 20.0 MW 2.7 3
1996 6 7 1325 29.2 L 59.846 5.130 12.0F TES 12 0.6 1.9LTES 2.2CTES 2.0LNAO1
SPEC EGD S Z MO 12.0 ST 12.8 OM 1.1 f0 20.0 R0.0690 AL 0.00 WI 20.0 MW 1.9 3
SPEC KMY S Z MO 12.2 ST 23.5 OM 1.2 f0 20.0 R0.0690 AL 0.00 WI 20.0 MW 2.1 3
SPECHASK S Z MO 12.2 ST 23.5 OM 1.2 f0 20.0 R0.0690 AL 0.00 WI 20.0 MW 2.1 3
SPEC ODD1S Z MO 12.3 ST 27.8 OM 1.2 f0 20.0 R0.0690 AL 0.00 WI 20.0 MW 2.2 3
SPEC BLS5S Z MO 12.2 ST 23.1 OM 1.1 f0 20.0 R0.0690 AL 0.00 WI 20.0 MW 2.1 3
SPEC SUE S Z MO 12.4 ST 32.8 OM 1.1 f0 20.0 R0.0690 AL 0.00 WI 20.0 MW 2.2 3
SPEC HYA S Z MO 12.3 ST 29.3 OM 1.0 f0 20.0 R0.0690 AL 0.00 WI 20.0 MW 2.2 3
SPEC FOO S Z MO 12.5 ST 23.9 OM 1.1 f0 16.4 R0.0842 AL 0.00 WI 20.0 MW 2.3 3
Average stress drop for 2 earthquakes selected: 30.0
Total number of channels used: 14
File with stress drop histogram is getstressdrop_hist.out
File with stress drop as a function of magnitude mw is getstressdrop_mw.out
198 CHAPTER 11. SEARCHING IN THE DATABASE, SELECT AND OTHERS
Each selected channel is printed out and in the end there is information of the total number of events
and channels used.
An example of a channel selection file stat is:
HASK1S Z
HYA S Z
HASK1S Z
HYA S Z
Note that station names with 5 characters on SPEC line uses the 5. character on the line for the first
character in station name.
Stress drop versus magnitude can give an indication if stress drops are reliable. According to the theory
of self similarity (see e.g. Havskov and Ottemoller [2010]), stress drops should be magnitude independent.
For small earthquakes (M < 3) it might be difficult to get a reliable corner frequency, it will often be
to small due to near surface attenuation (kappa, see MULPLT section). This results in smaller stress
drops for smaller events than larger events. It is therefore useful to plot the stress drop versus magnitude.
Figure 11.1 shows an example made with program LSQ.
ndexHistogram, stress drop
It is seen that there is only a slight tendency to increasing stress drop with magnitude indicating reliable
stress drops.
The distribution of stress drops can also be plotted with LSQ. Figure 11.2 shows an example of the data
from 11.1.
11.3. GETSTRESSDROP 199
The command COLLECT is used for collecting many event files from the database S-files into a single
file. This may be split into individual event files later using SPLIT. The file can be used for exchanging
data with other agencies or be used with the epicenter plotting program. The questions are:
Start time :
End time, return for end of month:
Compact output file (Y/N=default)
If a local data base is input, default start time is 1980 and default end time 2015. In this way it is fast to
collect all data from a local data base. At the end, the program will give statistics of collected data, and
file name. For getting data out of the database represented by the monthly CAT files, use SELECT. If
an update has been made, SELECT will always be the fastest program to use. COLLECT and SELECT
are the only programs that can make a CAT file from the individual S-files. Program input can also be
on the prompt line, below is an example:
collect -start time 19910912 -end time 19911015 -base name BER -compact
This means that a CAT-file (default) is collected from BER and is written in compact format (-compact
has no arguments). The time interval is between 19910912 and 19911015. Only start time is required,
the other arguments are optional. The syntax is: -keyword value -keyword value etc.
201
202 CHAPTER 12. EXTRACTING EVENTS FROM THE DATABASE, COLLECT
Chapter 13
The program splits up a multiple event S-file in Nordic format (usually made by COLLECT or NEWEVE)
or compact file to single files in the database or in the users own directory. Type SPLIT to start program
and questions are:
203
204 CHAPTER 13. INSERTING EVENTS INTO THE DATABASE, SPLIT
FORTRAN STOP
In the above example, there was already an event in the database with the same file name and therefore
the same id. It is up to the user to decide if this is the same event in which case it should be ignored or
if it is a new event which happens to have the same id (start time or origin time to the same second and
same event type). In case of a new event, a new id with one second different will be tried. Sometimes
it can be desirable to overwrite the whole database event by event. If e.g. a station code is wrong in all
events, this can be corrected by making a collect to extract all events, edit the collect.out file using a
global substitute, and finally use split to put the events back in. In that case the option of overwriting
all should be chosen.
Compact files can also be split up. Since this is unusual to do, the user will be prompted 2 times to
confirm the split up. Since there is no ID line in a compact file, the database name will be generated from
the header time. This option to be able to split up compact files has been made to facilitate work with
seismic catalogs where it is often desirable to be able to access individual events even when no readings
are available.
Chapter 14
UPDATE
Both the monthly epicenter files in \SEISMO\REA\BER \CAT and the updated S-files are generated
with program UPDATE which is a special version of HYP. Type UPDATE to start the program and
there will be questions about time period and database. The program will also ask for operator ID (4
chars), which is stored in the updated log file and the S-file, see below.
By updating, both the S-files and the CAT-files in the CAT-directory are updated. The reason for
updating both at the same time is to ensure that there is a correspondence between the two.
The program will go through as many months as specified by the user. When the program is running,
one line will be printed out for each event. The S-files will be overwritten with the updated location,
residuals etc. At the same time, a monthly CAT file is created in the CAT directory containing all events,
also events not located. If a monthly file is already present, it is overwritten.
Update can also work on a local database. The S-files are updated as described above. Since there is no
CAT database, the Update program makes a CAT file in the local directory called hyp.cat with events
in chronological order.
At this time, an S-file might contain several old ID-lines which in an append process have been converted
to comment lines. These are deleted when doing an update. The remaining ID-line is updated with the
action UPD, the operator ID and the time. At the same time, all the error lines are deleted and only the
one belonging to the prime location is kept.
The update process can also change all S-file names according to the origin time and the IDs are changed
correspondingly. This is done in order for the database to be in chronological order according to origin
time and not the more random times used when the events were first registered into the database. Even
if the event is marked not to be located with a * in header line column 45, the ID will still be updated
(same for program UPD). Like with the SPLIT program, if two events of the same type (L, R or D) have
the same origin time to the second, one second is added to the file name part indicating seconds (see also
section 13). The event will also be in chronological order in the CAT database.
*****VERY IMPORTANT ******
The first time an update is done, the S-files get a new name according to the origin time now calculated
205
206 CHAPTER 14. UPDATING FINAL LOCATIONS IN DATABASE, UPDATE AND UPD
and the internal ID is changed accordingly. The ID is then locked indicated by an L in column 76 of
the ID line. For all future updates, by default, the ID will remain the same, the S-file name will also
be the same irrespective if the origin time changes. This is VERY important in case data is taken out
of the database for some special analysis and then put back in to overwrite the original data. If the ID
is the same, the correct event will be replaced. Optionally, Update can make a new ID each time the
program runs (not recommended). It might be necessary sometimes to allow this in case the events are
no longer in chronological order according to origin time (e.g. a teleseismic event is put in with the ID
corresponding to the recording time, when located, the origin time is many minutes before and it will
appear too late in the database). However, this is rarely a problem after the first location is done and it
is recommended to use the default option of locking the ID.
NOTE: When an update takes place, the old location, magnitudes (except 3. if a different agency from
the default agency), residuals etc are removed. If an event cannot be located, the old location etc is lost.
This is intentional since the updated database should represent the data available. If a location should
be retained, special flags must be set, see section 7, Fixing location (a * in column 45 in header line).
In order to keep track of how and when the database has been updated, every run of UPDATE creates
a log file of the update process. This file is located in a subdirectory of the database directory (default
BER ). If e.g. updating REA, the logfiles will be in ../REA/BER /LOG/ (unix). Filenames are similar
to S-files. Below is an example of a logfile with name 01-0000-00L.S199606:
The content is as follows: date and time of file updated, operator ID, time of update, event id of first and
last event of the month, number of events for month. The example above shows that June 96 has been
updated 2 times, the last time on September 10, 1999. For each update, one line is added to the top of
the file, so the update history is saved.
Note: If the command UPDATE is used from EEV, only one S-file is updated (name stays the same),
and a general update should be made.
UPDATE recalculate moments if distances (or depths) change, however it does not change the Vp or Vs
velocities used if a change is made in MULPLT.DEF.
Problem: If UPDATE crash, there will not be a correspondence between S-files and the CAT data base:
Redo UPDATE.
UPD
The command UPD is very similar to the UPDATE command, however there is no modification of the
S-file except the ID line. The program is used to simply move single S-files into the monthly CAT-files
without relocating. It is mainly used to manipulate database events already processed. E. g. if ISC data
a available and it is desirable to have it in individual files to be able to use EEV, the same data can then
be copied into the CAT part of the database using UPD without modifying the original solutions. The
data must be in the CAT part of the database in order for SELECT to work fast. KNOWN BUG: On
Sun OS, it seems that UPD can only operate on up to a 4 year time period.
Chapter 15
DIRF
The DIRF command is a useful program for making a file with a numbered list of files from a directory.
The command makes a file with file name filenr.lis e.g. when working with many waveform files with
long names, a DIRF is first made, and subsequent programs then get file names from filenr.lis, either
by using the whole list, or just a given number. This is handled with routine filename (in LIB). Below
are some examples of using DIRF with SEISAN data files.
dirf 9101-10*
# 1 9101-10-0915-15S.KMY_01
# 2 9101-10-1510-55S.N2F_08
# 3 9101-10-2333-44S.N3F_06
# 1 9101-10-0915-15S.KMY_01
# 2 9101-10-2333-44S.N3F_06
The wildcard * above indicates that all files from the 10th is wanted. Many programs use the same
subroutine to get the file name from filenr.lis. This means that most programs using filenr.lis
assume that if a name given is less than or equal to 4 characters, it is a number so file names less than
5 characters cannot be used when the program asks for Filename or number. For a very long listing
it might be an advantage to only get the first or the last 20 files and dirf has the corresponding options
-head and -tail respectively. This argument must be the first argument like dirf -tail *.txt.
DIRF is dimensioned to a maximum of 99999 files.
DELF
DELF is a simple program that allows the user to delete a file that is listed in a filenr.lis file or
another index file. First run DIRF to list the files that you want to delete. Then start DELF and choose
the number of the file to delete, ? shows the contents of filenr.lis. In addition, DELF also has an
option to delete all the files in the filenr.lis or index file. This is a useful option if selected files in a
data has to be deleted. If e.g. all S-files from a particular agency has to be removed, run SELECT first
207
208 CHAPTER 15. USING FILENR.LIS, DIRF AND DELF
The bulletin program BUL is intended for writing seismic bulletins in a nice format. The output is
written to a PostScript file.
Input files:
209
210 CHAPTER 16. MAKING A BULLETIN, BUL
Output file:
The output file is called bul.ps and is a PostScript file that you can print. Optionally, a limited number
of pages can be selected from the bul.ps file for printing. The header page is still included and the page
numbers correspond to the original page numbers.
Chapter 17
SEISAN has several programs for extracting and writing out data for plotting or printing statistics, most
of which will be listed in this section.
report collect.out
Date TimeE L E LatE LonE Dep E F Aga Nsta Rms Gap McA MlA MbA MsA MwA Fp Spec
x x x x x x x
Number of output fields 8
Number of events 12
Number of events with spectra: 1
Number of events with fault plane solution: 3
211
212 CHAPTER 17. REPORTS AND STATISTICS
The report.inp is a file with the choices used. Report can use that file (or a file with the same format
and a different name) as second argument:
report collect.out report.inp
in order to use a fixed set of choices.
Content of report.out
Year Date Latitud Longitud Depth NST GAP Ml STRIK DIP RAKE
1996 6 3 47.776 153.222 0.1 12 348
1996 6 6 62.652 4.940 15.0 13 270 2.9 28 61 -41
1996 6 6 62.634 5.068 15.0 13 2.9
1996 6 6 62.652 4.940 15.0 13 270 2.9 28 61 -41
1996 6 7 59.841 5.127 12.0 12 1.9 8 41 75
1996 610 -13.481 167.130 200.1 301
1996 625 61.656 3.363 14.9 35 3.2
1996 7 5 61.282 4.825 7.1 10 2.0
1996 713 61.416 3.870 12.1 9 1.5
1996 718 60.156 2.070 15.0 9 1.8
1996 718 51.438 157.737 29.9 18
1996 726 61.755 2.293 22.1 9 1.8
The file report n.out contains the input data with the only difference that the magnitudes have been
moved around on the header line. This can be practical for later plotting with EPIMAP. If no magnitude
selection has been made, the magnitudes will come in the order Mc, Ml and Mb. If no magnitude
of that type is available, the output field is blank. The magnitude selected is the first to occur of
the corresponding type. If other magnitudes are to be selected, numbers can be used to select any 3
magnitudes in any order. If it is important to select magnitudes by agency also, use program MAG.
REPORT can also give a numbered output by adding the second or third argument -n.
1. Information about which stations should be searched for in the database. There are several options
for entry:
a: Give a filename with the stations listed one per line. The format is a5. The file name MUST
have a . not to be confused with option (b) below.
b: Give stations, one pr line, enter to finish, enter for def file statis.def
c: Just make a return and the stations given in file statis.def will be used. The file has one station
per line an dcan be located in either the working directory or DAT.
3. Question about counting all phases. This means counting the occurrence of a station for each phase
for that particular station. This can give the total number of phases read at a particular station in
a given time interval which can be more than the number of events. If not counting all phases, the
program gives the number of events recorded at the station.
NET NWAW
NSN 147
JMI 21
KNN 10
W_L 2
214 CHAPTER 17. REPORTS AND STATISTICS
W_E 1
W_S 2
The top part shows the event statistics by station. Local Ev is number of local events (readings if so
specified above) (type L and R) at the station, Local S means number of local events ONLY recorded at
that station, Distant E and distant S is the same for distant events (type D). The middle parts shows
the number of waveform files NWAV from different networks NET as indicated by the first 3 letters of
the waveform file name after the . At the bottom is a summary statistics most of which should be
self-explanatory. The information about .. more than given stations means that in addition to the
stations searched for, the event had additional stations not used in the statistics.
or daily intervals. If desired, the corresponding histograms can be plotted interactively on the screen or
can be printed. Several other routine programs such as grapher, xyplot, gnuplot or GMT, etc., can also
be used for this purpose. The general purpose of this program is to evaluate the catalogue completeness.
When run for different magnitude intervals, one can detect the magnitude thresholds above which the
catalogue can be considered complete.
30 4
40 2
50 0
Examples of plots are found under program GETSTRESSDROP
Chapter 18
This section describes the programs used for modifying and checking waveform files. The most important
features are to add or subtract channels and modify headers. A special program in this group is GET WAV
which checks data bases for availability of waveform files. New from version 7.1 is that SEISAN also can
handle other waveform formats, however not all programs can work with all formats. This will be
indicated with each program. The following programs are available:
APPEND: Append two or more waveform files following each
other in time
AUTOREG: Automatically register events
CONGAP: Check completeness of continuous waveform
database
CONNOI and EVANOI: Compute noise power spectral density and evaluate
out to produce plots
DATABASE2MSEED: Convert waveform data to miniseed based on para-
metric database
GET WAV: Check for available waveform files
GET ARC: Extract wav files from archive and register in S-file
MSCUT: Cuts MiniSEED files into 1 hr or shorter files
RDSEED MANY: Simple way to chop up a seed volume
RESAMP: Resample waveform files
SEIASC: Convert SEISAN waveform files between ASCII and
binary form
SEICUT: Extract an interval of a waveform file
SEIDEL: Splitting up a SEISAN waveform file in 2
SEISEI: Split and merge SEISAN, GSE, SAC and MiniSEED
waveform files
SELSEI: Find waveform files with given stations
P ALIGN: Time shifting waveform data to align P or S-phase
arrival times
WAVETOOL: Extract waveform data
WAVFIX: Fix waveform file header time correction, make stan-
dard file names, change headers etc.
WAVFULLNAME Print full file name including path for waveform file.
217
218 CHAPTER 18. WAVEFORM FILE MANAGEMENT TOOLS
autoreg
Event type for all events: Local: L (default)
Regional: R
Distant: D
.....
In this case wavform files were moved to data base LVC instead of the default TEST.
Now comes a listing of waveform file names and S-file names. The program will check if the event is
already registered and the same options are available as in program SPLIT (section 13). Since AUTOREG
automatically creates S-files for all events in filenr.lis, they will all be given an event type.
CONGAP, check completeness of continuous waveform database
This program checks for completeness of continuous data for a given time interval. The program reads
the waveform data to see what data are available and checks for gaps, defined by a constant amplitude
value (e.g. 0). The input can come either from an input file (congap.par) or the command line.
Parameters in the input file are:
CONT BASE: name of database, you can have more than one
START DATE: start time and date of interval to be read (yyyymmddhhmmss)
STOP DATE: stop time and date of interval to be read (yyyymmddhhmmss)
INTERVAL: duration of intervals read at a time in minutes (e.g. 60. for one hour)
When started from the command line, the same parameters can be given:
congap -start <yyyymmddhhmmss> -stop <yyyymmddhhmmss> -cbase <text> -interval <number>
The output file (congap.out) looks like this:
The fields are station and component code, date and time, expected duration and actual time with data.
The output file can be used to produce plots showing data completeness (tool for this not included).
When the program runs it also produces a summary output at the end, where the last column gives the
percantage of data completeness, and the actual and expected times are in seconds:
--------------------------------------------
# stat comp actual expected %
--------------------------------------------
1 EDI HHZ 86400.00 86400.00 100.0
2 EDI HHN 86400.00 86400.00 100.0
3 EDI HHE 86400.00 86400.00 100.0
--------------------------------------------
database and produces output files that are evaluated by EVANOI. The computation of the noise PSD
follows the method described by McNamara and Buland [2004].
To run CONNOI on a SEISAN continuous database BER use for example:
In both examples BER is the database, you can also specify def and the program will take all default
continuous databases or archives defined in SEISAN.DEF. The default output filename is connoi.out.
Example of output:
The output from CONNOI can then be used as input to EVANOI. You can enter station and component,
give a time interval, select a time of day interval, and chose a reference station. EVANOI produces GMT
plotting scripts files that are named after the station. Then simply run the script file to get a plot.
You can also output the data in a compact format using the -compact option. This output does not work
with EVANOI, but it is fairly easy to read in your own scripts. An example output :
By default, CONNOI calculates spectra every 30 minutes, with each spectra calculated over a 60-minute
interval. You can change this using the -spectlen and -spectspace options, where -spectlen gives the
interval over which to calculate the spectra (in minutes) and -spectspace gives the spacing between
spectra with respect to -spectlen (1.0 for no overlap, 0.5 for 50% overlap, etc). For example:
will calculate spectra over a 60-minute interval, spaced every 60 minutes (no overlap). Finally, you can
calculate the spectra for a single channel of a single station using the -sgram option. This option always
uses the -compact output format and sets spectspace to 1.0. For example:
18.1. APPEND, APPEND TWO OR MORE WAVEFORM FILES 221
Figure 18.1: Example of plot created using CONNOI and EVANOI. The plot shows
noise PDFs for station BER for three components in January 2015.
222 CHAPTER 18. WAVEFORM FILE MANAGEMENT TOOLS
connoi -start 20100501 -stop 20100502 -cbase BER -sgram TOTI BHZ
file), which points to the waveform data or a filenr.lis type of file that gives the waveform file names;
(2) a waveform file or a list of waveform files. The program can be started either interactively, without
arguments, or non-interactive by specifying the commands as arguments.
Filtering: WAVETOOL only supports band pass filters hardwired to 4 poles and one pass (forwards). So
if WAVETOOL is started from MULPLT to extract data as seen on the screen, the filter constants will
ONLY be passed to WAVETOOL if 4 poles and band pass.
The arguments are: -sfile <sfile-name> : The S-file name of the event you want to extract waveform
data from.
-wav files <file-name>: Extract from a list of waveform files in filenr.lis format. Input from S-file
will be ignored. This option merges all files from list (if within a reasonable time window) and program
is then partly doing what SEISEI is doing. If file-name is given as SEISAN, then the output file name
follows SEISAN convention.
-wav in file: input waveform file.
-maxpoints : Skip points to get approximately maxpoints
-wav out file <file-name>: Name of waveform output file, not used if output format is SAC.
-start <time>: Start time can be used to set start time the same for all channels instead of using chansel
file, time can be absolute or relative to beginning of the first trace. Options are Start time relative earliest
channnel, Abs start time string yy...s.sss for all channels.If ABS time used, string MUST contain a ..Abs
start time string yyyymmddhhmmss (integer), used to define cont start time.
-duration <time>: Select duration of time window in seconds if -start is used.
-interactive : enable interactive mode
-cbase: name of file with selected continuous databases,all bases is default
-command file: give arguments to wavetool in a file rather than on the command line (used by Seisweb)
-cwav: Input is from the SEISAN continuous data base, useful for extracting intervals
-cseed: Input from large SEED file, similar to -cwav -wav in file <file-name>: Input of one waveform file
-arc: Input from BUD or SeisComp archive.
-sfile <file-name>: Input of S-file name
-format <output format>: The output formats supported are SEISAN, SAC, GSE (GSECM6) and
GSEINT. In case of SEISAN or GSE, multi-trace files including all selected traces are created, while for
SAC, single trace files are generated. SEED is also possible on Linux.
-chansel <file-name>: Input file to select channels and time windows. The first line contains number of
channels. The following lines give station code, start time (both absolute and relative to earliest trace
allowed) and duration. If start time and duration are set to 0, complete traces are selected.
-chan out file: file name of file with channel description if this option is given, program terminates after
writing out the file.
-chandef <file-name>: change station and/or channel names following standard also used in the conver-
sion programs, for example:
Header line text (29 chars) ... NetCd (5 Chars), comment in next line
p0 HH Z
p1 HH N
p2 HH E
-maxpoints <number> : Number specifies the total number of points desired for the total time window
covering all selected traces. This option is meant to reduce the number of points to what is needed to
visual correctly plot the traces. When plotting the trace using a number of pixels, which is smaller than
the number of points on the trace, samples are plotted on top of each other for one time sample. This
results in the maximum and minimum being plotted at the same place on the x-axis. The idea now is to
reduce the trace to these maxima and minima only. Then using twice the number of samples than pixels
will allow to visually correctly show the trace. Note that this is not a resample routine. Option mainly
used with SEISWEB.
-stat out : write out station location file, simple xy output file (station list.out)
-rsam : convert data to RSAM (1-minute absolute average), which is commonly used in volcano seismol-
ogy
-resp out : write out list of all response files for channels given in waveform files (respfile list.out)
Intercative input
The interactive input has less options as the mon interactive input, however the option are as above. The
questions are:
Filename of s-file or waveform file, number or filenr.lis Maximum number of points in output trace, return
for all same as -maxpoints Ground motion output (dis = 1, vel = 2, acc = 3, none = return) Filter low
and high, return for no filter Select all data, y=return,n If answer is n, then the following 2 questions
come: Number of channels to read Channel number, start time and window
Output formats (SEISAN, GSE (def=CM6), GSEINT, SAC, MSEED) Default is SEISAN=return
Another way of extracting waveform data is using MULPLT where many traces can be extracted as a
binary SEISAN file (using WAVETOOL in the background) or a single trace as an ASCII file.
Accuracy of extracted data
If the data is filtered or corrected for instrument response, the number out can be less than one and an
output file of zeros can be made. If the output format is SEISAN, the values will always be scaled to
avoid this and the appropriate scaling factor is included in the waveform file. Subsequently reading of
these files in SEISAN will produce the correct values. For this reason, it is advised to use SEISAN as
output format when filtering or correcting for instrument response. SAC data can have values less than
1.0 so only if written in SAC or SEISAN will the values be correctly represented. If a more specific
combination of filters and and response removal is required (like making a Wood Anderson trace with an
addtional fileter) it can only be done for one event using the MULPLT OutW option which creates an
ASCII Helmerger file which then can be converted with WAVETOOL to any other format. SAC input
data is checked for max values. If smnaller then 10, output will be scaled in SEISAN format. Note:
Parameter MERGE WAVFORM in SEISAN.DEF sets the network extension of extracted files.
18.2 GET ARC, extract waveform files from the archive corre-
sponding to S-files and register the name in the S-file.
The program uses an S-file as input (one or many files). The stations to select from the archive can be
user specified, all stations with readings, all stations in archive or all stations in a given distance from
the epicenter. All channels for each station are automatically selected and there is no option for selecting
e.g. all Z-channels. The output file get arc.out contains the input data with the waveform file line added.
If the process is done twice and the same waveform file name is created, it will only be recorded once in
226 CHAPTER 18. WAVEFORM FILE MANAGEMENT TOOLS
the S-file. The output file must be split into the data base and possibly overwrite existing S-files. The
program can also be run with arguments for the operator and file e.g. get arc collect.out bb. This option
is used when the program is called from EEV with commend ARX.
Example run
get_arc
Give operator
jh
Give input file
collect.out
Interval in number of seconds before and after origin time
Default (enter) is 30 and 300
50 500
Extract stations with readings: enter
all channels in archive: a
for given stations interactively: s
for stations in a file: f
for stations at given distance to epicenter: d
for stations to given distance to given point:p
a
In details, the options are: Default: Use stations with readings. If a station has more than one reading,
it is only selected once.
a: All channels in archive. If a very large network, this option might select too much.
s: For given stations. Give station codes, one per line.
f: For given stations. Give stations from a file, one per line.
d: Use all stations in archive within a given distance. If there is no epicenter, the stations in S-file will
be used. If no stations in S-file, all station in archive will be used.
p: Use all stations at a given distance from a point. The user will be asked for the latitude and longitude
of point and distance.
18.3. GET WAV, GET LISTING OF AVAILABLE WAVEFORM AND RESPONSE FILES 227
get_wav
INPUT FILE NAME
select.out
Where to copy files to, default . on Linux and blank on Windows
The iwhere to copy option can be used to write the complete path to where files are copied. This option
is only used for waveform files, not calibration files. Note: On PC the files copy wav and copy cal have
names copy wav.bat and copy cal.bat, respectively
In the above example, a select.out was used. For each file, it is checked if the waveform and response
files are available in the system. All waveform data bases and directories specified in SEISAN.DEF are
searched. Calibration files are seached for in working directory and CAL. In order to extract the waveform
files corresponding to the input CAT file, the output file copy wav.out can be used to copy the files out
of the data base to working directory. On Unix, just source the copy wav.out file, on Windows, change
the file to a .bat file (e.g. copy get wav.out wav.bat) and run it. For the calibration files there is
similarly a file called copy cal.out.
MSCUT chop up MiniSEED files
The program cuts up MiniSEED files into 1 hour, 15 minutes or x minutes files. Where 60 modulo x
is equal to zero. Note that mscut is splitting miniseed files at block level and not at the first sample in
228 CHAPTER 18. WAVEFORM FILE MANAGEMENT TOOLS
the new minute, in order to keep the original header information. To compile the program, the miniseed
library libmseed by Chad Trabant is required. The options are
-H Cut into one hour files (default)
-Q Cut into 15 min files
-D Cut into files with a duration defined by minutes
60 modulo the number of minutes must be zero.
-V Report program version
-h Show this usage message
-v Be more verbose, multiple flags can be used
-p Print details of header, multiple flags can be used
-s Print a basic summary after processing a file
-r bytes Specify record length in bytes, required if no Blockette 1000
file File of Mini-SEED records
ALL FILES HAVE THE SAME LENGTH OF TIME. The program will check if a following file has the
correct header time based on the length of the previous file. If the following file starts before the end
of the previous file (err samp samples, default 70), it is assumed that the timing is wrong and that the
files should follow each other. A warning is given and the program continues. If the following file has a
header time that is more that a given err samp samples after where it should be, it is assumed that the
next file is missing and zeros are inserted in the channel data. The number of sample errors, err samp, is
hardwired in the program, currently 70. The program will continue to put data together in one file until
there are no more file names in the filenr.lis file or a blank line is encountered. After a blank line in
the input file, a new output file will be created. This can be used to make daily files of e.g. 2 weeks on
continuous data by manually placing a blank line in the filenr.lis file for every 24 hours. The program
recalculates the sample rate based on time in first and last file. The output file name will be given the
standard waveform file name with type R for resampled like 1999-07-02-1112-22R.BERGE 005.
Works ONLY with SEISAN format
A simple program to make an ASCII equivalent of a binary SEISAN file, or vice versa. It is the same call
to use the program both ways. By using a filenr.lis file as input, many files are converted and the
original filenames are kept with the addition of an A for ASCII or B for binary. If the files are converted
back, the A or B is removed.
The program is useful for manually editing a waveform file or checking the content in case of problems.
The program is also useful for moving binary files between different types of computer platforms (moved
as ASCII files, not needed between platforms running SEISAN). Between PC, Sun, Linux and MacOSX,
SEISAN programs will automatically adjust for differences in binary structure. The header format is
exactly like the binary SEISAN files and the sample values are written in multicolumn format.
Works ONLY with SEISAN format
A simple program to extract out a section of a waveform file (any seisan primary format). A similar job
can be done with wavetool. Syntax is:
seicut filename yyyymmddhhmmss.s interval
The first sample to use is the first sample found before the start time, the output time interval (in seconds)
will be the time from first to last sample, so if e.g. one second of data is asked for at a sample rate of
100 Hz, the time interval in header will be 0.99 sec and the number of samples output will be 100. If
the interval is not available in any of the channels, the program will stop. The output file name will use
a network code reflecting station code of first channel in input file and CUT is added to the end of the
file name. The same time window must be available in all channels.
230 CHAPTER 18. WAVEFORM FILE MANAGEMENT TOOLS
The program will generate 2 new files, one with the channels removed and one with the remaining
channels. The original file is still present.
Works ONLY with SEISAN format
Waveform files with time shifted headers, all have the same time, but station names are labeled
STA01, STA02 etc in the same order as given in input file. Only first 3 letters of station code is
used.
tsd.out : A file in Nordic format with the new waveform file names of the time shifted data. This
file can be split and then used with EEV for plotting all traces. It can be split into a local data
base or any other data base. Or copy tsd.out to a file e.g. named 27-1200-00L.S207011 and then
start EEV.
The waveforms in the output file tsd.out can also be plotted with the command mulplt -sfile
tsd.out.
The arrival time of the selected phase in the new waveform files is the pseudo date and time: 2070-11-27
12:00.
Note: The station name is renamed in the output. If there are more than one P-phase observation for a
single event (e.g. Pn and Pg, or P read on two different channels) it is the first P that is time shifted.
The program can only time shift 99 waveform files and they have to be in SEISAN format. The waveform
file must be present in the working directory.
Figure 18.2 show an example.
Figure 18.2: Example of aligning traces from 5 events for the same station. Note that
the alignment is critically dependent on the original P-picks.
18.12. WAVFIX, FIXING TIME CORRECTION AND CHANNEL NAMES IN WAVEFORM FILE HEADERS AN
In case channel names are to be changed, this can also be done with WAVFIX. A definition file is needed
for changing station, component or both. The parameter file name is wavfix.def and an example is
given in DAT. For definition of the wavfix.def, see next section 19 on Conversion programs definition
file.
WAVFIX can change header times and/or file names for one or many files. Before running the program,
a list of file names must be made with DIRF. Below is an example where the header time is changed by
120 secs. No wavfix.def file is present (current or DAT directory).
To correct the timing of individual channels, you need to create the file wavfix.tim in either the DAT
or working directory. WAVFIX checks if the file is present and applies the correction from the file as
default. The format of this file is as follows:
Column 1-5: station code
Column 7-10: component code
Column 12-25: start date and time for time correction (can be empty)
Column 27-39: end date and time for time correction (can be empty)
Column 41:60: time correction to be added
NOTE: The file must have 3 header lines of any content before the station lines as shown below.
Example:
File names of waveform files can be given to WAVFIX directly, from a filenr.lis file or from a Nordic
format file. In case you choose the Nordic input, the waveform file names will be changed in the Nordic
file (output file nordic.fix). This option is useful if you are correcting file names, since the entries in the
S-files are otherwise not fixed.
ONLY the first waveform filename in the Noridc files is used.
WAVFIX will also take input from the prompt. Writing wavfix -help gives
wavfix -help
wavfix
usage: wavfix -infile <infile> [-uncertain_time -polarity] [-time_correction <x in seconds> ]
-uncertain_time add uncertain time flag to all channel headers
-polarity change polarity
-time_correction apply time correction of x seconds
The uncwrtain time option does not seem to work for MiniSeed output.
Example of running WAVFIX
18.13 WAVFULLNAME
Prints full filename including path for a waveform file by searching directories and databases specified in
SEISAN.DEF. Filename is to be given on prompt line, e.g. wavfullname 1996-06-13-1248-15S.NSN 003.
Chapter 19
There are mainly two types of files to convert, parameter files with readings and related parameters and
binary waveform files.
PARAMETER FILES
235
236 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
This Java program will get the PDE events from the USGS web page and store them in a SEISAN
database named PDE. The program uses a parameter file getPDE.xml located in DAT with update
peiod, data base to copy to etc. The program works under Window and Linux. The program is written
by Ruben Soares Lus (ruben.so.luis@gmail.com). Contact the author for more information or consult
our web pare for new documentation.
GIINOR, Geophysical Institute of Israel to SEISAN
The input files are the bulletin type files.
HARNOR, Harvard to Nordic
The standard moment tensor solutions given by Harvard (http://www.globalcmt.org/CMTsearch.
html) are converted to Nordic format. Strike, dip, rake and moment tensor solution is written out.
The programs can use 3 different input formats:
Standard format: Default format on screen
Full format: Full format on screen
ndk format: File format for downloaded file
The screen formats have the disadvantage that only a limited number of events can be downloaded and
captured in one screen so if a lot of events are required, the best alternative is to download a file with all
events in ndk format, and then, after conversion, select the desired events.
The ndk format and the full format both give both the hypocenter calculated with arrival times (main
header line) and the centroid hypocenter and origin time (MT line), while the standard format does not
give the hypocenter calculated with arrival times, so the first header line gives the centroid location. For
that reason, it is recommended to use the full format if a screen format is used.
The ndk format does not give Mw which is then calculated from the moment. All formats have additional
information not carried over to SEISAN.
HINOR, Hypoinvers archive format to Nordic
The input files are the archive type. For details, see HYPINV program.
HYPNOR, converting HYPO71 files to Nordic files
Input is just filename of HYPO71 file. A similar program for HYPOINVERSE files is HINNOR.
HINNOR, converts from Hypoinverse to NORDIC format
This program works like HYPNOR.
HSUMNOR, HYPO71 summary file format to NORDIC format
Note that the program only converts to header lines.
ISCNOR, converting ISC bulletin file to Nordic format
This program works with the ISC fixed 96-column format as e.g. distributed on CDROM (files of type
FFB). The program can select out subsets of ISC data using a latitude-longitude window, depth and
prime magnitude. Any of the magnitudes Ms and mb are used. Before 1978, there was only mb on the
CDs. More detailed selection can be done on the output file later with SELECT. Since the amount of
data is very large it is also possible to write out only the hypocenters. Note that ISC now writes in ISF
format also, which can be converted with ISFNOR.
Newer CDs have compressed data and cannot be used directly. files must be copied to disk first, decom-
pressed and then handled as single files.
The program will first check if a file with agency codes called agency.isc is present. If so the station codes
are read from this file (same format as files on CDROM). The program will also check the beginning of the
data input file for a possible list of agencies and station coordinates. If present, the stations coordinates
are read and converted to SEISAN format and additional codes read in. The agency codes are needed in
order to identify in plain text the various agencies used.
238 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
Principles in conversion:
Phases: The phases out can be either the phase IDs sent to ISC or the ISC
reinterpreted phases (given with a number code in the input file).
If the user supplied phases are used, parenthesizes are removed,
and if P/PKP etc is given, it is replaced by P.
Times: If day is incremented relative to origin time day, it is carried into
the hours, which can be more than 24.
Agency: It is assumed that it is the same agency for hypocenter and first
magnitude. Magnitude is checked for agency, if blank, it is as-
sumed also to be the same as for hypocenter. Only first 3 charac-
ters of code is used.
Stations: Only first 4 characters of code are used.
Depth: If no error on depth, a depth fix flag is set.
First motion: Only C or D are used, ISC codes J and B are ignored.
Hypocenter orders: ISC put the best solution last, here the order is reversed, and the
prime estimate is first.
Duration magnitude: Change D to C for type.
Distance indicator: If station furthest away is less than 1000 km indicator is L, be-
tween 1000 and 3000 km indicator is R and if more than 3000 km
indicator is D. If no stations are present the type is set to D.
In order to relocate an event and compare to ISC location, the ISC reidentified phases must be used
(option 2, see below). This has the disadvantage that phases not used by ISC (mainly S-phases of local
earthquakes) are weighted out in the output file. If option 3 is used, the ISC identified phases are selected
if there and if no ISC identification is given, the local reported phase is used. The output file for option
2 and 3 looks the same except that for option 2, the user-defined phases are weighted out. The residuals
given in the output file are always relative to the ISC identified phases.
Running ISCNOR:
Below is an example of a run where a latitude - longitude window has been used.
The file input can be from a CDROM as in the example above. In that case, the whole CDROM can be
read or a smaller time interval can be given. The input can also be from a single file and the program will
then ask for the next file when the first has been converted. If many files are to be converted, a list of file
names can be made with DIRF and filenr.lis entered as an input file name. The Nordic format output
file is iscnor.out and the station list is in isc.sta which has the format used by SEISAN. Optionally,
output can also be in the original isc format, however that requires setting a flag in the program and
recompiling, see program source code.
ISCSTA, selecting stations in the complete ISC station file
The complete station list in the ISC list is very large and it is often an advantage to use a smaller subset,
although HYP can use the whole list. The program can select out subsets of stations in both SEISAN
and an older ISC format. The program will read an S-file, find how many different stations there are
and select those stations out of a station file, which can either be in SEISAN (=HYPO71) format or
ISC format (automatically determined). The output is in SEISAN format. If no S-file is given the input
station file is assumed to be in ISC format and the whole file will be converted to SEISAN format.
KINNOR, Kinemetrics to NORDIC
Converts .PCK file output of EDPPICK to file in SEISAN format. Many events are converted from one
file. The program is based on program from Kinemetrics by Christopher S. Lim. For info on how
conversion is made, see program source code.
ISFNOR, ISF1.0 to and from Nordic
The ISF format is used by the ISC and is an extension to the IMS format. The program is based on
the routines provided by the ISC for reading and writing ISF, and the SEISAN standard routines for
reading and writing Nordic data. The program converts in both directions. All possible information is
converted. Information on the ISF format can be found on the ISC website (http://www.isc.ac.uk).
It is recommended to use ISF format for data exchange with ISC.
NORIMS, IMS1.0 to NORDIC format.
The IMS1.0 (International Monitoring System) is a new version of the GSE format and very similar. The
program can partly be used for the new ISF (IASPEI Seismic Format) which will include all of the IMS
format an additional information needed by ISC and NEIC. The program and the following description is
240 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
by Mario Villagran. The program works with the IMS1.0:SHORT format (phase-readings/origin files)
and the program works both ways.
IMS1.0:SHORT Nordic
Nordic IMS1.0:SHORT
The IMS1.0:SHORT format is exactly the one used at the IDC International Data Center (Vienna,
Austria). In addition some features used by the ISC International Data Center and the Spanish NDC
National Data Center had been added. Magnitudes in IMS format use many characters, the Nordic
format allows only one; the following rule is followed:
IMS Nordic
For mb b
For MS S
For ML L
For MD C
For Ml l
For MN N
For mblg G
For ms s
For MB B
IMSNOR do not include coda magnitude.
The maximum likelihood magnitudes mb1, mb1mx, ms1, ms1mx, etc are pending. IDC still does not
have documentation and they may be changed.
Single measurements of magnitude/station are parsed as comment lines (type 3) starting with symbol
$. When importing data from IMS format, only the Event IDC number is parsed and included into
a comment line (type 3) of Nordic, together with the ellipse dimensions orientation and the mb standard
deviation.
All parameter values read that exceed field limits of Nordic (Amplitude, velocity, snr, etc) have been set
to the maximum or minimum possible, example: if snr > 999.9 then snr=999. For conversion from Nordic
to IMS it is necessary to use both the hyp.out and print.out files; The reason is that IMS includes
many parameters that need to be searched in both files.
When converting to IMS format, the user can specify the start numbering for the first event and phase in
the file; ignoring will assume (1,1). It is optionally also possible to set the no location flag in the output
header lines.
Comments in the IMS input phase data is ignored.
It seems that the program works well for converting ISC data. Just capture the output on the ISC screen
and use that as input to IMSNOR. No cleaning of the file is needed before conversion.
NORCSV, NORDIC to CSV format
The program converts the date and time, hypocenter location and magnitude to a simple CSV file that
can be loaded into spreadsheet software. An example of a line is
where the columns are date, time, latitude, longitude, depth, magnitude and magnitude type. The
magnitude with type of the highest priority is selected as given by the magnitude order in SEISAN.DEF.
For example ML from your agency may be given priority over MC, or you may prefer your ML over that
from another angency.
241
The program converts USGS CDROM hypocenters to NORDIC format. Most of the information is used.
If more than 3 magnitudes are available, only the 3 first are used. The number of stations is included
when available. The depth is indicated as fixed in all cases where the operator has been used (A,N,G).
Macroseismic information is included with max intensity. The residual standard deviation is put into rms
column. Event types are set to R. Magnitude types are converted as follows:
UK is made blank
b is replaced by B
s is replaced by S
D is replaced by C
w is replaced by W
WAVEFORM CONVERSION PROGRAMS
This group of programs are mostly converting waveform files from some format to SEISAN although a
few also convert from SEISAN to some other, mostly standard, formats. Most programs convert from
binary to binary formats.
Many instruments come with conversion programs to some standard format like PCSUDS or MINISEED,
and these have often been used to convert to SEISAN instead of writing programs reading the original
files directly. Many such conversion programs work on PC so the corresponding SEISAN programs only
work on PC. However, since the PC files can be read directly on Sun, this should not present a problem.
Many programs have VERY LITTLE documentation, look in source codes for more information.
The number of programs are forever increasing with new recorders coming onto the market and new
formats coming in use and others going out of use and it is becoming increasingly difficult to keep track
of it all. For this release of SEISAN it has not been possible to test all programs on all platforms. An
attempt has been made to standardize the programs. A general problem is that many seismic recorders
and formats do not provide proper identification of the channels. In the worst cases, there are no station
codes, only channel numbers and in very many cases, there is no room for proper component information.
This is being taken care of by having a definition file, and only one format for the definition file is used,
see below. This is also used with program WAVFIX.
Most programs work in the standard way with a filenr.lis file as input (made with DIRF).
The response information is seldom in the original files and in most conversion programs, the response
information is taken from the CAL directory. If no response information is available, a message will be
given. For each program, a comment will be given as to the status of testing and on which platforms
they operate. If the channel definition file option is implemented, the array dimensions will be SEISAN
standard.
The program SEIPITSA might be an easy way to convert between 1-column ASCII data and SEISAN
(see below).
When converting between the major analysis format (MiniSEED, SEISAN, SAC and GSE) mostly using
program WAVETOOL, only SEISAN and MiniSEED will preserve the network and location codes as well
as the flag for uncertain timing since the other formats only partly have room for this information.
Conversion programs definition file
The conversion programs use a common format for the definition file for naming station and channels.
The definition file is named programname.def as e.g. sudsei.def. The definition file can be in the working
directory or the DAT directory. The conversion program will first look in the working directory for the
file and then in DAT. The conversion of codes can take place in 2 ways (see below for details): (1) An
input station and component code is converted to an output station code and component, (2) an input
channel number is assigned a station and component code. The advantage of (1) is that the conversion is
independent of the channel number or order, however, the user must then know the default station and
243
1. Both station and component given on input: Converted to what is given for output station and
component.
Header line text (29 char)... NetCd (5 chars), Comment for next line
Header for REFTEK NEWNT
chan stati comi stato como, In and output definitions, comment for next line
1 BO11 S Z BOM B Z
BO12 S N BOM B N
BO13 S E BOM B E
The first line is just a comment line, must be there in any format. Here it shows where the network code
is positioned as indicated by NetCd.
The second line gives the header information for the SEISAN main header, which are the first 29 char-
acters. The file name network code is also given and is here NEWNT. Format a29,1x,a5.
The third line is just comment to indicate the position of the columns in the following lines (max 200).
A line must be there. The abbreviations are:
chan: Channel number, optional unless no input station and component
given.
stati: Input station code, 1-5 chars
comi: Input component code, 4 characters
stato: Output station code, 1-5 characters
como: Outut component code, 4 characters. First character MUST be
S, L, B, A, or I, last character MUST be Z, N or E, all upper case.
Format i5,1x,a5,2x,a4,1x,a5,2x,a4
The conversion programs are listed below
244 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
For each program, a summary of capabilities is mentioned: The platforms available (all for all or specific
name), channel definition file available (chan. def. yes or no) and if the program will look for response
files in the CAL directory to insert in the headers (resp. yes or no).
If you do not find the conversion program here, look on the ORFEUS website for other programs that
might convert to one of the formats used above.
(http://orfeus.knmi.nl/other.services/conversion.shtml).
AFADSEI, AFAD acceleration to SEISAN or MiniSeed all, chan. def. yes, resp
yes
Converts from AFAD ASCII acceleration to SEISAN or MiniSeed. . Components are hardwired to HN Z
etc. Assume 3 channels files only, all channels same sample rate and number of samples. Input values are
in gal, the output is in 1/10 000 gal or 0.001 mm/s2, station code is taken from file (a number). There is
an output file with hypocenter info from input files as well as the waveform file name. For echa channel
a response file is written in SEISAN format.
AHSEI, AH ASCII to SEISAN all, chan. def. yes, resp yes
Converts AH ASCII files to Seisan format.
ARCSEI, Reftek archive to SEISAN (windows only)
ARCSEI is a program to automate the extraction of data from a RefTek data archive and the conversion
to SEISAN format. The program works interactively and with a simple text interface that asks the user
to enter the details for the data extract. Based on the user selected criteria the program (1) extracts
the data from the archive in Passcal format using ARCFETCH, (2) converts the Passcal data files to
SEISAN format using RT SEIS, and (3) merges the SEISAN files if merging is activated by the user,
using SEISEI. The program is written in Fortran and works on Windows only.
The ARCSEI program can be used in various ways:
The ARCFETCH and RT SEIS programs, both part of the RefTek software package, have to be installed
(see RefTek documentation) and the PATH variable set to include the directory where the programs are
stored. It is assumed that the RefTek data archive exists and that the user is familiar with the content of
the archive. The archive content can be shown with the command ARCINFO. To test that the program
is installed correctly, open the Windows command tool (from the menu, or by selecting Start . Run .
cmd) and type ARCSEI <RETURN>.
The definition file: arcsei.def
The purpose of the definition file is to set some parameters needed to run ARCSEI, however, the program
also works without. The arcsei.def file can either be stored in the seismo/DAT directory, or the current
working directory. The program first checks in the current directory. The arcsei.def file should be adjusted
to the users set-up, before ARCSEI is started.
The parameters are:
246 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
ARCHIVE: The path of the RefTek data archive, can also be entered manually
at run time.
OUTPATH: The directory in which the SEISAN files are to be stored. The
default is .\ (the current directory).
MERGE: Select if SEISAN files from several stations for the same time
interval should be merged (Y), or not (N).
NETWORK CODE: Network code used in case SEISAN files are merged.
CHANNEL: Data channel in RefTek archive consisting of the unit, stream and
channel (unit,stream,channel). The * can be used as wildcard to
select all streams or channels, BUT not to select all units (since
ARCFETCH is used in cooked mode, which means that the time
interval extracted matches the input start- and end-time.
Example of the arcsei.def file
KEYWORD............Comments.............Par1........................
arcsei <RETURN>
ARCSEI - DATA EXTRACTION FROM REFTEK ARCHIVE AND CONVERSION TO SEISAN FORMAT
Return to accept default, which is set in the arcsei.def file, or give the archive path.
8021,1,*
8022,1,*
8023,1,*
8024,1,*
8025,1,*
8028,1,*
Type channel and <RETURN>, if defined in arcsei.def channels are listed, otherwise an example is
shown. The channel is given as unit,stream,channel. Wildcards can be used for stream and channel, but
not for the unit.
Specify the end time, either in the same style as for the start time (only if one start time), or in some cases
more useful, the desired time window in seconds, by entering +seconds. If sequential time windows are to
be extracted, use ++ seconds. The user is then asked how many time windows should be extracted. It is
thus possible e.g. to extract 10 consecutive windows of 600 seconds. Only if sequential extract windows
specified:
After the program has finished, the data in SEISAN format can be found in either the current directory
(default) or in the OUTPATH directory if the variable is specified in arcsei.def. The temporarily
created files are deleted automatically.
How it works
248 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
ARCSEI reads the user input that specifies what should be extracted from the RefTek archive and then
calls the programs ARCFETCH, RT SEIS and SEISEI. For temporary data storage ARCSEI creates the
directory arcsei temp under the current directory. The arcsei temp directory is automatically deleted
upon program completion.
2. Arcfetch
The arcfetch program performs the data extraction from the RefTek archive. A complete list of
the command line input of arcfetch can be obtained by starting the program without additional
options. ARCSEI starts arcfetch in the following way:
arcfetch archive channel,start-time,end-time -o OUTPATH -c
Where:
-o OUTPATH: Specifies the output path for arcfetch, always arcsei temp
-c: Specifies cooked mode, which means that the time interval extracted matches the input start-
and end-time (this is not the case, when not running in cooked mode)
Example:
arcfetch G:
ARCHIVE 8020,1,*,2000:200:12,+10 -oarcsei temp -c
3. rt seis
RT SEIS converts all files with the suffix rt in arcsei temp to SEISAN format. RT SEIS reads the
RTU.INI file for station definition, if the environmental variable RTU is set to point to the RTU.INI
file (see RT SEIS section below).
4. SEISEI
SEISEI, if merge is selected, merges all SEISAN files in the arcsei temp directory.
5. move
Finally all files (single or merged) are moved to the OUTPATH directory or the current directory if
OUTPATH is not defined. In case multiple stations are selected, ARCSEI runs steps (1) and (2) in
a loop, before the data is merged and moved. In case several time windows are selected, ARCSEI
runs steps (1) to (4) in a loop, and in addition a second loop over multiple station (1) and (2). If
sequential time windows are specified, ARCSEI computes multiple start times and works as if these
time windows were user specified. All, def. File yes, resp yes
-2138
-942
-734
-272
-652
-1736
-102
755
linux$ ascsei
File name, # or filenr.lis for all
data.txt
data.txt
year,month,day,hour,min,sec
2017,02,22,11,30,05.12
sample rate
20
station, max 5 chars
JENS
component, max 4 chars
BH Z
Enter scale factor, return for no scaling
BGISEI, Beijing GEODEVICE FORMAT (BGI) to SEISAN. Linux, PC, chan. def. yes, resp
yes
The program to convert waveform files from BGI to SEISAN format is called BGISEI. The instrument
response in the original files is not used. The program has only been tested with data recorded in Cuba.
The program is written by Bladimir Moreno.
CITSEI, CityShark to SEISAN all, chan. def. yes, resp yes
Converts from CityShark ASCII to SEISAN. Components S Z, S N, S E are assumed for the 3 channels.
Assume 3 channels files only, all channels same sample rate and number of samples.
CNVSSA and CNVSSR Kinemetrics accelerometers to Kinemetrics Dataseis PC
The programs are supplied by Kinemetrics to convert from SSA and SSR formats to Kinemetrics Dataseis.
To further convert to SEISAN, use program KINSEI. Only PC executable programs are available. The
data is 16 bit.
CSS
At the moment there is no direct conversion from CSS to SEISAN. It is possible to convert CSS data to
SAC or GSE using other tools like codeco, Geotool and SAC, and then convert to SEISAN format.
DELS, deletes parts of S-file
DELS, program to delete specific lines in an S-file with one or many events
There is often a need to delete particular parts of an event file like the spectral lines or the P-phases etc.
250 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
C:\\seismo\\WOR>dels
hyp.out
Any combination of options can be selected or deselected. The output is in file dels.out.
A special option is 99. This will write out IAML amplitudes for Z, N and E if all three present. Output
file is dels amp.out. The program can also be used with arguments
First argument is file name
Second argument is optionally overwrite meaning that input file will be overwritten, can only be used
with a file with one event, if more program stops. Third argument is operator
The last two arguments are used with EEV, command dels in EEV.
DIMASSEI, USGS DIMAS to SEISAN all, chan. def. yes, resp yes
Converts Dimas files to Seisan format.
DRSEI, Sprengnether data recorders to SEISAN all, chan. def. yes, resp yes
Converts Sprengnether DR3024 and DR3016 to SEISAN format. These two formats are slightly different,
but the program makes the adjustment. Only essential information is read in and only 4 lowest digits of
serial number are used. If station codes are set up, these are used, else the serial numbers are used for
station codes.
GIISEI, Geophysical Institute of Israel to SEISAN all, chan. def. yes, resp yes
Converts Geophysical Institute of Israel imported DAQ files to SEISAN format. The initial station
codes are as defined in file, can be converted with the normal .def file. If 4.th character of station name
indicates component (N or E), that is blanked out and transferred to 4.th character of component name
BEFORE using the def file conversions.
GURSEI, G uralp to SEISAN all, chan. def. yes, resp yes
Converts Guralp GCF files to SEISAN format, only works with one channel data. Maximum number
of samples as defined in seisan, at least 1 200 000, channels codes can be defined using the gursei.def
251
definition file. If no definition file, the station name is the first 4 letters from internal station name and
the component is BH Z.
GCF2MSD MANY
Runs Guralp gcf2msd many times from files in a file structure. It is only tested for one particular structure
with 15 min files, so the program has to be adopted to other structures. Requires program gcf2msd from
uralp. GCF2MSD MANY
G
GSERESP, conversion between GSE and SEISAN response files all
The program provides conversion between SEISAN, GSE1 and GSE2 response files. The response can be
given in frequency, amplitude and phase (FAP) triplets or in poles and zeros (PAZ). Since the number
of values in the GSE format is unlimited the conversion from SEISAN to GSE only changes the format,
whereas converting from GSE to SEISAN, if the number of FAP triplets is more than 30 or the number
of poles and zeros larger than 37, the response in SEISAN format will be approximated by 30 FAP
triplets. The output files in SEISAN format will have the default SEISAN response filenames (see RESP
program and SEISAN response format). Output files in GSE format will include the station name, the
component, number 1 or 2 for GSE1 and GSE2 respectively and end on .CAL (e.g. MOR SHZ2.CAL
(GSE2), KONO BZ 1.CAL (GSE1).
GSRSEI, GeoSig to SEISAN all, chan. def. yes, resp yes
Converts from GBV recorders to SEISAN. GeoSig was earlier GeoSys. Before version 8.1, there was a
bug in program so start time was wrong by the amount of the prevent time.
IRISEI, IRIS ASCII to SEISAN all, chan. def. no, resp yes
The input format is the variable ASCII download format used on the GSN Quanterra stations. The
format is used in connection with SEISNET. The program only works if input file has more than 1000
samples. ISMSEI, ISMES to SEISAN PC, chan. def. no, resp no ISMES is an Italian seismic recorder.
This is the first version of the program made by IIEES in Iran. The program can convert one file with
up to 3 channels.
KACSEI: Kinemetrics ASCII acceleration to SEISAN all, chan. def. yes, resp yes
Kinemetrics ASCII film record acceleration files (type *.v1) to SEISAN. It is assumed that:
- channel 1 is N, 2 is Z and 3 is E
- station code is taken from file name as given in first line of input file
- the 3 channels can have different number of samples, however it is assumed that they all start at
the same time
KINSEI, Kinemetrics DATASEIS to SEISAN PC, chan. def. yes, resp yes
The program takes the station code from the input files. The component codes are also taken from the
input file as far as Z, N and is E is concerned, but the first letter is always set to S, like S Z. The
program is also used if CNVSSR or CNVSSA have been used first.
K2SEI, Kinemetrics K2 to SEISAN PC,Linux, chan. def. yes, resp yes
Program for K2 binary files. The program works by first converting the binary files to ASCII by internally
running the Kinemetrics program kw2asc (PC only). If no definition file is present, channel 1-3 will be
A Z, A N and A E. If more channels they will be called A 04, A 05, etc.
252 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
LEESEI, Willy Lee binary files to SEISAN PC, chan. def. no, resp no
The number of channels is fixed to 16 and the time information is not read, it must be entered when
converting the file.
LENSEI, Lennartz ASCII to SEISAN all, chan. def. yes, resp yes
NANSEI, Nanometrics to SEISAN PC, Sun, chan. def. yes, resp yes
The program converts from the Y-file format to SEISAN. This is done by first making an ASCII file
with Nanometrics y5dump program (done internally in NANSEI). NOTE: The y5dump program requires
some special Nanometrics libraries (Solaris) or *.DLL files (PC), which are included and installed with
SEISAN (see installation section). The program converts single channel files only.
NEISEI, NEIC digital data to SEISAN PC, chan. def. no, resp no
NEIC earthquake digital data comes on CDROM. The data is extracted with a program coming with
the data and then converted to SEISAN binary waveform data. The response information is given as
poles and zeros in the SEISAN waveform file header.
OS9SEI, converting SEISLOG files to SEISAN PC, SUN, chan. def. no, resp yes
The program takes a SEISLOG ASCII (downloaded in CMP6 format) or binary file and converts to
a SEISAN file. The input can be several files from a filenr.lis or an ASCII downloaded file either
compressed or uncompressed. The program will look for the calibration file in the CAL directory and
add it to the SEISAN file, or give a message if it is not there. The program will work with SEISLOG
files recorded under operating system OS9 or QNX up to version 7.6. For QNX version 7.0, use program
QNXSEI.
PCQSEI, converting PCEQ format to SEISAN PC, chan. def. yes, resp no
PCEQ format to SEISAN. Earlier used with IASPEI software libraries.
PDASEI, converting PDAS files to SEISAN all, chan. def. yes, resp yes
The program converts a single channel PDAS file to a single channel file in SEISAN format. Several of
these files can then be merged with SEISEI. PDASEI in previous SEISAN versions (before version 6.0)
only worked with PDAS in 16-bit format, so if 32 bit or gain ranged format was input, the output would
have been in error. The current version of PDASEI should be able to convert all 3 types of input files.
A description of the PDAS format is found in the PDASEI program.
PSNSEI, Public Seismic Networks to SEISAN all, chan. def. yes, resp yes
The Public Seismic Network recording system makes one file pr channel. Since component is not well
defined, several files from the same recording system might get the same SEISAN file name. Do some
testing when setting up the recording system. The one component files can be assembled into multichannel
files with SEISEI. There might be a newer version of PSN format not supported.
QNXSEI, SEISLOG QNX version to SEISAN all, chan. def. no, resp yes
This program works as OS9SEI except that it does not read the ASCII files. The program must be used
with Seislog 8.0. The program is currently the only program that put in the time synchronization flag in
SEISAN waveform files except for data logging programs under Seislog Windows. See format description
253
in Appendix B. The program recalculates the sample rate based on the time in the first blocks in the
file and the last blocks in the file (each block is one second long). For very long files, this might be of
importance since the digitizer might not have exactly the nominal sample rate.
RSASEI, Andalucian Seismic Network to SEISAN all, chan. def. yes, resp yes
Conversion of network and broad band files to SEISAN format. Covers several versions of the DTS format
also used by other institutions in Spain. Not tested on Linux.
RT SEIS, Reftek Passcal to SEISAN PC, chan. def. no, resp no
The RT SEIS program converts Reftek Passcal format to SEISAN. This program is provided by Refraction
Technology Inc. The program does not use the filenr.lis as input file. To see the options of RT SEIS,
start the program without any arguments. In order to make use of the RTU.INI definition file, the
environmental variable RTU needs to be set to for example c:
seismo
dat (see RefTek documentation for more details). This file can be used to set station names for respective
unit IDs.
Example of RTU.INI:
[8020]
Station=SB00
Network=CTBTO
CH1Band=
CH1Type=
CH1Axis=a
CH1Loc =
CH2Band=
CH2Type=
CH2Axis=b
CH2Loc=
CH3Band=
CH3Type=
CH3Axis=c
CH3Loc =
[8021]
Station=SB01
Network=CTBTO
CH1Band=
...
SEI2PSXY
Converts waveform file to GMT psxy trace plotting ASCII file. The output files have one line for each
sample giving the date and time and amplitude value, e.g.:
2005/06/16T00:59:59.51 -40.0000
To plot the trace data with psxy, use projection -JX<xsize>T<ysize> and option -R giving time
range in the same style as the data. To plot the data the gmtdefaults should be set to gmtset IN-
PUT DATE FORMAT yyyy/mm/dd INPUT CLOCK FORMAT hh:mm:ss.xx. See psxy man pages for
more details.
SGRSEI PC, chan. def. yes, resp yes
SeisGram binary to SEISAN. Only 3 component data has been tested. Channel order is assumed to
be Z, N, E. The input real values have been multiplied by 100 000 before being converted to integers.
254 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
OPTIONS
-V
Print program version and exit.
-h
Print program usage and exit.
-v
Be more verbose. This flag can be used multiple times (-v -v or -vv) for more verbosity.
-S
Include SEED blockette 100 in each output record with the sample rate in floating point format.
The basic format for storing sample rates in SEED data records is a rational approximation (numer-
ator/denominator). Precision will be lost if a given sample rate cannot be well approximated. This
option should be used in those cases.
-B
Buffer all input data into memory before packing it into Mini-SEED records. The host computer must
have enough memory to store all of the data. By default the program will flush its data buffers after
each input block is read. An output file must be specified with the -o option when using this option.
-n Inetcode P
Specify the SEED network code to use, if not specified the network code will be blank. It is highly
recommended to specify a network code.
-l Iloccode P
Specify the SEED location code to use, if not specified the location code will be blank.
-r Ibytes P
Specify the Mini-SEED record length in Ibytes P, default is 4096.
-e Iencoding P
Specify the Mini-SEED data encoding format, default is 11 (Steim-2 compression). Other supported
encoding formats include 10 (Steim-1 compression), 1 (16-bit 3 integers) and 3 (32-bit integers). The
16-bit integers encoding should only be used if all data samples can be represented in 16 bits.
-b Ibyteorder P
Specify the Mini-SEED byte order, default is 1 (big-endian or most significant byte first). The other
option is 0 (little-endian or least significant byte first). It is highly recommended to always create big-
endian SEED.
-o Ioutfile P
Write all Mini-SEED records to Ioutfile P, if Ioutfile P is a single dash (-) then all Mini-SEED output will
go to stdout. All diagnostic output from the program is written to stderr and should never get mixed
with data going to stdout.
-T Icomp=chan P
Specify an explicit SeisAn component to SEED channel mapping, this option may be used several times
(e.g. -T SBIZ=SHZ -T SBIN=SHN -T SBIE=SHE). Spaces in components must be quoted, i.e. -T
S Z=SHZ.
LIST FILES
If an input file is prefixed with an @ character the file is assumed to contain a list of file for input. As
a special case an input file named filenr.lis is always assumed to be a list file. Multiple list files can
be combined with multiple input files on the command line.
The last, space separated field on each line is assumed to be the file name to be read. This accommodates
both simple text, with one file per line, or the formats created by the SeisAn dirf command (filenr.lis).
An example of a simple text list:
2003-06-20-0643-41S.EDI 003
2005-07-23-1452-04S.CER 030
An example of an equivalent list in the dirf (filenr.lis) format:
256 CHAPTER 19. FILE CONVERSION AND MODIFICATION PROGRAMS
# 1 2003-06-20-0643-41S.EDI 003
# 2 2005-07-23-1452-04S.CER 030
SILSEI all, chan. def. no, resp no
Conversion from the Icelandic SIL system to SEISAN. Only conversion from ASCII files.
SISSEI, Sismalp to SEISAN all, chan. def. yes, resp yes
The program converts from Sismalp to SEISAN. Sismalp is a French field recording system. The input
consists of 2 files pr event, a header file and a data file. It is assumed that the Sismalp ndx files have the
same file name as the header file except for the file extension. It is also assumed that the file names are
12 characters long.
SUDSEI, PCSUDS to SEISAN PC, chan. def. yes, resp yes
The program converts from PCSUDS to SEISAN. This is done by first running the program SUD2ASC
(included) and then converting to SEISAN. The SUD2ASC program and test data was supplied by
REFTEK through the distribution of PC-SUDS Utilities by Banfill [1996].
TERSEI, Terra ASCII to SEISAN all, chan. def. yes, resp yes
Program converts from Terra Technology ASCII files to SEISAN. Only tested with 1-3 channel files
WGSSEI to SEISAN all, chan. def. yes, resp yes
Program converts from WGSN files to SEISAN. The format is used on IRIS stations as processing format.
Little tested.
Chapter 20
The SAC software is interfaced to SEISAN and can be started directly from EEV. This is done since
SAC has functions that SEISAN does not have. It only operates on Unix.
20.1 SAC2000
SAC2000 (seismic analysis code) is currently developed by Lee Minner and Peter Goldstein [Gold-
stein, 1999]. SAC is not distributed with SEISAN, information on SAC can be obtained from the SAC
homepage (http://www-ep.es.llnl.gov/www-ep/esd/seismic/sac.html). The main features of SAC
include general arithmetic operations, Fourier transforms, three spectral estimation techniques, IIR and
FIR filtering, signal stacking, decimation, interpolation, correlation, and seismic phase picking. SAC
also contains an extensive graphics capability. With SAC it is possible to write macros, which helps to
process large amounts of data. The SAC format is used in several research oriented programs. SAC can
be started from EEV using the command sac. EEV will start the WAVETOOL program to convert
the data to SAC and then execute the command sac. In case your sac executable is called sac2000, it is
necessary to rename it (to sac) or alternatively to create a link in either the SEISAN PRO directory or
the SAC bin directory. This is done for example by the command :
ln -s /sac/bin/sac2000 /sac/bin/sac
Since the SAC format is a single trace format, the SEISAN multichannel files are split into single trace
files. The station and component names are included in the file name and the suffix SAC is added to
all SAC files. For both systems, waveform data can be converted to the respective format outside EEV
using WAVETOOL, GSESEI or SACSEI, and the programs can be started without using EEV.
257
258 CHAPTER 20. SIGNAL PROCESSING PROGRAMS
Chapter 21
The section describes the routines in SEISAN that can be used for analysing data automatic.
%
% Input parameters common to all filters:
%
% LWIND : used to define step length (DELTA=WINDOW/LWIND)
% ISHIFT : defines time shift between STA and LTA window (ISHIFT*DELTA)
259
260 CHAPTER 21. AUTOMATIC ROUTINES IN SEISAN
% Delay for LTA window (15 * 0.1) ==> 1.5 sec. after STA window.
% ISIGMA : defines fall off rate of LTA window (larger values longer windows)
% LTA(i) = (1 2^(isigma)) * LTA(i 1) + 2^( isigma) * STA(j)
% COHMIN : Polarization threshold.
% Minimum coherence (see thresh_1 and thresh_2)
% NDMIN : Mimimum number of consecutive triggered windows in a detection
% SVELO : S wave velocity of the medium below the station (used for 3 comp)
% NFILT : number of filters
% CRAT : Ratio for calculation of coda duration ( range 1 4)
% LWIN : Window used in coda duration routines (range 20 50 seconds)
% THRES : Quality threshold (range 2 5). Used on the maximum to average
% amplitude ratio in order to sort out the most noisy traces.
%
% Input parameters defined for each filter:
%
% WINDOW : length of the moving time window (sec)
% F1 : lower cutoff frequency (Hz) of band pass filter
% F2 : higher cutoff frequency (Hz) of band pass filter
% THRSH1 : STA/LTA threshold for polarized signals
% THRSH2 : STA/LTA threshold for unpolarized signals
% If coherence > cohmin then detection is made on thresh_1
% If coherence < cohmin then detection is made on thresh_2
%
% Output parameters:
%
% D : day of year
% H : hour
% M : minute
% SEC : second
% DUR : duration, i.e. time in detection state (sec)
% FRQ : centre frequency of filter giving the best detection (Hz)
% SNR : signal to noise ratio (SNR=STA/LTA)
% STA : short time average (root mean square of amplitude)
% NT : total number of triggered time windows in the detection
% NH : number of windows with best SNR on one of the horizontal comp.
% NV : number of windows with best SNR on the vertical comp.
% NC : number of windows with acceptable polarization
% Q : quality class, 1(best) 4(worst)
% PS : P/S wave discriminator, 0(S) 10(P)
% AZI : backazimuth in degrees measured from North through East
% DA : variability in azimuth (deg)
% VEL : apparent velocity (km/s)
% DV : variability in apparent velocity (km/s)
%
% Note : azimuth and apparent velocity calculations are based on the
% assumption of P wave, so that these variables should be
% neglected for S waves.
%
21.1. AUTOPIC AND AUTO 261
*ASK S Z 3 component
*MOR7 S Z 3 component
*MOR8 S Z 3 component
*LOF S Z 3 component
*LOF A Z 3 component
*OSG S Z 3 component
*TRO S Z 3 component
*FOO S Z 3 component
*ALVN S Z 3 component
*UGA S Z 3 component
*ENT A Z 3 component
AUTO
A Program for automatic processing: Phase picking, location, magnitude and fault plane solution deter-
mination.
This program run the picking program AUTOPHASE first (optionally AUTOPIC), locates events with
or without outlier removal with HYP and then determines magnitudes with AUTOMAG. Automatic
amplitudes for fault plane solutions can be done optionally with AUTORATIO. Fault plane solutions
can also be done optionally with FPFIT or HASH. The default is to do AUTOPHASE, HYP with
outlier removal and AUTOMAG using default parameters. Individual steps, like doing magnitudes, can
optionally be deselected and some non default parameters for AUTOMAG can be selected. All changes
are made using arguments, see list below. Thus the program can also be used to do any one of the
operations. However to do only e.g. magnitudes, a more rational choice would be to use AUTOMAG
only. Similarly for doing only locations, it is more logical to use HYP. The input can be all SEISAN types:
a file, a data base or an index file. Outlier removal by HYP can be deselected. An alternative to outlier
removal by HYP is to use the HYP option for residual weighting. For more detail of the individual
programs, see program descriptions elsewhere in SEISAN manual. There are always two output files:
auto.out: all events with the final results with updated values of location and magnitude. auto.log: a
summary of what has been done to each event. If input is from a data base or index file, the results are
also written back to the data base, overwriting what was there from before. The ID line is not updated by
AUTO. When picking automatically, a few bad picks can throw the solution off so for a local event, the
distance might wrongly be very large. It is then important that the range used for distance weighting in
HYP is large so the initial wrong location can be made and the outlier rejection gets a chance to eliminate
bad picks. Doing fault plane solution is only recommend with very good data. It is then important to
use at least the default values set for both minimum number of polarities and maximum az gap. Note the
gap is not the gap as in a hypocenter solutions but the gap when polarities are plotted on the projection
on the focal sphere.
See list of argument below
c:\seismo\PRO>auto help
Write auto help to get list of arguments. If no
arguments, all defaults are used. This is autophase,
location with outlier rejection and ML and spectral Mw
By T. Utheim terje.utheim@geo.uib.no
The AUTOPHASE program is part of the RTQUAKE real-time earthquake detection [Utheim et al.,
2014] (Utheim and Havskov, 2014). The AUTOPHASE (hereafter AP) is a stand-alone phase-picker
routine that is used for automatic phase-picking in RTQUAKE and can also be used as an option in
SEISAN from the EEV program. The routine is based on the FilterPicker algorithm [A. Lomax and
Vassallo, 2012] (Lomax et al. 2012), but with several modifications and additions. However, the original
picking algorithm is unchanged.
The FilterPicker (hereafter FP) implementation in both RTQUAKE and SEISAN checks each component
of a waveform for possible phase-picks. All channels in the waveform file are checked and there is no
possibility to unselect channels. Each component may have several suggested phases given by the time
of occurrence. Each component may also have a suggested first movement indicated for each pick. There
can thus be many picks for each channel.
The following rules apply for selecting P and S phases among the suggested picks:
For one station there will only be one P and one S-phase selected.
P is only accepted on vertical components.
S is only accepted on vertical components if the station does not have horizontal components so S is in
general only accepted on horizontal components. If several picks are found on a horizontal component,
it is assumed that the first is P. The S is then selected on the first of the following picks that has a
time-difference greater than a default value MINDIFF (1.5 seconds) set in the program. This is to avoid
picking secondary P phases as S phases. This rule is also used if picking S on Z-components.
If S-phases are found on two different horizontal channels, the first arriving one is used.
If only one pick on a horizontal component, no S is selected.
First movement are included in the S-file only for vertical channels.
If the event is defined as distant (D) in the SEISAN S-file, only P phases are picked.
S-phases are given a weight of 3.
Running AUTOPHASE AP is started from within the SEISAN EEV program with the command ap.
This command converts all associated waveform files (can be different formats) to one MiniSeed file
seed.out, which is then used as input to AUTOPHASE. The S-file and corresponding waveform files are
used as input to the AP. All old readings are deleted and replaced by the new readings from AP. All
phases are marked with A for automatic. AUTOPHASE can also be operated outside EEV with the
command:
Autophase -sfile xxx -wavefile yyy
where xxx is a single event S-file and yyy is one waveform file in MiniSeed format. AP can only work
with one S-file.
21.2. AUTOPHASE, AUTOMATIC PHASE PICKING 265
AUTOPHASE also has other options not used in SEISAN, see RTQUAKE manual (ftp://ftp.geo.uib.no/pub/seismo
Parameters
AUTOPHASE has no parameter file since it seems that the default parameter work will in most cases.
Default FilterPicker parameters are set at the top in the source program under the comment:
Default FilterPicker parameters and can be changed by the user. See M. Vassallo and Lomax [2012]
Vassallo et al. (2012) for documentation. The program must be recompiled.
#define Picker FW 300.0 Longest period for a set of filtered signals from the differential signal of the
raw broadband input trace (300 multiplied by sample rate)
#define Picker LTW 500.0 Time scale used for accumulating time-averaged statistics of the input raw
signal (500 multiplied by sample rate)
#define Picker TH1 10.0 Trigger threshold used for event declaration. A trigger is declared when the
summary CF (characteristic function) exceeds Picker TH1
#define Picker TH2 10.0 A pick is declared if and when, within a window of predefined time width,
Picker TUP after trigger time, the integral summary CF (characteristic function) exceeds the value:
Picker TH2 multiplied by Picker TUP (see below).
#define Picker TUP 20.0 Time window used for pick validation (20 multiplied by sample rate).
Default time-difference MINDEF is set to:
MINDEF = 1.5
Coda is computed for vertical components only, and only for events marked local (L) or regional (R) in
the s-file. Computation of coda can be turned off by changing the SETCODA switch in the source code
to zero, and recompiling. Default is SETCODA=1. The coda is computed by comparing a long-term
average of the signal before the P phase with long-term averages after the P-phase divided by a factor.
Example: The AUTOPHASE picker is started from EEV with the command: ap
-----------------------------------------------------------------------
Create s-file: /home/seismo/snew/REA/TST__/2015/12/09-0804-18R.S201512
-----------------------------------------------------------------------
The autophase routine will also indicate first movement of p-phases when found. This can
be seen on station PB08 BZ and PB09 BZ below:
0 2015 12 9 0803 54.7 LM-22.259 -66.832 0.0 BER 11 1.2 2.3WBER 1
1 SPEC AVERAGE MO 12.5 ST 2.2 OM 1.3 f0 6.48 R1.2239 AL 0.00 WI 20.0 MW 2.3 3
2 SPEC SD MO 0.7 ST 1.8 OM 0.7 f0 2.58 R2.8040 AL WI MW 0.5 3
3 GAP=282 2.48 27.2 73.7 98.6 -0.1631E+04 0.5338E+04 -0.1724E+04E
4 SPEC PB09BH Z MO 12.1 ST 1.5 OM 0.9 f0 8.00 R0.1480 AL-0.00 WI 20.0 MW 2.0 3
5 SPEC PB09BH Z T 8 5 5 K 0.020 GD 159 VS 3.20 DE 2.60 Q0400.0 QA 0.70 Q1 1.00 3
6 SPEC PB03BH Z MO 12.3 ST 2.6 OM 1.1 f0 8.00 R0.1480 AL-0.00 WI 20.0 MW 2.1 3
7 SPEC PB03BH Z T 8 519 K 0.020 GD 173 VS 3.20 DE 2.60 Q0400.0 QA 0.70 Q1 1.00 3
8 SPEC PB01BH Z MO 12.4 ST 3.4 OM 1.2 f0 8.00 R0.1480 AL-0.00 WI 20.0 MW 2.2 3
9 SPEC PB01BH Z T 8 5 8 K 0.020 GD 174 VS 3.20 DE 2.60 Q0400.0 QA 0.70 Q1 1.00 3
10 SPEC PB07BH Z MO 12.2 ST 1.1 OM 1.0 f0 6.36 R0.1862 AL-0.00 WI 20.0 MW 2.1 3
11 SPEC PB07BH Z T 8 524 K 0.020 GD 179 VS 3.20 DE 2.60 Q0400.0 QA 0.70 Q1 1.00 3
12 SPEC PB08BH Z MO 14.4 ST0.002 OM 3.2 f00.137 R8.6423 AL-0.00 WI 20.0 MW 3.6 3
13 SPEC PB08BH Z T 8 517 K 0.020 GD 183 VS 3.20 DE 2.60 Q0400.0 QA 0.70 Q1 1.00 3
14 SPEC PB04BH Z MO 12.2 ST 2.2 OM 1.0 f0 8.00 R0.1480 AL-0.00 WI 20.0 MW 2.1 3
15 SPEC PB04BH Z T 8 530 K 0.020 GD 184 VS 3.20 DE 2.60 Q0400.0 QA 0.70 Q1 1.00 3
16 SPEC PB05BH Z MO 11.9 ST0.335 OM 0.7 f0 5.32 R0.2226 AL-0.00 WI 20.0 MW 1.9 3
17 SPEC PB05BH Z T 8 534 K 0.020 GD 187 VS 3.20 DE 2.60 Q0400.0 QA 0.70 Q1 1.00 3
18 SPEC PB11BH Z MO 12.7 ST 6.1 OM 1.4 f0 8.00 R0.1480 AL-0.00 WI 20.0 MW 2.4 3
19 SPEC PB11BH Z T 8 527 K 0.020 GD 200 VS 3.20 DE 2.60 Q0400.0 QA 0.70 Q1 1.00 3
20 2015-12-09-0803-18.TST___054_00_01 6
21 ACTION:NEW 15-12-09 08:04 OP:SEIS STATUS: ID:20151209080418 I
22 STAT SP IPHASW D HRMM SECON CODA AMPLIT PERI AZIMU VELO AIN AR TRES W DIS CAZ7
23 PB16 BZ IP A 8 5 4.49 120
24 PB11 BZ IP A 8 4 49.15 132
25 PB08 BZ IP AC 8 4 43.76 105
26 PB01 BZ IP A 8 4 38.26 125
27 PB07 BZ IP A 8 4 39. 1 122
28 PB09 BZ IP AC 8 4 33.65 121
29 PB03 BZ IP A 8 4 37.56 113
30 PB04 BZ IP A 8 4 41.36 89
31 PB06 BZ IP A 8 4 36.51 86
32 PB05 BZ IP A 8 4 42.61 87
33 PB15 BZ IP A 8 4 37.86 94
34 PB11 BN IS 3A 8 5 28.64
35 PB08 BN IS 3A 8 5 19.16
36 PB01 BN IS 3A 8 5 9.81
37 PB06 BN IS 3A 8 5 7. 6
38 PB15 BN IS 3A 8 5 9.31
# 13 9 Dec 2015 08:03 54 LM-22.259 -66.832 0.0 N 1.2 2.3WBER 11 ?
21.3. AUTOSIG 269
21.3 AUTOSIG
AUTOSIG is a program to perform some automatic processing. The program includes routines for
P-phase picking, determination of signal duration, amplitude determination, determination of spectral
parameters [Ottem oller and Havskov, 2003] and determination of distance type (local, teleseismic, noise).
The program can still do with improvement. The input to the program can be either a parametric Nordic
file (with one or several events) or waveform files. In both these cases, the output is written to the
autosig.out file. Additional output files are autosig.trace and autosig.err, which will help to find
potential problems. Alternatively, the program can also be started from EEV; the output is then directly
written to the S-file. The input parameters are defined in the file autosig.par, which is located either
in the DAT or the working directory.
Following are descriptions of the automatic processing routines:
P-phase picking:
The phase picking is based on changes in the STA/LTA ratio. A band pass filter can be specified. The
routine gives options to enhance the changes in the signal before computing the STA/LTA ratio. It is
recommended to first remove the linear trend and then to compute the characteristic function which is
given by y**2+k*(dy/dt)**2, which enhances changes in both amplitude and frequency content. Then
the STA/LTA ratio is computed to detect changes in the signal. The routine can also compute the
squared STA/LTA. When a change is detected (STA/LTA ratio above trigger level), it is tested whether
the signal spectral amplitudes are significantly higher (factor of 2 in amplitude) than the pre-signal noise
spectral amplitudes. This is done to avoid triggering on spikes.
Signal duration:
The signal duration is determined by comparing the signal amplitudes with the amplitudes of the pre-
signal noise. The duration is determined by the point from which the ratio of these amplitudes is lower
than a given value. A filter is applied if specified in the parameter file.
Amplitude:
Routine finds maximum amplitude between two peaks.
Spectral parameters:
The routine computes the displacement amplitude spectrum for P or S waves (see section 8.12) and,
using either a converging grid search or a genetic algorithm determines the seismic moment and the corner
frequency by minimizing the difference between observed and synthetic source spectra. The frequency
band is determined by comparison with the pre-signal spectrum. The grid search is generally more cost
effective and produces better results. The method is described in Ottemoller and Havskov [2003]. The
displacement spectrum is corrected for geometrical spreading and attenuation (both along the travel path
and near surface). Therefore, the hypocentral distance has to be known. The time domain window for
extracting the data from the trace can be given by either a group velocity (Vg=distance/travel time)
window or a fixed window in seconds around the phase pick.
Distance type:
The routine determines whether the signal is from a local or teleseismic event, or noise. If signal spectral
amplitudes are not significantly higher than pre-signal noise amplitudes, it is assumed that the signal
is noise. Otherwise the amplitudes at two selected frequencies given by DIST FREQ SELECT are
compared, the rules are (f1<f2):
Spec signal amp(f1) - Spec noise amp(f1) > Spec signal amp(f2) - Spec noise amp(f2): teleseismic
Spec signal amp(f2) > Spec noise amp(f2): local
There are a few command line options that can be used to run autosig in non-interactive mode, syntax is
270 CHAPTER 21. AUTOMATIC ROUTINES IN SEISAN
#
KEYWORD............Comments.............Par 1.....Par 2
#
# spectral parameters
#
SPECTRAL S-Q0 Q0 440.0
SPECTRAL P-Q0 Q0 85.0
SPECTRAL S-QALPHA Q = Q0**Qalpha 0.70
SPECTRAL P-QALPHA Q = Q0**Qalpha 0.70
SPECTRAL KAPPA 0.02
SPECTRAL P-VELOCITY P velocity 6.2
SPECTRAL S-VELOCITY S velocity 3.6
SPECTRAL DENSITY Density 2.8
#
# auto signal processing parameters
#
REMOVE MEAN 1. for true 0.
REMOVE TREND 1. for true 1.
CHAR FUNCT 1. for true 1.
K IN CHAR FUNCT K IN X=Y^2+K*Y^2. 3.
STALTA NREC/REC rec 0./ non-rec 1. 1.
STALTA SQUARE/ABS square 1. 1.
AUTOCODA SQUARE/ABS square 1. 0.
AUTO PHASE 1. for true 0.
only if no phase
AUTO SPECTRUM 1. for true 1.
AUTO AMPLITUDE 1. for true 1.
AUTO LOCATE 1. for true 0.
NORM 1.
272 CHAPTER 21. AUTOMATIC ROUTINES IN SEISAN
#
# select phase
#
SELECT PHASE 0:auto P 2.
1:synth P
2:synth S
3:P from file only
4:S from file only
5:S or P from file
--- for 3-5, if no phase and AUTO PHASE is 1. use auto phase pick ---
DIST FREQ SELECT 1. 10.
#
# parameters used in the genetic algorithm searching for spectral parameters
#
GA POPULATION SIZE 50.
GA GENERATIONS 250.
#
# grid dimension in case of grid search
#
GRID NLOOP 5.
NGRID FREQUENCY 100.
NGRID SPECTRAL AMP 100.
#
# low filter limit to use for auto spectrum
SEPCTRUM F LOW .05
#
# parameters controlling output
#
CREATE WAVEOUT 1.
SPEC OVERWRITE 0.
PHASE OVERWRITE 0.
#
21.4. AUTOMAG 273
# station parameters
#
# STAT- COMP -sta-- -lta-- -ratio mincod -dtrle fill filh
STATION MOL S Z 3.0 20.0 10.0 2.5 1.5 5.0 10.0
STATION MOL B Z 3.0 20.0 10.0 2.5 1.5 5.0 10.0
STATION HYA S Z 3.0 20.0 10.0 2.5 1.5 5.0 10.0
STATION LSA L Z 3.0 20.0 10.0 10.0 9999.0 00.1 10.1
STATION CHTO L Z 3.0 20.0 10.0 10.0 9999.0 00.1 10.1
STATION XAN L Z 3.0 20.0 10.0 10.0 9999.0 00.1 10.1
21.4 AUTOMAG
Program to make automatic readings of WA amplitudes and make spectral fitting for channels for one
or several events in an S-file. This is a simplified version of AUTOSIG and the program does not require
any parameter file. The program will, by default, process Z channels for which the stations has a P or S
reading and the window following the S-phase will be used. Optionally P can be used for spectra and N
and E channels can also be used. A check is made for P-window length so if the window will include the
S-waves, no spectrum is made. If only a P-phase available, the S-phase time will be calculated from the
P-phase arrival time. If the epicentral distance is more than 200 km, the S-phase is assumed to be the
Lg phase and an Lg velocity of 3.5 km is used. However if the depth is more then 50 km, S is assumed.
In any case, if an S is present, the observed S-time is used.
The program can be used stand alone or in EEV with command automag(am) or command ami (input
of parameters).
A special option is to do a grid search for the best Q-parmeters that fit the Brune spectrum using one or
several events.
If the S-file has distances, both Ml and Mw can be calcculated. The parameter for Ml is taken from
STATION0.HYP in local directory or in DAT. If not found, the standard Hutton and Boore(1987) values
are used. The additional filter limits for Ml (if any) are taken from MULPLT.DEF, in local directory
or DAT. If not filters in MULPLT.DEF, no filters are set. If a filter is used, the amplitudes read are
corrected for the gain of the filter at the determined peiod.
The average Ml and Mw are shown on screen after one run. In order to get the average Ml and Mw in
the S-file after using AUTOMAG, an update must be made. However each value is printed out and can
also be shown with program PLOTSPEC (see later).
The program has a lot of output on screen when running. This can mostly be used to check why a
particualr spectrum or amplitude operation failed.
Program input
Interactive input: Give s-file name, spec window and wa window, if zero window length, the corresponding
operation is not done, give frequecy range for spectral fit, give channel names. If station is called ALL,
all Z-channels from all stations with readings (P or S) are used. Alterentively other components can be
used for all stations. If not using option ALL, the user must give each channel in which case any channel
can be used. Give if P or S-spectrum.
If the spectral window is given, data outside this window will not be used. However, the signal to noise
ratio is still check so the actual spactral range might be smaller than the spcified range.
274 CHAPTER 21. AUTOMATIC ROUTINES IN SEISAN
below. It is important that curves that are averaged using the same kappa since the averaging does not
take kappa into account. AVQ will also make a plot showing the Q-relations for the Q-curves averaged
(the first avarage) as well as the average curve.
Example of running the AUTOMAG program:
automag grid
Give input S-file
dels.out
Give spec window, enter for def (20)
25
Give spectral range, enter for 0.05-srate/2.5
give max distance, enter for all
Start q0, step Q0 and number of steps
50 50 10
Start qalpha, step qalpha and number of steps
0.3 0.1 9
Start kappa, step kappa and number of steps
0.03 0.0 1
Number of tests is: 90
Continue(n/y=enter)
Station code and component (e.g. BER BHZ), end with blank
Station code and component (e.g. BER BHZ), end with blank Giving station code ALL : Use all Z
channels with readings Giving station code ALL C : Use all C channels with readings
ALL
P or S-spectrum=default (enter)
Output file for the above input:
q0= 50.0 qa= 0.500 ka= 0.030 nf= 5 re= 0.081 mw= 3.46 f0= 4.19 st= 42.0
q0= 50.0 qa= 0.600 ka= 0.030 nf= 8 re= 0.092 mw= 3.41 f0= 4.18 st= 31.8
q0= 100.0 qa= 0.900 ka= 0.030 nf= 50 re= 0.095 mw= 3.24 f0= 5.11 st= 26.4
q0= 150.0 qa= 0.900 ka= 0.030 nf= 49 re= 0.095 mw= 3.17 f0= 4.01 st= 9.3
q0= 100.0 qa= 1.000 ka= 0.030 nf= 51 re= 0.096 mw= 3.25 f0= 4.18 st= 13.1
q0= 50.0 qa= 0.300 ka= 0.030 nf= 4 re= 0.096 mw= 3.48 f0= 5.80 st= 45.3
q0= 200.0 qa= 0.800 ka= 0.030 nf= 47 re= 0.097 mw= 3.11 f0= 4.23 st= 9.0
q0= 300.0 qa= 1.100 ka= 0.030 nf= 33 re= 0.097 mw= 3.17 f0= 3.42 st= 5.4
q0= 400.0 qa= 1.000 ka= 0.030 nf= 33 re= 0.097 mw= 3.15 f0= 3.51 st= 5.4
q0= 500.0 qa= 0.900 ka= 0.030 nf= 33 re= 0.097 mw= 3.14 f0= 3.58 st= 5.5
q0= 150.0 qa= 0.800 ka= 0.030 nf= 49 re= 0.097 mw= 3.16 f0= 4.90 st= 16.4
q0= 100.0 qa= 0.800 ka= 0.030 nf= 43 re= 0.097 mw= 3.22 f0= 5.94 st= 34.9
q0= 150.0 qa= 0.600 ka= 0.030 nf= 43 re= 0.097 mw= 3.20 f0= 5.82 st= 35.6
21.4. AUTOMAG 277
q0= 350.0 qa= 1.100 ka= 0.030 nf= 33 re= 0.097 mw= 3.16 f0= 3.38 st= 5.2
q0= 450.0 qa= 1.000 ka= 0.030 nf= 33 re= 0.097 mw= 3.15 f0= 3.47 st= 5.2
q0= 50.0 qa= 1.000 ka= 0.030 nf= 37 re= 0.097 mw= 3.35 f0= 6.22 st= 55.2
q0= 300.0 qa= 0.800 ka= 0.030 nf= 41 re= 0.097 mw= 3.12 f0= 3.71 st= 6.3
....
....
q0= 400.0 qa= 0.400 ka= 0.030 nf= 45 re= 0.103 mw= 3.05 f0= 4.36 st= 9.0
q0= 400.0 qa= 0.500 ka= 0.030 nf= 42 re= 0.103 mw= 3.08 f0= 4.15 st= 8.0
q0= 350.0 qa= 0.600 ka= 0.030 nf= 42 re= 0.103 mw= 3.09 f0= 4.27 st= 8.3
q0= 500.0 qa= 0.500 ka= 0.030 nf= 41 re= 0.104 mw= 3.09 f0= 3.97 st= 6.9
q0= 450.0 qa= 0.500 ka= 0.030 nf= 42 re= 0.104 mw= 3.08 f0= 4.17 st= 7.6
q0= 150.0 qa= 0.300 ka= 0.030 nf= 24 re= 0.104 mw= 3.34 f0= 4.19 st= 21.1
q0= 500.0 qa= 0.400 ka= 0.030 nf= 41 re= 0.105 mw= 3.08 f0= 4.12 st= 7.6
q0= 200.0 qa= 0.300 ka= 0.030 nf= 37 re= 0.106 mw= 3.18 f0= 5.38 st= 29.6
q0= 100.0 qa= 0.400 ka= 0.030 nf= 19 re= 0.108 mw= 3.34 f0= 4.16 st= 27.0
q0= 100.0 qa= 0.300 ka= 0.030 nf= 13 re= 0.109 mw= 3.32 f0= 4.54 st= 28.4
q0= 100.0 qa= 0.500 ka= 0.030 nf= 20 re= 0.112 mw= 3.33 f0= 4.69 st= 30.1
q0= 50.0 qa= 0.800 ka= 0.030 nf= 13 re= 0.112 mw= 3.26 f0= 6.09 st= 58.0
q0= 100.0 qa= 0.600 ka= 0.030 nf= 25 re= 0.112 mw= 3.26 f0= 5.31 st= 32.5
q0= 50.0 qa= 0.400 ka= 0.030 nf= 4 re= 0.114 mw= 3.47 f0= 6.04 st= 51.2
avq
File name, enter for automag_grid.out
q0= 50.0 qa= 0.500 ka= 0.030 nf= 5 re= 0.081 mw= 3.46 f0= 4.19 st= 42.0
q0= 50.0 qa= 0.600 ka= 0.030 nf= 8 re= 0.092 mw= 3.41 f0= 4.18 st= 31.8
q0= 100.0 qa= 0.900 ka= 0.030 nf= 50 re= 0.095 mw= 3.24 f0= 5.11 st= 26.4
q0= 150.0 qa= 0.900 ka= 0.030 nf= 49 re= 0.095 mw= 3.17 f0= 4.01 st= 9.3
q0= 100.0 qa= 1.000 ka= 0.030 nf= 51 re= 0.096 mw= 3.25 f0= 4.18 st= 13.1
q0= 50.0 qa= 0.300 ka= 0.030 nf= 4 re= 0.096 mw= 3.48 f0= 5.80 st= 45.3
q0= 200.0 qa= 0.800 ka= 0.030 nf= 47 re= 0.097 mw= 3.11 f0= 4.23 st= 9.0
q0= 300.0 qa= 1.100 ka= 0.030 nf= 33 re= 0.097 mw= 3.17 f0= 3.42 st= 5.4
q0= 400.0 qa= 1.000 ka= 0.030 nf= 33 re= 0.097 mw= 3.15 f0= 3.51 st= 5.4
q0= 500.0 qa= 0.900 ka= 0.030 nf= 33 re= 0.097 mw= 3.14 f0= 3.58 st= 5.5
...
...
q0= 500.0 qa= 0.400 ka= 0.030 nf= 41 re= 0.105 mw= 3.08 f0= 4.12 st= 7.6
q0= 200.0 qa= 0.300 ka= 0.030 nf= 37 re= 0.106 mw= 3.18 f0= 5.38 st= 29.6
q0= 100.0 qa= 0.400 ka= 0.030 nf= 19 re= 0.108 mw= 3.34 f0= 4.16 st= 27.0
278 CHAPTER 21. AUTOMATIC ROUTINES IN SEISAN
q0= 100.0 qa= 0.300 ka= 0.030 nf= 13 re= 0.109 mw= 3.32 f0= 4.54 st= 28.4
q0= 100.0 qa= 0.500 ka= 0.030 nf= 20 re= 0.112 mw= 3.33 f0= 4.69 st= 30.1
q0= 50.0 qa= 0.800 ka= 0.030 nf= 13 re= 0.112 mw= 3.26 f0= 6.09 st= 58.0
q0= 100.0 qa= 0.600 ka= 0.030 nf= 25 re= 0.112 mw= 3.26 f0= 5.31 st= 32.5
q0= 50.0 qa= 0.400 ka= 0.030 nf= 4 re= 0.114 mw= 3.47 f0= 6.04 st= 51.2
Q0= 155.1 qalpha= 0.83 res= 0.096 mw= 3.22 f0= 4.31 avst= 18.4
Q0= 161.2 qalpha= 0.85 res= 0.097 mw= 3.20 f0= 4.28 avst= 16.6
Q0= 164.2 qalpha= 0.87 res= 0.097 mw= 3.19 f0= 4.26 avst= 15.4
Q0= 176.7 qalpha= 0.86 res= 0.097 mw= 3.18 f0= 4.18 avst= 14.4
Q0= 183.2 qalpha= 0.86 res= 0.097 mw= 3.18 f0= 4.16 avst= 14.2
Q0= 196.3 qalpha= 0.81 res= 0.097 mw= 3.18 f0= 4.22 avst= 14.7
Q0= 202.8 qalpha= 0.84 res= 0.097 mw= 3.16 f0= 4.10 avst= 12.7
...
...
Q0= 243.4 qalpha= 0.55 res= 0.102 mw= 3.13 f0= 4.52 avst= 14.2
Q0= 243.2 qalpha= 0.54 res= 0.102 mw= 3.13 f0= 4.54 avst= 14.2
Q0= 238.8 qalpha= 0.53 res= 0.102 mw= 3.14 f0= 4.50 avst= 14.4
Q0= 241.0 qalpha= 0.54 res= 0.102 mw= 3.13 f0= 4.47 avst= 14.0
Q0= 234.1 qalpha= 0.53 res= 0.103 mw= 3.14 f0= 4.53 avst= 15.0
Q0= 222.7 qalpha= 0.52 res= 0.103 mw= 3.15 f0= 4.52 avst= 15.9
Q0= 216.9 qalpha= 0.53 res= 0.103 mw= 3.16 f0= 4.49 avst= 16.2
Q0= 206.6 qalpha= 0.52 res= 0.104 mw= 3.17 f0= 4.51 avst= 17.3
Q0= 192.4 qalpha= 0.55 res= 0.104 mw= 3.18 f0= 4.56 avst= 19.2
Q0= 182.1 qalpha= 0.56 res= 0.105 mw= 3.18 f0= 4.58 avst= 20.0
Q0= 186.4 qalpha= 0.54 res= 0.106 mw= 3.20 f0= 4.59 avst= 20.8
It is seen that the average parameters, including residual, mw and corner frequecy now is a slowly varying
function of the average residual. It is also seen that a high Q0 and a high qalpha give a better fit than a
low q0 and a low qalpha. If some test have few good fits, they can be eliminated by usin the parameter
Min number of fits to use in average. In this example, 20 could have been used.
21.5 PLOTSPEC
1996 625 0337 31.1 L 61.687 3.283 15.0 TES 31 2.0 3.3LTES 3.0CTES 3.2LNAO
FOO S Z
Ml=3.4 A= 1425 T=0.24
f= 0.09-20.00
Mw=3.5
1996 625 0337 31.1 L 61.687 3.283 15.0 TES 31 2.0 3.3LTES 3.0CTES 3.2LNAO
SUE S Z
Ml=3.4 A= 1094 T=0.20
f= 0.49-20.00
Mw=3.3
1996 625 0337 31.1 L 61.687 3.283 15.0 TES 31 2.0 3.3LTES 3.0CTES 3.2LNAO
OSG S Z
Ml=3.5 A= 941 T=3.58
1996 625 0337 31.1 L 61.687 3.283 15.0 TES 31 2.0 3.3LTES 3.0CTES 3.2LNAO
HYA S Z
Ml=3.8 A= 1146 T=0.32
f= 0.09-20.00
Mw=3.6
f= 1.82-20.00
Mw=3.2
The first line is the header line from the S-file so it does not reflect the magnitudes calculated automatically
until an update has been made. Second line is the station and component. Third line is local magnitude
and corresponding amplitude (nm) and period(s). Fourth line the frequency interval used for the spectral
fitting and the fifth line the moment magnitude. Values that could not be determined are left blank.
The plot has room for 15 pairs of spectra/WA traces. The fitted spectrum is plotted in red and for the
WA trace, the trace between the two extremes used for the amplitude observation, is plotted in red. If
either the spectrum or the WA-trace is not used for a particular component, the corresponding part of
the plot is left blank. If there are more then 15 component plots, several pages can be plotted.
To delete a value, put the cursor in the corresponding plot square and press d. A diagonal line will appear
in plot to indicate that a value is to be deleted. When terminating the program, the user will have to
confirm the delete of all. There is no undelete option for single channels.
NOTE. Both spectral information and WA amplitudes can be deleted from the s-file with command
DELS.
PLOTSPEC is intended to be used from EEV but it will also work outside EEV by giving command
PLOTSPEC. The program will then look for the latest AUTOMAG.list in working directory and plot
spectra for the FIRST event ONLY. If AUTOMAG has been used with many events, some of the results
for the first event might have been overwritten if the same STAT-COMP is used in several events and
will not be plotted. PLOTSPEC has one optional argument which is the S-file to use.
21.5. PLOTSPEC 281
Figure 21.2: Plot using program PLOTSEC. The WA amplitude for OSG and spectral
estimate for LOF have been deleted. The automatic fits are plotted in red. This event
is found in the TEST database.
282 CHAPTER 21. AUTOMATIC ROUTINES IN SEISAN
START DATE and STOP DATE: give time interval, can be larger than data availability
WAVEOUT: Set to 1. to write out waveform files with the original data and trigger channels.
EXTRACT DURATION: Length of extraction window in seconds, used in extract.batch
PRE EVENT TIME: Time to start extract before detection time in seconds, used in extract.batch
INTERVAL: Length of data segment read at a time. The default is 60 minutes.
21.6. DETECTION PROGRAM FOR CONTINUOUS DATA, CONDET 283
DET ALGORITHM: choices for the detection algorithm are STA for squared STA/LTA, COR for corre-
lation and CAR for Carl Johnsons detection algorithm
MIN TRIG DURATION: Minimum duration the trigger level needs to be exceeded for
MIN TRIG INTERVAL: Only allow for one detection within this time, given in seconds
FILTER LOW: Low cut for bandpass filter
FILTER HIGH: High cut for bandpass filter
If DET ALGORITHM is STA:
STA LENGTH: Short term duration in seconds
LTA LENGTH: Long term duration in seconds
TRIGGER RATIO: Ratio of STA/LTA required for trigger
DETRIGGER RATIO: Ratio to detrigger
FREEZE LTA: LTA can be frozen at time STA/LTA goes above TRIGGER RATIO, 1.=to freeze
If DET ALGORITHM is CAR, see Earthworm documentation for details:
CARL RATIO
CARL QUIET
If DET ALGORITHM is COR:
CORRELATION MIN: Minimum correlation between waveforms of master event and the data required
for a trigger
MASTER WAVEFORM: Name of waveform file that is used as master event, the master event is cross-
correlated against the continuous waveform data
Network detection parameters:
NET MIN DET: Minimum of detections required from different stations with time window given by
NET WINDOW SEC: Time window for network detection in seconds. NET MAX DELT SEC: Allows
the user to specify the maximum time allowed between arrivals on two consecutive stations (in addition to
the overall time window for all arrivals given in the preexisting NET WINDOW SEC NET MIN RATIO:
Gives the minimum STA/LTA ratio to keep. This lets one use a low STA/LTA ratio in CONDET and then
to explore which STA/LTA level to reject during the much faster CONDET -NET phase. EXTRACT
DURATION: Duration(sec) of extract.
284 CHAPTER 21. AUTOMATIC ROUTINES IN SEISAN
Chapter 22
BVALUE is a program to make b-value plots using a NORDIC input file (also compact). A postscript
plot file is generated.
The questions are:
Output is now:
n m1 m2 maxl a maxl b sd lsq a lsq b cor rms bfix afix sd
52 2.0 4.0 3.25 0.68 0.46 3.77 0.93 0.93 0.14 1.0 4.02 0.16
Normalized 3.55 4.07 4.32
Normalized m1 2.19 2.21 2.32
Norm. lin. m1 154.9 162.2 208.9
! Normalized means normalized to one year (m=0), Normalized m1 (m=m1) and Norm. lin. m1 is just
285
286 CHAPTER 22. CALCULATING B-VALUE, BVALUE
0.6 1 90
0.8 3 89
1.0 6 86
1.2 6 80
1.4 7 74
1.6 4 67
1.8 11 63
2.0 8 52
2.2 11 44
2.4 6 33
2.6 7 27
2.8 5 20
3.0 4 15
3.2 7 11
3.4
Questions:
Plot(y/n)
! This will make a plot and a postscript plot file.
Note that only the last plot on screen is saved. The plot
must be sent manually to the printer.
1000
100
10
1 2 3 4
Figure 22.1: An example of a b-value plot. The bars are number of events and crosses
the accumulated number of events.
The output file bvalue.out contains the same information in the same format as shown in the example
above. The file can be used with other plotting programs to make nicer looking b-value plots. An
example is shown in Figure 22.1.
288 CHAPTER 22. CALCULATING B-VALUE, BVALUE
Chapter 23
SEISAN includes five programs for estimating the fault plane solution, FOCMEC, FPFIT, HASH (called
hash seisan),EBEL and PINV. The programs are described below, they can all be called from EEV.
Fault plane solutions can be plotted with EPIMAP (new from version 9.0), W EMAP (Windows only)
and FOC (see below).
Apart from MULPLT, polarities and amplitude ratios can be read in a more efficient way with the pro-
grams PLOTPOLARITY, AUTORATIO and PLOTRATIO.
The program GMTNOR also makes output which can be used with GMT. In EEV fault plane solutions
can be added manually to an event with commands inputfps or ifp.
23.1 FOCMEC
The program can be used to determine double couple earthquake focal mechanisms using polarities and/or
amplitude ratios for both local and global earthquakes. The program also provides an interactive graphical
display. The existing solution can be plotted without any station data or location being available, however
if existing polarities should be plotted, the event must be locatable in order to calculate angles of incidence.
Several solutions can be plotted on the same figure in order to compare solutions.
The SEISAN program FOCMEC provides the interface between the database and the program that
determines focal mechanisms, which in SEISAN is the program FOCMEC EXE. This program is written
by Arthur Snoke [Snoke et al., 1984] and distributed as part of the FOCMEC package (http://www.
geol.vt.edu/outreach/vtso/focmec). FOCMEC EXE is identical to FOCMEC in Snokes package
and can be easily upgraded (unless formats are changed). Generally the user will use FOCMEC when
working with SEISAN data, however, it is also possible to run the original version (see documentation by
Snoke: INF/focmec.pdf). Before FOCMEC EXE is started the user can optionally change the inputfile
focmec.run.
The program works with polarities and amplitude ratios. See the MULPLT section on how to read
polarities and amplitudes. Note that since amplitude ratios are used, there is no need to correct for
instrument response provided the response is the same for the different components (within 5-10 %).
289
290 CHAPTER 23. FAULT PLANE SOLUTION
Amplitude ratios are computed from amplitude readings given in the S-file. While amplitude ratios can
provide additional constraint on the solution, they should be used with caution. Ideally, the solution
should be well constrained by polarities only, and then amplitude ratios can provide confirmation of a
solution or help to select one of several equally good solutions. The principle behind the amplitude ratio
method is that the effect of geometrical spreading will cancel out when forming the amplitude ratios of
S and P waves (or SV/SH) of the same phase type, e.g. Pg and Sg. This leaves the following corrections
to be made on the amplitudes before the ratios are calculated.
Calculate angle of incidence at the station and correct for the free surface effect.
For local earthquakes, use the calculated travel time for a particular phase to correct for Q. Different
Q for P and S can be used and the frequency used is the frequency of the maximum amplitude
phase.
For distant earthquakes, correct for t . Different t for P and S can be used. The frequency used
is the frequency of the maximum amplitude phase.
Different values can be set in file FOCMEC.DEF, which can be located in DAT or working directory.
The observations to be made are:
Rotate the seismogram (if three component record) to get R and T components.
Read maximum amplitude P-phase and corresponding period on Z, phase P.
Read the maximum amplitude S-phase (same type) and corresponding period on Z, phase (SV).
Read the maximum amplitude S-phase (same type) and corresponding period on H, phase (SH).
The wave type Pg/Sg or Pn/Sn has to be given when the amplitude is read. When reading on uncorrected
seismograms, MULPLT will want a confirmation that the user wants to save uncorrected amplitudes,
since, normally, all amplitude observations in an S-file are in nm. It is possible to filter the signals
provided the same filter is used for P and S. Ideally, the amplitude observation should be made at a
frequency below the earthquake corner frequency and consequently also the filter high cut frequency
should be below the corner frequency.
It is also possible to read amplitudes on the radial component. However, SV amplitudes and phases change
rapidly around the critical angle and the amplitudes can therefore be unreliable (see INF/focmec.pdf for
details). So, although SEISAN will use the amplitudes read on the radial component, it is in general
not recommended to use them. Assuming reading on only Z and H, the following amplitude ratios are
calculated:
SV/P
23.1. FOCMEC 291
SH/P
SV/SH
In reality, the data only provides 2 independent ratios so ideally only 2 should be used. Since it is hard
to know which 2 are the most reliable, SEISAN uses all.
The most reliable amplitudes are P on Z and SH on T so if enough data is available, try not to use SV.
However, if only Z-channels are available, SV on Z has to be used.
Phase names in SEISAN used for amplitudes for FOCMEC have the names AMPG, AMSG, AMPN and
AMSN for direct and first arrival (refracted), respectively. For local earthquakes both PG and PN types
can be used while for distant earthquakes only PN types can be used.
Amplitudes (only g-phases) can be read automatically using program AUTORATIO which is implemented
in EEV with command ar. Both time domain and frequency domain amplitudes can be read and they
have different phase names from the manually determined amplitude phases names so fault plane solution
can be made with one of the kind of amplitudes. For details, see AUTORATIO program.
Any P-phase (first letter of phase name is P) with a polarity (C or D) is used, like P, Pg, PP etc. For
further processing in FOCMEC, C is labeled C if phase onset is or I and + if phase onset is E.
Correspondingly, polarity D is labeled D or -. FOCMEC can also use polarities of SV and SH, but this
has not been implemented in SEISAN.
Autimatic polarity determination
Program AUTOPHASE (command ap in EEV) read phase arrivals and polarities. In general it is not
recommened to use automatic polarities unless P-phases are very clear. See program AUTOPHASE.
Checking and modifying polarities
Once polarities and/or P-phases are stored in the S-file, the graphical program PLOTPOLARITY (EEV
command pol) can modify, add and remove polarities. See PLOTPOLARITY for more details.
Any P-phase can be used like Pn and Pg. When few polarities are available, it is an advantage to use
both Pg and Pn since these phases have different angles of incidence. Polarities associated with other
phases are not used. There is no check if a P-phase has been duplicated.
Amplitude ratios must be determined from the same wave type for example Pg and Sg and the program
will only form amplitude ratios from the same wave types. While in principle it should be possible to
use ratios determined from refracted waves, generally ratios determined only from direct waves are used
since they are easier to identify and have larger amplitudes than refracted arrivals. Particularly the Sn
is difficult to identify. This means that the amplitudes readings most often will be made within what is
considered the maximum amplitude in the Pg and Sg wave trains. However, the polarity might be read
on the first arrival which can be Pn or another refracted arrival.
292 CHAPTER 23. FAULT PLANE SOLUTION
Distant earthquakes
Polarities of any P-phase can be used (but not pP since first letter is not P ). Using amplitudes require
events with clear P and S phases and usually this means reading on broad band records. The amplitude
phase names AMPN/SN are used to indicate first arrivals.
The program makes a grid-search and finds how many polarities and amplitude ratios fit each possible
solution. All solutions with less than a given number of wrong polarities and/or amplitude ratios within
given error limits, are then written out and can be plotted. With a cursor, the user can then select the
preferred solution, which can be stored in the input file or the database. The program is intended to work
from within EEV (option F), however it can also work independently (see below). The program uses an
input file called focmec.inp (automatically generated). This is a Nordic format file. Direct waves have
angle > 90 and refracted arrivals angle < 90 degrees. If the angle is > 90, the polarity is plotted at
an azimuth+180. If the user wants to use FOCMEC as a freestanding program, the angle of incidence
information may have to be put in manually in a standard CAT-file, which is then renamed focmec.inp.
This can be done automatically by FOCMEC if a hyp.out and corresponding print.out file is available.
FOCMEC can also be used to convert angles, like dip, strike and rake to T and P-axis, simply say focmec
a, where argument a stands for angles and you will be prompted for input.
When the program runs, all amplitude information and corresponding corrections are listed. First there
is a question of which type of amplitudes to be used. In the example below, manual amplitudes are
chosen.
Number of polarities: 10
Amplitude types: Manual: 8 Automatic: 8 Spectral: 8
The abbreviations are STAT: Station code, C: Component, PH: Phase, AMP: Amplitude in count, PER:
Period in sec, TRTIME: Travel time in sec, QCOR: Log Q-correction, ANGINC: Angle of incidence at the
source, ANGEMG: Angle of emergence at the station, Fcorr: Free surface correction for this amplitude,
Az: Azimuth from the event to the station, DIST: Epicentral distance in km., Ratio type (see text),
T: indicator of ratio type, Amp1 and Amp2: The two amplitudes (count) in the ratio, Fcor is the free
surface correction in the amplitude ratio (to be multiplied with ratio) and LogRat is the logarithm of the
corrected amplitude ratio used.
Note that for station SNART, amplitudes were also read on the radial component so more then 3 ampli-
tude ratios were used.
Following, the user get the choices:
Stop (0)
Plot saved solution(s) (1)
Plot new solutions (2)
Plot selected solution (3)
Find new solutions (4)
-1, -2, -3 also plot station
1. This is the solution(s) already stored in the data base (S-file). See secetion Storing and selecting
fault plane solutions below.
2. Plotting new solution after having used option 4
3. Plotting the selected solution after using option 4
Using e.g. -1 instead of 1, also plots the stations to help identify them on the plot, see Figure 23.1
4. Starting a search for new solutions
Option 4 gives the following information and questions:
Depending on number of data values, 0-5 is a good answer. To let the program find the minimum
number of polarity errors, type -1, which is particular useful if there is a significant minimum
number of polarity errors.
Equivalent for ratios to Maximum number of polarity errors, however, error is defined by amplitude
ratio error. Number of errors depends on number of observations. For 9 observations 1-2 errors is
reasonable.
294 CHAPTER 23. FAULT PLANE SOLUTION
Give maximum allowed difference between observed and computed log amplitude ratio, default is
0.2, which often is a good value.
The program will now start the searching and write out on the screen (and in a file) the solutions which
fit the requirement of number of misfits. The maximum number of solutions is limited to 100 as a default,
or to the value defined by FOCMEC MAXSOL in SEISAN.DEF. At the end, the number of acceptable
solutions is written out as well as the minimum number of bad fits. This can then be used for the next
search. Now option 0 to 4 can be used again.
When plotting the solution with option 2, the cursor comes up. Also, the solutions will be printed in text
form to the screen, see Figure 23.1.
The abbreviations are Pol: Number of polarity errors for P, SV(not used) and SH(not used), Rat Err:
Number of ratio errors, RMS RErr: The RMS error for the ratios used, RErr (All): The RMS error for
all ratios.
The polarities and amplitude ratios can be plotted on the focal sphere using the same convention as the
original FOCMEC program, which is:
o= compression
+= emergent compression
= dilatation
-= emergent dilatation
V= amplitude ratio SV/P
S= amplitude ratio SV/SH
H= amplitude ratio SH/P
The user can select a preferred solution by moving the cursor near one of the letters T or P (T and
P axis). By pressing T, the program will find the nearest T axis (same for P and nearest P-axis) and
corresponding fault plane solution, which can be stored in the database and/or plotted with option 3. If
no solution is to be selected, press q for quit. If a solution has been selected, the user will be asked if
it is to be saved or not after selecting option 0. The saved solution goes into the focmec.out and from
there into the S-file (type F-line) in the database if FOCMEC is operated from EEV and the solutiosn
will also be written to fps.out.
When working from EEV, the event will always be located before the FOCMEC program starts up. In the
Nordic format the solution is stored simply as strike, dip, rake and number of bad polarities (3f10.1,I5).
Aki and Richards convention is used. In addition, the name FOCMEC will be written near the end of
the line to indicate that the fault plane solution was made by FOCMEC. The line type is F.
The following files are created:
focmec.dat: Input parameters to FOCMEC EXE.
focmec.log: Log of the FOCMEC EXE run.
focmec.lst: More details on solutions
focmec.out: Gives input parameters and solutions
focmec.eps: A Postscript plot file of LATEST plot
focmec.run: Run parameters for FOCMEC EXE, you can re-run FOCMEC by focmec exe focmec.run
23.2. FPFIT 295
A synthetic input can be generated for FOCMEC. The purpose is, for a given fault plane solution with
a given set of stations, to test how well correct amplitudes and polarities can be inverted to the known
fault plane solution. The procedure is: 1: Select an event with a set of observations and a fault plane
solution.
2: Write SYNTET in the F-line in S-file where method is given, using e.g. FOCMEC, this is FOCMEC,
replace with SYNTET. 3: Run FOCMEC from EEV. The synthetic polarities and amplitudes will then
be generated for the same observations as given in the S-file. These observations are normally written out
to the file focmec.dat as polarities and corrected amplitudes. The focmec.dat is then input to the original
FOCMEC. The synthetic observations are now made by correcting the focmec.dat file to the theoretical
polarities and amplitude ratios corresponding to the SYNTET fault plane solutions. The theoretical
values are therefore at the source and not affected by Q and free surface. The original observations in
the S-file are not changed. 4: Do the inversion in the normal way.
Since the theoretical values are generated by FOCMEC routines, FOCMEC should exactly return the
SYNTET solution. However depending on the number and types of observations, this might not be the
case. Before making the solution with FOCMEC, it is possible to edit the focmec.dat file to introduce
errors or remove observations in order to test the sensitivity of the solution to errors in input or insufficient
input. Vp/Vs is hardwired to 1.74 for calculating synthetics.
The same input is also used with HASH so HASH can also be tested in the same way. It is assumed
that HASH calculates amplitudes the same way as FOCMEC but this has not been tested. HASH does
not use S on Z-component and the P is assumed to be read on the R-component while SEISAN uses the
Z-component. So some differences can be expected.
Computer limitations: Total number of polarities must be less than the dimension of array DATA (pa-
rameter max data) for Nordic data (see file seidim.inc in INC directory).
Figure 23.1 shows an example of a fault plane solution calculated with FOCMEC.
23.2 FPFIT
This well known program, written by Reasenberg and Oppenheimer [1985], uses polarities to find one
or several fpss (see manual fpfit.pdf in INF). Quoting the manual Program FPFIT finds the double
couple fault plane solution (source model) that best fits a given set of observed first motion polarities
for an earthquake. The inversion is accomplished through a two stage grid search procedure that finds
the source model minimizing a normalized, weighted sum of first motion polarity discrepancies. The
weighted sum is expressed through the F-factor (0-1) given as output in S-file. A value below 0.5 is a
good fit and a value of 1.0 is means a perfect misfit. A station distribution ratio STDR is calculated.
Quoting the manual The station distribution ratio is 0.0 < STDR < 1.0. This quantity is sensitive to
the distribution of the data on the focal sphere, relative to the radiation pattern. When this ratio has
a low value (say, STDR < 0.5), then a relatively large number of the data lie near nodal planes in the
solution. Such a solution is less robust than one for which STDR > 0.5, and, consequently, should be
scrutinized closely and possibly rejected. This value is also written to the S-file. One advantage with
FPFIT compared to FOCMEC is that formal errors are estimated and usually only one solution is given.
The software is found at http://earthquake.usgs.gov/research/software/
The original program FPFIT is left unchanged except for a minor gfortran adaption. FPFIT is an
296 CHAPTER 23. FAULT PLANE SOLUTION
Figure 23.1: Top: An example of a fault plane solution plot. Symbols are explained in
the text. Bottom: A fault plane solution also showing the stations with corresponding
polarities.
23.3. HASH 297
interactive program with many options for parameters stored in a parameter file and different data input
formats can be used. In the SEISAN implementation, this has been simplified and a SEISAN driver
program FPFIT SEISAN is used. This program converts the observations to an input file in hypo71
format, fpfit.dat, makes a parameter file with preset parameters, fpfit.inp and a run file fpfit.run to run
the program. After running FPFIT SEISAN (either free standing or through EEV with command fp), it
is possible to run the original program directly with command fpfit and test different FPFIT parameters,
using fpfit.inp as a starting parameter file (default). It is then possible to interactively get information
about the different parameters. The hardwired parameters essentially use default settings, ensure the use
of all data (e.g. no magnitude-distance restrictions) with the same weigh on all data. In addition, the
following is set:
- Search in as fine a grid as the program allows, one deg for fine search.
- Search for multiple solutions, not just the best. Gives an idea of uncertainty.
Run the program: In EEV, use command fp, first solution is written to S-file. The previous solution
of FPFIT will be overwritten. FPFIT in SEISAN implementation can work with both global and local
data, while the original FPFIT only works with local data. Outside EEV. See section on composite fault
plane solution.
Output files:
fpfit.out Details of inversion. In the
FPFIT manual, this file
is called Statistical sum-
mary file
fpfit.fps The fps solution etc. In
the FPFIT manual, this
file is called Extended
hypocenter summary card
file
fpfit.pol Station and polarities
used, see FPFIT manual
fps.out The fps in SEISAN format
in a cat file
Note: There is no check if polarities are read on Z-channel but it is required that the phase is P.
23.3 HASH
This program [Hardebeck and Shearer, 2002, 2003] determines fault plane solutions using P-polarities
and amplitude ratios as input, just like the FOCMEC program. The P-amplitude used by the program
is the p
theroretical radial amplitude and thatp was obtained by reading [Hardebeck and Shearer, 2003]
AP = (A2r + A2z ) and the S-amplitude AS = (A2sv + A2sh ) where A is amplitude, r is radial (on rotated
seismogram) and z is vertical. The S used was the maximum pS on any of the rotated components or Z.
This was then compared to the theoretical amplitude AS = (A2sv + A2sh ) where sv is SV, and sh is SH.
This approximation apparently worked well. The free surface and attenuation correction is not built in,
but was replaced by a fixed factor per station, which had to be determined independently. In order to
298 CHAPTER 23. FAULT PLANE SOLUTION
simplify the input, the free surface and attenuation corrected amplitude ratios from FOCMEC are used
as input for HASH. The program was modified to use only SH and by using the free surface corrected P
on the Z-component, the true P-amplitude is used. Thus only one amplitude ratio is used for each station
(SH to P). HASH returns solutions with less than a given number of polarity errors and average amplitude
errors less than a given limit. If no solutions are found, error limits are increased and normally many
solutions are returned. Using this, an estimate of the best solution is made and likely errors calculated.
The advantage with HASH is that it finds one or a few best solutions, while for FOCMEC the user must
select one among many. Also HASH will not completely change the solution by one wrong amplitude
ratio, since the average of the amplitude errors is used as selection criteria and not a single amplitude.
FOCMEC does not give any estimate of the errors in the solution. HASH calculates an estimated error;
however that requires an input where each event has been located with e.g. 10 different likely input models
and all data is used as input in order to get estimate of fault plane solution uncertainties generated from
the model. This was not done in the SEISAN implementation so only the error estimated from the
spread in solutions is used. This might lead to smaller error estimates as compared to the original
HASH implementation. The SEISAN HASH implementation is a simplified implementation compared to
the original HASH with many parameters hardwired, see hash seisan.for for implementation details and
changes. Like FPFIT, the F-fit function is calculated (called weighted fraction of polarity misfits) and
similarly the station distribution ratio (see FPFIT). Both values are given in S-file as well as the average
amplitude error. For more information, see the HASH manual hash.pdf and FPFIT manual fpfit.pdf in
INF. The software is found at http://earthquake.usgs.gov/research/software/index.php. HASH
does not estimate errors in strike, dip and rake but errors in fault plane and auxiliary plane (degrees).
Polarities and amplitudes are picked like for FOCMEC. When running the program, the amplitudes are
corrected like for FOCMEC (actually done by FOCMEC) so the Q-correction will use the Q-relation
given in focmec.def (see FOCMEC description above). The same output, as for FOCMEC, with the
available amplitudes, their ratios and corrections will be shown and the control is the handed over to
HASH. The questions are:
Grid angle for focal mech. search, enter for def 2 Comment: Smallest is 2
Enter angle for computing mechanisms probability, def is 60 Comment. Default 60 deg. Sel.
Enter probability threshold for multiples, def is 0.1 Comment: Default 0.1 selected
Number of polarities is : 11
Number of amplitude ratios is : 5
Minimum number of polarity misfits overall : 0
Minimum average amplitude error overall : 0.13
New number of pol. misfits inc. extra is : 1
New average amp limit inc. extra : 0.23
23.3. HASH 299
Explanations of input:
The mechanism probability is the probability that the real mechanism is close to the preferred
mechanism, within angle for computing mechanisms probability where angle define close. If there
are clustered outliers, alternative solutions (or multiples) are found based on those outliers. You can
set the minimum probability for the multiples (i.e. ignore multiples with a low probability.)
Minimum number of polarity misfits overall: Minimum number of wrong polarities for anyone of
the grid points disregarding amplitude fit. This is the number of polarity errors to find a solution without
amplitudes.
Minimum average amplitude error overall: The minimum average log error for any grid point dis-
regarding errors in polarity.
New number of pol. misfits inc. extra is: The new limit for polarity errors.
New average amp limit inc. extra: Based on the above, a new amplitude ratio error limit is set.
Minimum average amplitude error for pol ok: The new error limit considering polarities within
limit.
New average amp limit is: In order to get sufficient solutions, the amplitude error limit is increased
to this value.
158.0 53.1 -156.4 7.0 3.8 0.30 0.57 0.76 FCF HASH F
39.2900 66.3900 -63.6500 0.13 2 1 FCF FOCMEC F
42.0 68.0 -62.0 7.0 5.0 3.0 0.1 0.2 FCF FPFIT A F
18.7 67.8 -63.3 4 FCF PINV F
In this example, there are 4 solutions made by the 4 programs and the solution made by FPFIT has been
selected as a prime solution with quality A. The content and format is:
300 CHAPTER 23. FAULT PLANE SOLUTION
Quality indicator: The indicator can be any character, but usually A to F is used with A as the
best. It is up to the user to manually assign a quality indicator. Events can later be selected based on
quality indicator. Programs SELECT and FOC use quality indicators. The quality indicator as well as
the selection of the prime solution can be select by command fq in eev. An example is given below:
Fault plane solutions for this event 1 180.3 55.1 -123.7 5.0 4.4 0.04 0.67 0.38 SJA HASH A 2 6.1000
48.4400 -48.0700 2 SJA FOCMEC 3 191.0 51.0 -110.0 SJA DREGER 4 185.0 48.0 -121.0 HRV CMT A
Give fps number to be prime solution, enter for no change
23.4 PINV
This program makes a preliminary best fault plane solution based on polarities and is intended as a
help to other methods of fault plane solution. The original program was written by Suetsugu and some
information is found in [Suetsugu, 1998]. A copy of this report, which also gives general information
about fault plane solutions, is available as foc.pdf at http://iisee.kenken.go.jp/lna/?mod=view\
&cid=S0-250-2007
To run the program from EEV:
Command pi will locate the current event and then start PINV (stands for P-inversion). PINV is
hardwired to use hyp.out as input file and it will use all polarities from P-phases (capital P as the first
letter). The result of the inversion is written out on the screen and in file pinv.out. The strike, dip
and rake and number of wrong polarities is also written to the S-file provided at least 5 polarities are
available, however PINV will make an inversion with any number of polarities and write the result to the
screen. In the S-file, the result is written as an OF-line giving the source of the inversion as PINV. A
new inversion will overwrite the previous solution. This means that a PINV solution will be additional
to the solution given by the F-line and therefore not considered as prime. It is also possible to directly
compare the solution to the solution obtained by FOCMEC.
To run program outside EEV.
The program can run with one or many events (composite solution). First locate event(s) with HYP,
then give command pinv and the inversion is made. All polarities in the hyp.out file are used. The result
only goes the screen, hyp.out, fps.out and pinv.out.
23.5. FAULT PLANE SOLUTION PROGRAM TO USE AND SOME ADVICE 301
Principle of operation:
Moment tensor inversion can be done most simply using amplitudes as observed on the focal sphere. In
PINV, polarities are considered to be amplitudes of +1 or -1 corresponding to compression and dilation,
respectively. This is a gross oversimplification since there will be large variation of real amplitudes over
the focal sphere. This input data of amplitudes is then inverted to get the moment tensor under the
restriction of finding a single double couple. Despite the simplification, the advantage of this method is
that it very quickly gives a best approximation to the fault plane solution. This best solution, particularly
with few data, might be just one of many possible (see FOCMEC), but it serves to give an idea of a possible
best solution and it is in general consistent with the observations [Suetsugu, 1998]. Unfortunately PINV
does not give an error estimate to judge how reliable the solution is. It is therefore not recommended
to use PINV to obtain prime fault plane solution, but rather as a help to select a solution when using
FOCMEC unless much well distributed data is available. In some cases, FOCMEC will find a solution
where all polarities fit, while PINV will get a similar solution with some polarity errors. This can be
explained by PINV using the assumption of +1 and -1 amplitudes and thus an overall fit to amplitudes
near nodal planes might be difficult. The original input to the PINV program has an option to give zero
amplitude of observations judged nodal, however in our experience it is hard to judge if a first polarity
is nodal or just has a small amplitude du to path (e.g. Pn) so this option has not be included.
An example of a run is:
There were 8 observation which all fitted. The pseudorank indicates how many parameters can be
determined in the inversion. In this case 5 since there are 8 observations. If less than 5 observations, the
pseudorank will be less than 5. The Absolute pseudorank tolerance is a measure of the fit.
In some cases due to incorrect model, the hypocenter must be fixed to a depth different from what it
locates to naturally in order to get a solution.
Note that in order to compare FOCMEC and HASH, amplitudes should only be used on Z and T since
HASH cannot use amplitude on Z. In anay case, these amplitudes are the most reliable. In HASH, the
number of solutions will depend mainly on the error limit given for the amplitude ratios. If very few
solution are found, the solution might be less reliable so increase the limit then. A few hundred solutions
is a good number. The results from two solutions can be compared with EEV command fd which
calcultes the difference it P and T orientations. It is easy to compare the solutions. Run each program
in EEV, then plot using command fo. Each solutions will be plotted in a different color, see Figure 23.3.
If doing composite solutions, use program FOC with input from fps.out.
1: Select the events to be used together in one file using e.g. SELECT or the graphical options in
EPIMAP.
2: Locate the events with HYP. There are now two output files, hyp.out and print.out available for
input to the fault plane solution programs. The fps program must be executed in the directory of
the print.out and hyp.out. Once the fault plane solution has been made, the solution is available
with the first event in hyp.out.
3: Do the fault plane solution:
4: Plot the composite fault plane solution: The solution can be plotted with command focmec o.
Only polarities will be plotted. The solution can also be plotted with plotfoc using hyp.out as
input. In thsi case no polarities are shown. The solution with the first event in hyp.out is used.
No agency is written for the composite solution. A previous solution without agency and quality is
overwritten. If all 4 programs have been used, all 4 solutions will be present in hyp.out and plotted
together. It is possible to plot stations corresponding with all polarities with program focmec. Then
type focmec and when the menu 0-4 comes up, chose -1.
The solution(s) will also be written to the cat-file fps.out in standard SEISAN format. For each
run of a program, the solutions accumulate in fps.out. This can be used to compare solutions from
23.7. MOMENT TENSOR INVERSION PROGRAM, INVRAD 303
Figure 23.2: Composite solutions using 5 events and the 3 programs FOCMEC, FPFIT
and HASH. Only polarities are used.
different programs, see FOC. The solution can also be plotted with PLOTFOC. An example of the
plot with FOCMEC is seen in Figure ??.
Finally the solutions will also be written to hyp.out and can be plotte with PLOTFOC, however in
that case only the mechanisms are shown.
NOTE: All fault plane solutions made from the different programs are accumulated in file fps.out.
Figure 23.2 shows an example using polarities from 5 events.
The original program has been slightly modified in input and output to be integrated with EEV in
SEISAN. The steps to get the fault plane solution are:
Select the event from EEV
1. Plot each trace and select preferably the first clear amplitude of the direct wave. Mark the amplitude
as usual and associate the amplitude with amplitude phases AMPG or AMSG (direct phases). This
will create a separate line with amplitude readings only. The polarity must also be indicated on
a separate phase , which must be Pg or Sg since the inversion program uses the polarity of the
amplitude. The amplitudes MUST be picked on instrument corrected traces if all instruments do
not have the same response function. At least 5 amplitudes must be selected. S phases picked
on vertical or radial components will be considered SV while S-amplitudes picked on transverse
components will be considered SH. Phases picked on NS or EW component cannot be used. If
these new phases are not to be used for location, they can be weighted out.
2. Update event with command update to make distance and azimuths available.
3. Use command INVRAD to do the inversion. This command does several things hidden for the user:
- Creates the model input file for INVRAD called invrad.mod. This file is created from the
STATION0.HYP file, either from the current directory or DAT.
- Creates the data input file for INVRAD called invrad.inp. This file is made from the current
database file (S-file) by extracting all amplitudes associated with Pg and Sg amplitudes and
converts to P, SV or SH amplitudes in microns. The depth of the event is taken from the S-file
header and the estimated error is fixed to 0.1 micron.
- Runs the INVRAD program which produces the invrad.out file
- Reads the invrad.out file to get the fault plane solutions which overwrite the current fault
plane solution in the S-file. If you do not want to get the current solution overwritten, put a
character in column 79 on the solution, see also focmec program.
Figure 23.3: Compare fault plane solutions from different programs. For explanation
of symbols, see FOCMEC.
Figure 23.4: Example of plotting many solutions. Each solution is given with number,
the fault plane solution and the quality (A-E). Up to 24 solutions can be plotted on one
page.
306 CHAPTER 23. FAULT PLANE SOLUTION
Figure 23.5: Plotting many fault plane solutions. Left: Using W EMAP. Notice that
the colors in the solutions are inverted compared to normal practice. Right: Using
EPIMAP. The data for the two plots is the same.
23.9 FOC: Plot many FPS, stress inversion and Rose diagram
Note that in SEISAN, strike of fault plane is used so the strike of the dip is strike of the fault plane+90
degrees. The output is file.oput which gives the found stress tensor and the fit to the data, for details
see Michael [1984]. The stress tensor has a corresponding slip angle, (average slip) and for each event the
difference in slip angle for the individual event and the average slip is calculated as well as the average
difference and standard deviation. When running SLICK with FOC, an input file foc.slick is made for
selected events (making the corrections to strike of slip) and the output file is foc.slick.oput. FOC also
plots the direction of maximum compressive stress s1, minimum compress stress s3 and null axis s2. In
the example below s1 has max value of 0.68 and strike and dip are 19 and 34 respectively. S3 has strike
and dip of (113, 5) and s2 (-149, 56) respectively. The average fit angle is 59 with a standard deviation
of 51, a bad fit.
For a complete stress analysis it is recommended to also do the error analysis using the complete slick
package or e.g. the program ZMAP (not a SEISAN program, uses MATLAB, found at http://www.
earthquake.ethz.ch/software/zmap/ftp). FOC writes a file which is formatted for input to ZMAP.
However doing stress analysis as implemented in SEISAN gives a good impression of the consistency of
the fault plane solutions in a particular area. It is recommended that at least 10 events are used for
inversion.
FOC program
FOC is a program doing different things with fault plane solutions given in a CAT-file: Converting data
to other formats, plotting many solutions, running the SLICK program and displaying the results, plot
P and T axis for many events and make statistics of polarities. The input is:
foc
Give input file
collect.out
Quality, ABC.., up to 5 chars, enter for all
AB Comment: Different qualities can be selected
308 CHAPTER 23. FAULT PLANE SOLUTION
Figure 23.6: Left: The position of the T-axis given by the event numbers. The triangle
is the SLICK minimum compressive stress direction and the circle is the null axis. Right:
Corresponding for P-axis and the triangle is now the maximum compressive stress direc-
tion. Top: The misfit for each event as a function of event number. This figure can also
show the cumulative misfit, see example run of FOC.
Plot all solutions selected (Y=enter/n) Comment: Analysis can be done without plotting all
N
The plot of the many fault plane solutions is seen in Figure 23.6. After plotting the fault plane solutions,
a plot comes up plotting the location of the P and T axis and the results from SLICK, see Figure 23.6.
Output files:
Foc.out: P and T axis for all events, can be used as input to make rose diagrams.
Foc events.out: The events used based on quality selection
Foc pol.out: Statistics of polarities:
Stat C D
AZ05 3 2
MESC 18 60
VIF0 5 2
MIRA 10 32
23.10. PLOTFOC, PLOTTING FAULT PLANE SOLUTION WITHOUT NEED FOR STATION INFORMTION3
VIF 44 19
LFA 52 18
PRCH 36 6
PVER 26 3
FRA0 0 2
AZ07 1 1
.
.
SET2 3 0
PSAN 1 3
Sum of maximum number of polarities 570
Sum of minimum number of polarities 158
For each station the different polarities are counted and a sum of the consistent polarities are given at
the end. Foc.zmap: Input file in format used by ZMAP, notice direction of slip is used instead of strike
of fault, see SLICK.
Foc.slick and foc.slick.oput: See SLICK.
NOTE: FOC uses the first instance of the fault plane solution found in file for a particular event.
PLOTPOLARITY takes the s-file name as input and makes a plot of P-wave onset with polarity readings
if available. The program provides an efficient way to plot and change polarities used to determine fault
plane solution. Only vertical channels of data are shown. If changes are done, the program will save, if
the user wants to, these back to the s-file. The plots can extend over several pages when there are many
traces.
PLOTPOLARITY can be started from EEV using command pol, or from the command line using either,
e.g.:
plotpolarity 09-2257-08L.S201508
to plot all vertical channel data. This is the default option when starting the program from EEV.
The program asks for some input at the startup:
This is the total window duration that will be displayed around the P arrival, which is taken from the
s-file.
This number gives the position of the P arrival within the time window as percentage of the total window.
Setting this to 0 would mean that the signal starts from the P arrival, 50 means that P will be in the
center of the window, and so on. Numbers less than 10 and greater than 90 will be reset to 10 and 90,
respectively. One typically wants enough pre-phase time to see how the signal is changing.
311
312 CHAPTER 24. PLOTTING AND CHANGING OF POLARITIES, PLOTPOLARITY
This allows to average the samples for the given time period starting the given length prior to the time
of a sample. The averaging will act as a filter without a phase response, and can be looked at for noisy
signals, best only to confirm if the signal seen on original trace is still the same when applying averaging
filter.
Next the plot comes up, and the polarities can be inspected and changed, using keys c=compression,
d=dilatation and r=remove. In case of a change, a message is written to the terminal, and the graphics
are updated. For each trace, the station name is shown together with the the phase, the polarity (empty
if not available), the distance and azimuth. The graphics are written to a Postscript file polarity.eps, an
example is given in Figure 24.1.
313
The program runs on an s-file and measures P and S amplitude in both time and frequency domain. The
measurements are done for a number of frequency bands and the results are obtained by averaging. The
results can be used with FOCMEC and HASH to determine the fault plane solution. Data windows are
selected based on the arrival time picks in the file and have a user selectable length (default 2 sec). The
program adds 20% of time as pre-phase time. AUTORATIO can convert to displacement or velocity units
and allows for filtering of the data. The user can set a maximum hypocentral distance, default is 100 km.
While the program would work with Pg/Sg or Pn/Sn, it is probably wise to work with short distances
and direct phases only. The results are written to the autoratio.nor output file in Nordic format. If called
from EEV (command ar), the results are written directly to the s-file. Another output file, autoratio.out,
lists all the amplitude readings.
The data processing steps are as follow, first for P, then S signal:
Read the complete trace, for P this is the vertical channel, for S the horizontal channels are read
and rotated into radial and transverse using the computed back azimuth
Taper and remove DC, possibly filter and convert to ground motion
The following amplitude names are used in the Nordic output file:
315
316 CHAPTER 25. MEASURING AMPLITUDE RATIOS, AUTORATIO
The following amplitude names are used in the Nordic output file:
There are thus 2 S-amplitudes and one P-amplitude and the fault plane solution program will make 3
amplitude ratios, see FOCMEC and HASH. The least reliable S is probably S on Z. The program has a
parameter s on z which can be set to not reading SV on Z. The program must then be recompiled.
NOTE: Each time the prgrom runs, all old automatic amplitudes are deleted. Manual amplitude pics are
not deleted.
Waveform inversion
Introduction
The moment tensor inversion for regional earthquakes implemented in SEISAN uses the well tested Dreger
code [Dreger, 2003].The software has been integrated into SEISAN to take advantage of all the parameters
already being part of the SEISAN data base like response, hypocenter and station parameters as well
as SEISANs ability to do instrument correction and filtering. All operations take place through EEV
including an optional search for the best hypocentral depth. A tutorial for the original Dreger software
including basic information on the principles of the software is found in INF, mt dreger.pdf.
What data to use
The program works for regional distances (up to 20003000 km) where the model can be approximated
by flat parallel layers., The inversion will generally work best for events large enough to produce low
frequency signals (f<0.1 Hz) which means surface or sometimes S-waves (at short distances or for deep
events). However theoretically there is no lower magnitude limit since the source time function is a point
source. A simple test to see if the data potentially can be used at low frequencies, is to apply a filter
0.01 to 0.1 Hz and see if there is a clear signal. A more quantitative test is to make spectral analysis of
the S and/or surface waves to observe where the signal to noise ratio approaches 1. There are examples
of inversions of small near events (m=23) with frequencies as high as 3 Hz. However, this is not what
generally can be expected to work. It is possible to use any or all of the components Z, R and T, however
the T-component is often the most important. It is recommended to use at least 4 stations with at least
6 seismograms, however that is rarely enough to get a reliable solution. Real signals are often more
complicated and of longer duration than the synthetic signals, so it is easier to fit signals with a few
simple pulses.
Use velocity or displacement
Our tests show that it does not make much difference for good data. In some cases it might be easier to
get stable velocity traces than displacement traces since the effect of the enhancement of low frequency
noise from the conversion to displacement is avoided. Whatever is selected in MULPLT is what is used
by all programs. There is a check that there is no discrepancy between the data and the Greens function
in terms of displacement and velocity.
Technical steps to do MT
319
320 CHAPTER 26. WAVEFORM INVERSION
Step 1 Select channels to analyze and write out a rotated instrument corrected data file in Helmberger
format which is used to make input files to the Dreger program. Note, that all filters used must be 4 pole
bandpass Butterworth filters, either one way or two ways. Although MULPLT can generate other filters,
they can currently not be used for MT inversion.
Make sure the event is well located and all response files are available. If doubt about depth, fix it
in S-filer header line.
Start EEV.
Plot data filtered, it is easier if filter is fixed.
Select channels desired for analysis. Select as many channels as possibly can be used. It is possible
later to deselect without going back to MULPLT. NOTE: You can only make a data set of the
channels seen on the screen! See below how to deal with many channels.
Select a time windo starting about 30 s before the first P and lasting for about 10 min, but at least
long enough to get all waves to use for analysis.
Rotate channels (if 2 horizontals), check that all channels are rotated (no back azimuths of 999).
Select filter band and plot signals instrument corrected and filtered. Start with just filtering the
signals e.g. in band 0.01 to 0.1, this gives an idea of which channels have good low frequency
signals. A good filter to use is often 0.03 to 0.1 Hz. For small events, a filter of 0.5 to 1.0 might
have to be used Inspect the signals to see if they look reasonable. E.g., the instrument corrected
amplitudes should not be very different. At this stage errors in the response files or bad data might
be detected. If so correct data and select again. A wrong response can seriously affect the solution.
When signals look ok and are displayed instrument corrected, filtered and rotated, press button
OutW, and wait for message in to right hand corner File mulplt.wav finished. The Ascii file
mulplt.wav has now been written out. It can take some time since it is an Ascii format of real
numbers (see below). In a multi-trace window there can be missing data in front of the signals and
at the end of the signals for some channels. These gaps are filled out with the DC level.
Quit MULPLT.
How to deal with many channels: By default, MULPLT shows 99 channels per screen, but this is
often reduced to a smaller number by setting parameter NCHAN PER SCREEN in MULPLT.DEF to a number
like 24. So if e.g. 100 channels are available, the data will be shown on several screens. The procedure
is then:
Select channels to use on each screen. If no channels are selected on a screen, all will be used.
When the selection is finished and if there are more channels than fitting on one screen, press N.
This will plot all channels on one screen and a file with all channels desired can be made. Pressing
N again brings back the original number of channels per screen.
At this stage, a file with possible data for analysis has been written out with the original sample rate,
instrument corrected (units nm or nm/s) and filtered. The two first letters in the component names has
been replaced by RR to indicate reprocessed data. The file can be plotted with MULPLT or from EEV
with command pd.
Step 2 Create parameters needed for MT
26.1. MOMENT TENSOR INVERSION IN SEISAN 321
The generation of the Greens function needs a series of parameters including the crustal model, which
might be the most critical input. The model used will be taken from the STATIONx.HYP file so it will
be possible to use a station file different from the default by either working in a local directory with
a local STATION0.HYP or having a STATIONx.HYP in DAT, where x corresponds to the model ID given
in the S-file. Note that a STATIONx.HYP file can contain Q and density, but often does not and then
default values are used. All parameters will be written in the S-file in the SYNT format (including extra
mt-variables), see section on synthetic seismograms and the example below. The stations selected for
analysis will be the stations given in the mulplt.wav file as made under step 1. Default values are given
for many parameters. In order to generate parameters, in EEV:
Give command mtp (p for parameter). All needed parameters are now stored in S-file as well as
parameters for the synthetic seismogram programs, since many of these parameters are the same.
An example of the parameters is given below. At this time a backup file of mulplt.wav is made
for future reference. The name is yyyy-mmdd-hrmm-ss.mulplt.wav.
Edit the S-file to change default parameters to desired values, see example below. Often a first test
can be made with the default values. By default, modeling is only done for one depth, but it is
possible to test a range of depths by editing the parameter file. It is however recommended to use
the default depth from the S-file for the initial test.
NOTE: Command mtp does not overwrite any parameters already in S-file. If a completely new set of
parameters is needed, all the old ones can be deleted in the S-file or by using command mtd.
Step 3 Generate and inspect unfiltered Greens functions.
The Greens functions should now be generated with the parameters given in S-file. In EEV:
Give command mtg (g for Greens functions). This makes Helmerger format files all.green$$$ with
all the time series Greens functions needed for the given data set and the requested depths $$$.
By default only one depth is used. This might take some time (minutes) depending on number
of points used, however the time is independent of the number of stations used. The default is to
generate a 512 point time series which by default is 512 secs long. NOTE: All previous Greens
function files are deleted before the new ones are made.
Plot the Greens functions with command pg (g for Green). It is useful to check if the Greens
functions look reasonable. NOTE: If Greens functions for several depths have been made, only
the Greens function with the largest depth can be plotted in this way (file all.green). The other
ones must be plotted directly with MULPLT outside EEV. For component codes, see Dreger docu-
mentation in SEISAN. Note that the transverse components TSS and TDS have no P-waves so they
appear to start later. Not all models and distances might produce reasonable signals, there should
at least there should be some resemblance with the data signals. Note that the signals, starting at
the origin time (read from S-file) have been time shifted with the reduction velocity to appear to
arrive at similar times. At this stage it might be decided that a different time window or sample
rate is needed. Then edit S-file and redo step 3.
Note that the all the Greens function files and the time shifted data files do not have accurate absolute
time due to time shifting.
Step 5 Make the inversion
The desired time windows from all.green$$$ are filtered by the selected filter and written out. The filtered
time shifted window from mulplt.wav are now selected, filtered by a (desired sample rate)/5 Hz antialias
filter and resampled to the desired sample rate and written out. The inversion is now performed. All this
is done in EEV. NOTE: All data files from previous inversion are deleted before the data selection.
The inversion is now done and the results given on the screen. If a range of depths have been selected,
inversion will be done for each depth and the inversion will be repeated for the depth with the best fit
so this becomes the last inversion, which can be save in S-file. A table of fit parameter (VR) and depth
is displayed together with corresponding fault plane solution. If results are good (see later), they can
optionally be saved in the S-file. Note particularly the value of Zcor which is how many samples the data
has to be shifted to fit with the Greens function.
Step 6 Check results
See Dreger documentation in INF for the explanation of the output. The variance reduction (VR) is
shown for each station as well as for all stations. A low value indicates a bad fit and a negative VR
might indicate inverted polarity. The most important check is to see how the synthetic seismograms fit
the observed seismograms.
In EEV, give command pm. The plot of overlaid seismograms is now shown. They should be similar.
Plot also with fixed scale to see the absolute difference between the traces.
The fault plane solution can be plotted (if saved in step 5) with command fo. Compare to any solution
from other sources (if given in S-file, see section 23 on fps in SEISAN).
In the above plots, the original data has been shifted corresponding to the value of Zcor. This means
that, for a positive Zcor, the last Zcor data sample on the trace has no data and is replaced by zeros.
Similarly if Zcor is negative the first Zcor samples are zero.
Judging the results
See the Dreger documentation for a discussion. Generally the variance reduction VR should be as high as
possible. A bad fit could give an unrealistic moment (and Mw) so that is also an indicator of the quality.
A good fit is not a guarantee for correct results. If e.g. the gap is large, there might not be sufficiently
different data to give a reliable solution, even if the fit is good. The quality given has been assigned by
Dreger as follows
Figure 26.1: Plot of original filtered instrument corrected data (blue) compared to the
synthetic seismograms (red). The filter used is 0.02 to 0.05 Hz. The plot is made with
a fixed scale of 30 000. Note how the T-components dominate the solution. The data
is the Dreger test data included in the SEISAN training data. Note that when plotting
a file in Helmberger format, the overlay function (see MULPLT section) is turned on
automatically for channels starting with SY.
324 CHAPTER 26. WAVEFORM INVERSION
Figure 26.2: Same data as shown in previous figure but only for station BKS. The data
is now auto scaled. The fit on all channels is quite good. Notice the small amplitude of
the radial component.
26.1. MOMENT TENSOR INVERSION IN SEISAN 325
It is necessary to check the solution against the P polarities to confirm that they generally match the
solution as wrong alignment can result in inverted solutions. However, it is not to be expected that all the
synthetic polarities fit the observed polarities since the fault plane solution from MT (measures overall
slip) might be different from fault plane solution with polarities (measures the slip of the initial rupture).
Use command fo to plot the solution together with observed polarities recorded in the S-file.
Example of a run of the inversion
Depth=8
Station Information
Station(0): PKD__.data R=122.0km AZI=137.0 W=1.000 Zcor=14
Station(1): BKS__.data R=142.0km AZI=331.0 W=1.164 Zcor=13
Station(2): CMB__.data R=171.0km AZI=34.0 W=1.402 Zcor=13
Station(3): KCC__.data R=201.0km AZI=71.0 W=1.648 Zcor=12
Mo=4.12984e+023
Mw=5.0
Strike=223 ; 130
Rake=18 ; 172
Dip=83; 72
Pdc=98
Pclvd=2
326 CHAPTER 26. WAVEFORM INVERSION
Piso=0
Station(0)=78.607796 4.95437e+010
Station(1)=82.944862 3.37622e+010
Station(2)=82.605667 1.91152e+010
Station(3)=56.903259 6.36377e+009
VAR=7.48972e+006
VR=79.39 (UNWEIGHTED)
VR=79.00 (WEIGHTED)
Var/Pdc=7.668e+004
Quality=3
New model: Delete in S-file, edit station file and run mtp. Or correct directly in S-file. However if
a new model results in new distances and azimuths, then the station lines should also be deleted
before using mtp. Similarly with the depth line if depth changes.
New depth: If location is unchanged, only change depth in parameter file and start with step 3.
New event location: Delete station lines in sfile and start with step 2.
Take out some stations: Change the ID in the first station line (the one with mt specific parameters),
e.g. write xSTATION instead of STATION. Then run inversion again, step 5.
Take out components for a station: Edit the field MT-COMP: TRZ, see below. Then run inversion
again, step 5.
Change filter: A new data selection in MULPLT must be made with the new filter and the new
filter must be written into the S-file. There is a check if filter in S-file corresponds to filter in data
file. Then continue with inversion, step 5.
Add a completely new station: Start from the beginning, this requires complete data selection and
computation of Greens functions. The simplest is to delete all parameters with mtd.
Change sample rate: Change in S-file and start from step 3 making Greens functions. Remember
to change the number of points for inversion correspondingly, that is e.g., if sample rate is doubled,
number of points must also be doubled to analyze the same length time window.
Change reduction velocity. Change in S-file and ideally start from step 3. However, starting from
step 4 gives the same result provided the time window is long enough, see also below.
Adjust time shifts: Zcor gives the number of samples the data automatically has been shifted
to correlate with the Greens function. Check how the synthetic seismograms fit the observed
26.1. MOMENT TENSOR INVERSION IN SEISAN 327
seismograms. This number can be adjusted in the s-file. The number should be Zcor plus or minus
a few data points. If zero, the automatic correlation is used. If real data is seen to the left of the
synthetics, reduce Zcor and increase if the data is to the right of the synthetics (indicated on top of
plot as Data left. -Zxor). Zcor can be positive or negative.
In general, if deleting a line with parameters, they can be regenerated by command mtp.
The most common editing in the S-file can be done with command mte in EEV. The command shows:
With this command it is possible to very quickly weight out or in a station, select components and change
zcor.
If a range of depths is used or the new mt solution is updated, the mt is written to a file named psmeca.in
that can be used to plot the mt solution with the GMT program psmeca. With the command
psmeca psmeca.in -R10/80/0/42 -JX16/-20 -Sd0.3 -Gred -P -B10f5:"Variance reduction":/1:Depth:
> mt.ps
the double couple part was plottes in figure 26.3. Using -Sm0.3 will show the mt.
Summary of mt related commands in EEV
pd Plot mulplt.wav
Influence of parameters
Filters: Try to find a filter giving a good signal to noise ratio. There can be substantially difference using
different filters.
Reduction velocity: It has little influence on the results except that Zcor changes due to relative change
in arrival times. It is normally selected to include signals before the P arrival and to include all surface
waves. Even different reduction velocity for real and Greens function data does not matter. The use of
reduction velocity only has the purpose of reducing the length of the traces by putting events close in
time. This is particularly important when using events in with a wide distance range.
Time window : The most important is that the time window includes the whole time signal to be inverted.
The time window actually used by the program will depend on how close it is to a 2n number.
The correlation is done only with 2n samples. The number of samples selected for correlation can be both
larger and smaller than the number of samples in the data file. E.g. if number of samples is between 90
and 181, 128 samples will be used and if between 182 and 362, 256 samples is used etc.
The inversion also seems to use a 2n number and there can, in a few cases, be a radical difference between
using e.g. 256 and 257 points in calculating the fit VR, but apparently not the solution itself. The default
number of samples to use is therefore 257. So if the number of samples is near a 2n number, use a number
a bit larger than 2n . This change in fit is not generally observed, in most cases VR is not affected.
Inspect the Greens function file all.green (command pd) or use MULPLT with all.green$$$ to see how
long the Green function signal is and similarly look at the data files. The time shifted data files are
STAT.data and can be plotted with MULPLT.
Sample rate: Seems to have little influence if well above the frequencies of analyzed data. One or two Hz
seems ok for data where the inversion is made for frequencies below 0.1 Hz. For 1 Hz data 48 Hz or
similar (depending on sample rate of original data).
Number of stations and components: It is often difficult to get good results with all stations and compo-
nents. Start with a few stations (even one god one) and gradually add data. Note that changing station
configuration also can change the time shift between synthetic seismograms and the data. It is important
to have as small a location gap as possible.
Zcor : Zcor is calculated by correlating the Greens functions with the data and the synthetic seismograms
might need a correction as observed from the overlay seismograms. The Zcor time shift will change
with different solutions so there is no final Zcor that will work in all cases. Small changes in Zcor can
significantly improve the results. In the worst case, Zcor might have to be large enough to reverse the
polarity of a signal or even larger if e.g. P has been correlated with S (small events at higher frequencies).
The automatic correlation is what creates most problems.
What can go wrong
Very bad fit. This can be caused by the correlation not working well, Signals might be shifted
several cycles. Try using a different time window, particularly a longer one. This can also be cause
by a bug which results in a factor 2 wrong sample rate. it is clearly seen whan comparing the
synthetics and real data. Just run again usually fixes the problem:
Crash of inversion program. This might be caused by correlation not working. Zcor for a particular
station might have a value of millions. Do not use the particular station.
Deselecting components does not always seem to work, then use all 3 component or deselect station.
The invasion does not start. Use Ctrl+c and start again.
The S-filer contains all a parameters used including the start time and duration of the data file so it
is possible to extract the same data file for the same channels again. The Greens functions must be
regenerated by command mtg. If the user does not delete the backup files (see above) the data file is
available as backup file and a question will be given if the previous data file should be used.
Running the programs independently of EEV
Once a first run has been made, the programs can be run independently of EEV using the original
parameter files. This can be an advantage if the user wants to change some of the hardwired parameters.
However, this can only be done for one depth.
FKRPROG SEISAN: The only parameters which might be tested are the group velocities. Dreger is vague
about what they should be but their values seem to have some influence on the Greens function. It is
also possible to edit other parameters independently like the model.
TDMT INVC SEISAN: The only parameter that cannot be tested through EEV is to make the analysis
window smaller than the data window. This sometime improves the results.
Running in this way, the synthetic file readable by SEISAN is not generated and cannot be updated with
the results.
Example of parameters in S-file
Most of the parameters are explained under synthetic seismograms. The new ones used only for mt and
other important ones are:
DEPTH--: The first number is start depth, the following number of depth to test and the last number is
the increment in depth. The default is one depth only. MT-NP-USE: Number of points for the inversion,
default 257. The number does not have to be 2n but it seems that, in some cases, a number a bit larger
than 2n is better than 2n or a bit smaller.
NPOINTS: Number of points in time domain used to make Greens function, default 512. This number
must be 2n .
MTSTART: Start time of data window used. MT-WINDOW: Length (s) of data window used. MT-RATE: Sample
rate to use. This rate will be used for Greens function generation and the observed data will be down-
sampled to this rate. NOTE: The rate must have value so only skipping samples in the data can be done.
So the rate 1 can nearly always be used while rate 3 rarely can be used. The time window for the Greens
function will then be NPOINTS/MT-RATE. Default 1.0 samples/s.
MT-REDVL: Reduction velocity, default 8 km/s.
MT-FILT: Filters to use for both data and Greens functions.
MTOFFSET: Offset in samples for the data relative to the Greens function. Default 0.
MT COMP: Indicate which component to be used. By default all 3 are used, but any combination can be
selected. T, R and Z can come in any order but must be within column 76:78.
Technical notes
The Dreger MT inversion essentially consists of a Greens function generation program, fkrprog (in
SEISAN called fkrprog seisan), several data manipulation programs and scripts using SAC to prepare
data for the inversion program tdmt invc (in SEISAN called tdmt invc seisan). The two key programs
have been left nearly unchanged (all changes are clearly marked in programs) while the data manipula-
tion programs mostly have been replaced by standard SEISAN functions (mostly within EEV) and one
modified Dreger program wvint9 (now called wvint seisan) so only 3 programs have been added to
SEISAN. A significant change is that Dreger uses cm as a unit while SEISAN uses nm, so software has
been changed to nm like elsewhere in SEISAN. The Dreger code has no provision for using less than 3
channels. However, undocumented information indicates that if a data channel has zeros, it is not used
and this is how it is implemented in SEISAN. In some cases it does not seem to work well, should be
investigated more. The data and Greens functions in Dregers software are using the Helmberger format,
a simple Ascii format without reference to time and channel name. SEISAN will, for simplicity use the
26.1. MOMENT TENSOR INVERSION IN SEISAN 331
same format, but it has been extended to also include channel information, absolute time and an ID of
the event being processed (the S-file name), see example below.
The two first lines are main headers. The first line has number of channels in file (format i8) and has been
extended with, filter band, number of poles and passes and S-file name. Only the number of channels is
required information for plotting. The second line gives format of data, extended with help text which in
this case is information that file is in displacement (nm). The following two lines are channel headers for
each channel. The first channel header has undocumented information. The second channel header has
number of samples in channel (i8), sample interval(s)(f10.3), undocumented and starting from column
32, the station code, channel code and start time.
The program flow in SEISAN is
Plot, rotate, filter and instrument correct signals. This generates an output file mulplt.wav. A
parameter is set in MULPLT to enables the output. This file has not been re-sampled.
Make parameters in S-file (command mtp): Parameters are selected from mulplt.wav (stations to
use, filter and whether displacement or velocity), from s-file (depth, distances and azimuths), from
station file (model) and some are hardwired. The operation takes place in EEV. At this point the
backup data file is made.
Generate the 10 Greens functions (command mtg): All old Greens functions are deleted and param-
eter files to fkrprog seisan (green.par$$$, $$$ is depth) are made from the S-file (inside EEV),
fkrprog seisan is run giving an output file with frequency domain Greens functions green.out.
This file is converted to a Greens function time domain files, all.green, with wvint seisan (mod-
ified version of original program wvint9). Since it is assumed there is no explosive component, only
8 of the 10 greens function are written out in time domain (as the original program). all.green is
in Helmberger format. Information of using displacement or velocity is read from S-file.
Make inversion (command mti). In EEV, same length time windows, one for each station, are
extracted from all.green and seisan mt.out. Names are STA.green and STA.data. The old
STA.green and sta.data are deleted first. The Greens function files are antialias filtered with a LP
filter of 4 poles at (desired sample rate)/5 Hz (not sure it is needed), re-sampled and time shifted,
all in EEV. If a channel has been deselected or not available, zeros are written out. The Greens
functions are band-pass filtered and anti alias filtered with same filters as used for the data. The
parameter file (mt inv.in) for the inversion program tdmt invc seisan is made (in EEV) and
the inversion program started from EEV. The inversion program makes an output file with signals
and synthetics (synt.out) which is converted to Helmberger format file synt seis.out in EEV.
Command pm will plot this directly in EEV. File mt inv redi.out (as the original) has details of
the results and is read by EEV to optionally get results back into the S-file.
Fkrprog seisan: The parameter file format has been changed to include station names and the s-file
name.
332 CHAPTER 26. WAVEFORM INVERSION
Tdmt invc seisan: The program has minor changes to accept new Helmberger format (it also reads
the original format). It did not work properly under Windows with more then 450 points, so memory
allocation was doubled to fix this. The plotting routine has been simplified to only write original and
synthetic seismograms.
To get correct overlay, the channels must be sorted alphabetically. MULPLT turns on sorting (normally
set in MULPLT.DEF) if the filename is synt seis.out.
The SEISAN implementation is dimensioned to max 99 stations.
26.1. MOMENT TENSOR INVERSION IN SEISAN 333
Figure 26.3: The double couple part of the moment tensor solution shown with respect
to the variance reduction at different depths. The GCMT solution is also shown with
arbitrary variance reduction. This figure was made with the GMT program psmeca, se
text.
334 CHAPTER 26. WAVEFORM INVERSION
Chapter 27
This section contains the main program CODAQ to calculate coda Q, program CODAQ AREA to sort
output from CODAQ into areal bins and a help program AVQ to average Q-relations.
Codaq
The program will calculate coda Q (hereafter called Q) for a series of events and stations at given
frequencies. On completion, the average values are calculated and a Q vs f curve is fitted to the calculated
values. The program will also plot the individual events and filtered coda windows.
The principle for calculation is the standard coda Q method, whereby a coda window is bandpass filtered,
an envelope fitted and the coda Q at the corresponding frequency calculated. The envelope is calculated
RMS value of the filtered signal using a 5 cycle window. The program used here is the one described in
Havskov et al. [1989]. The program can only operate in connection with the SEISAN format S-files. The
program can use all waveform file types accepted by SEISAN and there can be more than one waveform
file in the S-file. The program will also take advantage of the SEISAN database structure.
27.0.1 Input
The calculations are controlled by a parameter file called codaq.par and the actual event-station combi-
nations to use are given in codaq.inp. Example files are in DAT, and with the test data set and the
example files in DAT, a test run can be done. An example of a parameter file is shown below:
-------------------------------------------------------------------
start in s times and Vp/Vs ratio (optionally)
2.0
absolute start time (sec)
0
window length (sec)
20
spreading parameter
1.0
constant v in q = q0*f**v
1.0
minimum signal to noise ratio
335
336 CHAPTER 27. CALCULATION OF CODA Q, CODAQ
2
Noise window in front of signal and length of RMS noise window
15,5
minimum correlation coefficient
0.50
maximum counts to use
64000
number of frequencies and number of octaves (optional)
3
frequencies and bands (optional if octave given)
4,2
8,4
16,8
default stations(1. line) and components (2. line), 30a5
HYA ASK SUE
S Z S Z S N
-------------------------------------------------------------------
Start in s-times and Vp/Vs ratio (optinal): Normally the coda window starts at twice the S-travel time
from the origin, this factor can be varied and might be chosen differently in special cases. Note that the
S-time is calculated from the P-time so a P-time must be present. This also means that if a Pn is used,
the coda window will start at 2 times the Sn travel time, which might be substantially different from 2
times the Sg travel time. e S-time is calcualted from the P-time using and Vp/Vs = 1.78. Optionally, the
user can select an Vp/Vs ratio to be used. This parmeter is optional so parameter files prior to version
8.3 can be used.
Absolute start time: If 0.0, above parameter is used. However if different from zero, an absolute start time
relative to the origin time is used for the start of the coda window. This might be useful since different
start times (meaning different lapse times) might produce different q-values. To use this parameter, one
must be certain to choose it long enough which can be checked with the plots. If the absolute start time is
smaller than (Start in s-times) multiplied by the s travel time, the station will be skipped and a message
given.
Window length: This is the coda window length in secs. Use at least 20 secs to get stable results.
Spreading parameter: The geometrical spreading parameter used in q-fit, normally 1.0 is used.
Constant v in q = q0 f v : For all q(f ) values, q0 is calculated using a fixed v, use e.g. 1.0. This
parameter has no influence on the individual q calculations.
Minimum signal to noise ratio: In order to accept a q value for the average, the signal to noise ratio must
be above this value. The signal to noise ratio is calculated using the last tRMS ( see next parameters)
secs of the filtered coda window and the first tRMS secs of the data file window. If the data file starts
with noise or in the P signal, the s/n ratio will be in error. A reasonable value is 5.0.
Maximum counts to use: If the count value in a coda window is above this value, the window is not used.
The intention is to avoid using clipped values. From SEISAN version 7.2, there is also an automatic
checking for clipped values in addition to maximum counts.
Noise window in front of signal and length of noise window, tnoise and tRMS: The first number is the
number of seconds of noise to plot in front of the signal. In previous versions, 15 secs was hardwired,
but sometimes there was not 15 secs of noise before the P. The second number is the length of the noise
337
window used for calculation of the signal to noise ratio. This was earlier hardwired to 5 secs.
Minimum correlation coefficient: In order to use the q value in the average, the correlation coefficient
of the coda q fit must be larger than or equal to this value. NOTE. Correlation values are in reality
negative, but are always referred to as positive in the following. An acceptable value depends on the
data, try to use a value higher than 0.5 (in reality -0.5)
Number of frequencies and number of octaves: Number of frequencies to use, maximum 10, 5 is a good
number. The number of octaves for the filter can also be given, then all filters have the same bandwidth.
Frequencies and bands: The corresponding center frequencies and frequency bands. The frequency band
should increase with increasing frequency to avoid ringing. E.g. 8,4 means that the signal is filtered
between 6 and 10 Hz. It is advisable to use constant relative bandwidth filtering, to get an equal amount
of energy into each band. The relative bandwidth is defined as RBW = (fu fl )/fo where fu and fl
are upper and lower frequency limit respectively. Such a filter would be e.g. 4 1, 8 2. 16 4. The
frequency representing the energy in a particular filter band, is the geometric center frequency calculated
as fc = sqrtfu fl . Since the user probably wants to calculate coda Q at the given frequency, the normal
option (new in SEISAN7.2) is that fu and fl are calculated such that the given bandwidth (e.g. 4 Hz)
is used, but the actual fu and fl will give the specified central frequency. It is still possible to calculate
as before, where fu and fl will be exactly as specified (but the geometrical center frequency will not
correspond to specified center frequency) by giving the bandwidth as a negative number. The filter width
should be at least one octave like 2-4 and 8-16. The number of octaves can be given with number of
frequencies so then there is no need to calcule the correct bands. It is recommended to use a 1-2 octave
filter and when using the option of specifying octaves, the geometric center frequency is always used. At
ther end of the calculations, the octaves and filter bands is written out. Default stations: The stations
iand compoents that will be used if not specified in the codaq.inp file. The stations are on the first line
and the components on the second line. A maximum of 300 channels can be used. THE 2 LINES MUST
BE THERE CONTAIN AT LEAST SOME BLANK CHARACTERS, if not, stations will not be read
from codaq.inp file and the program will crash.
Use of components; Component blank: Note that the program will use the first available component for
the given station in waveform file. The compoent actually selected will be shown in output and on plot.
Component with orientation e.g. Z: First Z-channel for station is selelected.
After reading the parameter file, the program will by default use the codaq.inp file to get the event
station information. However, any other name can be used if specified interactively, see below. The
station codes can have up to 5 characters.
The codaq.inp file will consist of a series of lines each giving an event identifier (an INDEX file). An
easy way to generate the file is using the SELECT program. The file can also be generated with EEV
using the (C)opy option making a file called indexeev.out. An example, where default stations are used,
is shown below:
1 /top/seismo/seismo/REA/BER__/1992/06/16-0343-38L.S199206
3 /top/seismo/seismo/REA/BER__/1992/06/16-1311-58L.S199206
7 /top/seismo/seismo/REA/BER__/1992/06/30-1504-30L.S199206
Since the above example only uses the default stations given in codaq.par there are no stations in
the input file. Below is an example where particular stations and components have been selected with
particular events, for this to work the station line and component line in codaq.par MUST be blank.
Component lines can be blank or only with orientation.
1 /top/seismo/seismo/REA/BER__/1992/06/16-0343-38L.S199206
338 CHAPTER 27. CALCULATION OF CODA Q, CODAQ
Note that the numbers to the left originate from the index file and do not have any importance. The
long name with the directory structure, is the name of the pick file (S-file) in the database, if the S-file
is in the local directory, it can have just the event id, in this example starting with 30-....The waveform
file name is in the S-file. Following the S-file name is, (like in the parameter file), first a line with station
codes followed by a line of component codes. Like in the parameter file, if a component is not given, the
first compoent with given station name will be chosen. THE COMPONENT LINE MUST BE THERE,
EVEN IF BLANK. Since it can be quite a lot of work to generate this file manually with both stations and
components, SELECT has an option to generate it, see SELECT. SELECT is able to make an output
file with all event-station combination within a given range. However, SELECT will give incomplete
component names since not complete in S-file. It is possible to use one or three components. The file
from SELECT is called index.codaq. /indexindex.codaq
Below is an example of a codaq.inp file, where it is assumed that the S-files are the current directory.
This file can also be generated with DIRF.
16-0343-38L.S199206
HYA KMY BER ASK TRO
16-1311-58L.S199206
HYA
S E
30-1504-30L.S199206
HYA EGD
S N S E
In the above examples, all results from one run are averaged. However it can sometimes be desirable to
run several datasets and get individual results from each. There is therefore the option of running one
set of events with many different sets of stations and for each set, the reults are written out separately.
Typically in a large area, one would want to get codaq for each station or small groups of stations using
a large earthquake set. This can be done using several sets of default stations, see example below.
SUE KMY
S Z S Z
ASK
S Z
ODD1
S Z
SUE
S Z
339
In this example, the first dataset has two stations, the others only one. The summary output for each
dataset is given in file codaq.summary . An example is seen below, for abbreviations, see later:
SUE S Z KMY S Z
ntotal= 37 q0= 71 sd= 25 v= 1.19 sd= 0.14 cor= 0.99
ASK S Z
ntotal= 10 q0= 54 sd= 22 v= 1.19 sd= 0.19 cor= 0.98
ODD1 S Z
ntotal= 11 q0= 61 sd= 19 v= 1.25 sd= 0.13 cor= 0.99
SUE S Z
ntotal= 20 q0= 54 sd= 26 v= 1.27 sd= 0.19 cor= 0.98
Average coda Q is also calculated for each station or channel. The default is to calculate average for
all components for each station. The output is given in file codaq.channel and also with more details in
codaq1.out. Optionally the averages can be made for each channel if codaq is called with the argument
-c. An example of an output file with channel averages is seen below.
PIL BH Z n= 4 q10= 1066 q0=147 sd= 5 v= 0.86 sd= 0.01 cor= 1.00
PIL BH N n= 5 q10= 1012 q0= 87 sd= 25 v= 1.06 sd= 0.12 cor= 0.99
PIL BH E n= 5 q10= 995 q0= 66 sd= 9 v= 1.18 sd= 0.08 cor= 1.00
YJI BH Z n= 11 q10= 1033 q0=113 sd= 5 v= 0.96 sd= 0.03 cor= 1.00
YJI BH N n= 3 q10= 965 q0=107 sd= 33 v= 0.96 sd= 0.13 cor= 0.99
Q10 is Q at 10 Hz.
The program first reads the parameter file, default codaq.par which must be in your current directory.
It then reads the codaq.inp file with the events to analyze (also in current directory). The S-file names
given here can, as shown in the examples above, be in the database or elsewhere, e.g. in your local
directory. In the S-file, the name of the waveform file is given. If more than one waveform file is given, all
files will be searched for the specified station and component. The program will first look in the current
directory, and then in WAV and thereafter in the WAV database and other directories as given in the
SEISAN.DEF file in DAT. The program can therefore work without moving the data from the database,
however you can also move both the S- files and waveform files to your local directory. Remember that
the S-files must be updated in order to have origin time, since the program uses the origin time and P
arrival times from the S-files.
Running the program:
0: Only q is calculated
1: Q is calculated and a plot on the tek screen is shown
340 CHAPTER 27. CALCULATION OF CODA Q, CODAQ
2: Q ,
and at the same time hard copy plots are made.
3: Q is calculated and hard copy plots are made, but
no screen plot.
The program will now start to run. Alterantively, the progran can be started with arguments on the
promt line:
codaq n parameter-file data-file
or alternatively when doing channel averages
codaq -c n parameter-file data-file
and no questions are asked. n is the choice 0 to 3 above.
If no plot is chosen, one line will appear on the screen for each station used and one for each frequency.
The program will start a new page for each new event. If you are plotting on the screen, you will therefore
have to hit return to get the next plot. The screen might not have been filled out if there are few data.
All questions will appear in the text window. At the end, a summary is given, which is the same as
logged in the output file codaq.out.
The abbreviations are:
H: Focal depth
M: Magnitude
TP: P travel time
TC: Start time of coda window relative to origin time
F: Frequency
Q: Corresponding coda q, if 0 value is > 10000 or negative
S/N: Signal to noise ratio AV
Q: Average q
SD: Standard deviation for average
NT: Total number of q values at all frequencies
N: Number of q values at given frequency
q: Average of q values
1/q: q is calculated as 1/q averages, probably the best to use
f:1/q: Q values calculated using the relation derived from the 1/q aver-
ages
q = q0*f**v obtained with the average 1/q-values
cq0: Constant q0 obtained using the fixed user selected v
v: Constant v determined
cor: Correlation coefficient on determining q vs f
corr: Average correlation coefficients of individual codaq calculations
when fitting the envelope, both average and standard deviation is
given
341
If a station is not present or no P is read, a message will be given. The program will search for the first
P arrival time in the S-file. If several are present for the same station, it will use the first.
codaq.out
A file called codaq.out is generated. It contains a copy of the parameter file, one line for each event
station combination accepted by the program (correlation and s/n ratio) and the average q values. The
q values are averaged directly (indicated by q) and 1/q are averaged (indicated by 1/q). At the end are
the fits to the q = q0 f v relation. A summary of codaq.out is given in codaq1.out This relation is
calulated using the average Q-values for each frequency and each average is weighted by the number of
observations used to calculate the average.
codaq.area
Output of codaq midpoints, codaq.area. For each accepted Q value, the midpoint between the station
and the event together with the corresponding Q and frequency is saved in the file, see example below
2009 117201030 LYN BH Z 34.58 112.67 1.0 91.2 10.0 37.5 38.8
2009 117201030 LYN BH Z 34.58 112.67 2.0 223.9 10.0 37.5 38.8
2009 117201030 LYN BH Z 34.58 112.67 4.0 444.0 10.0 37.5 38.8
2009 117201030 LYN BH Z 34.58 112.67 8.0 833.4 10.0 37.5 38.8
2009 117201030 LYN BH Z 34.58 112.67 16.0 1324.1 10.0 37.5 38.8
2009 117201030 LYN BH N 34.58 112.67 1.0 132.2 10.0 37.5 38.8
2009 117201030 LYN BH N 34.58 112.67 2.0 255.3 10.0 37.5 38.8
2009 117201030 LYN BH N 34.58 112.67 4.0 374.2 10.0 37.5 38.8
2009 117201030 LYN BH N 34.58 112.67 8.0 683.0 10.0 37.5 38.8
2009 117201030 LYN BH N 34.58 112.67 16.0 1252.1 10.0 37.5 38.8
2009 117201030 LYN BH E 34.58 112.67 1.0 92.0 10.0 37.5 38.8
The content is: Event date, station code, component,lat -lon of midpoint, frequency, Q, depth, epicentral
distance and hypocentral distance. This information can be used to plot the areal variation in Q and
SEISAN provides one such program, CODAQ AREA, see below. It can also be used for statistics with
QSTAT, see below.
codaq.index
A file called codaq.index is created. This index file contains all the events accepted for calculating the
codaq values and can therefore e.g. be used for making an epicenter map of events actually used (use
collect with the index file)
codaq1.out
Output file codaq1.out contains the same output as codaq.out except there is no print out for each
event. Additionally it has the average results for each station/component.
Example of codaq.out:
AV Q SD AV Q SD AV Q SD AV Q SD
NT= 8 N= 1 N= 3 N= 3 N= 1 N=
q 288 0 320 118 520 27 1077 0
1/q 288 0 287 123 519 26 1077 0
f:1/q 206 91 333 147 537 237 867 382
Above, the one line per q calculations is showing results from different stations. Only the traces selected
(fulfilling selection criteria) are shown. The time indicated, is the start time in the waveform file for that
particular station. In general, the start time for each channel of digital data would be different. If some
data is missing, it is also show in the codaq.out file. Corr is the average correlation coefficient (with
343
standard deviation) for the data selected for that frequency. The average lapse time is the average of the
tc - values.
codaqxx.statis
Q-values at each frequency xx is given in file codaq08.statis for e.g. 8 Hz. The file can be used to plot
the results with other programs.
codaq.summary
the files give a summary of the runs, e.g.
ntotal= 1096 q0= 68 sd= 3 v= 0.95 sd= 0.02 cor= 1.00
codaq.channel
The file gives the average values for each station, see example below:
beginverbatim
LYN n= 21 q10= 622 q0= 64 sd= 4 v= 0.99 sd= 0.03 cor= 1.00 YMG n= 88 q10= 570 q0= 68 sd= 6
v= 0.92 sd= 0.04 cor= 1.00 DAX n= 16 q10= 701 q0= 78 sd= 7 v= 0.95 sd= 0.04 cor= 1.00 TIY n=
38 q10= 668 q0= 81 sd= 9 v= 0.92 sd= 0.06 cor= 0.99 XAX n= 40 q10= 605 q0= 67 sd= 10 v= 0.95
sd= 0.07 cor= 0.99 LIF n= 50 q10= 719 q0= 57 sd= 3 v= 1.10 sd= 0.03 cor= 1.00 HEYT n= 12 q10=
676 q0= 77 sd= 18 v= 0.94 sd= 0.12 cor= 0.98 KEL n= 34 q10= 666 q0= 60 sd= 6 v= 1.05 sd= 0.05
cor= 1.00 DOS n= 105 q10= 629 q0= 63 sd= 4 v= 1.00 sd= 0.04 cor= 1.00 TAG n= 24 q10= 694 q0=
73 sd= 8 v= 0.98 sd= 0.06 cor= 0.99 JIC n= 90 q10= 663 q0= 79 sd= 5 v= 0.92 sd= 0.03 cor= 1.00
SZZ n= 72 q10= 617 q0= 80 sd= 4 v= 0.89 sd= 0.03 cor= 1.00 HSH n= 114 q10= 511 q0= 78 sd= 2
v= 0.82 sd= 0.01 cor= 1.00 HZH n= 16 q10= 698 q0= 75 sd= 5 v= 0.97 sd= 0.03 cor= 1.00 JIN n= 10
q10= 706 q0= 74 sd= 6 v= 0.98 sd= 0.04 cor= 1.00 GUJ n= 12 q10= 756 q0= 71 sd= 14 v= 1.03 sd=
0.10 cor= 0.99 LIS n= 4 q10= 651 q0=125 sd= 0 v= 0.72 sd= 0.00 cor= 1.00 XIY n= 11 q10= 492 q0=
61 sd= 22 v= 0.91 sd= 0.16 cor= 0.96 YUQ n= 52 q10= 598 q0= 62 sd= 5 v= 0.98 sd= 0.04 cor= 1.00
YAY n= 81 q10= 621 q0= 66 sd= 5 v= 0.98 sd= 0.04 cor= 1.00 HMA n= 22 q10= 638 q0= 76 sd= 3
v= 0.92 sd= 0.02 cor= 1.00 endverbatim]
In the DAT directory, there is an example codaq.par and codaq.inp set up to run on PC assuming that
SEISAN has been installed under
seismo. If installed differently, edit the codaq.inp file to reflect the installation. For Unix testing,
the codaq.inp MUST be edited to reflect the installation path or the file is regenerated using EEV as
described above.
Coda window should be at least 30 seconds, minimum correlation coefficient larger than 0.6.For comparing
coda values in different regions, ALL processing parameters must be identical including lapse time.
Figure 27.1 gives an example of a codaq plot. There are no options for the codaq plots and the length of
the window is always the first 200 secs from the original trace. If origin time or coda window is outside
this 200-sec window and data is available, the program continues, but the coda window is not plotted on
the figure.
344 CHAPTER 27. CALCULATION OF CODA Q, CODAQ
HYA 95 2 6 17 0 1 H= 19 M=2.5 TP= 22.9 TC= 81.5 WIN= 15.0 START= 2.0
5983
10 20 30 40 50 60 10 20 30 40 50 60 10 20 30 40 50 60 10 20
F= 1.0 Q= 0 CO=0.26 S/N= 0 F= 2.0 Q= 197 CO=-.41 S/N= 3 F= 4.0 Q=1223 CO=-.22 S/N= 8
80 130 166
50 60 10 20 30 40 50 60 10 20 30 40 50 60 10 20 30 40
50 60 10 20 30 40
KMY 95 2 6 17 0 13 H= 19 M=2.5 TP= 15.0 TC= 53.4 WIN= 15.0 START= 2.0
13233
20 30 40 50 60 10 20 30 40 50 60 10 20 30 40 50 60 10 20 30
F= 1.0 Q= 128 CO=-.60 S/N= 0 F= 2.0 Q= 0 CO=0.59 S/N= 3 F= 4.0 Q= 558 CO=-.33 S/N= 6
232 102 334
20 30 40 50 60 10 20 30 40 50 60 10 20 30 40 50 60 10
20 30 40 50 60 10
SUE 95 2 6 17 0 23 H= 19 M=2.5 TP= 24.2 TC= 86.2 WIN= 15.0 START= 2.0
2468
30 40 50 60 10 20 30 40 50 60 10 20 30 40 50 60 10 20 30 40
F= 1.0 Q= 0 CO=0.96 S/N= 0 F= 2.0 Q= 211 CO=-.32 S/N= 2 F= 4.0 Q= 232 CO=-.67 S/N= 4
120 74 106
0 10 20 30 40 50 0 10 20 30 40 50 0 10 20 30 40 50
0 10 20 30 40 50
Figure 27.1: An example of a coda Q plot. On top is shown the original trace and
below the filtered coda windows. Note that 15 secs of noise are shown in front of the
selected filtered coda window. The first 5 secs of the noise shown is used for calculating
the S/N ratio. On each filtered plot is given F: Center frequency, Q: Q-value, zero means
no Q-value could be calculated, S/N: Signal to noise ratio.
27.1. PROGRAM CODAQ AREA 345
C:\>codaq\_area
Frequencies 1.00 2.00 4.00 8.00 12.00 16.00
Min no for grid average, min no of freq for Q0 calculation
3 4
Lattitude range and grid size
-34 -28 1
Longitude range and grid size
-71 -66 1
Number of q-data in input file 1094
Number of q-data inside grid 560
Part of areal output file coda area.out showing the lat-lon bins, note the midpoint of the bin is used:
freq= 1.0000000
-70.5 -69.5 -68.5 -67.5 -66.5
-28.5 0 0 0 49 48
-29.5 0 0 88 0 0
-30.5 0 0 42 0 0
-31.5 0 0 61 0 0
-32.5 0 57 55 0 0
-33.5 0 0 67 0 0
freq= 2.0000000
-70.5 -69.5 -68.5 -67.5 -66.5
-28.5 0 0 0 120 117
346 CHAPTER 27. CALCULATION OF CODA Q, CODAQ
-29.5 0 0 115 0 0
-30.5 0 0 131 0 0
-31.5 0 0 111 0 0
-32.5 0 110 145 0 0
-33.5 0 0 0 0 0
In addition, Q0 is also calculated in the gridpoints for a fixed Qalpha. The fixed Qalpha is taken from
the average value for the whole area as given in file codaq1.out. The intention with this output is to get
a more smooth picture of Q0 when Qalpha is not allowed to vary.
Output file codaq grid.out contains details of the averages in each bin see part of file below:
freq= 1.0000000
-33.500 -70.500 0.0 0.0 0
-33.500 -69.500 0.0 0.0 1
-33.500 -68.500 67.1 20.6 8
-33.500 -67.500 0.0 0.0 0
-33.500 -66.500 0.0 0.0 0
The output is: Bin midpoint, average Q, standard deviation in average and number of points in bin.
Figure 27.2: The top plot shows Coda Q as a function of epicentral distance and the
bottom plot shows the distribution of individual Q-values for each frequency.
348 CHAPTER 27. CALCULATION OF CODA Q, CODAQ
C:\seismo\wor>avq
File name, enter for automag_grid.out
input.txt
Q0,alpha,n 100.000000 0.500000000 100
Q0,alpha,n 150.000000 0.300000012 50
Q0,alpha,n 200.000000 0.200000003 10
Q0,alpha,n 170.000000 0.400000006 22
Q0,alpha,n 250.000000 0.150000006 5
Q0,alpha,n 80.0000000 0.800000012 10
Number of curves to average: 6
Running average over how many, enter for average of all?
Figure 27.3: Figure AVQ: The figure shows the Q-relations to be averaged and the
average Q-relation (red).
350 CHAPTER 27. CALCULATION OF CODA Q, CODAQ
Chapter 28
The programs described in this chapter are used for merging events in SEISAN as well as for comparing
two catalogs.
The program will check if two events are close together in time and merge the events if requested. This
is partly an alternative to use append in EEV. The program asks for maximum time difference between
events to associate. The user will then be asked if events should be physically associated or not. The
program is useful when merging a large number of events. The program has two alternatives for merging:
1. Merge events in same data base: One event is compared to the next event in the same data base.
If they are close enough in time, the two events are merged and the program moves on to the next
event. If 3 events are close in time, only the 2 first are merged. In order to also merge the third,
the program has to be run again.
2. Merge events from a file into the data base: This option makes it possible to merge from another
data base (use SELECT or COLLECT to create a file) without first completely mixing the two. The
event from the file will be merged with as many files from the data base as fit the time difference
criteria. So e.g. 2 events from the data base can both get the same event from the file included.
At the end of the run, two files are output (associ rest.out associ merg.out) with events which were
not merged and merged respectively. These can then be put into another data base with split, if
desired. This function can also be used to separate the input file in two files.
Note: When merging within one data base, the first event will get the next one merged into it. If
merging from file into a data base, the event in the data base will by default always be the first and
keep the main header. This thus a safe method when you want to keep the main header uncheged
in the data base. Optionally you can decide to always put the header from the file first.
351
352 CHAPTER 28. MERGE EVENTS IN SEISAN AND COMPARE CATALOGS
KEYWORD............Comments.............Par 1.....Par 2
MAGNITUDE_ORDER LBER
MAGNITUDE_ORDER LNAO
In this example, LBER (local magnitude calculated by BER) is first chosen, if not there, LNAO and if
not there either, the first magnitude found in file. If no order is given in SEISAN.DEF, the magnitude
used will be the first found for the event, irrespective of type or agency. It is possible to leave either
magnitude or agency blank in which case the blank represents a wildcard.
Potentially all events can be a main shock so all combinations, within the time limit, will be searched.
However, one an event has been selected to be a duplicate, it cannot be used again for either main shock
or duplicate.
Input:
A SEISAN data base. The data base is not modified by ASSO.
Output:
All duplicate events will be merged with the Main event. The largest event will be listed first. The
output file with merged events is in asso.out. Optionally, a debug output can be made, either on screen
or in a file (see asso.def). An example is seen below
Each potential main (Main) event is listed. To be considered potential main event, it must have both
location and magnitude. If a duplicate event is found (Asso), it is shown with the parameters: M: The
interpolated maximum magnitude difference used, T: The interpolated maximum time difference (sec)
used and the actual time difference(sec), D: The interpolated maximum distance (km) used and the
actual distance. In the above example, the lower magnitude difference limit for the first associated shown
is 0.7, the limit in distance is 38 km and in time difference 46 sec. The Main event is listed first, then
all associated events so the list as shown above might not be in chronological order if there is an event
within the accepted time range which do not fulfill the other criteria. In the above example, the Main
event (1996 6 3 1955 35.7) has been merged with the 2 following events shown. But in between there is
event (1996 6 3 1955 39.4 47.9 153.2 0.1 5.6 bPDE) which has a too large magnitude to be merged with
the Main event, so this will then appear out of order and will be a potential new Main event. Once an
event has been merged with a Main event, it will not be merged with another Main event.
Merging across day boundaries: This usually does not create problems. If the first event is before midnight
and the second event after midnight, phase readings from the second event might have 24 h added if the
readings are from the second day. However in some cases, ASSO will select the first event after midnight
and the second event before midnight due to the magnitude size. In this case the header cannot refer to
the earlier phase times since they cannot be negative and the phases for the second event are not merged.
A message will be given.
Example of a asso.def file
This file is parameter file for asso. The file can be in working directory
or DAT.
Only the lines with recognized keywords and a non blank field
under Par 1 will be read. The comments have no importance. Lines with
keywords MAGS MDIF DIST TIME must come grouped
together in increasing magnitude order. Parameters for these lines are:
Reference magnitude, minimum magnitude difference of corresponding
event to merge, distance(km) and time(sec).
All number must be real numbers. Columns Par 1-Par 4 start in
columns 41,51,61 and 71 respectively.
All keywords in capital letters.
"Hypocentral" distance is calculated assuming main shock is at depth h1
and associated event at depth h2, epicentral distance at dist so
hypocentral distance is = sqrt(dist*dist+(h2-h1)*(h2-h1)).
If and event has no depth (field is blank), the depth is set tp 20 km.
differences.
The MAX DEPT DIFFERENCE will consider only events with a depth
difference less than MAX DEPT DIFFERENCE as possible associated events.
MAGS MDIF DIST TIME Mag. dep. par. 2.5 0.5 19.5 6.0
MAGS MDIF DIST TIME Mag. dep. par. 3.0 0.5 22.5 10.0
MAGS MDIF DIST TIME Mag. dep. par. 3.5 0.6 26.0 22.0
MAGS MDIF DIST TIME Mag. dep. par. 4.0 0.6 30.0 30.0
MAGS MDIF DIST TIME Mag. dep. par. 4.5 0.7 35.0 40.0
MAGS MDIF DIST TIME Mag. dep. par. 5.0 0.7 40.0 50.0
MAGS MDIF DIST TIME Mag. dep. par. 5.5 0.8 47.0 60.0
MAGS MDIF DIST TIME Mag. dep. par. 6.0 0.8 54.0 70.0
MAGS MDIF DIST TIME Mag. dep. par. 6.5 0.9 61.0 75.0
MAGS MDIF DIST TIME Mag. dep. par. 7.0 0.9 70.0 80.0
MAGS MDIF DIST TIME Mag. dep. par. 7.5 1.0 81.0 90.0
MAGS MDIF DIST TIME Mag. dep. par. 8.0 1.0 94.0 90.0
MAGS MDIF DIST TIME Mag. dep. par. 8.5 1.0 110.0 100.0
Event association, for example search for events present in both catalogues and display them side
by side (or to select only events exclusive to one of the catalogues)
Merging information in two catalogues, for example to create a catalogue with Mw and focal
mechanisms taken from one catalog (e.g. globalCMT), and hypocenter from another catalogue
(e.g. one based on local network relocation).
Comparison, i.e. generate output suitable for making histograms or map view comparisons of the
locations in two catalogues, or calculate bias vectors between two catalogues.
Reads two CAT Files or Sfiles in nordic format and associates events,
merging the information and respective files. Merged events have information
from both files interspersed. Both files must be sorted. Also each event
of the first set can only be associated with at most one event of the second set,
and vice versa.
DBASE If cat1 is three to five letters long and a file of the same
name does not exist the corresponding catalogues is created on
the fly from the S-files in the respectiv database. If the code
DBASE or D is used, use the current database
Options:
Method of association:
-D can be combined with -T but cannot be used on its own (both conditions need to be fulfilled)
It also cannot be used with -I option
Output control
-S=A Output only events in A (only makes sense when combined with -b or -B option)
-S=B Ouptut only events in B
-S=~A Output only events not in A (i.e. only in B, only makes sense with -B option)
-S=~B Output only events not in B (i.e. only in A, only makes sense with -A option)
-b=1,2,m For associated events, take all header lines of the type listed from second
set, all other headerlines from first set (implies -A). If the second set
does not have the required headerline, they will not be included in the output
(i.e., specified header lines will never be taken from first set if there is
an event association)
1...9,F,E,I,H : the corresponding header lines (Note that line type 4 refers
to phase pick lines, even if they have a blank in column 80
o: : Origin time (from type 1 line only)
e: : Epicentral coordinates (from type 1 only)
d: : Depth (from type 1 line only)
m : copy all magnitude information into header line
mW,mL,mb,mS : only copy designated magnitudes (note that magnitudes are copied
into the same slot unless option -M is set
-a=1,2,.. Like -b, but copy information from first set to 2nd set, implies -B (not
implemented yet)
-m=1,2,.. Like -b, but add header lines to existing header lines, effectively merging
the information in both files. Other header lines are taken from A (implies -A).
-M Find named slot for copied magnitudes (only relevant if -b={mW,ML,mb,mS} is set
Both type and agency need to match; otherwise the first empty slot is occupied, or
the last slot is overwritten)
Input file
Confidence covscale
68% 1.0
90% 2.71 [ Value for NEIC and JHD Oxford ]
95.4% 4.0
99% 6.63
99.73% 9.00
Examples
mW set, then the focal mechanism and magnitude information from cmt.nor is combined with all
other parameters from local.nor. The -M option forces the mW magnitude to be entered into an
empty magnitude slot if available (association requires a time-difference of less than 10 s).
3. merge_seisan.pl -T=10 -i -d=gmt global.nor local.nor > lines.xy produces a multi-segment
file suitable as input to gmt command psxy with -m option which will then draw the line connecting
the epicentres of associated events in the two catalogues.
4. merge_seisan.pl -T=10 -i -d=xyz global.nor local.nor > bias.xyz produces a file suitable
for plotting a histogram of the difference between locations in both catalogues.
5. merge_seisan.pl -T=10 -i -d=bias global.nor local.nor > lines.xy works out the mean
shift between events that are present in both catalogues (see usage information above for explanation
of output format).
c:\seismo\wor>compare\_hyp
Give input file 1, the reference
eev.out
2016 721 1517 46.7 D 41.340 44.040 5.0F SC3 20 1.5 4.2LSC3 5.7BSC3 4.3bSC3
28.4. COMPARE HYP, COMPARE HYPOCENTERS OF TWO CAT-FILES 359
4:00: 4.0
km
28
3:30: 3.5
23
Earthquake Depth
3:00: 3.0
18
2:30: 2.5
13 2:00: 2.0
8 1:30: 1.5
3 1:00: 1.0
94:30: 95:00: 95:30: 96:00: 96:30: 97:00: 97:30: 0 20 40
0
20
40
Figure 28.1: (Left) Histogram of the offsets between locations in the GCMT catalogue
and a catalogue based on an OBS/land deployment offshore Nortern Sumatra [Tilmann
et al., 2010], generated using the -d=xyz option and GMT pshistogram. (Right) Map and
cross-sectional views. Large rimmed circles are events in the local catalogue, and small
borderless circles are locations in the GCMT catalogue. Lines connect associated events
(drawn using -d=gmtd option and GMT psxy). The red arrow points in the direction
of the average shift between CMT and local locations, with the little red circle showing
the formal uncertainty of the average shift vector (generated using -d=bias option and
GMT psvelo). Its absolute size is only meaningful if the formal errors of the contributing
locations are all realistic. The plots show the tendency of CMT centroids in subduction
zones to be located seaward off and deeper than their actual location.
360 CHAPTER 28. MERGE EVENTS IN SEISAN AND COMPARE CATALOGS
2016 721 1628 47.7 D -23.860-175.560 10.0F SC3 43 1.9 6.0LSC3 5.8BSC3 5.3bSC3
2016 721 23 9 3.5 D 40.780-124.070 10.0F SC3 33 2.0 4.9LSC3 4.9BSC3 4.7bSC3
2016 722 040 26.3 D 39.360 25.970 7.0 SC3 34 1.4 3.1LSC3 3.0SSC3
2016 722 1131 49.5 D 19.900 120.900 10.0FSSC3 17 1.8 5.1BSC3 4.7bSC3
2016 722 2140 10.2 D 42.400 35.210 23.0 SC3 49 1.0 4.4LSC3 3.9SSC3 4.6BSC3
2016 722 2344 57.8 D 36.940 26.680 8.0 SC3 15 1.0 2.7LSC3
2016 723 1 0 20.0 D 47.680 147.050395.0 SC3214 1.0 6.9LSC3 5.7BSC3 5.7bSC3
2016 723 226 20.3 D -7.410 128.920132.0 SC3 19 1.1 5.4LSC3 5.3BSC3 5.0bSC3
2016 723 252 12.1 D 30.140 142.110 61.0 SC3 14 0.7 4.9LSC3 4.9BSC3 4.8bSC3
2016 723 741 45.1 D -6.710 101.270 10.0F SC3 83 1.5 6.0LSC3 5.8BSC3 5.3bSC3
End of s-file
Give input file 2, the file to compare
hyp.out
2016 721 1517 46.5 D 41.342 44.053 5.0F SC3 20 1.6 4.2LSC3 4.6bSC3
2016 721 1628 47.6 D -23.873-175.548 10.0F SC3 43 1.8 6.1LSC3 5.2bSC3 5.9BSC3
2016 721 2309 3.2 D 40.770-124.070 10.0F SC3 33 2.0 4.9LSC3 5.0bSC3 5.1BSC3
2016 722 0040 27.1 D 39.365 25.988 7.3 SC3 25 1.4 3.0LSC3
2016 722 1131 49.4 D 19.911 120.895 10.0FSSC3 17 1.7 4.7bSC3 5.3BSC3
2016 722 2140 11.9 D 42.343 35.206 22.2 SC3 42 1.3 4.4LSC3-4.1SSC3
2016 722 2344 58.5 D 36.951 26.683 10.5 SC3 13 0.9 2.7LSC3
2016 723 0100 19.3 D 47.772 147.040385.8 SC3214 0.8 7.3LSC3 5.4bSC3 5.6BSC3
2016 723 0226 20.3 D -7.409 128.924135.3 SC3 19 1.1 5.6LSC3 4.8bSC3 5.0BSC3
2016 723 0252 12.1 D 30.140 142.097 61.9 SC3 14 0.7 5.1LSC3 4.4bSC3 4.9BSC3
2016 723 0741 45.1 D -6.701 101.262 10.0F SC3 83 1.5 6.1LSC3 5.2bSC3 5.9BSC3
End of s-file
All the input headers are listed for the two files and at the end a summary of the differences is given. In
the example above, note that there were 11 events. Five events had fixed depth so only 6 were used for
depth comparison. Also note that not all events had all the magnitude types. This example is comparing
locations done with SeisComp3 and SEISAN. Below is shown the output file.
For each event, the difference in value is shown. Note that the difference value has a star behind it if it
exceeds the user specified values. The event numbers are also listed.
362 CHAPTER 28. MERGE EVENTS IN SEISAN AND COMPARE CATALOGS
Chapter 29
BOUCH and BOUSEI, HERRMANN and HERRSEI and WKBJ are all programs which is used for
generating synthetic seismograms.
The full wave modeling programs are written by Bouchon and Herrmann, and for WKBJ, Chapman and
Valerie Maupin. Valerie Maupin has integrated WKBJ for SEISAN and written the routines that makes
it possible to use specific phases. She has also made many improvements in the original installation of
BOUCH and HERRMANN and written a large part of this chapter.
Bouchon:
The Bouchon program is somewhat modified for SEISAN. The theory, which is quite straight forward, is
given in a series of papers (e.g. Bouchon [1981]). It is based on a discrete wave number representation
of the wave fields. Basically, the source is repeated periodically in space, so that integration over the
k-domain is replaced by a series. This implies that the periodicity of the source, L (in km), should be
large enough so that the information from fictitious sources does not arrive during the time interval of
interest. Roughly r < L/2, sqrt((L-r)**2+Z**2) > Vp*t where r is the epicentral distance and Vp is the
highest P-wave velocity of the model, t is the travel time and Z the hypocentral depth. Only layered
(horizontal, parallel) earth model is used. The earthquake source cannot be in the bottom layer or at the
surface.
There are 2 programs, BOUCH and BOUSEI. BOUCH computes the frequency response given the model,
the source depth, the focal mechanism, the receiver locations and the orientations of the two horizontal
components. BOUSEI takes the output file from BOUCH, multiplies it by the source spectrum and
uses an FFT to get the synthetic ground motion (displacement, velocity or acceleration). The user must
provide the source function (see below) and the original waveform files must be available in WAV or
working directory if a file containing both real and synthetic signal is to be generated. Otherwise, only
synthetic data will be seen in the output file.
Herrmann:
The Herrmann programs HERRMANN and HERSEI work the same way as BOUCHON and BOUSEI
respectively. The major difference is that once HERRMANN has been executed, HERSEI can be executed
with different fault plane solutions to obtain the time series, while for the Bouchon programs, both
programs must be run again. The Herrmann programs are thus faster for testing many different fault
plane solutions.
The description in the following is for the Bouchon programs, but the steps are the same for HERRMANN.
363
364 CHAPTER 29. MAKING SYNTHETIC SEISMOGRAMS
WKBJ:
As opposed to the seismograms calculated with the Bouchon and Herrmann programs, the WKBJ
synthetic seismograms contain only the number of phases selected by the user. The execution time for
one run of the program is very short. In addition to making the synthetic seismograms, the program
calculates the arrival times of these phases, and write them both on the screen and in the iasp.out file
for later plotting (see MULPLT). This is intended to be a tool to help identify phases on the data or on
the Herrmann or Bouchon synthetic seismograms: it can by no means replace these two programs, which
are much better than WKBJ to model the frequency-dependent character of crustal phases at regional
distance.
WKBJ seismograms have been introduced in seismology by Chapman [1978]. More details on the method
can be found in Dey-Sarkar and Chapman [1978] and in Chapman and Orcutt [1985]. The core of the
present program is a code written by Chapman et al. [1988] and is part of the seismological software dis-
tributed freely by IASPEI. The synthetic seismograms are given in displacement. Although their spectra
contain low frequencies, one should bear in mind that they represent a high-frequency approximation
of the wave field. They include a number of non-physical phases due to truncation of the integrals in
slowness p. For the most interesting crustal phases, the epicentral distance is usually much larger than
the source depth, and these phases interfere with the physical phases and modify their amplitudes.
The head waves on an interface appear automatically as a by-product of the reflected phases, as soon
as the epicentral distance is larger than critical. That means for example that the Pn phase appears
automatically on the synthetic seismogram as a by-product of the PmP phase. In order to synthesize or
calculate the arrival time of a Pn or Sn phase, you must then specify PmP or SmS (see below).
For a receiver at the free surface, the synthetic seismograms must include the free surface reflection
coefficient to yield correct amplitude and waveform for the different phases. For S phases, at epicentral
distances larger than critical, this includes automatically the SP phase (a P phase which propagates
horizontally along the free surface, and which originates from the critical conversion of S to P at the free
surface). The critical distance is of the order of the source depth for the Sg phase, and its SP phase usually
appears as a large arrival between the P and S wave. The SP phases are physical, but the amplitude of
their high frequency part is overestimated with WKBJ. If one wishes to suppress them from the synthetic
seismograms, one may optionally do so. With this option, the surface reflection coefficient is omitted and
the synthetic seismograms contain only the upgoing wavefield, that is the wavefield one would get in a
borehole, after filtering out the downgoing wavefield. Let us note that this option may strongly modify
the amplitudes and waveforms of the different phases compared with those at the free surface.
In addition to the synthetic seismograms, the program calculates the arrival times of the phases you have
specified, and write them in the iasp.out file. These times are calculated by interpolation in epicentral
distance of the values tabulated in wkbj.tab. For sources close to an interface (in practice for Pg and Sg
phases and the source under an interface), there is a limited epicentral distance range in which an arrival
time can be calculated. For example, the maximum epicentral distance for Pg is about 250km for a source
0.1 km under Moho in the default SEISAN model. In order to increase the maximal epicentral distance,
you may move the source away from the interface, or you may increase the number of ray parameters
used in program wkbj or.for (parameter nnpp) called from wkbj.for.
All three programs are hardwired to use triangular sources.
Running the programs
The programs require input about distances, azimuths, depth, crustal model, fault plane solution, time
window, number of points and some modeling parameters. Almost all of these parameters are available
within SEISAN. The programs have therefore been modified to use an S-file (Nordic format) as input file
with additional information about time window, number of points to model and crustal model. A special
365
format has been used to keep the modeling information separate from other information in the file (see
below for an example). The steps to model a particular event are as follows:
Problem Bouchon: Use fewer layers, ideally just a halfspace under the deepest ray. The programs seems
to become unstable if too many layer are used there.
Step 1
Edit the event in EEV and mark the stations wanted for modeling with a minuscule s in column 1, ONLY
mark the station once. Exit from editor and, within EEV, give the command synt. This will generate
all the necessary default input parameters for modeling, which are stored as comment-lines starting with
SYNT in the S-file (see below). At the same time, the ss used as markers are removed. Any old modeling
information present will remain and override the defaults.However, in case the F-flag is set for the DEPTH
parameter, distances and azimuths will be reset according to the current location.
Step 2
Edit event again and check if default parameters are ok (see explanation below).
Step 3
Run one of the programs BOUCH, HERRMANN or WKBJ. These are known commands in EEV.
BOUCH: The program will now run for a certain amount of time depending on number of points re-
quired. At the standard output, the input parameters used will be printed out and for each frequency,
the number of terms in wave number integration is printed out. If the limit of the number of terms is
reached, something is wrong, try other parameters. The limit is 2. BOUPAR parameter, currently set
at default value of 2000. The speed of this output (NPOINT/2+1 lines) gives a good indication of how
long time it will take.
HERRMANN: Takes longer than BOUCH.
WKBJ: Very fast.
Step 4
Generate the seismograms. BOUCH: Use program BOUSEI. The program is interactively asking the
seismogram type (displacement, velocity or acceleration). BOUSEI will generate a file bousei.out in
SEISAN format containing both original and synthetic traces. The number of traces is determined by
the specifications for each station, see below. Output file is bousei.out.
HERRMANN: Use program HERSEI, similar to BOUSEI. Output file is hersei.out.
WKBJ: The first command WKBJ also makes the seismograms. Output file is wkbjsei.out.
In all cases it is possible to shift the original trace relative to the synthetic trace and the program will
ask, for each channel, how much it should be shifted. A positive value shifts the real trace up in time
(to the left). The default is to shift the trace the amount of the P-travel time residual of the first P
found in the S-file for that station in order to line up the P - phases. NOTE: These phases MUST be the
same phase types in order to be lined up. If the first modeled phase is Pn and the first observed phase
given in the S-file is Pg, there will be a no alignment. The amplitudes for Bouchon are in nm, nm/sec or
nm/sec*sec (hopefully !!) assuming a seismic moment of 10 **22 dyne-cm. The output file will normally
contain both the original and synthetic traces. However, if no waveform file is available (in local or WAV
directory), the output file will contain an empty channel where the original data should have been. The
specifications in the hyp.out file determine which traces from the modeled stations are included in the
output file. If the specification after STATION is only component (e.g. S), then all 3 channels are shown.
If a particular channel is given (e.g. S N), then only that channel is shown. Only one or 3 channels can
be displayed.
All output traces are given in Z, N and E or Z, R and T depending on the parameter file (see below).
The channel names are SH, SB and SW for Herrmann, Bouchon and WKBJ respectively.
Step 5
366 CHAPTER 29. MAKING SYNTHETIC SEISMOGRAMS
Plot the traces with mulplt. This can be done within EEV using the command pw, ph or pb for WKBJ,
Herrmann or Bouchon respectively. Since there is no instrument correction, it is a good idea to plot both
the modeled and observed signals narrow band pass filtered. E.g. for regional events 0.1-1 Hz and for
small local events 2- 5 Hz (depending on sample rate).
shows an example of the modeling.
Note: The whole modeling process can be done entirely within EEV and it is intended to be done so.
Since the modeling requires updated distances, depths etc when changing model etc, it cannot take its
input from the location in the S-file, which only changes when doing an update (see UPDATE program).
So when running from within EEV, a location will always be done first to get an updated S-file (in this
case the hyp.out file) and this is the reason that the modelling programs use the hyp.out file instead of
the S-file for input. This also means that the modeling program can be run separately from any hyp.out
file, however it is then up to the user to keep it updated.
The modeling parameters
Below is shown an example of part of an S-file prepared for modeling. The file is one of the events in the
test data set and by using EEV to find the event, modeling can start immediately. All parameters have
been set automatically.
1996 6 7 1325 29.1 L* 59.841 5.127 12.0F BER 12 1.1 2.2CBER 1.9LBER 2.0LNAO1
1996 6 7 1325 29.1 L* BER 2.0WBER 1
8.3 41.0 74.7 1 F
1996-06-07-1324-51S.TEST__009 6
535 SOUTHERN NORWAY 3
depth fixed to 12 km, rms lowest with near station (less than 110 km) location3
fault plane solution ok within 10 deg 3
SYNT: MODEL--: THICK VP VS DENS QP QS 3
SYNT: MODEL--: 12.000 6.200 3.563 2.600 0.000 0.000 3
SYNT: MODEL--: 11.000 6.600 3.793 2.800 0.000 0.000 3
SYNT: MODEL--: 8.000 7.100 4.080 3.000 0.000 0.000 B 3
SYNT: MODEL--: 19.000 8.050 4.626 3.200 0.000 0.000 N 3
SYNT: MODEL--: 30.000 8.250 4.741 3.400 0.000 0.000 3
SYNT: MODEL--: 50.000 8.500 4.885 3.600 0.000 0.000 3
SYNT: ST-D-RK: 8.3 41.0 74.7 3
SYNT: DEPTH--: 12.0 3
SYNT: NPOINTS: 512 3
SYNT: TIMES--: TOTAL 60.000 INITIAL 0.000 SY-TRACE 60.000 3
SYNT: BOUPAR-: 800.0 2000 0.010 3
SYNT: PHASES-: Pg Sg PmP SmS SmP 3
SYNT: DT-Tsou: 0.050 .100 3
SYNT: REDVELO: 0.0000 3
SYNT: COMPON-: RADIAL 3
SYNT: STAT-AT: no 3
SYNT: NSTAT--: 3------------------------------------------------------3
SYNT: NEW STAT:---------------------------------------------------------------3
SYNT: STATION: EGD S Z DISTANC: 49.0 3
SYNT: STATION: EGD AZIMUTH: 9.0 BAZIMUTH: 189.2 3
SYNT: NEW STAT:---------------------------------------------------------------3
SYNT: STATION: KMY S Z DISTANC: 71.0 3
SYNT: STATION: KMY AZIMUTH: 172.0 BAZIMUTH: 352.7 3
367
MODEL: The model to be used. THICK is layer thickness, VP is Vp velocity, VS is Vs velocity, DENS
is density and QP and QS, are P and S q-values respectively. The model, velocities and Q-values are
taken from the STATION0.HYP file with first choice from current directory and second choice from DAT
directory (like the HYP program). The S-velocities are calculated using the Vp/Vs ratio given there.
Moho is indicated with N at the end of the line with the first mantle layer. A Q of zero means infinite Q.
The densities are approximate values and should be modified. See below for maximum number of layers.
ST-D-RK: Strike dip and rake is taken from an existing fault plane solution for the given event (F-line)
if it exists, otherwise arbitrary values are supplied. (0,0,0) is an explosion. The convention is Aki and
Richards.
DEPTH: Focal depth is taken from the current solution. The second field can optionally have the letter
F (right justified). If this flag is set, the user can give the synt command to update all distances and
azimuths used for modeling which will correspond to the latest location determined as e.g. a result of a
changed fixed depth or a changed model. The intention with this flag is that the user should be able to
set a fixed depth in the S-file header line, give the synt command to update the parameters for modeling
corresponding to this depth and then model.
NPOINTS: Number of points to model, 512 is set as default, must be 2**N. Used by BOUCH and
HERRMAN only.
TIMES: Three different times:
TOTAL: The total time window for generating data and synthetic seismograms for all channels, see also
REDVELO.
INITIAL: The initial time of the earliest trace in the output file, with reference to the source origin time.
The synthetics at the station with smallest epicentral distance automatically start also at this initial
time.
SY-TRACE: The duration of the synthetic seismogram for each channel, might have different start times,
see REDVELO.
DT-Tsou: Sampling interval (used for WKBJ seismograms only), and half-duration of the source used
for all three programs. In all programs, the source is triangular, however BOUCH can optionally use
several sources, see below.
REDVELO: Reduction velocity to calculate the initial times at subsequent distances (put 0. for no
reduction velocity). NOTE: Seems to not be correctly implemented so use 0 always.
368 CHAPTER 29. MAKING SYNTHETIC SEISMOGRAMS
PHASES-: The names in format A4 (right justified) of the phases to be synthesized with WKBJ. The
phases may be given in any order, with a maximum of 6 phases per line, and there may be several SYNT:
PHASES- lines.
Possible phases:
Pg (direct P from source to receiver)
Sg (direct S)
PmP (includes automatically Pn at distances larger than critical)
pPmP (includes automatically pPn at distances larger than critical)
sPmP (includes automatically sPn at distances larger than critical)
SmS, pSmS, sSmS (includes automatically Sn, pSn, sSn at distances larger than critical)
SmP, PmS
P1P, P2P, S1S, etc: the same as PmP, SmS etc, but on interface number 1, 2, etc.
(The free surface gets interface number 0 in the convention taken here. Thus in HYP, PN2 is the same
as P1N here. There associated head waves are labeled Pn1, Pn2, Sn1, etc.
COMPON-: RADIAL for radial-transverse components, NORTH for North-South, East-West compo-
nents.
STAT-AT: Is not free or NOT FREE anywhere within column 16 to 25: Optional line. If this option
is chosen, the WKBJ synthetic seismograms are calculated omitting the reflection coefficient at the free
surface, at the receiver location.
BOUPAR: Modeling parameters L, Nt and e. L is length of periodicity (should be a few times the
hypocentral distance), Nt is maximum number of terms in wave number summation and e is the value
used in truncating the summation. Increasing e and decreasing Nt will speed up convergence, but the
results might be unreliable. If Nt is reached, the results are unreliable.
NEW STAT: Comment line
STATION: Station to be modeled with component(s) to be displayed. The S means that short period
instruments are used. The default is S, so if e.g. BH is used, S must be chaged to BH, else the waveform
data is not found. If no component is given, all 3 components are assumed. The other option is to indicate
a component (e.g. Z) and only that component will be displayed (see also description of BOUSEI).
DISTANC is epicentral distance used, this distance is taken from the current location, AZIMUTH is
azimuth from the source to the station taken from current location, BAZIMUTH is the back azimuth
at the station, calculated by EEV, used to rotate if so specified. Each new station isrepresented by the
above 3 lines.
The source time function
The time duration of the triangular source time function for Bouchon is given as Tsou above, and is also
used in WKBJ and Herrmann.
Hints on modeling
Event 199606071325 in the test data set is set up with modeling parameters and can be tested immediately.
The model
The standard model given in STATION0.HYP might be too detailed for most cases and should be simplified
to include 3-4 layers by just editing the S-file, this also speeds up modeling. However, if you located the
event with one model and model with another, the distances and residuals might not fit. A solution could
be to have a STATION0.HYP in the local directory with the simplified model.
Alignment of P and S
369
If the distance calculated by HYP is not correct as indicated by P and S residuals, the synthetic and
observed signals will not be aligned. The distance for that station can then be changed manually in
the S-file under DIST and/or delays can be applied when generating the seismograms. For line up, it is
important that the correct first arrival is included in phase list (WKBJ), see what is identified by HYP.
If PN2, then P1N must be given for WKBJ.
Testing different parameters
There is no need to go back to EEV to test for the parameters that do not change the location. Thus
to test for different fault plane solutions, time windows, number of points, edit the hyp.out directly and
rerun. However, if depth or model is changed, relocation must be made. To test for different depths,
locate with fixed depths, see HYP.
NOTE: THE SOURCE AND RECEIVER CANNOT BE AT THE SAME DEPTH (BOUCH AND HER-
RMANN) AND IN NO CASES CAN THE SOURCE BE AT DEPTH ZERO.
Running time
This depends mostly on the number of points and to some degree on number of layers. The number of
stations has an insignificant effect on running time.
Program limitations: HERRMANN and WKBJ is set up with max 20 layers and Bouchon with 20 layers.
Maximum of 32 stations Change programs and recompile if more layers are needed. Bouchon is compiled
for 2048 frequencies (4096) points.
Computer notes:
The original Bouchon program BOUCH is almost unchanged. The only modification is that it uses a
subroutine to generate its original input file bouch.inp from the hyp.out file. This file still remains after
running BOUCH for debugging purposes. The output from BOUCH is bouch.out, which in turn is input
to BOUSEI.
Herrmann:
The Herrmann waveform modeling is based on a concept where the synthetic seismograms are computed
through a sequence of four distinct processes (programs).
1. The program hspec8 will calculate the medium response for 10 basic Greens functions, where
the response is given in frequency - wavenumber domain F(f,k).
2. The program rhwvinta will integrate and take the medium response from F(f,k) F(f,r)
3. The program rhfoc10 will convolve the response function with a source time function and with
inverse Fourier transform take F(f,r) F(t,r)
4. The program mech will construct a 3 component synthetic seismogram given a focal mechanism.
Herrmanns programs originally had several optional source time functions, however, a triangular source
has been hardwired (for all 3 programs) so it is easier to compare the results. The original options can
be reactivated by editing the program.
The programs HERRMANN and HERSEI run these 4 programs in an automated sequence.
All References, a detailed manual, source code and parameters as well as other related programs: Com-
puter Programs in Seismology, Volumes I - VIII. By Robert B. Herrmann, Saint Louis University, Saint
Louis, Missouri.
WKBJ:
370 CHAPTER 29. MAKING SYNTHETIC SEISMOGRAMS
xxx 9502-06-1700-50S.xxx_004
Plot start time: 95 2 6 17: 0 53.257
13100
1 KMY S Z
yPgyPn
yPmP ySg ySn
ySmS
56413
2 KMY SB Z
yPgyPn
yPmP ySg ySn
ySmS
209381
3 KMY SH Z
yPgyPn
yPmP ySg ySn
ySmS
768411
4 KMY SW Z
yPgyPn
yPmP ySg ySn
ySmS SEC
54 56 58 60 2 4 6 8 10 12 14
In SEISAN, travel times are generated from a flat crustal model or using the IASP91 global travel time
model. It can often be useful to generate travel times for given distances and two programs are supplied
to do these calculations. TTIM will calculate travel times for global phases at one given distance and
depth and TTLAYER, will calculate a travel time table (layered flat model) for a given depth and a
distance range. A special version of TTIM called IASP is used in connection with EEV and MULPLT.
373
374 CHAPTER 30. CALCULATION AND PLOTTING OF TRAVEL TIMES
all station in waveform file(s). If no iasp.inp preesent, it will use all stations in S-file. indexiasp.inp
In order to generate the earth model files IASP91.HED and IASP91.TBL, first run program REMODL,
then program SETBRN. The program REMODL has the earth model hardwired. Note: These binary files
CANNOT be moved between platforms. They are included with SEISAN for each respective distribution.
If lost, they must be regenerated on the same platform.
For more information about IASP91 programs, see HYPOCENTER manual by B. Lienert.
On at 64 bit computer the IASP files must be regenerated is you have the files from a 32 bit computer,
with the programs REMODL and SETBRN.
Figure 30.1: Example of travel time plot. Both P and S observed travel times are
plotted with + symbol. Calculated times are shown by the solid lines, the lower
one gives the first P arrivals, the upper line gives first S arrivals. The two outliers are
observations from a station with incorrect timing.
376 CHAPTER 30. CALCULATION AND PLOTTING OF TRAVEL TIMES
(1) The header lines are searched for hypocenter lines and the first found after the main header will be
used, (2) If no secondary header lines, the main header line is used. The intention of this order is that
it is possible to put in a PDE solution in a secondary header line (option INPUTONE in EEV) so that
theoretical travel times are calculated relative to a fixed solution and not the temporary solution made
by the local agency.
The IASP91 tables can be found in the local directory or DAT and have the same names as used in HYP
and TTIM. The program generates an output file iasp.out in Nordic format. This file is read by MULPLT
and the theoretical phases displayed on the screen. The number of phases calculated can be very large
making it hard to see which phase is which. IASP therefore has a definition file, IASP.DEF, where phases
to be written out are given. The file can be in the working directory or in DAT. If no definition file is
available, all phases will be written to the iasp.out file. Below is an example of a IASP.DEF file.
Phase ID Phase---
--------------------
IASP-PHASE P
IASP-PHASE PP
IASP-PHASE PPP
IASP-PHASE PKP
IASP-PHASE pP
IASP-PHASE sP
IASP-PHASE PcP
IASP-PHASE S
IASP-PHASE SS
IASP-PHASE SSS
IASP-PHASE SKS
IASP-PHASE ScS
IASP-PHASE PS
IASP-PHASE SP
IASP-PHASE ScP
Notice that the definition file might prevent display of phases expected. In the axample above, e.g.
Pg would not be seen so it is important to set up the definition file for the phases wanted. Fort local
earthqukes, it is not enough to write P or S since these phase are named Pn, Pg, Pb, Sn, Sg and Sb so
these phases names must be written like that.
Chapter 31
The QLG program can be used to determine an average QLg or to perform a tomographic inversion.
The method is described in Ottemoller et al. [2002]. Here, we use the same names for the damping
parameters, and many of the other parameters should be self-explanatory. The program can also produce
the input for distance trace plots. Note that using the program is no trivial task. The data set needs
to be carefully selected and the instrument calibration has to be known. The input to the program is a
Nordic file, which includes several events. The parameter file needs to be carefully set up.
The program can be used in the following way:
3. Tomographic inversion
Note: The main purpose of including the program is to give an example source code so that the user can
make use of it when implementing similar programs. The program uses a linear grid...
Example of the parameter file qlg.par :
377
378 CHAPTER 31. INVERSION FOR QLG , QLG
#
# Grid
#
X START x start of grid -92.5
Y START y start of grid 6.50
X DELTA x delta grid 1.
Y DELTA y delta grid 1.
X NPOINTS x # points 17.
Y NPOINTS y # points 13.
Menke et al. [2006] pointed out the non-uniqueness in attenuation tomography between the source term
and Q. They suggest to investigate the non-uniqueness by synthetic tests in which a perturbation is
applied to the source term and the inversion for Q is done without inverting for differences in the source
term. The solutions obtained are null-solutions and one needs to be careful not to mistake them for real
patterns. These tests are possible within QLG by setting the parameter SOURCE PERTURBATION,
where the first parameter refers to the source that is perturbed and the second parameter gives the
amount of perturbation in units of moment magnitude.
It is possible to invert real data without inverting for the site term by setting FIX SITE. This can be
a useful test as there is also a trade-off with the site term. Fixing the site term is more problematic, as
this is done based on the local magnitude, which may not be the same as the moment magnitude.
Another useful stability test is to add Gaussian noise to the spectra and check the inversion result. This
can be done for both real data and the checkerboard test by setting the parameter GAUSSIAN NOISE,
units are equivalent to change in moment magnitude.
Chapter 32
Wadati
This is a program to make Wadati diagrams and apparent velocity from a Nordic file with one or many
events. The apparent velocity is calculated from the arrival times and the calculated epicentral distances
as given in the S-file. The apparent velocity is thus approximate and affected by the location.
The purpose of the program is to calculate Vp/Vs values for individual events and calculate the average
for a group of events. In addition, the program can calculate the apparent velocity for each event based
on P or S-times. Wadati diagrams with plot can also be calculated directly from EEV.
The information can be used to obtain a first impression of crustal parameters. For each calculation,
events can be selected based on: Minimum number of stations, maximum rms of the fit (S-P vs P, or
arrival times), and minimum correlation coefficient of the fit. For the apparent velocity calculation, the
data can also be selected in distance and azimuth ranges.
The output gives:
T0 : Wadati calculated origin time
N: Number of stations used for Vp/Vs
VPS : Vp/Vs ratio
NP : Number of stations for P- velocity
NS : Number of stations for S-velocity
AVSP: Average S-P times with sd
AVDI: Average distance with sd
The average Vp/Vs is calculated for the whole data set. Individual Vp/Vs values outside the range 1.53
to 1.93 are excluded. An output file wadati.out is generated. A minimum of 3 stations is required for an
event to be used. Only same type phases are used (like PG and SG).
Example of a run to calculate Vp/Vs
379
380 CHAPTER 32. WADATI
The SPEC program is used for making spectra of many seismic signals in a semiautomatic manner. It
can be used for several investigations:
A: Making a large series of signal spectra, which can be corrected for instrument and path.
Average spectra are calculated. There are two options for further processing the calculated spectra:
Option (1): Calculate acceleration density spectra which are plotted compared to the Peterson noise
model.
Option(2): Using the slope of the flat part of the displacement spectra to calculate the near surface
attenuation kappa (see 8.12.
B: Making relative spectra of seismic events or background noise in order to determine the soil response.
When using relative spectra of horizontal versus vertical components, this is referred to as the Nakamura
method [Nakamura, 1989].
C: Making relative spectra of signals from two stations in order to determine Q. The program makes
output files for generating GMT plots in addition to standard SEISAN plots.
Note: Parameter file has changed between SEISAN 7.2 and 8.0 (number of windows and overlap has been
added).
The program can technically operate in two ways: (1) Making relative spectra of a series of pairs of
stations terminated by the average spectra, (2) Making a series of spectra for a number of stations and
events. The spectra can be corrected for distance, Q, and instrument response. In addition, the spectral
levels can be expressed in moment or moment magnitude calculated in the same way and with the same
units as in MULPLT. All relevant parameters are taken from the CAT files, the CAL files and the input
parameter file for SPEC. Window selection for the spectra can be specified to be related to the P, S
arrival times or the earthquake origin time and it is thus possible to automatically make e.g. S-wave
spectra of a large set of stations and events. Optionally, noise spectra, can be calculated together with
the signal spectra. The noise window is selected at the start of the waveform file.
Before the program is started up, the input files must be prepared. The program need two input files.
The parameter file (default spec.par) gives the parameters to use and the list of stations to process. The
event file (default spec.inp) is a CAT file with events to use or a filenr.lis type file with waveform file
names (can only be used if no readings are needed, like for Nakamura studies). An example of a spec.par
383
384 CHAPTER 33. CALCULATING SPECTRA, THE SPEC PROGRAM
and spec.inp file is found in DAT. These files can be used immediately with the test data set.
The program produces several output files. The main output is in spec.out with the parameters used,
the station event combinations used and error messages. The other files are giving output of most
graphs shown. These ASCII output files can be used in other plotting programs, however they have been
specifically formatted for the SEISAN GMTXY plotting script. Note that the numerical values given for
the spectral output given in those files is the same that appear on the plots and the values are linear. So
if a spctrum has been instrument corrected and smoothed, that is what is given. Similarly if a relative
spectrum is used. The number of files depends on number of stations used. Examples of files could be
spec all ASK S Z.out All spectra from ASK, S Z
spec all BER S Z.out All spectra from BER, S Z
spec all gmt.out All spectra from ASK and BER
spec ave ASK S Z.out Average spectrum from ASK, S Z
spec ave BER S Z.out Average spectrum from BER, Z Z
In order to plot these files with GMTXY (only Unix), give e.g. command
gmtxy spec all ASK S Z.out
There is one more output file, spec amp.out, which gives the log log spectra of of all traces calculated
(possibly instrument corrected) before smoothing takes place.
Limitations of amount of data: The program is set up to handle 300 spectra of up to 30000 points each
for one run. The dimensions can be increased in spec.for, however the program must then be recompiled.
The spectral windows are 10% tapered. The analyzed signals will be checked for clipping and rejected if
clipped. A message is then given in spec.out
The spec.par file The file contains alternate lines of parameter names and parameter values, and must
contain the number of lines shown in the example below.
-1.0,0,0
distance correction
1
minimum correlation and minimum sn for kappa
0.5 2.0
velocity and density
0.0 0.0
magnitude spectrum
0
stations and components, format a5,1x,a4,1x,a5,1x,a4
FOO S Z SUE S Z
The parameters:
Selection criteria: Determines how the start of the time window is selected. 1: Start with the P-arrival
time, 2: Start with the S-arrival time, 3: Start with the S-arrival time calculated from the P-arrival time
assuming a P to S velocity ratio of 1.78, 4: Start with start (see next parameter) seconds after the origin
time as given in the CAT file header. This option can be used if no readings are available in the CAT
file. When using a P or S-time for start of window, the program uses the first P or S phase found in the
CAT file for a given station. Component is of no importance here, so there is only a need for e.g. one
P-time for the station being processed if 3 component data is used. This is also the case when rotating
the signal, see below. However, on the trace plots, only readings on those components shown will be seen
on the plots.
Start: If the selection criterion is 1,2 or 3, this is the number of P or S travel times (from the origin)
used to find start time of window. Use 1.0 if the window shall start exactly at the phase time picked. If
selection criteria is 4, start is the number of seconds after the origin time.
Window length, #of windows, overlap:
- Window length: Window length in secs for both signal and noise (if selected) .
- # of windows: If more than 1, spectra will be made in several windows following the first window
and average spectra will be made. This option can only be used if selection criteria is 4. Used for
noise studies or Nakamura studies.
- Overlap: Windows can overlap (factor < 1.0) exactly follow each other (factor=1.0) or have gaps
(factor > 1.0). E.g. 0.9 is equal to 10 % overlap.
Plot pics: If 1, the phase pics in the CAT file spec.inp will be plotted.
Frequency band used: Lower and upper frequency bands for the spectral plots.
Response removal: If 0, no response is removed, else 1: displacement, 2: velocity, 3: acceleration (units
is nm, nm/s and nm/s*s), 4: Power spectral density in dB relative to ((1m/s**2)**2)/Hz. This option is
used for seismic background noise studies., 5: Determine kappa. The flat part of the spectrum (frequency
below corner frequency) is approximated by a straight line and kappa calculated for each event and the
average at the end (in spec.out file and on final plot). The spectrum will normally be corrected for Q,
BUT NOT kappa. For more details, see [Havskov and Ottemoller, 2010]. Make sure to set appropriate
frequency limits and correct distance corrections. Can be used for both P and S-spectra. A cal file for
each channel must be available in the CAL directory (see section 4.6). For relative spectra, the response
removal has no importance if the response is the same for the channels compared. A simple correction can
be made with Gain factor of channel 1 parameter above. NOTE: If moment or magnitude spectrum is
made, response removal MUST be 1.
Rotate components: If 1, the horizontal components are rotated. This means that if the user has spec-
ified N or E, radial or transverse respectively will be used instead. The original data remain unchanged.
If start time of spectra are chosen by using P or S, there must be a reading from those components if the
pics are to be plotted. If the parameter is zero, no rotation is done. See also MULPLT for more details
of rotation.
Q0, qalpha and kappa:
Q-correction:
Parameters in Q-relation Q = Q0**qalpha used for spectral correction (see also section on MULPLT
for standard attenuation relations). Only used if response is removed. If first 2 parameters are 0,0, no
Q-correction. New from SEISAN7.2 is that a kappa correction also can be used (see MULPLT spectral
section). Note that from version 10.1, Q=Q0 for f 1 Hz.
Calculation of Q:
If Q0 and qalpha is set to -1,0, the relative spectra will be used to calculate q as a function of f (see
standard relations in MULPLT section) and the plots will show q as a function of f. This can be used for
both P-waves and S-waves. The distance correction MUST be set, S-velocity must be given (see below)
and it is recommended to assume body wave spreading (amplitude proportional to 1/distance, factor is
1.0 below). If the response of the 2 stations is not identical, correction for response must also be made.
There must be an origin time and phase readings for components used must be available in order to
calculate Q. Q is calculated as pi * f * (t2-t1) / (ln(A2(f)/A1(f)) + alpha * ln(t2/t2)), where A1 and A2
are spectral levels at frequency f for the two stations, t1 and t2 are travel times and alpha is geometrical
spreading exponent (1.0 is body wave spreading). Q values lower than 1 and higher than 5000 are not
used, the Q(f) plot might then display a long straight line. The Q=Q0*f**qalpha is calculated from the
good values.
Distance correction alpha: The spectral amplitudes are multiplied by R**(distance correction) if
different from zero. This option MUST be set if moment or moment magnitude options (see below) are
selected as well as calculation of Q. However, it can be used without instrumental correction. For body
waves, use 1. Note that the geometrical spreading use here is simpler than used in MULPLT.
Minimum correlation coefficient and minimum signal to noise ratio for kappa: The mini-
mum correlation coefficient and signal to noise ratio for an event to be included in average kappa. The
coefficients are from the linear fit to the flat part of the spectrum.
Velocity and density: Velocity (km/sec) and density (g/cm*cm) used for calculating moment spectra.
If set to 0,0, no moment spectra are calculated. See section on MULPLT for details of calculation.
387
Magnitude spectrum: If 1, the spectral level is converted to moment magnitude, see MULPLT for
details of calculation.
Stations and components: Station-component pairs used, one pair per line, format (a5,1x,a4,1x,a5,1x,a4).
If no relative spectrum is used, the first station-component on the line is used.
Averaging in spec:
Q: For each frequency, the average linear 1/Q and corresponding sd is calculated. The upper and lower
bounds are calculated by subtracting and adding the sd. These values are then converted back to Q and
finally the log is taken. Only the good individual values are used. There is a possibility that the lower
bound becomes negative. In that case, the log Q is set to zero. Because the average is made in 1/Q, the
upper and lower bounds curves will not be symmetric around the average Q-curve.
Power spectrum: For each frequency the dB values are averaged and upper and lower curves should be
symmetric.
Kappa: Same as for Power spectrum.
Other spectra: The linear spectra or relative spectra are averaged. The sd used in the log spectra are
calculated by subtracting log average spectrum from log(average spectrum + sd).
Running the program:
The program gets the first pair of stations (or one station) from spec.par, calculates the spectra using the
list of events in spec.inp and at the end of the station list, calculates the average spectral ratios for all
pairs (max 100). All spectra are then shown on one plot together with averages and standard deviation.
Then the next pair of stations is processed in the same way and the program continues until the end of
file spec.par. Each pair of stations with signals and spectra is plotted on one page. If no relative spectra
are made, the plots look similar except that only one station is shown. Hard copy plots are made for each
page and sent to the printer if specified (see below). The hard copy postscript file is called spec.eps and
when the program finishes, a file with the last plot is available on the disk. For each spectrum (relative
or single), the average spectrum (or Q) is calculated both as an average of the log spectrum and as an
average of the linear spectrum. There is no frequency weighting and since all values shown on the plot
are used, the average value will be more representative of the high frequency part of the spectrum since
there are more values. This can be regulated by choosing another frequency range. The average spectra
shown on the last plot are log-averages. If option to calculate Q is used, the plots show 1/Q as a function
of frequency instead of relative spectra (proportional to relative spectra). For each event, Q0 and qalpha
are calculated.
When calculating kappa, the average spectrum do not have much physical meaning since the averages are
made from absolute spectra of events that might have very different moments. So the kappa calculated
from the average spectrum is not to be used.
Interactive output of level and frequency: With a spectral ratio (or Q) plot on the screen, position the
cursor at the point of interest on the spectrum and click. The level and frequency will now be displayed
on the right side of the plot.
The output file spec.out gives details of the run like averages and missing data. The output file
spec ave.out gives the x and y-values of the average spectrum IF IT HAS BEEN PLOTTED ON THE
SCREEN. File spec rel.out gives the values of the relative spectra.
There are 4 interactive input options:
0: All spectra are calculated but not sent to the plotter or screen except the last plot with the average
spectra (sent to both screen and printer). Used for checking the files or making a final run. If no relative
spectrum is chosen, no final plot is made. For each station and event combination, check lines are written
388 CHAPTER 33. CALCULATING SPECTRA, THE SPEC PROGRAM
Figure 33.1: An example of using the SPEC program. On top the original traces
are shown with windows chosen, in the middle the spectra of each channel and at the
bottom, the relative spectrum. Lower right shows the input parameters used. In some
cases (kappa and Q) the values calculated for this case are also shown.
390 CHAPTER 33. CALCULATING SPECTRA, THE SPEC PROGRAM
Figure 33.2: An example of a GMT plot. The figure shows an example of making noise
spectra of several traces.
Chapter 34
Collect the best possible earthquake catalog for the study area.
Homogenize the earthquake catalogue and assess the completeness.
Define the seismic source zones.
Prepare input parameters from the earthquake catalogue for each source zone.
Define ground motion prediction equations (GMPE) for the region.
Compute hazard in terms of different ground motion parameters (e.g., peak ground acceleration
(PGA), peak ground velocity (PGV) or spectral acceleration (SA) at different periods).
Assess site effects.
Prepare response spectra.
391
392 CHAPTER 34. SEISMIC RISK RELATED PROGRAMS
1. Compile a catalogue for the area of interest from local, regional and global sources. Most commonly,
several catalogs are merged. After quality control of the individual catalogs (SELECT, CATSTAT
and some of the Seisan Explorer tools can be useful for this) the catalogs can be merged using
SPLIT and ASSO.
2. Evaluate the preliminary catalogue completeness by using the Catalog completeness function of
Seisan Explorer.
3. Convert magnitudes into one uniform magnitude, preferably to moment magnitude MW. To do
this, regression curves must be prepared for different magnitude scales. Program MAG can be used
for this purpose.
4. Clean up the catalogue for dependent events (i.e. induced seismicity, non-earthquakes, foreshocks,
aftershocks, earthquake swarms). Here a search has to be made for clusters of events both in time
and space. Program CLUSTER can be used for this purpose. The probable explosions may be
removed by using the program EXFILTER. Following, the Poisson distribution function of Seisan
Explorer can be used to confirm that the cleaned catalog is Poisson distributed.
5. The evaluation of the catalogue completeness is dependent upon the clean-up process and the
magnitude unification. It is therefore necessary that steps 2-4 be repeated until a reliable catalogue
is prepared.
6. Delineate earthquake source zones for the area of interest. The zonation can be based on a seismicity
map with the clean catalog and additional information from geology, geophysics, seismotectonics,
paleoseismology etc. A seismicity map can be prepared using EPIMAP or GMAP (with Google
Earth). Both programs have zooming and area selection procedures which can be used to define
the source zone polygons.
7. For each earthquake source zone select the subset of events that fall in the chosen area. This can
be done by using the SELECT program. Alternatively, EPIMAP can be used to draw polygons
interactively on the screen and put the subset of events within this polygon into a file.
8. The seismicity within each source zone is assumed to be uniform following a Poisson distribution.
This can be checked using the Poisson distribution function of Seisan Explorer. For each source
zone, the following parameters then need to be defined:
- The a and b-value of the Gutenberg-Richter relation: these can be defined using the Weichert
method or Gutenberg-Richter relation functions of Seisan Explorer or from BVALUE. When
applying these programs, magnitude interval and bin sizes must be chosen critically, taking into
account the catalogue completeness and the detection threshold.
- Maximum expected magnitude with its standard deviation: This is usually inferred through other
available information, such as geology, palaeoseismicity, or subjective judgment of the scientist.
- Maximum observed magnitude: This is the largest magnitude observed within the catalogue time
span.
- Threshold magnitude: The so-called lower bound magnitude, which is chosen, based on engi-
neering considerations. Usually magnitudes less than 4.0 are not considered engineering significant.
9. It should be assessed whether there are characteristic earthquakes in the region of interest. This
can be done through careful examination of the catalogue and the active faults in the area. If
characteristic earthquake sources are included in the analysis, it is important that the seismicity
rate is reduced correspondingly in any area sources overlapping with the characteristic fault sources.
394 CHAPTER 34. SEISMIC RISK RELATED PROGRAMS
10. Ground motion prediction equations (attenuation relations), describing the level of ground shaking
as a function of magnitude and distance, must be defined for each source zone. Such relations are
based on empirical ground motion observations. If no suitable relations are available for the chosen
study area and cannot be derived based on existing data, relations can be adopted from tectonically
similar regions. In that case it is important to check the predictions of the chosen relations against
available recordings from the study area. Many relations are defined for different types of ground
conditions (rock, stiff soil, soft soil) and it is important that appropriate relations are chosen.
11. Run the CRISIS2012 program in order to set up a hazard model with the parameters determined
in steps 6-10. The model can be defined through the graphical user interface of CRISIS2012.
Optionally, a logic tree can be set up to account for epistemic uncertainty. Results can be displayed
as hazard maps or hazard curves directly, or exported as ASCII files. There is also an option for
deaggregating the results.
12. The local site conditions should be considered for critical sites. SPEC program can be used to
obtain the amplification factors due to unconsolidated sediments. These factors can be used later
to adjust the response spectra.
Many of the programs mentioned above are described individually throughout this manual at differ-
ent sections. In the following the programs that are directly relevant to hazard computations and not
described in other sections of the manual are explained in detail.
34.2 CRISIS2012
:
CRISIS2012 is a computer program to compute seismic hazard in extended regions. It was developed
at the Institute of Engineering, UNAM, Mexico, by Mario Ordaz (mors@pumas.iingen.unam.mx), Ar-
mando Aguilar and Jorge Arboleda.
Basic input data are: geometry of the sources, seismicity parameters of the sources, and ground motion
prediction equations. In addition, the spectral ordinates, for which the hazard is calculated, must be
defined together with the calculation grid and parameters related to the integration and display of results.
Details about the use of CRISIS2012 are given in the separate CRISIS2012 manual PDF file contained
in the MSI installation file in SUP.
CRISIS2012 is only available under Windows and needs to be installed separately. An MSI file is available
in SUP. When opening the MSI file, an installation widow appears asking a number of questions in
Spanish. The following choices should lead to successful installation of CRISIS2012:
2nd window: Choose the location where CRISIS2012 should be installed (browse with Examinar).
Choose whether CRISIS2012 should be available for all users (Para todos los usuarios) or current
user only (Solo para este usuario)
Siguiente (next)
During the process, it may be necessary to update the .NET framework of the computer.
After installation, a number of files will be available at the location specified in the 2nd installation
window. CRISIS2012 is launched through CRISIS 2012.exe . A comprehensive manual is found in
CRISIS 2008 Manual.pdf and through the help function of CRISIS2012.
log(N ) = a bM (34.1)
where log is the base-10 logarithm and N is the number of events with magnitude M (or larger in case of
regression on cumulative data, see below).
The user can choose which magnitude type to use (M is the first magnitude given for each event ). The
database is read, and a histogram is plotted showing the number of events in different magnitude bins.
The minimum magnitude to be considered and the bin size can be chosen by the user. Optionally, the
incremental number of events and the cumulative number of events above a given magnitude can be
overlain as symbols. The a- and b-values can be determined by regression on either the incremental or
the cumulative values. The starting magnitude is selected by the user and should be set such that only
the complete part of the catalog is considered. It is also possible to set a maximum magnitude in the
regression. The obtained a- and b-values are returned, and the fit is compared to the data in the plot.
Function Poisson distribution allows for visually checking whether an earthquake catalog is Poisson
distributed. The function reads the database and plots a histogram showing the number of 1-year intervals
with a given number of earthquakes, as a function of the annual number of earthquakes. This histogram
is compared to the theoretical Poisson distribution derived from
n
P (N = n) = e ,
n!
where n is the number of earthquakes for a given year and is the mean annual number of events.
A good fit between the histogram and the theoretical curve indicates that the data fulfills the Poisson
distribution.
Function Completeness check allows for defining catalog completeness for different magnitude
classes. The function provides a staircase plot of the earthquake catalog, showing for different magnitude
classes the cumulative number of events as a function of time. Assuming that the catalog is complete
during the most recent part of the time interval, the user can search for a change in slope, indicating a
change in seismicity rate. Such change is interpreted as a change in catalog completeness. The complete-
ness time can thus be read as the time where the staircase plot changes slope for a given magnitude class
and entered into a table. The plot can be zoomed by scrolling and moved by dragging with the mouse.
The user can select the minimum magnitude to be considered and the magnitude interval for each curve.
396 CHAPTER 34. SEISMIC RISK RELATED PROGRAMS
The entered completeness values are shown in the plot and saved to a file se-completeness.out, to be read
by function Weichert method, when pushing Replot.
Function Weichert method allows for determining a- and b-values for a given catalog, accounting
for varying catalog completeness for different magnitude classes following Weichert [1980]. The mag-
nitude classes and their corresponding completeness times are read from the file se-completeness.out,
which is generated by function Completeness check. The user can choose which magnitude classes to
consider through Select intervals to be used. The function performs a standard linear regression for
the Gutenberg-Richter a- and b-values for the complete part of the catalog. In addition, a regression is
performed following Weichert [1980]. This regression returns the b-value, the Mmin value used and a
value of Ny(M) for a magnitude selected by the user, defined through:
where log is the base-10 logarithm and Ny(M) is the annual number of earthquakes with magnitude M.
34.4 CLUSTER:
The purpose of CLUSTER is to find and remove dependent events (foreshocks, aftershocks and swarm
events) from a catalog. In contrast to the old CLUSER in SEISAN before version 10.0, this completely
new version will search for dependent events using more parameters: Time difference, epicentral distance
and depth distance. These parameters can be magnitude dependent and can be different before and after
the main event. The program requires an input parameter file cluster.def which can be placed in working
directory or DAT. An example is given in DAT and seen below.
For declaring an event as a dependent event, the dependent event must be occur at less than a given
time difference from the main event, it must be smaller than a specified magnitude (relative to the main
event), the epicentral or hypocentral distance between main and dependent event must be less than a
given value and the difference in hypocentral depth between the two events must be less than a given
value. Hypocentral distance is calculated as the direct distance between main shock and dependent
event.. The time and distance limits are generally magnitude dependent so larger values are used for
larger events. Different magnitude dependence can be used before and after the main event.
If the event has no location or magnitude, it will not be considered as a possible dependent event and
will be included in the list of main shocks.
The magnitude used is selected among all prime magnitudes in the file (the 6 magnitudes on main header
line, can be 2 lines if more than 3 magnitudes). The magnitudes can be given an order of priority in
SEISAN.DEF:
KEYWORD............Comments.............Par 1.....Par 2
MAGNITUDE_ORDER LBER
MAGNITUDE_ORDER LNAO
In this example, LBER (local magnitude calculated by BER) is first chosen, if not there, LNAO and if
not there either, the first magnitude found in file. If no order is given in SEISAN.DEF, the magnitude
used will be the first found for the event, irrespective of type or agency. It is possible to leave either
magnitude or agency blank in which case the blank represents a wildcard.
Potentially all events can be a mainshock so all combinations, within the time limit, will be searched. A
search is first made after the main event (for aftershocks) and then before the main event (for foreshocks).
34.4. CLUSTER: 397
Input:
A file in Nordic format. If only header lines, there must be a blank line between events.
Output:
All dependent events will be removed and put out in a file called cluster reject.out while the cleaned
catalog will be in file cluster use.out. Optionally, a debug output can be made, either on screen or in a
file (see cluster.def). An example is seen below
Main : 2012 210 1222 22.3 66.4 14.2 14.0 0.9 LTES
Main : 2012 210 1316 8.1 66.3 14.9 0.0 1.1 LTES
Main : 2012 210 1356 25.0 71.2 -8.1 13.0 3.5 LTES
After: 2012 212 2332 7.8 71.2 -8.2 12.9 1.8 LTES M2.5 T 22 2 D 26 3
After: 2012 213 853 34.5 71.0 -8.0 19.7 1.3 LTES M2.5 T 22 2 D 26 19
After: 2012 216 1322 6.1 71.1 -7.7 0.1 1.5 LTES M2.5 T 22 5 D 26 18
Fore : 2012 124 027 10.9 71.1 -8.0 43.2 2.3 LTES M2.5 T 22 17 D 26 14
Fore : 2012 122 1248 16.6 71.1 -8.3 23.7 1.7 LTES M2.5 T 22 19 D 26 12
Fore : 2012 120 128 10.3 71.1 -7.5 13.2 1.8 LTES M2.5 T 22 21 D 26 22
Main : 2012 210 1543 54.2 73.3 7.8 15.0 2.8 LTES
Main : 2012 210 1549 52.9 -27.6-176.6 33.0 5.0 BNAO
Main : 2012 210 1654 31.8 2.2 122.2 33.0 5.4 BNAO
Each potential main (Main) event is listed. To be considered a potential main event, the event must
have both location and magnitude. If a dependent event is found, its type is shown (After or Fore) with
the parameters: M: The interpolated main shock magnitude used, T: The interpolated maximum time
difference used and the actual time difference (days), D: The interpolated maximum distance (km) used
and the actual distance. In the above example, the upper magnitude limit for dependent events is 2.5,
main event is 3.5, the limit in distance is 26 km and in time 22 days. Directly following the Main event
comes a listing of all dependent events. The next potential main event will then be the first unused event
following the previous Main event and that Main event can then jump back in time since there might be
several events following the previous Main event which were not declared as dependent events.
Example of a cluster.def file
This file is parameter file for cluster. The file can be in working
directory or DAT.
Only the lines with recognized keywords and a non blank field
under Par 1 will be read. The comments have no importance. Lines with
keywords MAGS AFTER DIST TIME and MAGS BEFORE DIST TIME must come grouped
together in increasing magnitude order. Parameters for these lines are:
Reference magnitude of main event, maximum magnitude of corresponding after/foreshock
(AFTER/FORE), distance(km) and time(days).
All number must be real numbers. Columns Par 1-Par 4 start in
columns 41,51, 61 and 71.
All keywords in capital letters.
Hypocentral distance is calculated as the direct distance between main shock and
dependent event.
Parameter values are interpolated for magnitudes between the ones given.
The values shown in debug output are the interpolated values.
If event is larger than largest event in table, the values for the largest event is
398 CHAPTER 34. SEISMIC RISK RELATED PROGRAMS
The MAGS AFTER DIST TIME are magnitude of main shock, corresponding magnitude
of largest aftershock, distance and time. Similarly for the foreshocks.
The MAX DEPT DIFFERENCE will consider only events with a depth
difference less than MAX DEPT DIFFERENCE as a possible dependent event.
MAGS AFTER DIST TIME Mag. dep. par. 2.5 1.5 19.5 6.0
MAGS AFTER DIST TIME Mag. dep. par. 3.0 2.0 22.5 11.5
MAGS AFTER DIST TIME Mag. dep. par. 3.5 2.5 26.0 22.0
MAGS AFTER DIST TIME Mag. dep. par. 4.0 3.0 30.0 42.0
MAGS AFTER DIST TIME Mag. dep. par. 4.5 3.5 35.0 83.0
MAGS AFTER DIST TIME Mag. dep. par. 5.0 4.0 40.0 155.0
MAGS AFTER DIST TIME Mag. dep. par. 5.5 4.5 47.0 290.0
MAGS AFTER DIST TIME Mag. dep. par. 6.0 5.0 54.0 510.0
MAGS AFTER DIST TIME Mag. dep. par. 6.5 5.5 61.0 790.0
MAGS AFTER DIST TIME Mag. dep. par. 7.0 6.0 70.0 915.0
MAGS AFTER DIST TIME Mag. dep. par. 7.5 6.5 81.0 960.0
MAGS AFTER DIST TIME Mag. dep. par. 8.0 7.0 94.0 985.0
MAGS AFTER DIST TIME Mag. dep. par. 8.5 7.5 110.0 1000.0
MAGS BEFORE DIST TIME Mag. dep. par. 2.5 1.5 19.5 6.0
MAGS BEFORE DIST TIME Mag. dep. par. 3.0 2.0 22.5 11.5
MAGS BEFORE DIST TIME Mag. dep. par. 3.5 2.5 26.0 22.0
MAGS BEFORE DIST TIME Mag. dep. par. 4.0 3.0 30.0 42.0
MAGS BEFORE DIST TIME Mag. dep. par. 4.5 3.5 35.0 83.0
MAGS BEFORE DIST TIME Mag. dep. par. 5.0 4.0 40.0 155.0
MAGS BEFORE DIST TIME Mag. dep. par. 5.5 4.5 47.0 290.0
MAGS BEFORE DIST TIME Mag. dep. par. 6.0 5.0 54.0 510.0
MAGS BEFORE DIST TIME Mag. dep. par. 6.5 5.5 61.0 790.0
MAGS BEFORE DIST TIME Mag. dep. par. 7.0 6.0 70.0 915.0
MAGS BEFORE DIST TIME Mag. dep. par. 7.5 6.5 81.0 960.0
MAGS BEFORE DIST TIME Mag. dep. par. 8.0 7.0 94.0 985.0
MAGS BEFORE DIST TIME Mag. dep. par. 8.5 7.5 110.0 1000.0
There must be at least one "MAGS AFTER DIST TIME" line but "MAGS BEFORE DIST TIME" are not
needed. In that case there will be no search for foreshocks.
Chapter 35
The MAG program calculates simple magnitude relations. The program has three functions: (1) Calculate
parameters for a magnitude scale (Ml or Mc), (2) Calculate relation between two different magnitudes
and/or spectral parameters and (3) Calculate a new magnitude as a function of an existing magnitude,
a natural step following function (2). All three functions can be done at the same time. Function (3)
can also be used for moving a particular magnitude type and/or agency to the first magnitude position
in line 1 to be plotted with EPIMAP.
ALL HEADER LINES ARE SEARCHED FOR MAGNITUDE INFORMATION
Input: The data input is a CAT-file like one made with SELECT or COLLECT or it can be a compact
file if only magnitude comparison is made. Optionally there can be a parameter file, which MUST be,
called mag.par and MUST reside in the working directory. An example of the parameter file is found in
DAT and also shown below. The parameter file is not needed for all operations, see details below.
1: Magnitude scales
Coda magnitude Mc: The coda magnitude scale used is
M c = A log(coda) + B dist + C
where Mc is the coda magnitude, coda is the coda length in secs, dist is the hypocentral distance in
km (calculated from epicentral distance and depth in CAT file) and A, B and C are constants to be
determined. This is done in two ways
3d regression
m = A log(coda) + B dist + C
2d regression
with B = A * dist coff where dist coff is given in the parameter file and m is the reference magnitude.
SO B AND dist coff ARE DIFFERENT. The CAT-file must contain coda readings, epicentral distances
and a magnitude in the header line. A linear regression is then made between the known magnitude from
399
400 CHAPTER 35. MAGNITUDE RELATIONS, MAG
a given agency and the observed coda lengths following the relations above. The user has the option to
choose the type of magnitude to use in the regression. Usually Ml or Mb are used. All station-event
combinations are used to determine simultaneously the 3 constants A, B and C. Since the data often
is too bad to determine all 3 parameters at the same time, the program will also calculate just A and
C using a fixed user supplied value for the distance correction to the coda. The constant dist coff is
given in the mag.par file as the second parameter under MAG TYP COF (see below). IN ORDER FOR
THE CODA SCALE OPTION TO WORK, THE DISTANCE COEFFICIENT MUST BE DIFFERENT
FROM ZERO.
Output: On the screen the constants will be printed out and a file mag coda.out will contain pairs of
values m and (log(coda) + dist coff*dist), which can be used to plot the distance corrected coda relation.
If results from the 3D is to be plotted, dist coff must be calculated as dist coff=B/A, put into mag.par
and mag run again. On the other hand, if a best dist cof has been found, B is calculated as B=A*dist cod
A typical coda magnitude relation is :
The relation above can be derived from the standard geometrical spreading and attenuation relations:
where f is the frequency, v is the velocity and q = q0 f qalpha. The relation can be rewritten
Since qalpha often is close to 1.0, the relation can be simplified to the frequency independent relation:
If body wave spreading is assumed (a = 1), q0 = 100 and v = 3.5km/sec, the relation is
where b = dist cof f is fixed to the value given in the mag.par file (same parameter as used for coda).
This gives a more stable solution, however b = dist coff must be determined by trial and error or fixed
using known values from e.g. q-studies.
The amplitudes are assumed to be ground displacements (in SEISAN they are ground displacements
highpass filtered at 1.25 Hz to resemble Wood Anderson seismograms, see MULPLT). The distance ratio
between stations with the maximum distance and minimum distance must be more than 3 for the event
to be selected for analysis. It is assumed that a and b will be the same for all events, while c is different
(magnitude dependent). At the end, the average constants a and b are calculated of all values a and
b which are not deviating too much (a must be in the range 0 to -5, hardwired). Distance attenuation
coefficients a and b are supposed to be negative since amplitude decrease with distance. To get the local
magnitude scale
the constant C must be determined by fixing the magnitude at some reference distance like the original
Wood Anderson definition with M l = 3 at dist = 100km and amp = 1/2200mm = 454nm (assuming
gain of the Wood Anderson seismograph to be 2080, [Hutton and Boore, 1987]. The determination of a
and b does not work well unless the observations are very good. The relation for California is [Hutton
and Boore, 1987]
Output: On the screen the constants will be printed out and a file mag amp.out will contain the values
of a, b and c.
2: Magnitude relations and/or spectral parameter relations
Linear regression (maximum likelihood) can be made between any two magnitudes and/or spectral pa-
rameters on any of the header lines of an event in a CAT-file or a compact file. The user is interactively
prompted for the magnitude type and/or spectral parameters and agencies to compare. If none is given,
no magnitude comparison will be made. If several magnitudes/spectral parameters fit the requirement,
the last one is used. If e.g. the first header line has a BER Ml and the last header line also has a BER
Ml, the last one will be used. Maximum likelihood linear fitting is used. It is assumed that both variables
have normal and correlated errors. See subroutine maxlik.for in LIB for more info.
The following parameter can be selected:
Any magnitude and agency
Seismic moment(log)
Stress drop (log)
Corner frequency (log)
Source radius(log)
Spectral decay
Omega zero level (log)
If any of the spectral parameters are selected, or moment magnitude is without agency, there will be an
additional question about which station and component. A blank return means the average will be used.
402 CHAPTER 35. MAGNITUDE RELATIONS, MAG
With these parameter selections, it is possible to compare spectral parameters from any two channels,
compare the average spectral parameter with the parameter from one channel etc.
Output: A plot will be shown on the screen with the observations and the least squares fit and the values
are also printed out on the screen. It is now possibel to click on any symbol to get up the correponding
date and time. This facility can be used to find bad magnitides. A file mag mag.out contains the pairs
of magnitudes used.
3: Magnitude conversions
If a relation between two magnitude scales is known, e.g. by using option 2 above, an output file can be
made with the converted magnitudes. The relation to use is specified in the mag.par file. Several different
input magnitude types and agencies can be used and the relation-agency used is given in a priority list in
the mag.par file, see example below. It is here shown that if a BER Mc is available, this will be the first
choice. If no BER Mc then BER Mb will be the next choice etc. The new magnitude will have type X
and agency NEW. Output: The output file is mag new.out and has the same format as the input file. On
the header line, the old magnitudes are removed and in the first magnitude position will be the converted
magnitude (NEW) while in the second magnitude position, the magnitude selected for conversion will
be given. The third magnitude position is blanked out. The conversion option can also be used to move
magnitudes around by using a 1 to 1 relation as shown in mag.par example.
Summary of output files:
mag amp.out : Details each event for amplitude regression.
mag coda.out : Magnitude vs coda, see text.
mag mag.out : Pairs of magnitudes used for regression.
mag new.out : Events with converted magnitudes only.
mag newa.out : All events, both converted and non converted (due to no correct
input magnitude available).
mag spec.out : Summary of normal header line, all associated magnitudes and
spectral parameters.
mag ml inv.out : From Ml inversion
In DAT there is an example mag.par file.
An example of the mag.par parameter file:
This file is for parameters for MAG and called MAG.PAR. The name must
be in lower case on Sun. The following shows the parameters which can be set.
The file can contain any lines in any order, only the lines with
recognized keywords and a non blank field under Par 1 will be read. The
comments have no importance. The text fields are left justified, the
real numbers can be anywhere within the 10 columns of the parameter.
MAGAGA is the magnitude type and agency to use for the converted magnitude.
MAGREL gives the magnitude and agency to use for conversion e.g. LBER and
the parameters 2 and 3 gives the relationship:
The magnitude conversion uses one of the MAGREL relationships, where the
priority is in the same order as found in the list.
403
Figure 35.1: Example of using the MAG program. Relation between NORSAR and
Bergen local magnitudes.
404 CHAPTER 35. MAGNITUDE RELATIONS, MAG
The input file can be either Nordic or compact Nordic, however if coda or
amplitudes are to be used, it must be NORDIC.
KEYWORD........Comments...........................Par.1.....Par.2.....Par.3.....
BAD STATION Station not used for mag relation BER
BAD STATION Station not used for mag relation XXX
BAD STATION Station not used for mag relation BER
MAGAGA Magnitude type and agency, new mag XNEW
MAGREL Mag type, agency, a,b for new mag CBER 1.0 2.0
MAGREL Mag type, agency, a,b for new mag BBER 1.0 2.0
MAGREL Mag type, agency, a,b for new mag SBER 1.0 2.0
MAGREL Mag type, agency, a,b for new mag WBER 1.0 2.0
SCREENOUT Header line printed each event N
MAG_TYP_COF Mag. type for corr., dist coff. LNAO 0.002
Chapter 36
ML inversion, MAG2
MAG2 is a program to invert for the local magnitude scale ML. The difference to the inversion done in
MAG is that MAG2 inverts amplitudes from all events simultaneously for the scale and station corrections.
The program can invert for different scale parameters depending on selected distance ranges. The reason
for this is that it is known that the geometrical spreading is not the same for example between Pg and
Pn. Some authors have suggested distance dependent scales, but most commonly a single scale is used
for all distances for simplicity.
The general ML scale is given by
where we measure the displacement amplitude A in nm, R is the hypocentral distance in km, S is the
station correction of the individual stations, and c is a constant added to make the scale comparable
to other places at a reference distance. The station corrections add up to 0. The region dependant
parameters in the scale are a, accounting for geometrical spreading, and b, accounting for attenuation.
The part (alog10 (R) + bR + c) is commonly written as (log10 A0).
The program applies singular value decomposition using the Numerical Recipe [Press et al., 2003] routines
to invert the observations for a, b and S. It then computes the parameter c based on the reference given
through distance, amplitude and magnitude. This allows to calibrate scales between different regions so
that they are the same at the reference distance. Commonly c is set such that 480 nm amplitude at 17
km gives ML=2 (this is equivalent to 1 mm on a Wood-Anderson seismograph giving ML=2 at 17 km
[Hutton and Boore, 1987]. The original definition was 480 nm at 100 km giving a ML=3 (equivalent to
1 mm on a Wood-Anderson seismograph at 100 km distance), however it is now considred that a shorter
reference distance will give a more accurate scale. The inversion can be setup to invert for the geometrical
spreading term a in the scale for up to three distance ranges. However, a single attenuation term b is
used.
As input the program requires a parameter file mag2.par (or other name can be given as input) in the
working directory, and a standard station file e.g. STATION0.HYP. Then the user only has to enter
the input file of events in Nordic format, and if needed the name of the parameter file if different from
mag2.par. A sample file, mag2.par, and an input file, mag2nor.cat, with events from Norway are in given
in DAT.
The parameter file has the following settings given by keywords (any order):
405
406 CHAPTER 36. ML INVERSION, MAG2
INVERSION TYPE (f10.1) - 1. = singular value decomposition (no other choice yet)
DISTANCES (2f10.1) - distance range in km for observations to use
MINIMUM NUMBER OF OBS/EVEN (f10.1) - only events with more or equal number of observations
are used
MIN DISTANCERANGE RATIO (f10.1) - minimum range required computed as ratio of distances defined
by DISTANCES
ORIENTATION (f10.1) - use of components: 0. = horizontal and vertical, 1. = horizontal only, 2. =
vertical only
SYNTHETIC (f10.1) - set to 1. for synthetic test, scale defined by FIX SCALE A and FIX SCALE B;
0. for inversion of data
NOISE (f10.1) - ratio of amplitude to be added as noise to synthetic test
FIX SCALE A (3f10.1) - set the fixed parameter a in scale, possible for the three distance ranges given
by SCALE DISTANCE
FIX SCALE B (3f10.1) - set the fixed b parameter in scale, possible for the three distance ranges given
by SCALE DISTANCE
FIX SITE (f10.1) - set to 1. to not invert for station corrections; 0. for default inversion for station
corrections
IGNORE COMP (a4) - give component not to be used
IGNORE STAT (a5) - give station not to be used
REFERENCE DISTANCE, REFERENCE AMPLITUDE, REFERENCE MAGNITUDE (all f10.1) -
setup of the reference, used to calculate parameter c, give amplitude as Wood Anderson amplitude in
mm
SCALE DISTANCE (2f10.1) - give up to two distances which give the transition between the possibly
three distance dependent scales; blank or numbers larger than maximum distance will give only one scale
RANGE A (3f10) - The parameter a in the ML scale can be fixed to values given here. Three numbers
have to be given, the first gives the start value, the second the end value and the third gives the spacing
(e.g., .5,1.5,.1 means that mag2 inverts for a values between .5 and 1.5 with .1 spacing); if this parameter
is set, mag2 does run the invesion for the given (fixed) values of a.
The program produces a number of output files:
mag2 amp dis.out - amplitude versus distance for each event
mag2 amp obs.out - list of observed amplitudes
mag2 events read.out - listing of events that were read in
mag2 events used.out - events used in Nordic format
mag2 evxy.out - coordinates of events used
mag2.out - general output file, lists data used and computed scale
mag2 paths.out - event-station path coordinates
mag2 station hyp.out - hyp station file with scale and station corrections
mag2 stat list.out - simple output of stations used
mag2 statxy.out - coordinates of stations used
The output file mag2.out will give some details on the input data, as number of stations, events and
observations. It reports the reference used to fix the scale at the reference distance. Next it gives the
scale, consisting of three parts if inversion is done for all possible segments. This will be given by a1, a2,
a3, while b will be assumed to be the same. First the scale is presented to include the reference distance,
second it is shown without the reference distance included with the scale. Then comes a section with the
stations and the respective site terms, and finally the list of events with the source term inverted for.
The output file mag2.out for the example in the DAT directory should look like this:
36.1. MAGSTAT 407
ML inversion output
SVD inversion
36.1 MAGSTAT
The program MAGSTAT can be used with MAG2 to produce statistics that allow to evaluate the mag-
nitude scale. As input it takes a STATION file, as produced by MAG2, and a Nordic input file. Here,
one can use any data set, or the events that were used in the MAG2 inversion.
This program is still under construction.
408 CHAPTER 36. ML INVERSION, MAG2
Chapter 37
The program EXFILTER is used to identify probable explosions in a catalog of seismic events. Man-made
seismic events like quarry blasts, mining explosions and other explosions show a certain distribution in
time and space. Therefore the method of explosion identification here is based on normalizing the time
of day distribution of seismic event occurrence as a function of area. The program works on the following
principle: Areas where explosions occur are defined. If an event is located in one of these areas, with a
magnitude below a given maximum magnitude, with a depth less than a given maximum depth, within
a given time of day interval and within a given year interval, it is identified and marked as probable
explosion. The areas are defined by polygons of any shape. For definition of the filter areas, a list of
mine locations (with consideration of location accuracy), locations of explosions and locations of event
clusters (they might be clearly related to mine locations, but others might indicate unknown explosion
sites) can be used. The next step is to define the parameters for each area to get a normal time of day
distribution. They can be determined following the steps:
409
410 CHAPTER 37. EXPLOSION FILTERING, EXFILTER
The EXFILTER program searches for probable explosions using a catalog-file as input and marks events
that might be explosions with P as Event ID in the output file exfilter.out. Example of program run
<exfilter>
NUMBER OF AREAS: 55
FILENAME... ?
june.cat
************************************
Number of probable explosions found: 90
Output written in file: exfilter.out
************************************
411
Figure 37.1: Figures that show how the exfilter works for events in Scandinavia:
The top figure shows the filter areas used for Scandinavia. The bottom right figure shows
the time of day distribution for a 10 year Scandinavian catalog before filtering (made
with CATSTAT) and the figure bottom left shows the distribution after filtering.
412 CHAPTER 37. EXPLOSION FILTERING, EXFILTER
Chapter 38
38.1 VELEST
Introduction
The program VELEST is used to solve the coupled hypocenter velocity model problem for local earth-
quakes. It performs a simultaneous inversion for hypocenters and velocity model. The inversion is lim-
ited to first arriving phases. A detailed program description is given in the VELEST USERS GUIDE
[Kissling, 1995]. A recipe for preparing data and use of the inversion routine is presented in Initial ref-
erence models in local earthquake tomography [Kissling et al., 1994]. The two documents are available
in one Postscript file in the INF directory, the filename is velest.ps. The derived model can be used as
an improved model for earthquake location or as a starting model for 3-D inversion. For a fixed velocity
model and constant station corrections, VELEST in simultaneous mode performs the Joint-Hypocenter-
Determination (JHD).
Before you start please see the two articles Kissling-1988.pdf and Kisslig-1994.pdf in the INF directory.
The original version of VELEST by Kissling is included in the Sun and Linux versions. A version
modified to compile VELEST under Windows has been provided by Freddy Aldersons (e-mail: falder-
sons@earthlink.net). This Windows package is included in the file velest pc 3.3.zip, which is located in
the SUP directory. The files have to be extracted to the PRO directory.
The implementation of VELEST to SEISAN is given by the program VELMENU.
VELMENU provides:
After preparing a dataset of local earthquake data, VELMENU can be used to work with the VELEST
413
414CHAPTER 38. INVERSION OF TRAVEL TIME DATA AND JOINT HYPOCENTER DETERMINATION
inversion routine. The first time VELMENU is used, all input files for the inversion with default parame-
ters can be generated. These parameter files then can be changed interactively and the inversion started
with VELMENU.
Running VELMENU
The program is started with velmenu. After entering the filename of the earthquake data the menu of
VELMENU appears.
Example of program run :
velmenu
VELEST MENU
-----------
Choice ?
The complete inversion-process of earthquake data in SEISAN format, including all conversions and
preparation of parameter files, can be done with VELMENU. The steps are as follows:
#
# STATION SELECT FILE FOR PROGRAM VELEST
#
# STATIONS WILL BE USED IN THE VELEST
# INVERSION PROGRAM
#
# COMMENT LINES START WITH
#
#
KONO
BER
NRA0
...
NOTE: The order of the stations is as given by the input data file. VELEST uses the last station
as reference station, so you may want to change the order.
5: Create model file
The input model file model.inp is created using the model as given in the STATION0.HYP file.
The STATION0.HYP file, if available, will be read from the local directory, otherwise from the DAT
directory. This might be a reasonable starting model, but of course the model file has to be changed.
A. RUN VELEST
Once the parameter files are created the inversion program can be started. The inversion study requires
interactive changing of parameters, which is supported by VELMENU. All input parameter files can be
changed from VELMENU. NOTE:, ... please accept the warning: To calculate a Minimum 1-D model a
single or even a few VELEST runs are useless, as they normally do not provide any information on the
model space! [Kissling, 1995]. The conversions and the inversion programs are started as one process.
Before the inversion routine is started the station locations will be converted from the STATION0.HYP
file and the earthquake data in Nordic format will be converted to CNV (hypocenters and travel times)
format. NOTE: VELEST does not support 5 character station codes, therefore in the conversion to
VELEST, only the first 4 characters are used if the station code has 5 characters. In the conversion of
the earthquake data only phase readings from stations included in the station selection file will be used.
Arrivals with a time residual, given in the Nordic input file, above five seconds are omitted. Only the
first arriving phase of P and S respectively are used. The hypocenter location given by the inversion
will be determined by first arrivals only. The original data might include more phases like Pg, Sg or Lg.
Therefore, to get a comparison of hypocenter locations between the HYP location program and VELEST,
a Nordic file including the same data as the CNV file is created and the HYP program run on this file
before VELEST is started. The HYP program can be skipped by pressing CTRL+C, while it is running.
The results of the inversion will be given in a text file that can be viewed within VELMENU. VELMENU
provides an option to convert the VELEST output file with final hypocenter locations in CNV format
back to Nordic format and to write a file that shows differences (velout.dif) in location and time
between the two location routines, HYP and VELEST, based on the same input data.
Example of velout.dif :
1984 8 5 0235 22.7 L 59.449 4.968 0.0 BER 9 1.3 1.9CBER 3.7BBER 1
1984 8 5 235 22.1 L 59.458 5.140 0.1 BER 9 1
time: -0.6 latitude: 0.009 longitude: 0.172 depth: 0.1
1984 8 6 0406 26.6 L 59.538 5.678 1.9 BER 9 1.8 1.7CBER 3.6BBER 1
1984 8 6 4 6 26.6 L 59.505 5.655 6.2 BER 9 1
time: 0.0 latitude: -0.033 longitude: -0.023 depth: 4.3
...
Files will be overwritten, when VELMENU is started again. To work with different datasets or parameter
files it is recommended to work on different directories or to change the filenames, but note that the default
filenames (see below) will be used in VELMENU.
Problems: VELEST skips events without phase readings and therefore the number of events read by
VELEST will be different from the number given in the velest.cmn file. If this is the case VELEST stops
with the message STOP: ...end...(VELEST was running with the SINGLEEVENT-OPTION). Events
without phase readings will not be listed in the invers.out file, and should be deleted from the input file.
Joint-Hypocenter-Determination (JHD)
VELEST for fixed velocities and station corrections can be used as a JHD routine. For JHD, VELMENU
is used in the same way as described above for inversion. The only difference is that when generating the
velest.cmn you have to choose JHD. The appropriate file for JHD is then generated. Some parameters
in the velest.cmn file are different, compared to the inversion. These are dmax, nsinv and invertratio,
see VELEST USERS GUIDE for details. The output of final hypocenter locations as described above
can be converted to Nordic format, but note that the JHD will be based on first arriving phases only.
Example of JHD:
Potential problem: We have seen cases where in JHD mode the depth parameter in the inversion is
sensitive to invertratio, which when set to 1. in JHD means that VELEST inverts for station correction
in every iteration. VELEST in this case worked better with an invertratio of larger than 1. See VELEST
manual for details.
List of files generated by VELMENU / VELEST
data.cnv earthquake data in CNV format, VELEST input, generated by VEL-
MENU
data.nor earthquake data in Nordic format, HYP input, generated by VELMENU
fin hyp.cnv final hypocenter locations in CNV format, VELEST output
hyp.out earthquake data in Nordic format, HYP output
hypsum.out HYP output file
input.mod input model, VELEST input, generated by VELMENU
invers.out documentation of inversion, VELEST output
nor1.date earthquake data in Nordic format, VELMENU input
print.out HYP output file
selstat.lis selection of stations, generated by VELMENU
sta cor.out station corrections, VELEST output
station.sta station locations, VELEST input, generated by VELMENU
velout.dif difference file between HYP and VELEST location routine, VELMENU
output
velout.nor final hypocentre locations, same as fin hyp.cnv, in Nordic format,
38.2. NOR2DD 417
VELMENU output
velest.cmn VELEST control file, VELEST input, generated by VELMENU
38.2 NOR2DD
By Brian Baptie, BGS
This program produces input for the Double Difference Program HYPODD [Waldhauser, 2001; Wald-
hauser and Ellsworth, 2002] from Nordic and STATION0.HYP files. The Nordic file has to be given as
argument when running the program, example:
nor2dd select.out
The files created are:
phase.dat : phase input data
station.dat : station coordinates
HYPODD is available from: http://geopubs.wr.usgs.gov/open-file/of01-113/
SEISAN is often used for volcanic monitoring. Many of the standard tools used in SEISAN can also be
used for volcanic earthquakes, like epicenter location and magnitude. However, more special tool are also
needed and below there is a description how this is done at the British Geological Survey (BGS).
Another description, made by Andrew Lockhart at the USGS, is given in a separate manual (seisan volcano.pdf
in INF or at http://seis.geus.net/software/seisan/seisan_volcano.pdf ). This manual is a mini
SEISAN manual detailing the steps under Windows.
Volcano monitoring at BGS
By Brian Baptie
Background
An important part of volcanic seismology and the seismic monitoring of active volcanoes is the correct
recognition of the different types of seismic event generated by the volcanic activity. The principal event
types include, volcano-tectonic events, caused by shear or tensile failure of rocks; long period events,
generated by a volumetric source in a liquid; hybrid events; and volcanic tremor.
To be of value for volcanic monitoring, any database of seismic events should include the type or sub-
class of individual events. This should allow users to then extract phase and location information over
a selected time period for individual event types and calculate hourly and daily rates of event. Simple
histogram plots showing the distribution of subclasses over time can be generated with the program
VOLCSTAT (Unix only).
Initialization
The user should create a text file in the DAT directory called VOLCANO.DEF (an example is already in
the directory). The format of this file will be one line of text (80A) followed by successive lines with the
format i2,1x,6A,1X,40a for number, sub-class code and description. An example of the file is shown
below. Comments are preceded with !.
419
420 CHAPTER 39. ANALYSIS OF VOLCANIC EARTHQUAKES
6 un unknown
7 QUIT ! The last line should contain
this entry
This allows the use of a maximum 6-character sub-class identifier, e.g. hybrid, which can then be
searched for and selected.
VOLCSTAT: Creating histogram plots
The program reads S-files directly from the database, and creates input files as well as a GMT script to
produce histogram plots of the distribution of subclasses over time. The user needs to enter database
name, start and end time, and the subclasses that are to be plotted. An example of a plot is shown in
Figure 39.1. The program supports 1-char subclass names only.
The following output files are created:
volcstat.batch - c-shell script to generate Postscript output using GMT
volcstat counts.ps - Postscript output file
volcstat counts <type>.out - for each event, the Julian date is written out, one file per subclass
volcstat daily <type>.out - number of events per day, files written for each subclass
volcstat counts total.out - total event counts for each subclass
RSAM
1-minute RSAM data can be created with WAVETOOL.
Future Extensions:
It is intended that additional parameters can be included in the above structure to included routine
measurements of the volcanic earthquakes. For example, signal duration, peak amplitude and mean
frequency can be calculated for individual stations and included on additional type 3 lines with a volcanic
identifier. Parameters on each channel can then be averaged an inserted on the volcanic header line.
The proposed format for these lines is as follows
Figure 39.1: Bar diagrams showing distribution of events of different subclasses over
time.
422 CHAPTER 39. ANALYSIS OF VOLCANIC EARTHQUAKES
7:10 a4 station
12:15 a4 component
19:20 a2 PA field identifier
22:29 g8.3 peak amplitude
31:32 a2 DU field identifier
34:41 g8.3 signal duration
43:44 a2 MF field identifier
46:53 g8.3 mean frequency
55:56 a2 SB field identifier
58:65 g8.3 signal bandwidth
66:79 blank
80 a1 3 line type identifier.
For example
This method of inclusion of volcanic parameters should allow for future flexibility such as incorporation
of an additional parameter fields in columns 66 to 79. Also the use of type 3 lines means that existing
software, such as the update program, are unaffected by these lines.
Chapter 40
FK Analysis
The FK routines were provided by Tormod Kvrna from NORSAR and implemented into SEISAN by
Andrius Pacesa.
Some basics
The FK-analysis, more strictly slowness analysis, is a standard tool in seismic array processing. It is
used to find the apparent velocity and back azimuth of an incoming wavefront. Apparent velocity can
be used to identify the type of wave (P, S, Lg and etc.) and the approximate distance to the source can
be determined for teleseimic events. Utilizing azimuth and distance to the source, one can define the
approximate location of the signal source.
A description of frequency-wavenumber analysis - f-k analysis- may be found in Capon (1969). This
method has been further developed to include wide-band analysis and maximum-likelihood estimation
techniques - see Kvaerna and Doornbos [1986].
The principle of slowness analysis is beamforming in the frequency domain for a number of different
slowness values and calculating the power for each beam. The beam power will be a maximum in case
the slowness of the beam coincides with the slowness of the wavefront crossing an array. So the beam
having the maximum power will indicate the slowness of the incoming signal.
Running the program
The FK program can be started directly with command fk or from MULPLT. The program expects
that the file waveform.out with the seismic traces as input data, is available in the current directory. If
the program is invoked directly, this file has to be created before using mulplt, selecting a window and
creating the waveform.out file.
In general it is more useful, to start the FK program from MULPLT since the input file needs to be
created by mulplt. The result of the fk analysis can be saved to the S-file.
The steps are:
- start MULPLT
- use option fk to start FK program (this option creates file waveform.out and starts FK program),
accept maximum or pick value with mouse
423
424 CHAPTER 40. FK ANALYSIS
Note: The FK program only works by default with station file STATION0.HYP. If coordinates are in e.g.
STATIONt.HYP, the user will be asked to specify another station file letter, in this case t.
Example
Input:
Figure 40.1: The FK program can be started from MULPLT. The traces shown were
selected and used as input to the FK program. The result of the FK analysis is shown
in Figure 40.2. The event shown here is part of the testdata set.
427
Figure 40.2: Output from the FK program. Contours and values are the normalized
maximum power.
428 CHAPTER 40. FK ANALYSIS
Chapter 41
Instrument response
In SEISAN the instrument response can be stored as pairs of frequency, amplitude and phase or as poles
and zeros. The formats that can be used include GSE2, SEISAN, SAC and SEED. The SEISAN, SAC
and GSE response formats are described in Appendix C. For a detailed description of the GSE format,
the reader is referred to GSETT-3 [1997]. The program RESP creates response files in SEISAN and GSE
format. SEED format response files can be extracted from a SEED volume.
Introduction
The purpose of this program is to (1) Make Seisan or GSE2 response files, (2) Provide the engineer
maintaining seismic instrumentation with a practical tool for calculating and checking response functions
of the most common elements of a seismic system. The program can calculate response functions of
velocity transducers, accelerometers, filters and amplifiers, input poles and zeros or tabulated values and
multiply the combinations together to get complete system response functions. The program produces a
table with the response function and a simple graphical expression of the response curve. For the purpose
of checking measured values, a file with these values can be used as input and will be plotted together
with the theoretical values. The program can calculate, acceleration, velocity or displacement response.
Program PR RESP can make a table of many response files.
The instrument response
The seismic recording system can consist of seismic sensor, analog-digital converter, amplifier and filters.
For a detailed discussion the user is referred to Scherbaum [1996]. The combined response can be given
in the frequency domain as frequency response function or in the Laplace domain as transfer function.
The frequency response is given in pairs of frequency amplitude phase (FAP), while the transfer function
is given as poles and zeros (PAZ). The combined frequency response is obtained through multiplication
of the response from the individual components, while the transfer function is obtained by combing the
PAZ from the components. Amplifiers and accelerometers are specified simply by a constant gain. Filters
are assumed to be Butterworth. RESP can be used to write finite impulse response (FIR) coefficients
[Scherbaum, 1996] that are used as anti-alias filters in most modern digitizers if GSE is used as output
format. SEISAN has no capability to read the FIR filters or to correct for them. However, the FIR filters
are part of a full description of the instrument response and should be at least included for information
429
430 CHAPTER 41. INSTRUMENT RESPONSE
if possible.
The electrodynamic seismometer is assumed to have the following velocity frequency response:
2
T () =
02 2 + i20 h
s2
T (s) =
02 + s2 + 2s0 h
where
s = i, is the angular frequency 2f in Hz, 0 the resonance frequency of the seismometer,
i = 1 and h the damping (normally around 0.7).
NOTE: In the equation for the frequency response, the sign + 2*i*h.. was - before March 2000, so
old parameter files may have to be regenerated. The sign depends on the definition of the signs in the
Fourier transform and therefore may be different in different text books. It may even be wrong although
it looks right, if a wrong Ansatz is done. Due to the wrong sign, the FAP values in the SEISAN response
files were wrong, however the programs use the constants given in the files and the correct response is
generated. If you have the instrument constants in your old response files and not just FAP, the old
response files can be used.
The transformation from displacement to velocity or back is done by multiplying with i*..
In addition to or instead of using the equation above, values can also be entered as discrete values or as
poles and zeros.
The SEISAN response function is calculated for 60 frequencies between 0.01 and 100 Hz and the steps
between the frequencies are approximately logarithmic. The response function is normalised at 1.0 Hz (
see Table 1) and the gain at 1.0 Hz is given separately.
NOTE: ALL UNITS ARE IN METERS, SECONDS OR G (9.8ms-2)
NOTE: It seems that although the GSE format is clearly defined, there has been different interpretations.
This has also led to changes in SEISAN since the GSE response was introduced with SEISAN. For more
details, see Appendix C.
Which format to use
SEISAN, since version 7.1, supports the GSE2 calibration format in addition to the SEISAN response
file format. We recommend that you use the GSE2 format, since it presents one of the most widely
used calibration formats. Storage of the response in terms of PAZ is recommended over FAP, since the
PAZ representation describes the continuous transfer function. You may continue using existing SEISAN
response files and add new files in GSE2 format, or replace the old SEISAN response files with new GSE2
files.
How to run the program
The program has quite a few options, which easily may lead to confusion. Before you start you should
know which format you want to use (GSE2 or SEISAN) and whether you want to describe the response
in terms of FAP or PAZ. The recommended choice is to use GSE2 and PAZ.
Type RESP to start the program. You will then get a series of questions as indicated below in upper
case letters. All input is format free. A sample run is shown below.
41.1. CREATE INSTRUMENT RESPONSE FILES, RESP 431
the acceleration response. However it might sometimes be interesting to look at e.g. the velocity response
for a seismometer (after all, the seismometer is normally a velocity transducer !!). Enter the appropriate
number.
AMPLIFIER GAIN (DB) ?
This is the amplifier gain in dB. Since this question is only asked once, this gain must include gain of all
units except the recorder (asked below). This could e.g. include gain of the VCO system.
NUMBER OF FILTERS (0-10), RETURN FOR NONE ?
Up to 10 filters can be specified. If you answer 0, no filters are used and no more questions on filters will
appear. Otherwise one line of input must be given for each filter as follows:
FREQUENCY AND NUMBER OF POLES FOR EACH FILTER,
POLES NEGATIVE FOR HIGH PASS
Each line requires two numbers, the corner frequency of the filter and the number of poles. A high pass
filter is given by letting number of poles be negative. It is not always easy to know whether a filter is e.g.
one 2 pole or two 1 pole filters, the user needs to experiment with this.
FILE NAME FOR FILE WITH POLES AND ZEROS, RETURN FOR NO FILE
Here a file with poles and zeros can be entered. If seismometer constants have been chosen above, the
values calculated with poles and zeros are multiplied with the values previously calculated. The free
format file contains:
1. line: NP: Number of poles, NZ: Number of zeros, Norm: Normalization constant
Following NP lines contain one pair each of real and imaginary poles
Following NZ lines contain one pair each of real and imaginary zeros
NOTE: The unit of frequency is radian/s so if in Hz, multiply with 2 and normalization constant in
radian = (normalizationconstantinHz)2 (numberof polesnumberof zeroes) .
The next 2 options are only shown if the output file is selected to be FAP:
FILE NAME FOR TABULATED VALUES, RETURN FOR NO FILE
Here a file with tabulated values are entered. If seismometer constants or poles and zeros have been chosen
above, the tabulated values will be interpolated and multiplied with the values previously calculated for
from above. The free format file contains:
1. line: N: Number of tabulated values, Norm: Normalization constant
Following N lines contain one each frequancy, amplitude and phase(deg)
GIVE FILE NAME FOR MEASURED VALUES, RETURN FOR NONE
Give file name for measured values. In most cases you have none so just make a return. The format of
the input file is as follows:
frequency, amplitude, phase
frequency, amplitude, phase
etc.
e.g.
0.2,0.7,200
0.7,0.8,100
10.0,0.1,33
41.1. CREATE INSTRUMENT RESPONSE FILES, RESP 433
The file has no blank lines and can contain up to 60 data sets. It is important to note that the amplitude
values should be NORMALIZED at 1.0 Hz.
Now there is no more input to the response parameters, and the output is:
GAIN FACTOR AT 1.0 HZ: 12345.6
This is the gain of the system at 1.0 Hz and is also the value for normalizing the response curve, that
is, all calculated values are divided by this number. There is no unit for gain of an amplifier and for
displacement response using a seismometer and drum recording. If the recording is digital, the unit would
be counts/meter and for a velocity response counts/meter/second etc. If a file with poles and zeros is
used without any other information, the normalization constant must have the unit of count/m, similar
for the tabulated input.
Further output is given in a file called resp.out, see Table 1 for an example.
The response curves (amplitude and phase) are now printed/plotted on the screen. First comes the
amplitude response (amplitude in db versus log frequency). By pushing return, the phase response
is shown (phase shift (deg) versus log frequency). After the plots, the SEISAN calibration file can
optionally be made, follow instructions, see example below. The response file MUST be calculated for
the displacement response, and all calculation in SEISAN assume that response is calculated in counts/m.
After the SEISAN response file is made, the current parameters will be displayed and one or several can
be changed without entering all again. Like if the gain has changed at a certain date, only change date
and gain. This feature (new in SEISAN7.2) has been put in to be able to quickly make many similar
response files, like when all files have to be put in for a network.
Comments to data for response files
Station and channel codes
It is important that the station and channel codes are made exactly as they appear in the waveform files.
If not, SEISAN is not able to identify the channel.
Date
The date given here corresponds to the date from which the calibration information is valid. The SEISAN
system will always look for the most recent calibration file relative to the date of the earthquake.
Latitude, longitude and elevation
These data are for information only, it is not used anywhere in SEISAN, so it does not have to be entered,
however there is room for it in the SEISAN waveform file headers.
Comment
No information used by the system.
Plot
After the response file has been written out, a plot is made with PRESP of the file. There will also be a
plotfile, presp.eps, which can be sent to the printer. The response file can store the response in different
ways:
1. Parameters used for calculating the response: Generator constant, filters etc. In addition, the
response (amplitude and phase) at 30 frequencies are listed. In this case the response is calculated
from the parameters.
2. Incomplete set of parameters or no parameters and the response at 30 frequencies. In this case the
response is calculated by interpolation of the 30 values.
3. Poles and zeros: No discrete values are given and the response is calculated directly from the poles
434 CHAPTER 41. INSTRUMENT RESPONSE
and zeros.
See also Appendix B for the SEISAN waveform file format and section 5.5.
IMPORTANT: PUT RESPONSE FILE IN CAL DIRECTORY OR ONE OF ITS STA-
TION SUBDIRECTORIES. Response files can also be in working directory but this is not
advisable except for testing.
Example of running the program:
oxygen-(larso)23: resp
Problem: The response file naming has not changed according to the SEED convention
so location and network code cannot be entered using RESP, however they can be entered
manually in response file (see response file format). This menas that e.g. SHZ must be
entered as SH Z since only 3 of the 4 character are used. For older data in SEISAN format,
all 4 characters can be used.
Examples of response files is given in Appendix C.
Normalization constant in radian = 585.8106 (2)(numberof polesnumberof zeroes) = 585.8106 (2)4 = 9.121011 .
SEISAN also uses displacement so one zero is added. The values are then
Poles
-4.442 4.442
-4.442 -4.442
-392.0 850.7
-392.0 -850.7
-2199.0 0.0
-475.0 0.0
Zeros
0.0 0.0
0.0 0.0
0.0 0.0
To get total constant (gain and normalization constant), we multiply by sensor gain and digitizer gain
Total normalization constant = 9.121011 x2002x312793 = 5.711020
A SEISAN input file is then made
6 3 5.71e20 6 poles, 3 zeros and total gain constant
-4.442 4.442
-4.442 -4.442
-392.0 850.7
-392.0 -850.7
-2199.0 0.0
-475.0 0.0
0.0 0.0
0.0 0.0
0.0 0.0
The resp program now makes the SEISAN response file with this input as follows
Output format: 0 Only testing
Type of sensor: 0 Sensor response is in poles and zero file
Recording media gain: 1 Gain has been put into total gain constant
Amplifier gain: 0 No amplifier
Number of filters: enter No filter
File with poles and zeroes: resp.inp File with poles and zeros, can be any name
File with tabulated values: enter
File with measured values enter
Then the plot below comes up
It is seen that the two ways of making the response file gives almost the same result, however using poles
and zeroes is the most accurate, particularly for active sensors. In both cases no consideration was made
for antialias filters which normally can be disregarded if a modern sharp filter.
Example of a Gurlp DM 24 digitizer with CMG-5T accelerometer
The digitizer is the same as before
Using parameter format, SEISAN currently requires the component name to start with A. According
to international standards, the component code for an accelerometer should be something like ENZ so
41.2. EXAMPLES OF MAIN RESPONSE FILES FROM SEISMOMETERS AND ACCELEROMETER439
a parameter format cannot be used and poles and zeroes must be used. For the CMG-5T, the only
information about the sensor is the sensitivity of 1V is equivalent to 0.970 m/s2 1.03 V/ms-1. In SEISAN
parameter format this should be converted to V/g so sensitivity is then
9.81 (ms-2/g)/0.97(ms-2/V) = 10.1 V/g
Parameter format
The input is:
Output format: 0 Only testing
Type of sensor: 3 It is an accelerometer
Generator constant: 10.1
Recording media gain: 312793
Amplifier gain: 0 No amplifier
Number of filters: enter No filter
File with poles and zeroes: enter We use parameters now
File with tabulated values: enter
File with measured values enter
The plot below comes up
Poles and zeros
The displacement response for an accelerometer consists of 2 zeros and normalizarion constant of 1. The
total gain constant is then
312793 x 1.03 = 322000
So the input file for resp is
0 2 322000
00
00
440 CHAPTER 41. INSTRUMENT RESPONSE
The manual input is exactly as above in the other example of using a poles and zero input file and the
output is exactly as for the example of using parameter input.
Making a response file for a particular station
For a particular station, chose output format SEISAN PAZ or GSE2 PAZ and later answering yes to
question of making the SEISAN response file (see SEISAN manual ???????????????). If e.g. the station
has station code TEST and component name S Z, the a response file valid from January 1, 2007 will have
the name TEST S Z.2007-01-00-0000 SEI. In case of a SEISAN poles and zero file, the content is:
FOR MORE DETAILS ON HOW TO UNDERSTAND GSE AND SEED RESPONSE PARAMETERS,
SEE [Havskov and Alguacil, 2004], chapter 6.
Macrocosmic information in SEISAN are of 2 kinds. The summary information with maximum intensity,
macroseismic epicenter etc has a special line in the S-file (see Appendix1) and the SELECT program
can search for felt events. In addition, from SEISAN, version 8.1, a format has been defined to store
macroseismic observations used to create e.g. maps with isoseismals. The observations files are stored
in a local ISO format. For a format description and suggestion for file names, see Appendix A. There
are currently no SEISAN programs that generates these files so they have to be made manually from the
observations. The files in ISO are linked to the events as given by the S-file data base structure in the
same way as waveform files are linked to the events. The line type is MACRO3 and an example is
2007-01-21-1345-00.MACRO MACRO3
Thus information about event source parameters and felt information is available together. An example
of a file is
Brattvg, More og Romsdal 2007 121 1345 0 GMT 2007 121 1445 0 Local time
Comment
62.200 6.110 5.0 EMS 6150 RSTA
62.200 6.110 4.0 EMS 6150 RSTA
62.890 7.680 4.0 EMS 6480 BATNFJORDSRA
62.500 6.680 6.0 EMS 6260 SKODJE
62.460 6.130 6.0 EMS 6013 lesund
62.200 6.110 6.0 EMS 6150 RSTA
62.460 6.290 6.0 EMS 6017 SESTRANDA
62.460 6.010 4.0 EMS 6055 GODY
62.490 6.176 5.0 EMS 6057 ELLINGSY
62.430 6.180 4.0 EMS 6030 LANGEVG
The file format is given in Appendix A. Program EPIMAP can plot the new files (use macroseismic file
instead of a hypocenter file). The requirement is that the the first 3 letters after the . is mac or MAC
(as example above). The intensities will be plotted as number on the map. A new Unix program can
also be used with the data. Program MACROMAP can use the macroseismic observation file as input to
443
444 CHAPTER 42. MACROSEISMIC DATA IN SEISAN
create a map of the observations using GMT. The program generates a GMT script file, macromap.gmt,
which then is executed from within the program to create a PostScript output file, macromap.ps. This
file is then displayed, from within the program, with Unix command gv (GhostView). The program also
runs under Windows, but does not plot.
The input can also be from a file made with macroquest (web based interactive program for input from
the public, to be distributed with SEISAN CD). In addition to making the plot, a conversion from
the web format to SEISAN format is made (output file macromap.out). This option requires an input
file with postal codes in order to get location of the observations. MACROMAP can also be executed
directly or from eev. When executed directly from the prompt line, the options are: -macroinput file
with macroseismic observations, SEISAN format, abs path or in ISO -placename optional additional file
with place names, to be shown on map, abs path or in DAT, epimap format is used -postfile optional file
with postal code, abs path, used with web option If used with eev, the place name file must have name
place names.macro
An example of the postal code file is
Brattvg, More og Romsdal 2007 121 1345 0 GMT 2007 121 1445 0 Local time
Comment
62.200 6.110 5.0 EMS 6150 RSTA
62.200 6.110 4.0 EMS 6150 RSTA
62.890 7.680 4.0 EMS 6480 BATNFJORDSRA
62.500 6.680 6.0 EMS 6260 SKODJE
62.460 6.130 6.0 EMS 6013 lesund
62.200 6.110 6.0 EMS 6150 RSTA
62.460 6.290 6.0 EMS 6017 SESTRANDA
62.460 6.010 4.0 EMS 6055 GODY
62.490 6.176 5.0 EMS 6057 ELLINGSY
62.430 6.180 4.0 EMS 6030 LANGEVG
The content is postal code, latitude, longitude and location. The format is a10,ff10.3,2x,a30. the postal
code does not have to be a number, but can be any string.
445
Figure 42.1: Macroseismic map made with MACROMAP using EEV. The epicenter,
taken from the S-file, is shown with the star.
446 CHAPTER 42. MACROSEISMIC DATA IN SEISAN
Chapter 43
The cross-correlation function provides a measure of similarity between signals. In seismology cross-
correlation can be used to measure the similarity of waveforms between seismic events and in case of
similarity to determine relative arrival times of a seismic wave between two events. Waveform similarity
is caused by proximity in hypocenter location and similarity in focal mechanism between two events.
Cross correlation can be computed with the program CORR and the output be processed with program
XCLUST to detect groups of similar events.
CORR
The program CORR computes correlation and can be used to measure relative arrival times. It also can
be used to determine correlation of a master event with continuous data and extract event based data.
The output of maximum correlation for a station recording different events can be used to identify event
clusters within the data set, this can be done using the program XCLUST. The cross-correlation function
of signals x and y is computed in the time domain as:
Pn
j=1 xj y(j+i1)
rxy (i) = qP qP
n 2 n 2
j=1 xj j=1 yj+i1
Phase arrivals
Phase arrivals of similar events can be determined accurately through cross-correlation. P and S arrivals
can be determined independently. The procedure starts by selecting and picking phases for a master
event that is representative for the group of events. Analysis of this event needs to be done accurately
as it is the basis for the subsequent analysis. Phases of the other events in the group can be determined
through cross-correlation of either the complete trace or a selected phase window with the master event.
To pre-select a time window, manual identification of the phase for subsequent events is required prior
to running CORR. This may be necessary for example if the waveform file contains several events. The
phase arrival time is given by the maximum of the cross-correlation function that needs to exceed a
minimum threshold. The arrival time is written out as absolute time. Filtering is applied to the signals
447
448CHAPTER 43. CORRELATION OF WAVEFORM SIGNALS, CORR AND DETECTION OF EVENT CLUSTER
if selected for both master and subsequent events, this may be necessary especially when dealing with
events of different size. The filtering introduces a phase shift, which is applied to both signals. However,
the absolute phase arrival for the subsequent event is consistent with the master event picked time.
The calculation of the relative phase time (dt) is done by taking the travel time for the master event
(AT1 -OT1) (where AT is arrival time and OT origin time) minus the travel time of the other event
(CAT -OT2), where CAT is the time corresponding to the maximum amplitude in the cross correlation
function. The output file dt.cc can be used with the double difference location program HYPODD.
Cross correlation matrix
In this mode the cross-correlation is computed between the same stations for all pairs of events (that
fulfill the criteria for maximum distance betweenPthe events, and event and station). The resulting cross-
n
correlation matrix (for each station containing i (i 1) values, where n is the number of events) can
be used to identify groups of similar events using the program XCLUST.
Continuous mode
The main objective of running CORR in this mode is to identify a master waveform signal in a continuous
data stream, given by waveform data files. The times when correlation is higher than the selected
threshold level are written out, and can be visualized by splitting the corr.out file and using EEV and
MULPLT. In addition, it is possible to cut out individual event files (see CONTINUOUS EXTRACT
parameter).
Input file
Input to the program is given through the file corr.inp. A sample file is given in the DAT directory; the
data used in the example are part of the test data set (TEST database 2003/06, see training document).
The program is run by command corr in the same directory as corr.inp and the s-files. The waveform
files can be in any SEISAN standard place. All standard waveform formats can be used.
The parameters in corr.inp are as follows:
Event file names:
SFILE MASTER: sfile name of master event, remove or comment out this parameter to
run program in group identification mode to determine cross-correlation
matrix between all events and identify group of similar events
SFILE EVENT: sfile name of events that will be either cross-correlated among themselves,
or compared to the master event, there can be several of these.
SFILE INDEXFILE: textttfilenr.lis file can be used to give S-file names instead of listing them
with SFILE EVENT
General parameters:
449
Station parameters:
STATION: one line for configuration of each channel
STAT, COMP: station and component codes
SELCRIT: 1=P, 2=S, 4=full trace
DURATION: signal duration in seconds if (selcrit4) starting
from either P or S
FLOW, FHIGH: filter limits for bandpass filter, can be; can be
disabled by FILTER (see above)
Example of STATION line:
KEYWORD...STAT......COMP......SELCRIT...DURATION..FLOW......FHIGH.....
--- p ---
STATION PCA S Z 1. 6. 3. 8.
--- s ---
STATION EDI S E 2. 5. 3. 8.
Output files:
corr.out: This is the main output file. The file is in Nordic format and contains the phase readings if
run in phase detection mode and can be used with the SEISAN location programs directly. In continuous
mode, the file can contain more than one phase reading per channel. In group identification mode the
file contains the event list, cross-correlation matrix and suggested groups of similar events.
corr.trace: This files gives details of program run and can provide information on cause of errors. dt.cc:
Input file for hypodd giving relative phase times and correlation (see hypodd manual for details), e.g.
# 1 2 0.0
GMK -0.136 0.940 P
GMK -0.136 0.977 S
PCA -0.142 0.963 P
PCA -0.142 0.967 S
PCO -0.152 0.968 P
PCO -0.152 0.952 S
cc pairs.out: List of event pairs giving, index and s-file of first event, index and s-file of second event,
number of stations and average correlation of all stations. This file is used as input to XCLUST.
XCLUST
XCLUST is a simple program for cluster analysis of output from program CORR (cc pairs.out) to
identify groups of similar events. This is done in a rather simple approach:
451
Visual inspection of the waveforms is highly recommended to confirm the clustering results.
Input file: xclust.par
This is the file for the main parameters, which are:
MINIMUM CORRELATION: minimum correlation required for pair to be used
MINIMUM STATIONS: minimum number of correlated stations required for pair to be used
MINIMUM PERGROUP: minimum number of events required to make a group
TRACE OUTPUT; flag to write trace output file (1. for true)
Output files:
xclust.trace: gives some details of what the program does, useful for debugging
xclust.out: gives list of events for each cluster and for each event the number of links with other events
in that cluster
=============
group: 1 number of events: 20
-------------
event links
-------------
5 7
11 8
6 5
2 7
1 6
7 9
...
Index.xxx: Index file where xxx refers to number of cluster. This file can be used with eev (e.g. eev
index.001) to work on a specific cluster.
452CHAPTER 43. CORRELATION OF WAVEFORM SIGNALS, CORR AND DETECTION OF EVENT CLUSTER
Chapter 44
This chapter gives a bit more technical details of SEISAN starting with a short programmers guide with
description of sample and test programs.
SEISAN is conglomerate of programs and subroutines and it can be difficult to find out which routines to
use and how to start a new SEISAN program. The most common method is to use an existing program
and modify it. The intention with this section is to make it easier by providing a few sample programs
which then can be modified to do specific tasks. The most common subroutines in LIB, which might be
useful in other programs, are listed in Appendix D The compilation of existing SEISAN programs has been
described in section 3.8 and details of the commands are found in the Makefiles. In this distribution,
sample programs have been included, which each illustrate the used of some SEISAN features. All
programs are included in the Makefiles and can therefore be compiled directly, modified and recompiled.
Reading and writing S-files
A basic operation is to be able to read and write S-files, since all parameters are contained in the S-
files. Starting with version 7.2, a new library (rea.for) and include block (rea.inc for definition of
variables) has been included to make it easier to read and write data into S-files. Earlier, S-files were only
read and written as text strings and individual parameters were then read/written to the text strings.
Now the new routines do it all. These routines are now used in a few programs, but will be included
whenever a program is substantially modified. The sample program is called sample read write s.for.
The program illustrates how to read all parameters in an S-file, make modifications and write out the file
again. The program can be useful, if the user needs a program where special parameters are needed for
a particular analysis or for output in another format.
The program can read from a file or a data base and therefore illustrates the different posibilities in
SEISAN.
Reading and writing waveform files: SAMPLE READ WAV, SAMPLE READ CONT, SAMPLE READ ARC,
SAMPLE READ WRITE SEED, SAMPLE WRITE WAV
453
454CHAPTER 44. PROGRAMMING IN SEISAN AND LIST OF FILES IN SEISAN DISTRIBUTION
In SEISAN, waveform files can be in SEISAN, SAC, MiniSeed/SEED, Guralp or GSE format. SEISAN
format is slightly different depending on which compute platform it is written and byte swapping has
to be done in some cases. In order to automatically handle the reading of waveform files, irrespective
of format and computer platform, a set of standard routines are used (waveform.for) and an include
block where all parameters and data end up (waveform.inc). The sample reading program is called
sample read wav.for.There is a similar program sample write wav for writing SEISAN waveform files.
The program illustrates how to read many waveform files belonging to one event as if it was one file,
irrespective of format. It also demonstrates how to read just one waveform file. There is an output file
which gives a listing of all different channels found in all the files read. Thsi listing is in the format used for
defining channels in an achive. There is no detail on how to write a SEISAN binary file in this program,
but some info is given under the format description in Appendix B and the program tsig.for described
below illustrates a simple write. The sample program sample read cont illustrates how to extract out a
time segment of the continuous data base. The program also shows how to write a Seisan file with all
headers. The program is started from the command prompt:
sample read cont start time interval
where start time is yyyymmddhhmmss and interval is interval in minutes.
There is a similar program for reading data from archives, sample read arc.
sample read write seed interval
This program can read and write seed files using Chad and Rubens routines. it works independently of
SEISAN subroutines.
SAMPLE READ WRITE SEED There is also a routine in Java available to read all SEISAN binary
formats. The program is called SFORMAT (written by T. Utheim). Similarly there is a sample pro-
gram to read all SEISAN binary formats in Perl (written by Angel Rodriguez). The program is called
seibinasc.pl and you need a Perl interpreter to run it. Before starting the program, a DIRF must first
be made of waveform input files. The output is identical to a SEISAN ASCII file as made by SEIASC.
The sample write program is called sample write wav.for. It is a simple example of writing a straight
line. The output formay is SEISAN.
Correction for instrument response, sample instrument correction
This program will mainly demonstrate how to make instrument correction, but is also demonstrates
several other standard subroutine calls in SEISAN. The operations are:
Read S-file with readings and location
Get wave form files from S-file
Enter station and component for instrument correction
Find S-time from readings
Select out a time window for waveform channel around S-time
Find channel number in waveform file(s) corresponding to desired channel
Read the S-time window from waveform channel
Read response file
Prepare response removal, different filters and poles and zeros possible, the example is Wood-Anderson
response
44.2. ROUTINES FOR GEODETIC COMPUTATIONS (WGS84) 455
The SEISAN software libaray include two subroutines for geodetic computations using the WGS84 ellip-
soid:
456CHAPTER 44. PROGRAMMING IN SEISAN AND LIST OF FILES IN SEISAN DISTRIBUTION
The PRO, LIB, INC and COM directories contain software, the DAT directory parameter files for operat-
ing the SEISAN system and INF contains documentation and manuals. All files are listed and explained
in the file seisan.all in the INF directory.
The most common subrouties from LIB are listed in Appendix D
44.3. CONTENTS OF PRO, LIB, INC, INF, COM, DAT, SUP, ISO AND PIC DIRECTORIES 457
Acknowledgments
A large number of people have contributed to the SEISAN system. From the British Geological Survey,
Jim Bolton has spent several months cleaning up the software, putting in error checking and put in
the new version of EPIMAP. Jane Exton has also been involved in several of the SEISAN database
problems. A main contributor has been Barry Lienert who has spent several months at our institute to
modify and adopt the HYP program, he has also written the complete HYP manual. Bent Ruud has
contributed with the core of the AUTOPIC software and has helped out in practical aspects of installing
it. Kuvvet Atakan has written the seismic hazard part. Ronald Arvidson has tested large parts of the
system and done work on several programs and contributed with the modified version of FOCMEC. The
help of Arne Sjursen has been essential for implementing X. Vunganai Midzi did the complete testing of
version 6.0. Mario Villagran with programs, many suggestions and bug reports has interacted with the
development of SEISAN. Ezra Twesigomwe, Berit Storheim, K. Atakan and Alice Walker have debugged
the manuscript. Version 7: Bladimir Moreno has made the Windows graphics, made SEISAN run under
Linux, written several other programs and has thus enormously contributed to this version. The hazard
part has been updated by Kuvvet Atakan and Anibal Ojeda. Andrius Pacesa has implemented the FK
routine. The programs have been tested and the manual been checked by Margaret Grandison, Waldo
Taylor, Vunganai Midzi, Berit Storheim, Anne Lise Kjrgaard, Anibal Ojeda, Ileana Boschini and Cecilie
Langeland. Version 7.1: This version was tested by Anne Lise Kjrgaard, Margaret Grandison and
Vunganai Midzi. Version 7.2: Several contributions, including changes to MULPLT and implementing
HYPO71, were made by Brian Baptie from the BGS. W EMAP is a new program that was provided by
Fernando Carrilho. The CPLOT program was written by Susanne Lund Jensen from KMS. Susanne has
also checked this version of the manual. Version 8.0: The graphics part on Unix has been improved thanks
to Freya Cromarty and Frederik Tillmann. The on-site-inspection group at the CTBTO has financially
supported the development of SEISCONF and JSEISAN, as well as the modification of other programs.
JSEISAN and SEISCONF were written by Bladimir Moreno. A new version of W EMAP was provided by
Fernando Carrilho. Mario Ordaz contributed the DEGTRA A4 software. Angel Rodriguez contributed
the Perl reading routine and Terje Utheim the sfile Java program. Mathilde Bttger Srensen has
revised the manual and tested the distribution. Dieter Stoll has provided information on how to compile
on MacOSX and tested the software on Mac. RefTek has provided the rt seis program. Version 8.1:
Rodrigo Luciano Pereira Canabrava made a major contribution to SEISAN by writing and implementing
routines to read and write SEED data. Richard Luckett implemented the ISC location program. Mathilde
Bttger Srensen wrote scripts for the new macroseismic part. Brian Baptie contributed tools to convert
event data for use with travel time conversion programs. Version 8.3: Wayne Crawford has contributed
to a number of programs and made valuable suggestions. Version 9.0: Ruben Soares Lus has made
459
460 CHAPTER 45. ACKNOWLEDGMENTS
the interface routines for reading archives and contributed several Java programs. Version 10: Emanuel
Eichhammer is thanked for QCustomPlot see http://www.WorksLikeClockwork.com/. Finally we will
thank all the patient users who have suffered from the bugs and have given useful feedback.
Bibliography
A. Lomax, C. S. and Vassallo, M. (2012). Automatic picker developments and otimization: Filterpicker -
a robust, broadband picker for real-time seismic monitoring and earthquake early warning. Seis. Res.
Lett., 83:531540.
Anderson, D. (1982). Robust earthquake location using M-estimates. Phys. Eartg Plan. Int., 30:119130.
Banfill, R. (1996). PC-SUDS Utilities. A collection of tools for routine processing of seismic data stored
in the seismic unified data system for DOS (PC-SUDS), Version 2.5, Small Systems Support. Technical
report, Banfill Software Engineering.
Bouchon, M. (1981). A simple method for calculating Greens functions for elastic layered media. Bull.
Seismol. Soc. Am., 71:959972.
Brune, J. N. (1970). Tectonic stress and the spectra of seismic shear waves from earthquakes. J. Geophys.
Res., 75:49975009.
Chapman, C. H. (1978). A new method for computing synthetic seismograms. Geophys. J.R. astr. Soc.,
pages 481518.
Chapman, C. H., Jen-Yi, C., and Lyness, D. G. (1988). The WKBJ seismogram algorithm. In Doornbos,
D. J., editor, Seismological algorithms, pages 4774. Academic Press, London.
Chapman, C. H. and Orcutt, J. A. (1985). The computation of body wave synthetic seismograms in
laterally homogeneous media. Reviews of Geophysics, 23:105163.
Chiu, J., Isacs, B. L., and Cardwell, R. K. (1986). Studies of crustal converted waves using short-period
seismograms recorded in the Vanatu Island arc. Bull. Seismol. Soc. Am., 76:177190.
Dey-Sarkar, S. K. and Chapman, C. H. (1978). A simple method for computation of body-wave seismo-
grams. Bull. Seismol. Soc. Am., 68:15771593.
Draper, N. R. and Smith, H. (1966). Applied regression analysis. John Wiley and Sons, New York.
Dreger, D. S. (2003). TDMT INV: Time Domain Seismic Moment Tensor INVersion. International
Handbook of Earthquake and Engineering Seismology, 81B:1627.
Ebel, J. E. and Bonjer, K. P. (1990). Moment tensor inveriosn of small earthquakes in southwestern
Germany for fault plane solution. Geophys. J. Int., 101:133146.
Goldstein, P. (1999). SAC users manual. Technical report, Lawrence Livermore Laboratory, University
of California.
461
462 BIBLIOGRAPHY
GSETT-3 (1997). Provisional GSE 2.1, Message Formats & Protocols, Operations Annex 3. Technical
report, The Group of Scientific Experts Third Technical Test.
Gutenberg, B. and Richter, C. F. (1956). Magnitude and energy of earthquakes. Annali di Geofisica,
9:115.
Hardebeck, J. L. and Shearer, P. M. (2002). A new method for determining firstmotion focal mechanisms.
Bull. Seismol. Soc. Am., 92:22642276.
Hardebeck, J. L. and Shearer, P. M. (2003). Using S/P Amplitude Ratios to Constrain the Focal Mech-
anisms of Small Earthquakes. Bull. Seismol. Soc. Am., 93:24342444.
Havskov, J. and Alguacil, G. (2004). Instrumentation in earthquake seismology. Springer.
Havskov, J., Malone, S., McCloug, D., and Crosson, R. (1989). Coda Q for the state of Washington.
Bull. Seismol. Soc. Am., 79:10241038.
Havskov, J. and Ottem
oller, L. (2010). Routine Data Processing in Earthquake Seismology. Springer.
Herrmann, R. B. (1985). An extension of random vibration theory estimates of strong ground motion to
large distances. Bull. Seismol. Soc. Am., 75:14471453.
Herrmann, R. B. and Kijko, A. (1983). Modelling some empirical vertical component Lg relations. Bull.
Seismol. Soc. Am., 73:157171.
Hutton, L. K. and Boore, D. (1987). The Ml scale in Southern California. Bull. Seismol. Soc. Am.,
77:20742094.
IRIS Consortium (1993). Standard for the Exchange of Earthquake Data - Reference Manual, 2nd Edition.
Technical report, The International Federation of Digital Seismograph Networks (FDSN).
Kanamori, H. (1977). The energy release in great earthquakes. J. Geophys. Res., 82:29812987.
Kissling, E. (1995). Program VELEST USERS GUIDE - Short introduction. Technical report, Institute
of Geophysics, ETH Zurich, Zurich, Switzerland.
Kissling, E., Ellsworth, W. L., Eberhart-Phillips, D., and Kradolfer, U. (1994). Initial reference model in
local earthquake tomography. J. Geophys. Res., 99:1963519646.
Klein, F. W. (2014). Users Guide to HYPOINVERSE-2000, a Fortran Progeam to Solve for Earthquake
Locations and Magnitudes. Open File Report 02-171, USGS.
Kvaerna, T. and Doornbos, D. (1986). An integrated approach to slowness analysis with arrays and tree
component stations. Norsar semiannual technical summary, 1 october 1985 - 31 march 1986, NORSAR,
Kjeller, Norway. Scientific Report No. 2-85/86.
Lee, W. H. K., Bennett, R. E., and Meagher, L. (1972). A method for estimating magnitude of local
earthquakes from signal duration. Open file report, USGS.
Lienert, B. R. E. (1991). Report on modifications made to Hypocenter. Technical report, Institute of
Solid Earth Physics, University of Bergen, Bergen, Norway.
Lienert, B. R. E. (1994). HYPOCENTER 3.2: A computer program for locating earthquakes locally,
regionally and globally. Technical report, Hawaii Institute of Geophysics & Planetology.
Lienert, B. R. E., Berg, E., and Frazer, L. N. (1986). Hypocenter: An earthquake location method using
centered, scaled, and adaptively least squares. Bull. Seismol. Soc. Am., 76:771783.
BIBLIOGRAPHY 463
Lienert, B. R. E. and Havskov, J. (1995). A computer program for locating earthquakes both locally and
globally. Seis. Res. Lett., 66:2636.
M. Vassallo, C. S. and Lomax, A. (2012). Automatic picker developments and optimization: A strategy
for improving the performances of automatic phase pickers. Seis. Res. Lett., 83:541554.
McGuire, R. K. (1976). EQRISK. Evaluation of earthquake risk to site. Open File Report 76-67, United
States Department of the Interior, Geological Survey. 90pp.
McNamara, D. E. and Buland, R. P. (2004). Ambient noise levels in the continental united states. Bull.
Seismol. Soc. Am., 94:15171527.
Menke, W., Holmes, R. C., and Xie, J. (2006). On the nonuniqueness of the coupled origin time-velocity
tomography problem. Bull. Seismol. Soc. Am., 96:11311139.
Michael, A. J. (1984). Determination of stress from slip data: faults and folds. J. Geophys. Res.,
89:11,51711,526.
Nakamura, Y. (1989). A method for dynamic characteristics estimation of subsurface using microtremor
on the ground surface. QR of RTRI, 30:2533.
Ordaz, M. (1991). CRISIS. Brief description of program CRISIS. Internal report, Institute of Solid Earth
Physics, University of Bergen, Norway. 16 pp.
Ordaz, M. (1999). Users manual for program CRISIS-99. Technical report, Universidad Nacional Au-
tonoma de Mexico, Mexico City.
Ottemoller, L. (1995). Explosion filtering for Scandinavia. Norwegian national seismic network technical
report, IFJF, University of Bergen, Norway. 209 pp.
Ottemoller, L. and Havskov, J. (1999). SeisNet: A General Purpose Virtual Seismi Network. Seis. Res.
Lett., 70:522528.
Ottem
oller, L. and Havskov, J. (2003). Moment magnitude determination for local and regional earth-
quakes based on source spectra. Bull. Seismol. Soc. Am., 93:203214.
Ottemoller, L., Shapiro, N. M., Singh, S. K., and Pacheco, J. F. (2002). Lateral variaion of Lg wave
propagation in southern Mexico. J. Geophys. Res., 107.
Peterson, J. (1993). Observation and modeling of seismic background noise. Open-File report 93-322,
USGS. 95pp.
Press, W. H., Teukolsky, S. A., Vetterling, W. T., and Flannery, B. P. (2003). Numerical Recipees in
Fortrran 77, 2nd edition. Cambridge University Press, Cambridge, U.S.A.
Pujol, J. (2003). Software for joint hypocentral determination. In Lee, W. H. K., Kanamori, H., Jennings,
P. C., and Kisslinger, C., editors, International Handbook of Earthquake and Engineering Seismology,
volume 81B. IASPEI, Academic Press.
Reasenberg, P. and Oppenheimer, D. (1985). Fpfit, fpplot, and fppage: Fortran computer programs for
calculating and displaying earthquake fault plane solutions. Technical report, U.S. Geol. Survey.
Roberts, R. G., Christoffersson, A., and Cassidy, F. (1989). Real time events detection, phase identi-
fication and source location estimation using single station component seismic data and a small PC.
Geophys. J. Int., 97:471480.
464 BIBLIOGRAPHY
Ruud, B. O. and Husebye, E. S. (1992). A new three-component detector and automatic single station
bulletin production. Bull. Seismol. Soc. Am., 82:221237.
Ruud, B. O., Husebye, E. S., Ingate, S. F., and Christoffersen, A. (1988). Event location at any distance
using seismic data from a single, three-component station. Bull. Seismol. Soc. Am., 78:308325.
Scherbaum, F. (1996). Of Poles and Zeros - Fundamentals of Digital Seismology. Kluwer Academic
Publishers.
Singh, S. K., Apsel, R. J., Fried, J., and Brune, J. N. (1982). Spectral attenuation of SH-waves along the
Imperial fault. Bull. Seismol. Soc. Am., 72:20032016.
Snoke, J. A., Munsey, J. W., Teague, A. G., and Bollinger, G. A. (1984). A program for focal mechanism
determination by combined use of polarity and SV-P amplitude ratio data. Earthquake notes, 55.
Suetsugu, D. (1998). Practice on source mechanism, iisee lecture note. Technical report, Tsukuba, Japan.
Tilmann, F., Craig, T. J., Grevemeyer, I., Suwargadi, B., Kopp, H., and Flueh, E. (2010). The updip
seismic/aseismic transition of the Sumatra megathrust illuminated by aftershocks of the 2004 Aceh-
Andaman and 2005 Nias events. Geophys. J. Int., 181:12611274. 10.1111/j.1365-246X.2010.04597.x.
Utheim, T., Havskov, J., Ozyazicioglu, M., Rodriguez, J., and Talavera, E. (2014). Rtquake, a real-time
earthquake detection system integrated with seisan. Seis. Res. Lett., 85:735742. 10.1785/0220130175.
Veith, K. F. and Clawson, G. E. (1972). Magnitude from short period P-wave data. Bull. Seismol. Soc.
Am., 62:435452.
Waldhauser, F. (2001). hypoDD A program to compute double-difference hypocenter locat ions. Tech-
nical report, U.S. Geol. Survey, Menlo Park, CA.
Waldhauser, F. and Ellsworth, W. L. (2002). Fault structure and mechanics of the Northern
Hayward Fault, California, from double-difference earthquake locations. J. Geophys. Res., 107.
10.1029/2000JB000084.
Weichert, D. H. (1980). Estimation of the earthquake recurrence parameters for unequal observation
periods for different magnitudes. Bull. Seismol. Soc. Am., 70:13371346.
Appendix A
1 2 3 4 5 6 7
1234567890123456789012345678901234567890123456789012345678901234567890123456789
. . . . . . . .
-------------------------------------------------------------------------------
1996 6 3 1955 35.5 D 47.760 153.227 0.0 TES 12 1.1 5.6WHRV 5.6bPDE1
1996 6 3 1955 35.5 D 47.760 153.227 0.0 TES 12 1.1 5.6WHRV 5.6bPDE1
GAP=348 2.88 999.9 999.9999.9 -0.1404E+08 -0.3810E+08 0.1205E+09E
1996 0603 1955 31.8 D 46.787153.722 33.0 PDE 5.6bPDE 1
ACTION:SPL 08-10-02 10:19 OP:jh STATUS: ID:19960603195540 I
1996-06-03-2002-18S.TEST__012 6
1996-06-03-1917-52S.TEST__002 6
STAT SP IPHASW D HRMM SECON CODA AMPLIT PERI AZIMU VELO AIN AR TRES W DIS CAZ7
KBS BZ EP 20 4 40.63 23 -1.3210 5724 351
TRO SZ EP 20 5 32.5 21 1.7510 6471 343
LOF SZ IP C 20 5 46.68 21 -0.1110 6729 344
JNW SZ EP 20 5 49.5 21 1.1910 6755 353
JMI LZ I 20 8 27.35 6768 353
JMI LZ I 2014 41.56 6768 353
JMI LZ I 2021 25.49 6768 353
MOL SZ IP C 20 6 25.49 19 -1.7410 7408 343
FOO SZ EP 20 6 35.99 19 0.1210 7559 344
HYA SZ EP 20 6 36.91 19 -0.1410 7580 343
SUE SZ IP C 20 6 39.07 19 -0.2810 7621 344
KONO BZ IP C 20 6 40.72 19 -0.7010 7657 341
ASK SZ EP 9 20 6 37.24 19 -4.94 0 7671 344
BER SZ EP 9 20 6 37.43 19 -5.16 0 7678 344
465
466 APPENDIX A. THE NORDIC FORMAT
-------------------------------------------------------------------------------
Below are examples of how the last free columns of type 4 lines are used in the Nordic Databank in
Helsinki and in Bergen:
1985 510 21 5 16.1 LE 60.240 6.170 30.0F BER 6 2.3 3.8LNAO 4.0bPDE 3.2sISC 1
1.5 0.5 0.9 5.0 0.4 5
8505210425.WNN 6
ACTION:UPD 93-07-09 09:40 OP:jens STATUS: ID:19920101080359 I
STAT SP IPHASW D HRMM SECON CODA AMPLIT PERI AZIMU VELO AIN AR TRES W DIS CAZ7
NRSA SZ IPN 1 D 2105 13.44 0345 1234.6 1.33 245.2 08.6 22 2 -0.7 9 555 235
BER SZ IPG 2 U 2105 25.41 200
HYA SZ ISG 1 2105 33.1
ODD SZ IP 3 2105 20.1 250
ODD SZ EPG 2105 22.9
ODD SZ LG 2105 55.8
Note in this example the fault plane solution line(F) and the HYP error line(E)
Location parameters:
AR : Azimuth residual when using azimuth information in locations
TRES: Travel time residual
-----------------------------------------------------------------------------
Note: Type 1 line must be the first, all type 4 lines should be together and
the last line must be blank
--------------------------------------------------------------------------------
FORMAT DESCRIPTION:
467
Type 1 Line:
If more than 3 magnitudes need to be associated with the hypocenter in the first line, a
subsequent additional type one line can be written with the same year, month, day until event
ID and hypocenter agency. The magnitudes on this line will then be associated with the main
header line and there is then room for 6 magnitudes.
1-5 Blank
6-20 a Any descriptive text
21 Free
22 a1 Diastrophism code (PDE type)
F = Surface faulting
U = Uplift or subsidence
D = Faulting and Uplift/Subsidence
23 a1 Tsunami code (PDE type)
T = Tsunami generated
Q = Possible tsunami
24 a1 Seiche code (PDE type)
S = Seiche
Q = Possible seiche
25 a1 Cultural effects (PDE type)
C = Casualties reported
D = Damage reported
F = Earthquake was felt
H = Earthquake was heard
26 a1 Unusual events (PDE type)
L = Liquefaction
G = Geysir/fumerol
S = Landslides/Avalanches
B = Sand blows
C = Cracking in the ground (not normal faulting).
V = Visual phenomena
O = Olfactory phenomena
M = More than one of the above observed.
27 Free
28-29 i2 Max Intensity
30 a1 Max Intensity qualifier
(+ or - indicating more precicely the intensity)
31-32 a2 Intensity scale (ISC type defintions)
MM = Modified Mercalli
RF = Rossi Forel
CS = Mercalli - Cancani - Seberg
SK = Medevev - Sponheur - Karnik33 Free
34-39 f6.2 Macroseismic latitude (Decimal)
40 Free
41-47 f7.2 Macroseismic longitude (Decimal)
48 Free
49-51 f3.1 Macroseismic magnitude
52 a1 Type of magnitudeI = Magnitude based on maximum Intensity.
A = Magnitude based on felt area.
R = Magnitude based on radius of felt area.
* = Magnitude calculated by use of special formulas
developed by some person for a certain area.
Further info should be given on line 3.
53-56 f4.2 Logarithm (base 10) of radius of felt area.
57-61 f5.2 Logarithm (base 10) of area (km**2) number 1 where
469
1 Free
2-79 A Text Anything
80 A1 Type of this line ("3")
This type of line can be used to specify xnear, xfar and the starting depth for use with
HYPOCENTER. For example
Type 4 line:
1 Free
2- 6 A5 Station Name Blank = End of readings = end of
event
7 A1 Instrument Type S = SP, I = IP, L = LP etc
8 A1 Component Z, N, E ,T, R, 1, 2
9 Free or weight, see note below
10 A1 Quality Indicator I, E, etc.
11-14 A2 Phase ID PN, PG, LG, P, S, etc. **
15 I1 Weighting Indicator (1-4) 0 or blank= full weight, 1=75%, 2=50%, 3=25%,
4=0%, 9: no weight, use difference
time (e.g. P-S).
16 Free or flag A to indicate automartic pick, removed when picking
17 A1 First Motion C, D
18 Note: Currently 15 to 18 can also be used for phase assuming
column 11-14 is not blank. See note ** below.
19-20 I2 Hour Hour can be up to 48 to
indicate next day
21-22 I2 Minutes
470 APPENDIX A. THE NORDIC FORMAT
NB: Epicentral distance: Had format I5 before version 7.2. All old lines can be read with
format F5.0 with same results, but now distance can also be e.g. 1.23 km which cannot be read
by earlier versions. However, an UPDATE would fix that.
** Long phase names: An 8 character phase can be used in column 11-18. There is then not
room for polarity information. The weight is then put into column 9. This format is recognized
by HYP and MULPLT.
Type 5 line (optional): Error estimates of previous line, currently not used
by any SEISAN programs.
1 Free
2-79 A Help lines to place the numbers in right positions
471
1 Free
2 - 5 A4 The text GAP=
6 - 8 I3 Gap
15-20 F6.2 Origin time error
25-30 F6.1 Latitude (y) error
31-32 Free
33-38 F6.1 Longitude (x) error (km)
39-43 F5.1 Depth (z) error (km)
44-55 E12.4 Covariance (x,y) km*km
56-67 E12.4 Covarience (x,z) km*km
68-79 E14.4 Covariance (y,z) km*km
Columns
Note: the type M lines are pairs of lines with one line that gives the hypocenter time,
and one line that gives the moment tensor values:
1:1 Free
2:79 File name
80:80 P
Example
1980 0124 0927 CHARGE(T): 0.5 E13 LE Haakonsvern, HAA underwater explosion E13 EC3
Information on explsion site, time and agency, same format as a type 1 line, no magnitudesused,
EC3 Information on charge and site
Columns
2:11 Info text
11:12 Blank
474 APPENDIX A. THE NORDIC FORMAT
Example:
1980-03-14-0456-05.MACRO MACRO3
Sunnfjord 1980 314 456 5 GMT 1980 314 556 5 Local time
Comment
60.500 5.270 1.0 EMS 5088 MJOELKERAAEN
60.560 5.260 1.0 EMS 5100 ISDALSTOE
60.570 5.050 1.0 EMS 5112 ROSSLAND
1. Line
Location, GMT time, Local time. Format a30,i4,1x,2i2,1x,2i2,1x,i2,
GMT,1x,i4,1x,2i2,1x,2i2,1x,i2,1x,Local time
2. Line Comments
3. Line Observations: Latitude, Longitude,intensity, code for scale, postal code or similar,
location,Format 2f10.4,f5.1,1x,a3,1x,a10,2x,a. Note the postal code is an ascii string and
left justified (a10).
Example
XNEAR 1000.0 XFAR 2000.0 3
Columns
8-13: xnear value
20-25: xfar value
The file is written from Fortran as an unformatted file. This means that the file contains additional
characters (not described below, see end of this Appendix) between each block, which must be taken into
account if the file is read as a binary file. If read as Fortran unformatted, the content will appear as
described below. However, the internal structure is different on Sun, Linux and PC. SEISAN automati-
cally corrects for these differences. The SEISAN ASCII format has identical headers to the binary files,
however the binary samples are written as formatted integers, one channel at the time just like the in
the binary format.
line 1
1 1: FREE
2 30: NETWORK NAME,
COULD E.G. BE WESTERN NORWAY NETWORK
31 33: NUMBER OF CHANNELS, MAX 999
34 36: YEAR-1900, e.g. 101 for 2001 (I3)
37
38 40: DOY
41
42 43: MONTH
44
45 46: DAY
47
48 49: HR
50
51 52: MIN
53
54 59: SEC, FORMAT F6.3
60
61 69: TOTAL TIME WINDOW (SECS), FORMAT F9.3
475
476 APPENDIX B. THE SEISAN WAVEFORM FILE FORMAT
70 80: FREE
71
72
73 80: FREE
|
line 2
1 80: FREE
|
line 3
1
2 5: STATION CODE (A4), first 4 characters
6 7: FIRST two COMPONENT CODES (A2), SEED style
8 : NOT USED
9 : LAST COMPONENT CODE (A1), SEED style
10 : STATION CODE (A1), LAST CHARACTER IF 5 CHARACTER STATION CODE
11 17: START TIME RELATIVE TO EVENT FILE TIME (SECS) F7.2
18 : BLANK
19 26: STATION DATA INTERVAL LENGTH (SECS) F8.2
27 52: SECOND CHANNEL
53 78: THIRD CHANNEL
79 80: BLANK |
|
23
24 25: HR
26
27 28: MIN
29 : TIMING INDICATOR, BLANK: TIME IS OK, E: UNCERATIAN TIME
30 35: SECOND (F6.3)
36
37 43: SAMPLE RATE (F7.2 or any f-format)
44 50: NUMBER OF SAMPLES (I7)
51
52 59: LATITUDE (F8.4), optional
60
61 69: LONGITUDE (F9.4), optional
70
71 75: ELEVATION (METERS), optional
76 : Indicate gain factor: Blank: No gain factor, G: Gain factor in
column 148 to 159
77 : 2 OR 4 FOR 2 OR 4 BYTE INTEGER, BLANK IS 2 BYTE
78 : P: Poles and zeros used for response info, blank: Seismometer
period etc used for response info. See below for details.
T: Use up to 30 tabulated values irrespective of what is given
below. If less than 30, blank characters must be given.
79 : C: a combination of table, poles and zeros or instrument
constants have been used, for information only. Value in 78
must then be T.
F: Force use of header response, e.g. generated by MULPLT. Only
gain at 1 hz is correct and 78 must be set to T.
80 - 80: FREE
148- 159: Normally comment, if 76 set to G, this is a gain factor,
format G12.7. All samples read from channel are multipled
by this factor when read by routine seisinc. Used when data
is stored in units of e.g. nm where values can be less than 1.
Currently generated by MULPLT when option OUT is used to
extract part of a waveform file. Alse program WAVETOOL will
generate these files (used with Out option). Some conversion
programs may also write this.
81 - 160: COMMENT LINE DESCRIBING THE SYSTEM RESPONSE (A80)
If character 78 is P, option 2:
For each pole or zero, there are two real numbers representing the real and imaginary part of the pole
or zero, thus the number of poles is half the number of values written. First all the poles are written in
pairs of real and imaginary parts, then follow the zeros. There is room for a total of 37 poles and zeros
(74 pairs). The poles and zeros are written in a simulated line mode to make it easier to read, thus the 3
blanks after writing 7 values. It is assumed that the response is in displacment with units of counts/m.
-------------------
| EVENT FILE | at least 12* 80 BYTES
| HEADER |
-------------------
|
-------------------
| EVENT FILE |
| FIRST CHANNEL | 1040 BYTES
| HEADER |
-------------------
|
479
-------------------
| DATA |
| FIRST CHANNEL |
-------------------
|
-------------------
| EVENT FILE |
| NEXT CHANNEL | 1040 BYTES
| HEADER |
-------------------
|
-------------------
| DATA |
| NEXT CHANNEL |
-------------------
|
|
|
|
-------------------
| EVENT FILE |
| LAST CHANNEL | 1040 BYTES
| HEADER |
-------------------
|
-------------------
| DATA |
| LAST CHANNEL |
-------------------
To write a SEISAN file: If main headers are called mhead, channel header chead, data is data (integer),
there is nchan channels and each has nsamp samples, then the file is written as
Do i=1,12
Write(1) mhead(i)
Enddo
Do k=1,nchan
Write(1) chead
Write(1) (data(i),i=1,nsmap)
Enddo
This example only works up to 30 channels when writing main header. For more channels, see e.g.
program SEISEI how to do it.
Details of binary file structure
When Fortran writes a files opened with form=unformatted, additional data is added to the file to
serve as record separators which have to be taken into account if the file is read from a C-program or
if read binary from a Fortran program. Unfortunately, the number of and meaning of these additional
480 APPENDIX B. THE SEISAN WAVEFORM FILE FORMAT
characters are compiler dependent. On Sun, Linux, MaxOSX and PC from version 7.0 (using Digital
Fortran), every write is preceded and terminated with 4 additional bytes giving the number of bytes in
the write. On the PC, Seisan version 6.0 and earlier using Microsoft Fortran, the first 2 bytes in the file
are the ASCII character KP. Every write is preceded and terminated with one byte giving the number
of bytes in the write. If the write contains more than 128 bytes, it is blocked in records of 128 bytes, each
with the start and end byte which in this case is the number 128. Each record is thus 130 bytes long. All
of these additional bytes are transparent to the user if the file is read as an unformatted file. However,
since the structure is different on Sun, Linux, MacOSX and PC, a file written as unformatted on Sun,
Linux or MacOSX cannot be read as unformatted on PC or vice versa. . The files are very easy to
write and read on the same computer but difficult to read if written on a different computer. To further
complicate matters, the byte order is different on Sun and PC. With 64 bit systems, 8 bytes is used to
define number of bytes written. This type of file can also be read with SEISAN, but so far only data
written on Linux have been tested for reading on all systems. This means that version 7.0 can read all
earlier waveform files on all platforms from all platforms. However, files written on version 7.0 PC cannot
be read by any earlier versions of Seisan without modifying the earlier seisan version. In SEISAN, all
files are written as unformatted files. In order to read the files independently of where they were written,
the reading routine (buf read in seisinc, in LIB) reads the file from Fortran as a direct access file with
a record length of 2048 bytes. The additional bytes are thrown away, the relevant bytes fished out and
swapped if the file is written on a different computer than where it is read. Since there is no information
stored in the header of the file giving the byte address of each channel, the routine must read the first
file-header, calculate how many bytes there are down to where the next channel starts, jump down and
repeat the process until the desired channel is reached (this is also how SUDS files are read). However,
compared to reading the file as unformatted, only a fraction of the file is read to fish out a particular
channel. Once the channel header has been read, the start address is stored in the subroutine so any
subsequent access to that channel is very fast. Overall, random access to SEISAN waveform files is much
faster with the binary read than the previous (version 5.0 and earlier) unformatted read. Only in the
case where the whole file is read is the unformatted read faster.
---------------------------------------- -----------------------------
one byte: K indicates start of file 4 bytes: # of bytes following
---------------------------------------- -----------------------------
one byte: # of bytes following one block of data
---------------------------------------- -----------------------------
128 bytes or less of data 4 bytes: # bytes in prev. write
---------------------------------------- -------------------------------
one byte: # of bytes in previous record 4 bytes: # of bytes following
---------------------------------------- -------------------------------
one byte: # of bytes in following record one block of data
---------------------------------------- -------------------------------
128 bytes or less of data ........
..... ........
..... ........
For 64 bit systems, the above 4 byte numbers are 8 byte numbers.
481
From version 7.0,the Linux and PC file structures are exactly the same. On Sun the structure is the
same except that the bytes are swapped. This is used by SEISAN to find out where the file was written.
Since there is always 80 characters in the first write, character one in the Linux and PC file will be the
character P (which is represented by 80) while on Sun character 4 is P.
482 APPENDIX B. THE SEISAN WAVEFORM FILE FORMAT
Appendix C
SEISAN can use either SEISAN response format or GSE response format or SAC response format or
RESP response format. The detailed SEISAN format is given here as well as the parts of the GSE format
and SAC format used in SEISAN. Please see the SEED manual for details on the RESP response file
format.
See also chapter 5.5.
Line 1
1 5: STATION CODE (A5)
6 9: COMPONENT (A4), E.G. SZ L : SZ LOW GAIN, AN: ACCELERATION NS
10 : CENTURY, 0: 1900, 1:2000
11 12: YEAR
14 16: DOY
18 19: MONTH
21 22: DAY
24 25: HR
27 28: MIN
30 35: SECOND (F6.3)
52 59: LATITUDE (F8.4), optional
61 69: LONGITUDE (F9.4), optional
71 75: ELEVATION (METERS), optional
78 : P: Poles and zeros
Blank: Seismometer period etc used for response info. See below for
details.
T: Use up to 30 tabulated values irrespective of what is given
483
484 APPENDIX C. RESPONSE FILE FORMATS USED IN SEISAN
Line 2
1 80: COMMENT LINE DESCRIBING THE SYSTEM RESPONSE (A80)
OPTION 1
Line 3
1 - 80: (10G8.3) 1. SEISMOMETER PERIOD
2. FRACTION OF CRITICAL DAMPING
3. SEISMOMETER GENERATOR CONSTANT (V/m/s) or
ACCELEROMETER SENSITIVITY (V/G)
4. AMPLIFIER GAIN
5. RECORDING MEDIA GAIN (I.E. 2048 COUNTS/VOLT)
6. GAIN AT 1.0 HZ, UNITS: COUNTS/METER
7. CUTOFF FREQUENCY FOR FILTER1 (HZ)
8. # OF POLES FOR FILTER1 (NEGATIVE FOR HIGHPASS)
9. CUTOFF FREQUENCY FOR FILTER2 (HZ)
10. # OF POLES FOR FILTER2 (NEGATIVE FOR HIGHPASS)
Line 4
1 - 80: (10G8.3) FREQUENCIES AND #S OF POLES FOR FIVE MORE FILTERS
OPTION 2
If character 78 is T, use tablated values, format as in option 1
OPTION 3
If character 78 is P, option 2:
Line 3
1 - 22: (1X,2I5,G11.4) 1. NUMBER OF POLES
C.2. GSE RESPONSE FORMAT 485
2. NUMBER OF ZEROS
3. NORMALIZATION CONSTANT, COUNTS/M
23 - 80 (5G11.4) 2 Poles in pairs of real and imaginary parts
Lines 4-13
1 - 80: (G11.4) Remaining poles and zeros. 7 values are written
and then 3 spaces are left blank.
Example of SEISAN PAZ response file using the same constants as above
2 3 0.1089E+10-0.1222E-01 0.1246E-01-0.1222E-01-0.1246E-01 0.
0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
0.
FAP2 1 V 60
0.00500 0.48047733E-02 138
0.00590 0.57846815E-02 130
0.00700 0.69361408E-02 123
0.00830 0.82667302E-02 117
0.00980 0.97841555E-02 113
0.01200 0.11995634E-01 108
0.01400 0.14000172E-01 106
...
60.00000 0.59999992E+02 90
71.00000 0.70999992E+02 90
85.00000 0.84999992E+02 90
100.00000 0.99999985E+02 90
The first line is the same as before. The PAZ2 lines has the following meaning: Normalization constant of
seismometer and filter (0.26e-5), number of poles and zeroes (2 and 3), and the type of response (Laplace
transform). The DIG2 line has the gain of amplifier and AD converter combined (0.419e6 c/V) and
sample rate.
In the simplest case, the response is given by the PAZ and a scaling factor. It is common (like in SEED)
to have two scaling constants, one that normalizes the PAZ to amplitude 1 at a calibration period, and
another constant that gives the amplitudes in the physical units. This is NOT the case with the GSE2
format. The GSE2 response for PAZ normally contains at least two parts, the CAL2 line and a PAZ2
line. The scaling factor should scale the PAZ to output/input units, NOT normalize. In the CAL2 line,
the system sensitivity at a calibration period is given in units input/output, but is generally not needed.
The total response is given by the PAZ, multiplied with the PAZ2 scaling factor, or the product of several
stages.
This is how SEISAN reads the response, however, if it finds that the PAZ2 gives normalized values at
the calibration period, the response is multiplied with the sensitivity given in the CAL2 line (this is done
because such GSE files have been seen).
FIR filters can be specified in GSE as an additional stage and can be written out by the RESP pro-
gram. An example is given below. The FIR filter coefficients are required to completely describe the
instrumentation. However, they are not used in SEISAN.
ZEROS 3
POLES 4
-0.0123 0.0123
-0.0123 -0.0123
-39.1800 49.1200
-39.1800 -49.1200
CONSTANT 3.832338e+12
Note that the response file names must follow SEISAN response file file names with SAC at the end like
e.g. KEV B Z.2000-10-10-0000 SAC.
Subroutines in SEISAN are located in different files and it is not always easy to find what is available.
Consequently there are some duplication. The following is a list of some of the commmon routines and
their location. Very technical routines have not been listed. Some much used routines are not listed
since they are found together in a file like routines for waveform handling in LIB/wave.for. There are
also many routines in main programs which might be useful, they are not listed here. Most entries are
subroutines but there are also a few functions. See also INF/seisan.all for a list of all subroutine files
in LIB.
489
490 APPENDIX D. SOME GENERAL SUBROUTINES IN SEISAN IN LIB
Table D.11: Waveform handling, see wave for most general routines
Name Description Location
seisinc read a seisan format file seisinc
shead make seisan waveform channel header shead
sheads main and channel heders sheads
496 APPENDIX D. SOME GENERAL SUBROUTINES IN SEISAN IN LIB
Appendix E
Changelog
This appendix list the changes that have been added to SEISAN since version 8.2.
Please note that most changes are also notes in the header of the source code.
NOTE: Version 10.2 was only distributed under Windows so most changes to version 10.2 are also changes
to 10.3
497
498 APPENDIX E. CHANGELOG
Plot picture files from EEV with command pp. Try with earthquake on June 3rd 1996 in TEST
base. Files are in PIC or local directory. A new linetype P is used in S-file for the file name. In
SEISAN.DEF PLOT PICTURE COMMAND must be set.
Plot pdf files from EEV with command pp. Files are in PIC or local directory. A new linetype P
is used in S-file for the file name. In SEISAN.DEF PLOT PDF COMMAND must be set.
A new command em in EEV will edit an ISO file listed in the S-file.
A new program plotspec, called from EEV with command ps, will plot all spectra made with
AUTOMAG in EEV. Bad fits can be deleted interactively.
Q correction in most programs have been changed to optionally be frequency independent set q0
for f below a given frequency, usually 1 Hz.
New Perl script (textttmerge seisan.pl) to associte CAT files, many new options compared to AS-
SOCI and ASSOCIATE.
A new program ISCCSVC2NOR to convert ISC CSV catalog data to Nordic format.
WAVETOOL: new option to convert station and channel names of miniseed files
Data in SeisComP archives with quality make M, R or E, is now read, if D is not present
New program to make automatic spectra and amplitudes, AUTOMAG, also used in EEV, based
on AUTOSIG.
Program DELS to deelte par of S-file, like all S-readings. Als option form EEV
E.5. SEISAN VERSION 9.1 (2013) 499
Chad Tabants seed read and write routines are now used in all programs.
Dregers moment tensor inversion integrated with SEISAN.
Compilation has been simplified with the integration of DISLIN and Libmsed into the seisan dis-
tribution.
New option in SPEC(no plot, used for batch).
New conversion program HINOR, Hypoinverse archive format to NORDIC.
Several programs in SEISAN reads Guralp gcf format.
Several programs in SEISAN read Helberger format (used for MT inversion).
MULPLT can now, for the first time, write out any processed signal seen on the screen (option
OutW).
Filter routiens gave been reorgnized giving more options (see MULPLT section on filters).
MULPLT can overlay channels.
MULPLT can select many channels in multitrace mode by left and right button mouse click.
MULPLT can plot files in a file of files via EEV, LIST option.
500 APPENDIX E. CHANGELOG
MULPLT can select only to plot stations for plotting in a given distance from a point, usually the
epicenter.
SELECT has a new option for selecting data for CODAQ.
GMAP new option: automatic plotting of epicenters in Google Earth, see page 173.
GMAP: Error ellipses are implemented.
CODAQ output results in at station-evetn midpoints
CODAQ area: new program to sort CODAQ out put in areal bins.
JSEISAN has been removed.
SeisanExplorer, a new graphical interface to replace EEV and JSEISAN, distributed separately.
New compiler and graphics system for Windows: This is the largest change. Windows now uses
Gfortran and gcc and the graphics library is DISLIN. This has stabilized the graphics on Windows
end enabled to use the same compiler on most platforms. However, the gfortran on Windows has
created new problem in some programs most of which probably has been solved.
SEISAN can now extract and plot data from a BUD and a SEISCOMP archive, read more at page
12.
EEV has several new options: CM: Copy many files, DD: Duplicate header, FH: HASH fault
plane solution, FP: FPFIT fault plane solution, FO: Plot all fault plane solutions, IFP: Input
munually fault plane solution, INPUTFPS: input complete fault plane solution line, COML: Input
geographical location line, COMF: Input felt event comments.
FOC: A program to plot and analyze fault plane solutions.
FPFIT: FPFIT fault plane solution program with SEISAN driver program FPFIT SEISAN.
HASH SEISAN: HASH fault plane solution program.
E.8. SEISAN VERSION 8.3 (2010-06-05) 501
GETPDE - A new program that grap the PDE from the USGS web page and add the events in a
database, see page 237.
SEIS2VIEWER - A new program for plotting earthquakes on a map, command smap, see page 186.
EPIMAP: Can now plot fault plane solutions.
MULPLT: Has a three component option facilitating working with three component data.
AVQ: new program to average Q-relations.
MAG2: new program to invert amplitudes for ML scale.
Individual size of graphics windows for different programs can now be set in COLOR.DEF.
The following programs do not work with Gfortran: HYPINV, HYP ISC, NORHYP, ARCSEI
EEV copies the name and path of the current s-file to a file named eev.cur.sfile, when the system
command o is used.
Plot STATION?.HYP and SEISAN polygon files with Google Earth using GMAP, see page 173.
The Herrmann modeling programs finally work under Windows.
FOCMEC: Use of amplitudes has been improved and bugs fixed in amplitude section.
New broadband body wave and surface wave magntudes have been implemented.
New conversions programs: AHSEI, DIMASSEI, DATABASE2MSEED
Noise spectra from continuouis data, CONNOI and EVANOI.
Magnitude implementation has been adjusted to the new IASPEI standard, see table below.
Improved SEED reading and writeing (still not perfect, sometimes problem with Steim2)
SEED channel naming convention now used
SAC reading and writing also under windows
New conversion programs
E.10. SEISAN VERSION 8.2 (2008) 503
Improved WAVETOOL
SEISEI use all formats for input and SEISAN and MiniSEED for output
Store waveform data in memory for faster plotting (see MULPLT section, page 117)
Array processing of teleseismic P- arrival on regional network using plane wave approach, PFIT
Plot of arrival times using EEV
Epicenter plotting using GoogleMap or GoogleEarth (program GMAP)
SEISAN has been tested on Vista and there are problems with some graphic programs like LSQ.
EDRNOR, conversion program for USGS parametric data
GSERESP2SEED, prorgam to create dataless SEED volumes from GSE response files,
using GSE2SEED
QLg program has new features to test effect of noise and source perturbation
Instructions on how to use SEISAN under Cygwin have been added
Index
504
INDEX 505
X Windows, 19
XCLUST, 447
Xnear and xfar, 105
Y5DUMP, 252
Yearly number of events, 214