NAME
baler2db - take mseed data from baler downlad directory and loads into dbcentral db
SYNOPSIS
baler2db [-v]
[-d dbout ]
[-p pffile ]
mseed_dir dbmaster balerdb_central
SUPPORT
Contributed code: NO BRTT support.
THIS PIECE OF SOFTWARE WAS CONTRIBUTED BY THE ANTELOPE USER COMMUNITY. BRTT DISCLAIMS ALL OWNERSHIP, LIABILITY, AND SUPPORT FOR THIS PIECE OF SOFTWARE.
FOR HELP WITH THIS PIECE OF SOFTWARE, PLEASE CONTACT THE CONTRIBUTING AUTHOR.
DESCRIPTION
baler2db is the first program in a series of programs to fill gapped data in a database.
baler2db starts with data which has been recovered from a baler or other device in miniseed
format, make necessary corrections to the data, and builds a cleaned database of day volumes.
All data recovered from a baler through a run of
baler_admin or send via cdrom
(or equivalent) are assumed to be stored in miniseed files, all located in the directory
mseed_dir.
The first step in
baler2db, after various checks, is to run
miniseed2days which
creates a new database named
raw_baler in the same directory where
mseed_dir is located.
miniseed2days is executed with the
-C option so that all miniseed blocketts which have
problems such a "0" clock quality or corrupted miniseed data are removed.
Next, a new wfdisc named
dbout is created using the same waveforms as
raw_baler.
The
dbout wfdisc has any corrections provided through the
pffile, fixing things like
known station or channel mislabling. Any wfdisc records less than 2 seconds long are removed.
The
dbout and
raw_baler databases are linked to
dbmaster through a descriptor
file.
dbfixchanids is run on
dbout, followed by
dbfix_calib and
dbverify.
Finally if all is successful, a new row is added to the dbcentral database -
balerdb_central.
OPTIONS
-
-v
verbose
-
-d dbout
Output database name. Default is cleaned_baler.
-
-p pffile
Name of parameter file. Default is baler2db.
ENVIRONMENT
needs to have sourced $ANTELOPE/setup.csh. Need
environment variable $PFPATH to be set.
PARAMETER FILE
baler2db parameter file element is:
-
wfdisc_cmds
list of commands to correct known baler problems in the wfdisc. Generally these are
mis-named station and/or channel codes.
DEFAULT PARAMETER FILE
# WFDISC will get substituted with the proper database wfdisc table inside the program
#
wfdisc_cmds &Tbl{
dbset -v WFDISC sta RAMR V04C
dbset -v WFDISC sta 0795 I05A
dbsubset -v WFDISC "chan=~/LL.*|VH.*|UH.*|VFP|VTW|LTW|HH.|HL.|HG.|HN./" | dbdelete -
dbsubset -v WFDISC "chan=~/VCE|VCQ/" | dbdelete -
dbsubset -v WFDISC "sta=~/HELLBK/" | dbdelete -
dbsubset -v WFDISC "sta=~/EXMP/" | dbdelete -
dbsubset -v WFDISC "sta=~/D03A|HAST|Y12C/" | dbset -v - chan VMU VM4
dbsubset -v WFDISC "sta=~/D03A|HAST|Y12C/" | dbset -v - chan VMV VM5
dbsubset -v WFDISC "sta=~/D03A|HAST|Y12C/" | dbset -v - chan VMW VM6
dbsubset -v WFDISC "sta=~/R04C|T06C|U04C|U05C/" | dbset -v - chan VMZ VM1
dbsubset -v WFDISC "sta=~/R04C|T06C|U04C|U05C/" | dbset -v - chan VMN VM2
dbsubset -v WFDISC "sta=~/R04C|T06C|U04C|U05C/" | dbset -v - chan VME VM3
dbsubset -v WFDISC "sta=~/I05A|LAVA|P05C|S04C/" | dbset -v - chan VMU VM1
dbsubset -v WFDISC "sta=~/I05A|LAVA|P05C|S04C/" | dbset -v - chan VMV VM2
dbsubset -v WFDISC "sta=~/I05A|LAVA|P05C|S04C/" | dbset -v - chan VMW VM3
}
RETURN VALUES
0 if successful, 1 if not.
SEE ALSO
build_baler_data(1)
baler_request(1)
gap_status(1)
replay_data(1)
rt_baler_info(1)
miniseed2days(1)
dbfixchanids(1)
dbdescriptor(5)
BUGS AND CAVEATS
baler2db will only work on the directory
mseed_dir.
mseed_dir can
only contains miniseed files, no subdirectories. It is good practice to execute
baler2db
in a different directory than where the miniseed files exist.
AUTHOR
Frank Vernon
Antelope User Group Contributed Software