SkillAgentSearch skills...

Rdseed

rdseed – Read an FDSN SEED format volume

Install / Use

/learn @iris-edu-legacy/Rdseed
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

rdseed

rdseed – Read an FDSN SEED format volume

NAME

rdseed - Read an FDSN SEED format volume

SYNOPSIS

rdseed [options] [-f filename]

OPTIONS

The following options may be selected:
    -a retrieve the abbreviation dictionaries
    -b n set the seismogram input buffer size (bytes)
    -c retrieve volume table of contents
    -C arg retrieve the comments where 'arg' is either STN or CHN
    -d output data records (follow with -o to select a format or it defaults to SAC)
    -e extract event/station data
    -E output filename will include endtime
    -f file input file name
    -g file specify alternate SEED volume for metadata (see ALT_RESPONSE_FILE)
    -h help (this list)
    -i ignore location codes
    -k strip records from output which have a zero sample count (miniSEED and SEED output only)
    -l list contents of each record in the volume
    -o n specify output format (numeric value, see examples below). Use -d with this option.
    -p output poles and zeros
    -q dir specify the output directory
    -Q qual specify data quality [E,D,M,Q,R] (see Input Options below for details)
    -R print response data
    -s retrieve all station header information
    -S retrieve station summary information
    -t show start/stop times, start blocks of events
    -u show usage (this list)
    -v n select volume number
    -x use summary file
    -z n  check for reversals and apply sign change correction based on the number n=[0-3] 
          (see Check Reversal under Options section below)

DESCRIPTION

rdseed reads and interprets Standard for Exchange of Earthquake Data (SEED) files. This is the format defined by the Federation of Digital Seismographic Networks (FDSN) to represent seismic data. According to the command line function option specified by the user, rdseed will read the volume and recover the volume table of contents (-c option), the set of abbreviation dictionaries (-a option), or station and channel information and instrument response tables (-s option).

The desired sequential volume in a file or on tape can be selected with the (-v option). The first volume is "1", the second "2" and so forth. Note: This option only applies to physical volumes that contain multiple logical volumes.

Additional options allow access to detailed information concerning the actual contents of the volume. The first of these options (-t) writes out a list of data start and stop times along with the starting record sequence numbers at which those data may be found. The other option (-l) is primarily a diagnostic tool; it writes a description of every record in the volume.

While there are a large number of command line options for rdseed, the user can also run it in User Prompt Mode, discussed below.

As data is extracted from the SEED volume, rdseed looks at the orientation and sensitivity of each channel to determine if the channel polarity is reversed. Refer to the description of blockettes 52 and 58 in the SEED manual for a description of reversed polarity. A negative sensitivity in blockette 58 is indicative of a reversed polarity. The user can request that reversed channels be corrected (-z option). This correction is a simple multiplication by -1.0 to the data samples for that specific channel. The output response file information is NOT adjusted for channels where rdseed inverts the data.

Output Header Corrections

rdseed corrects the header information in the SAC, AH and CSS files as follows:

  • SAC headers contain dip and azimuth information. If a dip/azimuth reversal checking is active (-z option 1) and detected, rdseed will reverse the sign of the data samples and the dip and azimuth values. If gain reversal checking is active (-z option 2) and detected, then rdseed will reverse the sign of the data samples (no header information is altered). If both dip/azimuth and gain reversals are being checked for (-z option 3), correction is only performed if one or the other is found to be reversed. Otherwise nothing is altered.

  • CSS headers are handled in the same way as SAC headers, except that a scale factor is inserted into the CALIB variable. If gain reversal checking is active and a reversal is found, the data are inverted and the header CALIB value is also inverted.

  • AH headers have no dedicated place to store dip/azimuth information, but do have a comment field where this information is added. The same rules as above are followed for reversal checking options 1, 2, and 3, otherwise.

User Prompt Mode

When rdseed is run without any options, the user is prompted for each option, along with additional options described below.

Input Options

[command line equivalent in brackets]

Input Device (Default: /dev/nrst0):

[-f] the input device can be changed from the default of /dev/nrst0, which refers to a magnetic tape device. Note that when a tape is being accessed, it is best to use the no-rewind device. This allows rdseed to search for multiple volumes on tape across tape file marks.

