FetchResp Documentation
Purpose
downloads response information from IRIS Network server to local disk.
Program version: FetchResp v1.0.
Introduction
FetchResp is a program which will download response information from the IRIS
Network Data Center. It is intended to be run as a script either from the command
line using a terminal window or with cron using crontab.
FetchResp reads a file which specifies the networks, stations and or channels
to be downloaded. You can indicate what dates are of interest. The default for
FetchResp is the latest response information, but you can also download the first,
last or all responses. See below for more information on command formats.
Installation Notes
FetchResp is downloaded from our website. During the download/installation process
you will be asked where you want FetchResp installed. Since FetchResp is intended
to be run from a terminal session, you might consider installing in a directory
which is easily accessible from your login shell.
During the download/install process, you will be asked where to make
aliases. Ignore this option or select the “No Aliases” option
as this feature has no meaning for command line programs.
In the chosen directory the install program will place FetchResp into a directory
called FetchResp.v1.0. You will need to edit the FetchResp command script file
(called runFetchResp) found in this directory.
In this script file you will find 3 variables which FetchResp uses. You
will need to edit these as described below.
runFetchResp
Script
Here are the contents of the runFetchResp script:
#!/bin/sh
#
# specification file for download
export FILE=query.txt
export JAVA_EXE=/usr/bin/java
export HOME=/directory/where_you_installed/FetchResp/FetchResp.v1.0
# make sure it is there, create it before use
export OUTPUT_DIR=/directory/where/you/want/output_to_go/RESPONSES
${JAVA_EXE} -cp ${HOME}/DHI_Access.jar:${HOME}/fetchResp.jar FetchResp
${HOME} ${OUTPUT_DIR} ${FILE}
Variables
to edit
1. The FILE variable:
The FILE variable tells FetchResp what stn/channels you want downloaded.
Query.txt is provided in the download, but it can be any comma-delimited
text file. Just place its name here.
2. The JAVA_EXE variable:
Set the JAVA_EXE to point to the java installation on your machine.
In Linux, Unix or Mac OSX you can find this out by using the 'which'
command.
ie: which java.
3. The HOME variable:
FetchResp is intended to be run either form a terminal window or via
cron.
Using cron necessitates the need to specify the working directory. Specify
it with
this variable.
4. The OUTPUT_DIR
Use the OUTPUT_DIR to indicate what directory to use to place the response
files.
If the directory is not there it will create it.
Program Input File
The input file (query.txt).
The input file as
specified in the env variable FILE, is a comma-delimited file of one or
more lines. Each line specifies a network, station,
location code, channel with optional
extra fields.
The extra fields
can be:
1: a date which
specifies the epoch to save.
2: a date range
to specify the epoch
3: keywords: last,
first and all.
Here are the contents
of an example text file, query.txt:
# shows the basic
format
NETWORK,STATION,LOCATION,CHANNEL,
optional fields
# shows date range
usage
IU, anmo ,10, bh*,2004,100,10:00:00,2004,200,10:00:00
-- ---- -- ---
----------------- -----------------
| | | | | |
| | | | | ending
date
| | | | starting
date
| | | channel
| | location
| station
network
# shows network wildcarding with one date specification
I*,*,*,bh*,2005,200,10:00:00
-----------------
|
date for selecting epoch
# shows
current date/time usage, no date specified, defaults to "now"
wa,*,*,BH*
----------
|
simplest usage. This will
extract all broadband channels from the network WA
keeping
only the records which span the current date/time.
# shows use of
'last'. Will save only the latest record regardless of the record's
# epoch date/time
TA,*,10,*,last
--------------
#shows the use
of 'all'. Downloads everything. All epochs.
IU,anmo, *, *, all
Contact Information
Send comments to
, IRIS DMC
2006.10.18 |