AHXDR(1) CUSP COMMANDS AHXDR(1) NAME ahxdr - converts CUSP event .mem and waveform files to an AH format file. SYNOPSIS ahxdr _f_o_r_m_a_t [_f_i_l_e_n_a_m_e] DESCRIPTION ahxdr converts event data from the CUSP format to the AH format as defined by Lamont Dougherty Lab. The resulting file is readable on SUN workstations and can be transferred as a binary file using the network utility ftp. For the `standard' AH format, the _f_o_r_m_a_t argument should be ah, for the XDR implementation, xdr. Program obtains the id numbers of the events to process from list of filenames read from an input file. The name of this input file can be specified as _f_i_l_e_n_a_m_e on the command line; if not specified, the input file name defaults to ahxdr.input. Each line in the input file must be a CUSP filename, a filename of the form: x_i_d.mem . An input file can be produced by issuing the command of the type: ls -1 $CUSP_IN /*.mem >_f_i_l_e_n_a_m_e The .mem and waveform files of the events to be processed must reside in the respective directory paths assigned to the environmental variables CUSP_IN and GRAM_IN ; usually both are defined to be `.' , the current working directory. At the data centers an event waveform filename is simply: _i_d (cf. the CUSP naming convention of: x_i_d.grm ). By default all trace data is converted to the specified for- mat; optional data for controlling the selection of time- series data can be specified in an auxillary input file with a name of the form: $CUSP_IN /_a_h_x_d_r._k_o_m This file consists of one or more lines containing keywords and/or data values. (see OPTIONS below). OPTIONS Data records in the .kom control files are of the form: _k_e_y_w_o_r_d _v_a_l_u_e * or ! _t_e_x_t a comment; blank lines are also ignored. select _f_i_l_e_n_a_m_e specifies pathname of file containing selected station names. File contains one name per line in the format: STN_NAME STN_OPER STN_COMP (A6 A6 A3). DEFAULT = all sites found in .mem file. Operator and component are USGS Menlo Last change: 4 AUGUST 1992 1 AHXDR(1) CUSP COMMANDS AHXDR(1) optional, defaults are recording net and all com- ponents, unless specified by COMP or KNOWN keywords. secs _s_e_c_o_n_d_s length of output time series in seconds (real*4). DEFAULT = length of time series declared in .mem file GRM tuple; however, internal program arrays are dimen- sioned for a maximum of 360448 bytes/trace. vr _r_e_d_u_c_t_i_o_n__v_e_l_o_c_i_t_y Start of time series is delayed by _e_v_e_n_t__s_t_a_t_i_o_n__d_i_s_t_a_n_c_e/_r_e_d_u_c_t_i_o_n__v_e_l_o_c_i_t_y seconds (real*4). If specified traces are processed in dis- tance sorted order as determined by event-station azimuth. DEFAULT = 0. ; no reduced traveltime adjust- ment to time series start time. start _s_e_c_o_n_d_s number of seconds to offset start of time series rela- tive to reduced starting time (real*4). DEFAULT = 0. known _c_o_m_p_o_n_e_n_t(_s) Select only the component types specified, must match exactly (e.g. VHZ, VLZ ). comp _c_o_m_p_o_n_e_n_t Select only those channels with the specified orienta- tion (e.g. N ). DEFAULT = every component. Selected site specifications overrides this. azim _s_t_r_i_k_e strike (degrees) of the positive distance axis (real*4). DEFAULT = all event-station azimuths define positive distances. deci _f_a_c_t_o_r decimation factor (resampling interval) of trace data (integer*4). Possible values are 1-7. DEFAULT = 1 ; no decimation. out _f_i_l_e_n_a_m_e pathname of output file. DEFAULT = _i_d.xdr type _d_a_t_a_t_y_p_e time series data type: float, long, or short . DEFAULT = float notime do not transfer time codes (identified by component type: T ). DEFAULT = all time codes are transferred. USGS Menlo Last change: 4 AUGUST 1992 2 AHXDR(1) CUSP COMMANDS AHXDR(1) verbose give detailed data message log for each station pro- cessed. DEFAULT = no summary messages. swap if waveform files have data in VAX format (little- endian), use this keyword to swap the data sample bytes to xdr order. DEFAULT = time series samples assumed to be in xdr-format (big-endian) end required, if you want program to process specified optional input data and create an output file. EXAMPLES Below is a listing of a sample .kom command file: cat ahxdr.kom ! list example input file * Event 123587 NWSE ! a comment, not processed. select 123587.SEC1 ! optional record, more follow secs 60.0 ! data seconds to retrieve vr 6.0 ! reduction velocity start -2.0 ! trace start time relative to reduced traveltime known VHZ ! select only the vertical components azim 320.0 ! postive distance +-90 degrees azimuth of this strike deci 2 ! decimate the data by 2 output 123587.XDR ! dump converted data to this file end ! required to start processing ! another example of optional comment, not processed vr 6.0 start 58.0 comp VHZ output 123587.XDR2 end ! required, signals program to process input ENVIRONMENT The following variables must be defined in the shell in which the ahxdr command is invoked: CUSP_IN Pathname of directory containing .mem files and auxil- lary input .kom files; usually equvalent to ".". GRAM_IN Pathname of directory containing waveform files; usu- ally equvalent to ".". GRAM_OUT Pathname of directory to which the .xdr files are out- put. DDL_EVENT Pathname of the file containing the data definition language used to initialize a database memory buffer USGS Menlo Last change: 4 AUGUST 1992 3 AHXDR(1) CUSP COMMANDS AHXDR(1) for .mem file i/o (e.g. cusp/Base/event.ddl). DDL_SETUP Pathname of the file containing the data definition language used to initialize a database memory buffer for station data (e.g. cusp/Base/setup.ddl). MEM_SETUP Pathname of the station database file (e.g. cusp/Base/setup.mem). DIAGNOSTICS Errors are flagged with either a self explantory text mes- sage or a text message naming the program module in which the error occurred along with two integer number status codes: ier and ires; ier flags where in a program module an error occurred (a positional tag) and ires is the value of an integer variable (usually a return status ) which failed a logical test. Error reporting cascades upwards, providing a trace through nested subroutine calls. Interpretion of these status codes requires access to the source code and is best left to programmers familiar with the subroutine libraries in CUSP. AUTHOR Please report bugs and address questions to: awwalter@eureka.wr.usgs.gov USGS Menlo Last change: 4 AUGUST 1992 4