The SOD demo

Files that configure SOD's operation are called recipes. The --demo flag tells SOD to run the demo recipe included in SOD. This recipe gathers seismograms for channels in the II network for earthquakes with a magnitude of 6 or greater in January of 2003. In order to see the recipe that SOD uses for the demo, invoke the command sod --demo -r on Unix systems and sod.bat --demo -r on Windows. The -r tells SOD to print the recipe instead of running it.

Creating directories for SOD runs

SOD uses a database to keep track of its actions. Every time it runs, a directory SodDb is created to store it. This database needs to be isolated between runs of SOD. If a recipe is run in a directory where it ran previously, SOD will exit immediately, thinking all work is done. Therefore, we run SOD in a new directory for each invocation of each recipe. Start the command prompt, create a directory "demo", and cd into it.

Running the demo

From the demo directory, invoke the command sod --demo on Unix systems and sod.bat --demo on Windows. If the Install went well, you should see some output like the following:

Congratulations, valid recipe.
Fiji Islands Region (-20.6, -177.7) 378000 m 2003/01/04 05:15:03 GMT 6.5 MW
Luzon, Philippines (15.7, 119.7) 10000 m 2003/01/06 23:43:50 GMT 6.0 MW
Chile-Argentina Border Region (-33.8, -70.1) 110800 m 2003/01/07 00:54:51 GMT 6.0 MB
Fiji Islands Region (-19.7, -176.3) 10000 m 2003/01/09 02:50:45 GMT 6.0 MW
New Ireland Region, P.N.G. (-5.3, 153.7) 71900 m 2003/01/10 13:11:56 GMT 6.7 MW
Channel: II.AAK.00.BHE
Channel: II.AAK.00.BHN
Channel: II.AAK.00.BHZ
Channel: II.ABKT.00.BHE
Channel: II.ABKT.00.BHN
Channel: II.ABKT.00.BHZ
Channel: II.ALE.00.BHE
Channel: II.ALE.00.BHN
Channel: II.ALE.00.BHZ
Channel: II.ARU.00.BHE
Channel: II.ARU.00.BHN
Channel: II.ARU.00.BHZ

The first messages like

Fiji Islands Region (-20.6, -177.7) 378000 m 2003/01/04 05:15:03 GMT 6.5 MW
are printed every time SOD retrieves an event that matches demo recipe's criteria. The ones that follow like
Channel: II.AAK.00.BHE
are printed for every matching channel. Finally, messages like
Got 1 seismograms for II.COCO.00.BH1 for eq on 2003/01/04 05:15:03 GMT
are printed every time SOD gets a seismogram. You can watch for these to get a rough feel for what SOD is doing.

In addition to the database files mentioned earlier, this SOD recipe will store all the seismograms it retrieves as sac files. These are put in the seismograms directory where SOD was started. If the run has been going for a while or is finished, you'll see directories in seismograms for every earthquake SOD has processed and inside of each of these is a data directory containing sac files for every channel retrieved for the earthquake.

SOD is very configurable, so all of this printing and saving is how the demo is configured. How your own SOD runs work depends on what you tell SOD to do in the recipe. In general, printing a line per event, channel and seismogram is very helpful for small recipes where you are watching the output, or when you are creating a new recipe and are not sure you have things quite right yet.

There are three command line flags that can be very helpful when creating a new recipe or debugging an existing recipe.

NextNext: Network Tutorial