MSEED2SAC(1) | General Commands Manual | MSEED2SAC(1) |
mseed2sac - miniSEED to SAC converter
mseed2sac [options] file1 [file2 file3 ...]
mseed2sac converts miniSEED waveform data to SAC format. The output SAC file can be either ASCII or binary (either byte-order), the default is binary with the same byte-order as the host computer. By default all aspects of the input files are automatically detected.
If an input file name is prefixed with an '@' character the file is assumed to contain a list of input data files, see INPUT LIST FILES below.
A separate output file is written for each continuous time-series in the input data. Output file names are of the form:
"Net.Sta.Loc.Chan.Qual.YYYY,DDD,HHMMSS.SAC" For example: "TA.ELFS..LHZ.R.2006,123,153619.SAC"
Files that would have the same file name due to having the same start time will be kept separate by adding a digit to file name. The -O argument changes this behavior to allow overwriting of existing file names.
If the input file name is "-" input miniSEED records will be read from standard input.
The SAC header variable KHOLE is used synonymously with the SEED location code. Any location codes found in the input miniSEED or metadata file are put into the KHOLE variable.
"Time[/Lat][/Lon][/Depth][/Name]" For example: "2006,123,15:27:08.7/-20.33/-174.03/65.5/Tonga"
The parameters later in the string are optional.
1 : Alphanumeric SAC format 2 : Binary SAC format, host byte order (default) 3 : Binary SAC format, little-endian 4 : Binary SAC format, big-endian
A metadata file contains a list of station parameters, some of which can be stored in SAC but not in miniSEED. Each line in a metadata file should be a list of parameters in the order shown below. Each parameter should be separated with a comma or a vertical bar (|). DIP CONVENTION: When comma separators are used the dip field (CMPINC) is assumed to be in the SAC convention (degrees down from vertical up/outward), if vertical bars are used the dip field is assumed to be in the SEED convention (degrees down from horizontal) and converted to SAC convention.
Metdata fields:
Network (KNETWK) Station (KSTNM) Location (KHOLE) Channel (KCMPNM) Latitude (STLA) Longitude (STLO) Elevation (STEL), in meters [not currently used by SAC] Depth (STDP), in meters [not currently used by SAC] Component Azimuth (CMPAZ), degrees clockwise from north Component Incident Angle (CMPINC), degrees from vertical Instrument Name (KINST), up to 8 characters Scale Factor (SCALE) Scale Frequency, unused Scale Units, unused Sampling rate, unused Start time, used for matching End time, used for matching Example with comma separators (with SAC convention dip): ------------------ #net,sta,loc,chan,lat,lon,elev,depth,azimuth,SACdip,instrument,scale,scalefreq,scaleunits,samplerate,start,end IU,ANMO,00,BH1,34.945981,-106.457133,1671,145,328,90,Geotech KS-54000,3456610000,0.02,M/S,20,2008-06-30T20:00:00,2599-12-31T23:59:59 IU,ANMO,00,BH2,34.945981,-106.457133,1671,145,58,90,Geotech KS-54000,3344370000,0.02,M/S,20,2008-06-30T20:00:00,2599-12-31T23:59:59 IU,ANMO,00,BHZ,34.945981,-106.457133,1671,145,0,0,Geotech KS-54000,3275080000,0.02,M/S,20,2008-06-30T20:00:00,2599-12-31T23:59:59 IU,ANMO,10,BH1,34.945913,-106.457122,1767.2,48.8,64,90,Guralp CMG3-T,32805600000,0.02,M/S,40,2008-06-30T20:00:00,2599-12-31T23:59:59 IU,ANMO,10,BH2,34.945913,-106.457122,1767.2,48.8,154,90,Guralp CMG3-T,32655000000,0.02,M/S,40,2008-06-30T20:00:00,2599-12-31T23:59:59 IU,ANMO,10,BHZ,34.945913,-106.457122,1767.2,48.8,0,0,Guralp CMG3-T,33067200000,0.02,M/S,40,2008-06-30T20:00:00,2599-12-31T23:59:59 ------------------ Example with vertical bar separators (with SEED convention dip): ------------------ #net|sta|loc|chan|lat|lon|elev|depth|azimuth|SEEDdip|instrument|scale|scalefreq|scaleunits|samplerate|start|end IU|ANMO|00|BH1|34.945981|-106.457133|1671|145|328|0|Geotech KS-54000|3456610000|0.02|M/S|20|2008-06-30T20:00:00|2599-12-31T23:59:59 IU|ANMO|00|BH2|34.945981|-106.457133|1671|145|58|0|Geotech KS-54000|3344370000|0.02|M/S|20|2008-06-30T20:00:00|2599-12-31T23:59:59 IU|ANMO|00|BHZ|34.945981|-106.457133|1671|145|0|-90|Geotech KS-54000|3275080000|0.02|M/S|20|2008-06-30T20:00:00|2599-12-31T23:59:59 ------------------ As a special case '--' can be used to match an empty location code.
For each time-series written, metadata from the first line with matching source name parameters (network, station, location and channel) and time window (if specified) will be inserted into the SAC header. All parameters are optional except for the first four fields specifying the source name parameters.
Simple wildcarding: for the source name parameters that will be matched a '*' character in a field will match anything. The BHZ metadata lines above, for example, can be (almost) summarized as:
IU,ANMO,*,BHZ,34.9459,-106.4571,1671,145,0,0,Geotech KS-54000,3456610000,0.02,M/S,20,2008-06-30T20:00:00,2599-12-31T23:59:59
A selection file is used to match input data records based on network, station, location and channel information. Optionally a quality and time range may also be specified for more refined selection. The non-time fields may use the '*' wildcard to match multiple characters and the '?' wildcard to match single characters. Character sets may also be used, for example '[ENZ]' will match either E, N or Z. The '#' character indicates the remaining portion of the line will be ignored.
Example selection file entires (the first four fields are required)
#net sta loc chan qual start end IU ANMO * BH? II * * * Q IU COLA 00 LH[ENZ] R IU COLA 00 LHZ * 2008,100,10,00,00 2008,100,10,30,00
If an input file is prefixed with an '@' character the file is assumed to contain a list of file for input. Multiple list files can be combined with multiple input files on the command line. The last, space separated field on each line is assumed to be the file name to be read.
An example of a simple text list:
TA.ELFS..LHE.R.mseed TA.ELFS..LHN.R.mseed TA.ELFS..LHZ.R.mseed
Seismic Analysis Code (SAC) is a general purpose interactive program designed for the study of sequential signals, especially timeseries data. Originally developed at the Lawrence Livermore National Laboratory the SAC software package is also available from IRIS.
Chad Trabant IRIS Data Management Center
2017/09/29 |