DHI2MSEED
Version 0.06
Introduction
The DHI2mseed.jar is a simple
command line utility for downloading miniSEED files from a DHI server
using command line arguments. It takes a couple of input files
specifying the DHI IIOPs and a SCNL (Station Channel Network Location)
code file that lists the data desired, and then writes miniSEED files
to a specified directory.
An installation of Java, version 1.4 or later,
is required to run the program.
To run the module, you will need the DHI2mseed.jar
file and can issue a simple command line such as this:
java -jar DHI2mseed.jar -duration 60 -f scnl.list -p iris.txt -starttime 2007-07-01T00:00:00 -o outputdir
The files are written to the output directory in the
format S.C.N.L.YYYYMMDD.HHmmss.mseed.
Properties File
The properties file
contains the CORBA links to connect to a DHI. Here is an example file
for iris.txt that is an example used for the IRIS DHI:
NameService=corbaloc:iiop:dmc.iris.washington.edu:6371/NameService
NetworkDNS=edu/iris/dmc
NetworkDC=IRIS_NetworkDC
SeismogramDNS=edu/iris/dmc
SeismogramDC=IRIS_DataCenter
|
Arguments
The arguments on the command line
are explained in this section. There are limited arguments and some are
optional. Note if java -jar
DHI2mseed.jar -help is issued, then the
following is echoed back to the user:
$ java -jar Dhi2mseed.jar -help
DHI2mseed, Version 0.06
Usage:
-duration
minutes
-endtime
yyyy-MM-ddTHH:mm:ss
-exist
[error|ignore|overwrite]
-f
SCNLfile
-help
-o
outputdirectory
-outputFilename
file
-p
propertiesfile
-scnl
Station Channel Network Location
-starttime
yyyy-MM-ddTHH:mm:ss
|
All time
values should be specified in the ISO 8061 standard date and time
format, which is YYYY-MM-DDTHH:mm:ss where YYYY is the year in the
Gregorian calendar, MM
is the month of the year between 01 (January) and 12 (December), DD is the day of the month
between 01 and 31, the capital letter T is used to separate the date and
time components, HH
is the number of complete hours that have passed since midnight, mm is the number of complete
minutes since the start of the hour, and ss
is the number of complete seconds since the start of the minute. This
format avoids using a space which requires the user to use quotes which
must be used with care on some operating systems. For example you can
not use single quotes under Windows.
For convenience you can use a space rather than the capital letter T to separate the date and time. Note that quotes are needed
if you use a space!
-duration minutes
The number of minutes to request for the
waveforms.
This argument is required if either the starttime or endtime are
not specified. If this argument, the starttime and the endtime are all specified this argument is not used.
-endtime = YYYY-MM-DDTHH:mm:ss
The end time of the
desired waveforms. Note that quotes are needed if you use a space in
the time value!
This argument is
required if either the starttime
or the duration are not specified.
-exist [error|ignore|overwrite]
The way the module
should react if a miniSEED
file being written to
already exists. If error
is specified the program will terminate immediately when an existing
file is found, ignore
will
not write any output files that exist, and overwrite will
overwrite existing files.
The default is set to ignore.
-scnl S.C.N.L
The dot (period) separated SCNL values for specifying which Station Channel Network
Location codes to retrieve miniSEED for. Using -- is equivalent to
requesting space space.
-f SCNLfile
The name of the file that contains the space
separated SCNL values for specifying which Station Channel Network
Location codes to retrieve miniSEED for. Using -- is equivalent to
requesting space space.
The default name looked for is scnl.txt if -scnl and -f are not
specified on the command line.
-o
outputdirectory
The
directory name
where to write the miniSEED files. The directory
will be created if it does not
exist.
The default is to open a directory named data in the
current working
directory if not specified.
-o outputFilename
The
single file to write all of the miniSEED data.
If the file already exists the miniSEED data is
appended to the file.
The default is to write one or
more miniSEED files with
file names based on the SCNL.
-p propsfilename
The name of the properties file. See above for example specification.
The default is to use the IRIS DHI server.
-starttime = YYYY-MM-DDTHH:mm:ss
The start time of
the desired waveforms. Note that quotes are
needed if you use a space in the time
value!
This
argument is required if either the endtime or
the duration are not specified.
Example Run
$ java -jar DHI2mseed.jar
-duration 10 -starttime "2007-07-01 00:00:00" -p iris.txt -f scnl.list
-o output
DHI2mseed, Version 0.06
Processing SCNL file (1): SBA BHZ IU
org.omg.CORBA.ORBClass=com.ooc.CORBA.ORB
ooc.orb.service.NameService=corbaloc:iiop:dmc.iris.washington.edu:6371/NameService
org.omg.CORBA.ORBSingletonClass=org.omg.CORBA.ORBSingletonClass
requesting data for IU.SBA.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 2 seismograms
writing seed file [0]: output/SBA.BHZ.IU..20070701.000006.mseed
seed file already exists [1]: output/SBA.BHZ.IU..20070701.000006.mseed
Processing SCNL file (2): COR BHZ IU
requesting data for IU.COR.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 2 seismograms
writing seed file [0]: output/COR.BHZ.IU..20070701.000014.mseed
seed file already exists [1]: output/COR.BHZ.IU..20070701.000014.mseed
Processing SCNL file (3): HRV BHZ IU
requesting data for IU.HRV.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 2 seismograms
writing seed file [0]: output/HRV.BHZ.IU..20070701.000013.mseed
seed file already exists [1]: output/HRV.BHZ.IU..20070701.000013.mseed
Processing SCNL file (4): ANMO BHZ IU
requesting data for IU.ANMO.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 4 seismograms
writing seed file [0]: output/ANMO.BHZ.IU..20070701.000000.mseed
writing seed file [1]: output/ANMO.BHZ.IU..20070701.000001.mseed
seed file already exists [2]: output/ANMO.BHZ.IU..20070701.000000.mseed
writing seed file [3]: output/ANMO.BHZ.IU..20070701.000031.mseed
Processing SCNL file (5): WVT BHZ IU
requesting data for IU.WVT.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 2 seismograms
writing seed file [0]: output/WVT.BHZ.IU..20070701.000005.mseed
seed file already exists [1]: output/WVT.BHZ.IU..20070701.000005.mseed
Processing SCNL file (6): CCM BHZ IU
requesting data for IU.CCM.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 2 seismograms
writing seed file [0]: output/CCM.BHZ.IU..20070701.000001.mseed
seed file already exists [1]: output/CCM.BHZ.IU..20070701.000001.mseed
Processing SCNL file (7): CIA BHZ CI
requesting data for CI.CIA.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 1 seismograms
writing seed file [0]: output/CIA.BHZ.CI..20070701.000000.mseed
Processing SCNL file (8): BAR BHZ CI
requesting data for CI.BAR.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 1 seismograms
writing seed file [0]: output/BAR.BHZ.CI..20070701.000000.mseed
Processing SCNL file (9): RPV BHZ CI
requesting data for CI.RPV.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 1 seismograms
writing seed file [0]: output/RPV.BHZ.CI..20070701.000000.mseed
Processing SCNL file (10): JCS BHZ CI
requesting data for CI.JCS.*.BHZ 2007-07-01T00:00:00.000Z -
2007-07-01T00:10:00.000Z
Got 1 seismograms
writing seed file [0]: output/JCS.BHZ.CI..20070701.000000.mseed
$ ls output/
ANMO.BHZ.IU..20070701.000000.mseed
CCM.BHZ.IU..20070701.000001.mseed
JCS.BHZ.CI..20070701.000000.mseed
ANMO.BHZ.IU..20070701.000001.mseed
CIA.BHZ.CI..20070701.000000.mseed
RPV.BHZ.CI..20070701.000000.mseed
ANMO.BHZ.IU..20070701.000031.mseed
COR.BHZ.IU..20070701.000014.mseed
SBA.BHZ.IU..20070701.000006.mseed
BAR.BHZ.CI..20070701.000000.mseed
HRV.BHZ.IU..20070701.000013.mseed
WVT.BHZ.IU..20070701.000005.mseed
$ more iris.txt
NameService=corbaloc:iiop:dmc.iris.washington.edu:6371/NameService
NetworkDNS=edu/iris/dmc
NetworkDC=IRIS_NetworkDC
SeismogramDNS=edu/iris/dmc
SeismogramDC=IRIS_DataCenter
$ more scnl.list
SBA BHZ IU --
COR BHZ IU --
HRV BHZ IU --
ANMO BHZ IU --
WVT BHZ IU --
CCM BHZ IU --
CIA BHZ CI --
BAR BHZ CI --
RPV BHZ CI --
JCS BHZ CI --
Libraries
The following open-source
libraries are used by this program:
3/3/2008 - Kevin Frechette, Instrumental Software
Technologies, Inc. -
info@isti.com

Click here to visit the ISTI home page