Electronic Seismologist logo
May/June 1998

Steve Malone
E-mail: steve@geophys.washington.edu
Geophyics AK-50
University of Washington
Seattle, WA 98195
Phone: (206) 685-3811
Fax: (206) 543-0489


What seismologist is not familiar with SAC? The venerable "Seismic Analysis Code" has been around almost as long as some of us grey beards. It was one of the first general purpose analysis programs to be made available to a fairly wide community of users during the transition from mostly batch processing to interactive computing during the 1970s. It still is a very popular analysis program even though there are now other, more "modern" programs with some similar capabilities, ease of use, and efficiency.

SAC has evolved over the years but has retained both its basic look and feel and its data file format. In fact, this stability is one of the attributes of SAC which is often under appreciated. While most can find fault with the SAC data format, its constancy has often had a calming effect on the Electronic Seismologist (ES) whose feeble brain is overloaded with the cornucopia of waveform formats in use today. The original developers of SAC did a remarkable job of designing a header structure including most of the variables needed for a huge variety of uses. They also built in a few extra (user defined) variables to allow for expansion. However, the ES has always been mystified by the exclusion of that most basic of earthquake parameters, magnitude. SAC format has always included a string variable called "KHOLE" (Hole identification if nuclear event), which shows its heritage in the nuclear test discrimination research world, but not until the most recent version has one of its variables been assigned to event size. Despite a few such missing variables, SAC format's simplicity and organization has contributed to its longevity. Comparing it to the modern data exchange format, SEED is like comparing the trusty jeep ("sport utility vehicle" for the young'uns) with the space shuttle; it won't go everywhere and maybe not very fast, but mere mortals can use it to get where they most need to go.

This is not to say that SAC itself has remained static. The program has expanded its repertoire from time to time and been recast into different programming languages. In particular, new functions have been added, and its graphics display capabilities have been enhanced. This does not mean it has adopted a quiche-eating, champagne-drinking GUI. Rather different graphics output devices and modes have been added as the computer industry developed around it. SAC sticks to its basic heritage of command-line interaction. This may make its learning curve steeper than some flashy pull-down-pop-up-click-the-command type interface, but the ES thinks it makes it more versatile and powerful in the long run.

SAC has enjoyed the privilege of wealthy and stable parents. Lawrence Livermore National Labs has allowed (maybe even encouraged) a talented series of seismologist-programmers to develop and nurture SAC for more than 20 years. The developers have used SAC in research projects for test driving to improve its capabilities. The latest incarnation of SAC (SAC2000) is better and more of the same, a careful blending of stability and new features. The ES is convinced that this type of upgrading is much harder to do than to start over and "do it right this time" but is also much more valuable for this type of program. He is greatly relieved that the same old commands he has been using for 20 years work pretty much like they always have in this new version. The new guardians of SAC have some interesting plans for bringing the old war horse into the next millinium. To get a flavor of what SAC2000 is and where it is going, the ES convinced Peter Goldstein and his colleagues at LLNL to write his column for him this month.


Peter Goldstein, Doug Dodge, Mike Firpo, and Stan Ruppert
Geophysics and Global Security Division, Lawrence Livermore National Laboratory
URL: http://www.llnl.gov/redirects/ees/peterg.html


SAC2000 or SAC, as many users refer to it, is a fundamental seismic signal processing and analysis tool. It is used by a large portion of the international seismological community including academic, government, and business institutions. SAC has attained this popularity for a variety of reasons. Foremost are its extensive, well-documented, well-tested, and well-maintained capabilities; its macro programming language which allows users to develop new analysis techniques and customized processing programs; and its ability to do both batch and interactive processing. SAC's strengths also include its ability to process a diverse range of data types and its extensive usage (> 400 institutions worldwide), which has made it much easier for researchers to develop collaborative research projects. SAC is relatively easy to use and is available on a variety of hardware platforms. Much of its popularity is probably due to its user oriented development philosophy, which has led to consistent, backward compatible development guided by users input and needs.

Figure 1. Selected signal processing and analysis capabilities in SAC2000. Maps of station and event locations are illustrated on the left. Event symbols can be sized according to user specified criteria such as magnitude or travel-time residual. A single station, multi- event record section with travel time curves is shown at the upper right. The P-wave FK spectrum and spectrogram of a selected event is shown at the lower middle and right respectively.

SAC2000's extensive signal processing capabilities include: data inspection, signal correction and quality control, unary and binary data operations, travel-time analysis, spectral analysis including high-resolution spectral estimation, spectrograms and binary sonograms, and array and three-component analysis (Figure 1). These capabilities have proved useful for solving a number of geophysical problems such as the following: estimation and analysis of strong ground motions; earthquake, explosion, and volcanic source studies; seismic discrimination and identification studies; magnitude estimation; travel-time analysis; studies of wave propagation phenomena such as path and site effects; and investigations of Earth structure. It has also proved useful for analysis of other geophysical data such as measurements of electro-magnetic or hydro-acoustic phenomena.

Recent Developments

Over the last few years, our focus has been on enhancing users abilities to combine and utilize data and results from a variety of tools and data sources. Recent developments include map making capabilities (see Figure 1) via an easy to use interface to the Generic Mapping Tool (GMT, Wessel and Smith, 1991), a new tool for processing three-component data interactively or in batch mode (Figure 2), an Application Programming Interface (API) that allows users to develop their own SAC commands, and an easy-to-use interface to MATLAB that allows a user to apply MATLAB commands and scripts on SAC data from within SAC2000. We have also implemented many commands to enhance user efficiency, such as a command to delete selected channels from memory, and we have made numerous improvements and enhancements to individual SAC commands such as the record section plotting capability.

