Data Services Newsletter

Volume 7 : No 4 : December 2005

SAC Data Handling Interface

Programmers at IRIS and ISTI have collaborated on a new module for SAC. This new module, called read_dhi, allows the venerable SAC program to connect via the internet to the DHI online systems. This means that the SAC program we all know and love, can now download events, instrument responses and seismograms from any DHI compatible server in the world.

Once this new module is loaded into sac, the user can easily specify seismogram, event and network servers, select events and quickly download seismograms directly into SAC.

Program Usage

Here is a summary of program usage.

1. Load the read_dhi module into SAC:

SAC> load read_dhi

2. Select the servers to use:

SAC> read_dhi list_servers
initializing: corbaloc:iiop:dmc.iris.washington.edu:6371/NameService, edu/iris/dmc
----------- Seismograms servers -------------
0 ==>GEOFON_SeismogramDC
1 ==>SCEPPSeismogramDC
2 ==>IRIS_ArchiveDataCenter
3 ==>IRIS_BudDataCenter
4 ==>IRIS_PondDataCenter
5 ==>SCEDC_DataCenter
6 ==>SCEDC_DataCenter
7 ==>DART_DataCenter
8 ==>NCEDC_DataCenter
Enter seismogram server number to use >>3
----------- Network servers -------------
0 ==>GEOFON_NetworkDC
1 ==>SCEPPNetworkDC
2 ==>IRIS_NetworkDC
3 ==>SCEDC_NetworkDC
4 ==>SCEDC_NetworkDC
5 ==>NCEDC_NetworkDC
Enter the number of the server to use >>2
----------- Event servers -------------
0 ==>GEOFON_EventDC
1 ==>MEMPHIS_ISTI_EventDC2
2 ==>MEMPHIS_ISTI_EventDC
3 ==>ORFEUS_ISTI_EventDC
4 ==>ORFEUS_EventDC
5 ==>ORFEUS
6 ==>ANHINGAEVENTDC
7 ==>SCEPPEventDC
8 ==>IRIS_EventDC
9 ==>SCEDC_EventDC
10 ==>ORFEUS_ISTI_EventDC
11 ==>MEMPHIS_EventDC
12 ==>MEMPHIS
13 ==>Memphis
14 ==>BDSN_EventDC
15 ==>NCEDC_EventDC
16 ==>NCSN_EventDC
Enter event server number to use >>8

3. List and select events for 2005/12/20 with magnitude greater than 5:

SAC> read_dhi event 2005/12/20 00:00:00 2005/12/20 23:59:59 5 10
Requesting event from : 2005-12-20T00:00:00.0000Z to 2005-12-20T23:59:59.0000Z 
    with a magnitude range: (min,max) 5, 10
# Date latitude longitude depth magnitude magn type... .. .
0 ===> 2005/12/20 05:51:10.400 12.163 140.959 6.4 6.2 MO
1 ===> 2005/12/20 05:51:10.000 12.160 140.960 6.4 6.2 M
2 ===> 2005/12/20 05:51:13.000 12.220 140.980 29.4 6.1 M
3 ===> 2005/12/20 05:51:14.000 12.190 140.990 35.0 6.2 M
4 ===> 2005/12/20 16:05:40.000 12.150 140.870 29.0 5.4 M
5 ===> 2005/12/20 16:05:41.000 12.120 140.840 35.0 5.4 M
6 ===> 2005/12/20 16:34:54.000 -1.950 -80.690 57.4 5.0 M
7 ===> 2005/12/20 18:34:35.000 -25.340 179.390 502.7 5.2 M
8 ===> 2005/12/20 18:34:37.000 -25.390 179.380 527.7 5.2 M
Enter event number to use >>1

4. Download seismograms for this event from the IU network (note the use of wildcards):

SAC> read_dhi seismograms IU * * BH* 2005/12/20 05:50:00 2005/12/20 06:10:00
checking for data available:
checking >> IRIS_BudDataCenter, IU, *, *, BH*, 2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
0 ==> IU,ADK,00,BHE,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
1 ==> IU,ADK,00,BHN,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
2 ==> IU,ADK,00,BHZ,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
3 ==> IU,AFI,00,BHE,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
4 ==> IU,AFI,00,BHN,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
5 ==> IU,AFI,00,BHZ,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
6 ==> IU,AFI,10,BHE,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
7 ==> IU,AFI,10,BHN,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
8 ==> IU,AFI,10,BHZ,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
9 ==> IU,ANMO,00,BH1,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
.
.
.
.
.
243 ==> IU,WCI,00,BHZ,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
244 ==> IU,WVT,,BHE,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
245 ==> IU,WVT,,BHN,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
246 ==> IU,WVT,,BHZ,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
247 ==> IU,YAK,00,BHE,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
248 ==> IU,YAK,00,BHN,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
249 ==> IU,YAK,00,BHZ,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
250 ==> IU,YSS,00,BHE,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
251 ==> IU,YSS,00,BHN,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
252 ==> IU,YSS,00,BHZ,2005-12-20T05:50:00.0000Z,2005-12-20T06:10:00.0000Z
requesting >> edu/iris/dmc, IRIS_BudDataCenter, IU, AFI, 00, BHE,
    2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
requesting >> edu/iris/dmc, IRIS_BudDataCenter, IU, AFI, 00, BHN,
    2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
requesting >> edu/iris/dmc, IRIS_BudDataCenter, IU, AFI, 00, BHZ,
    2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
requesting >> edu/iris/dmc, IRIS_BudDataCenter, IU, AFI, 10, BHE,
    2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
requesting >> edu/iris/dmc, IRIS_BudDataCenter, IU, AFI, 10, BHN,
    2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
requesting >> edu/iris/dmc, IRIS_BudDataCenter, IU, AFI, 10, BHZ,
    2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
requesting >> edu/iris/dmc, IRIS_BudDataCenter, IU, ANMO, 00, BH1,
    2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
requesting >> edu/iris/dmc, IRIS_BudDataCenter, IU, ANMO, 00, BH2,
    2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
requesting >> edu/iris/dmc, IRIS_BudDataCenter, IU, ANMO, 00, BHZ,
    2005-12-20T05:50:00.0000Z, 2005-12-20T06:10:00.0000Z
.
.
.
.
downloaded 244 seismograms
SAC>

5. Once into SAC you are free to use any off the SAC commands as normal. Here is a plot of an ANMO download:

Plot of station ANMO waveforms retrieved using the new SAC-DHI interface.
Figure 1: Plot of station ANMO waveforms retrieved using the new SAC-DHI interface.

You can also download instrument response with writing to disk in the RESP file format. The read_dhi module also can create a SAC Poles and Zeros file.

In summary, SAC users now take advantage of the quickness and flexibility of the DHI online systems while still retaining the powerful SAC tools.

Note

The ISTI module which connects the java based DHI to the SAC program can be used by other developers to connect their C or C++ language programs to the DHI.

More information

Download SAC DHI

by Chris Laughbon (IRIS Data Management Center)

13:41:31 v.b4412d20