Output Device (Default: stdout):

Non-error text displayed by rdseed goes to the terminal by default, but can be redirected to a file that you indicate here. Some of the options send results to the Output Device (such as the station summary [-S]). Use the Unix '>' redirect command when calling rdseed from the command line.

Volume #[(1)-N]:

[-v] the volume number can be changed from the default value of 1.

Options [various]:

One mode option must be selected, the complete list of which is displayed by the program. All options except the following have the same meaning as the corresponding command line options listed above, with the following exceptions:

  • the e option will generate a weed compatible event file. NOTE: 'weed' has evolved to JWEED and now PyWEED.
  • the d option means the user wants to output a data file, the type of which is designated by the Output Format option shown below.

One or more of the following options will be presented to the user if the d, s, or S option was selected:

Summary File (Default: None):

[-x] a summary file can be selected as input for rdseed to filter stations, channels, and time windows. Created by "JWEED", a summary file lists events, and phase oriented time windows for station data. NOTE: JWEED has been replaced by PyWEED.

Station List (ALL) :

A list of selected stations separated by spaces or commas. Wildcard substitution using characters * , ? and . is allowed. A station name can be an alias whose name is defined in a file whose filename is specified by the environment variable SEEDALIAS. See details below. Hitting RETURN accepts all stations.

Channel List (ALL) :

A list of selected channels separated by spaces or commas. Wildcard substitution using characters *, ? and . is allowed. Hitting RETURN accepts all channels.

Network List (ALL) :

A list of selected networks separated by spaces or commas. Hitting RETURN accepts all networks.

Loc Ids (ALL [-- for spaces]):

A list of location identifiers (two alpha-numeric characters) that encapsulate a set of related channels. Originally, SEED left the IDs undefined with space characters, so some data may be identified with spaces only. Hitting RETURN accepts all location IDs. Option -i from the command line tells rdseed to ignore location codes.

Output Format [(1)..9]:
[-d -o] select output format as one of the following:
1=SAC -- (default) SAC binary format
2=AH - AH (Ad Hoc) format
3=CSS - CSS Schema format
4=miniSEED - data-only SEED records
5=SEED - full SEED with metadata
6=SAC ALPHA - SAC alphanumeric (ASCII) format
7=SEGY - SEG-Y format
8=Simple ASCII (SLIST) - Single column sample values in ASCII
9=Simple ASCII (TSPAIR) - Time and sample column pairs in ASCII
Output file names include endtime? [Y/(n)]

[-E] select if the user wants each output file to be tagged with the waveform end time in the file name.

Output poles and zeroes?[Y/(n)]:

[-p] select if the user wants a SAC PZ (poles and zeros) file to be created. SAC PZ files contain header annotation that identifies key metadata features about the station being described. (See "example of SAC PZ format below").

Check Reversal [0..3]
0=No (default)
1=Dip.Azimuth
2=Gain
3=Both:
  [-z] select signal reversal check and data change on dip/azimuth, gain, or both.

(See "Output Header Corrections" above for details)

Start Time(s) (FIRST) :

A list of seismogram start times of the form YYYY.DDD.HH:MM:SS.FFFF or YYYY/MM/DD.HH:MM:SS.FFFF separated by spaces. YYYY may be YY i.e. "90" for "1990". Least significant parts may be omitted, in which case they become zero i.e. 90.270 is time 00:00:00.0000 of the 270th day of 1990.

End Time(s) (LAST) :

A list of seismogram end times of the same form as start times. Each start time (except the last one) must have a corresponding end time. If the last start time does not have a corresponding end time, the end time is assumed to be the last time in the volume.

Sample Buffer Length [2000000]:

[-b] each seismogram is assembled in a sample buffer prior to output. The size of the buffer can be changed. This number is the number of samples (not bytes). If the length is too small for the any of the requested seismograms, an error message will inform the user that the waveform is being broken into pieces. The user may increase the size of the buffer to avoid this problem.

Extract Responses [Y/(N)] :

[-R] get channel response information in RESP format. (

Related Skills

View on GitHub
GitHub Stars34
CategoryDevelopment
Updated5mo ago
Forks18

Languages

C

Security Score

87/100

Audited on Oct 10, 2025

No findings