Figure 2. Interactive version of SAC2000's three-component data inspection and analysis tool. The leftmost panel illustrates the main window where picking, processing, and data window selections are made. The center panel indicates the vertical component window of the data and the corresponding three-dimensional particle motion. The particle motion perspective can be changed interactively by dragging on the axes of the particle-motion plot or by changing the values in the text box at the lower right. The panel at the right indicates the ML probability estimate of the polarization for this window.

Our most recent work on SAC2000 is motivated by the need for easy and efficient access to, processing of and interpretation of large amounts of data, such as that contained in CSS3.0-based Oracle databases or CSS3.0 flat files. To meet this need, we have developed a new, internal data structure and data management module for SAC2000. It is capable of representing all the information in our CSS3.0 schema, Oracle databases. Currently SAC2000 can access data from those databases using a variety of easy to use selection criteria. Work is in progress to allow SAC2000 to update the databases as well. Given the variety of data that are currently possible in SAC2000 and other programs and the likelihood that additional parameters will be needed in the future, we have designed SAC2000's new data structure to be easily extendible and anticipate incorporation of significant extensions to the CSS3.0 schema.

The following summarizes a few of our recent developments. A more extensive listing of recent developments can be found in Goldstein et al. (1997), in the on-line documentation that comes with SAC, or on the web at http://www.llnl.gov/sac/sac.html.

Three-component Data Analysis Tool

We have developed a new, MATLAB-based tool for interactive and batch mode analysis of 3-component seismic data. This tool will improve a user's ability to detect and identify seismic phases, especially secondary phases. It has also helped us process data and identify problems with data such as incorrect sensor orientation information.

This tool has a number of capabilities including the following: graphical data selection and filter design, automatic back-azimuth and incidence angle estimation, interactive, graphical, three-component particle motion analysis, and maximum-likelihood probability estimates of selected wave types (Christoffersson et al., 1988).

Figure 2 displays a selected example of the interactive version of this three-component data analysis tool. Interactive data/window selection, phase picking, and signal rotation are done in the main window. Pop-up windows are used for the following: filter the data (no windows shown), interactively analyze particle motions (particle-motion module), and compute maximum-likelihood probabilities for selected wave types (ML-polarization analysis module).

Access to Oracle and Flat File CSS3.0 Databases

We are developing a new data management module in SAC2000 that will provide convenient and intuitive access to selected databases such as CSS3.0 based Oracle databases and flat files. This module includes a new, CSS3.0 compatible internal data structure, functions to read and write standard SAC files, and functions to read from a CSS3.0 schema, Oracle database.

This new Oracle database capability allows a user to read data based on selected event criteria such as time, location, magnitude, and depth or station criteria such as name, component, or location or a combination of station and event criteria. For example, assuming an existing CSS3.0 schema, Oracle database, a user could use the following command to read data recorded at station ABKT on component BHZ from events with epicenters with latitudes between 30 and 32 degrees and with longitudes between 60 and 62 degrees:

SAC> readdb srclat 30 32 srclon 60 62 staname ABKT component BHZ

The following, slightly more complicated command could be used to look for aftershocks within 50 km of an earthquake that occurred on day 162 at 9:00 GMT in 1994 with an epicenter at 29 degrees latitude, 53 degrees longitude. It also restricts the aftershocks to have magnitudes between 4.7 to 7.0.

SAC> readdb srccircle 29 53 50 sta ABKT chan BHZ mbmag 4.7 7.0 starttime 1994 162 09:00

With our database (which currently contains more than 80,000 waveforms) such requests are executed within seconds, providing the user nearly instantaneous access to a very large database of waveform and parameter data.

Currently, SAC2000 can read from, but not write to, a database. Work is in progress to allow SAC2000 to update a database as well. Given the variety of data that are currently possible in SAC2000 and other programs, and the likelihood that additional parameters will be needed in the future, we have designed SAC2000's new internal data structure to be easily extendible and anticipate incorporation of extensions to the CSS3.0 schema.

Efficiency Enhancements

We have implemented a number of new processing capabilities and enhancements in SAC2000 that will improve user efficiency. These include the ability to use UNIX commands from within SAC2000 and a HISTORY command, similar to the UNIX "csh" history command, that allows the user to inspect and repeat previously entered SAC2000 commands. DELETECHANNEL is a recently implemented data selection capability that can be used with the FILENUMBER command to identify and remove unwanted data from SAC2000's internal memory.


We have implemented a number of new processing capabilities and enhancements in SAC2000 that will improve users' efficiency and their ability to accurately interpret data. We are also developing a new, flexible data structure for SAC2000 that will allow us to access, modify, and output all the information in CSS3.0-based Oracle databases or CSS3.0 flat files. These new capabilities are essential for efficient processing and analysis of the large amounts of seismic data that are currently being collected.


Work performed under the auspices of the U.S. Department of Energy by the Lawrence Livermore National Laboratory under contract W 405-ENG-48.


Christoffersson, A.,E.S. Husebye, and S.F. Ingate (1988). Wavefield decomposition using ML probabilities in modeling single-site 3-component records, Geophys. J. Int. 93, 197-213.

Goldstein, P., Doug Dodge, and Mike Firpo (1997). Recent developments in SAC2000, Proceedings of the 19th annual seismic research symposium on monitoring a CTBT, Orlando, FL, September 23-25.

Wessel, P. and W. H. F. Smith (1991). Free software helps map and display data, Eos, Trans. Am. Geophys. U. 72, 441.

SRL encourages guest columnists to contribute to the "Electronic Seismologist." Please contact Steve Malone with your ideas. His e-mail address is steve@geophys.washington.edu.

Posted: 26 June 1998
Updated: 11 December 2001