Contact Us

Southern California Earthquake Data Center

Research Tools

Waveform Data

Seismogram Transfer Program (STP)

 

What is the STP SAC2000 Module?
This module allow you to pull data from STP directly into SAC2000 memory, without ever writing files to disk. For now, it's still beta code, so if you find any errors, please let us know.

 

How Do I Get/Install It?

1. You will need sac2000 if you don't have it. You may also try requesting a copy from IRIS.

2. Download "libstp.so" from our anonymous ftp site.

3. Set up the SACSOLIST and LD_LIBRARY_PATH environments:
    setenv SACSOLIST libstp.so
    setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/path/to/file/libstp.so

4. Optional: Use init script to load automatically. Create a file named "sac.init" containing the line, "load stp". Then type on the command line:
    alias sac2000 "/path/to/sac /path/to/sac.init"

5. Start up sac2000. (If you omitted step 3, you will have to type "load stp" at the beginning of every sac2000 session where you want to use this library).

 

How Do I Use It?

1. First, start up sac2000.

2. Load the stp module from the SAC prompt if you do not have a sac.init script.
    SAC> load stp

3. Then you're ready to start issuing stp commands. Actually, just a subset of those commands: TRIG, WIN, and EVENT. (If you want more, email us.) Here are some example commands:
SAC> stp trig -net CI -sta PAS -chan B__ 9818433
SAC> stp win CI PAS B__ 2003/08/27,06:01:00 +1m
SAC> stp event -e 9818433


There are a few additional commands to control how many waveforms you get. SAC2000 can only handle 200 or 1000 waveforms depending on your version. We set the default number of waveforms to 200. You can change it with the command "stp max number", i.e. :
SAC> stp max 50
Maximum number of files to return set to 50
SAC> stp max 1000
Maximum number of files to return set to 1000

You can also override the default with the "-num" flag, i.e.:
SAC> stp -num 2 win CI PAS ___ 2003/12/01,06:01:00 +120s
This will return the first two waveforms.

 

Troubleshooting

Here are some possible errors and what they mean:

ERROR 1201: Could not find VARS variable blackboard
SAC2000 uses "%" for something, so using this as a wild card in a search will not work.

Adding 1000 files would exceed the maximum number of files SAC can handle.
No update being done.
ERROR 6010: Number 6010

SAC2000 can only hold a certain number of files in memory (either 200 or 1000 depending on what version you have). If you try to pull in more than that, no files will get put into memory, and you will get this error. Although our function attempts to replace the files in memory when it reads more files, this does not actually happen, ao you may exceed the limit in successive calls. The SAC2000 command "read" will delete files in memory and overwrite them. The SAC2000 command "deletechannel" does not delete my files from memory. The SAC2000 command "INICM" deletes everything from memory.

Here are a few ways you can deal with this problem:
A) make sure to set the default maximum files to below the SAC2000 max (to 199 or 999).
B) read in one sac file in between each call, clearing the memory.

OR:
A) make sure to set the default maximum files to the SAC2000 max (to 200 or 1000).
B) call "INICM" to clear the memory between runs. (You must run "load stp" again after INICM even if "load stp" is in the init file).

sh: trig: not found
This means that you forgot to prepend your command with "stp".

ERROR: No data.
ERROR -1:

This means that the command you gave STP returned nothing. The most likely problem is that you sent STP a command with bad syntax, such as:
SAC> stp trig
Since no event is specified, no data is returned.

Anything else? Please drop us an email.

Please Note: This module is still under some development. Please email us to inform us of any problems you encounter, or if you have suggestions on how we can improve this module. Thank you!