#!/bin/sh ### ==================================================================== ### Unix script to generate coordinates of the source and receiver points ### for given configuration parameters, perform two-point ray tracing, ### and convert unformatted output into a simple formatted file. ### It runs programs 'srp', 'crt' and 'crtpts'. ### ==================================================================== if [ $# -eq 0 ] then echo "Purpose: " echo " To generate coordinates of the source and receiver points for given" echo " configuration parameters, perform two-point ray tracing, and convert" echo " unformatted output into a simple formatted file. " echo "Usage: " echo " srpcrt NAME NUM1 " echo " srpcrt NAME NUM1 NUM2 " echo "Parameters: " echo " NAME... prefix of data files (name of the job). " echo " NUM1... integer configuration parameter. " echo " NUM2... optional second configuration parameter. " echo "Executable programs required: " echo " srp, crt, crtpts " echo "Input files: " echo " NAMEsrp.dat... input file for the 'srp' program to generate source " echo " and receiver files for given configuration parameters. " echo " The receiver file must be named NAME-rec.out. Source and " echo " receiver names will be prefixed with NUM1-. " echo " NAMEcrt.dat... input file for the 'crt' program. " echo "Output files: " echo " NAMENUM1NUM2.out... file containing travel times, slowness " echo " vectors and amplitudes (in R.C.C.S.) at the receivers. " echo " NAMEscr.out... collected screen output of programs 'srp', " echo " 'crt', and 'crtpts' (written in an append mode). " exit fi ### .................................................................... ### Source and receiver points for given configuration parameters: ### -------------------------------------------------------------- echo "'$1srp.dat' '$2-' $2 $3 /"|srp >>$1scr.out 2>>$1scr.out ### ### Ray tracing: ### ------------ echo "'$1crt.dat' /"|crt >>$1scr.out 2>>$1scr.out ### The above command should be modified if 'scropc.for' were included ### within 'crt.for'. ### ### Results of ray tracing: ### ----------------------- echo "'$1rec.out' 3* '$1$2$3.out' 11 0 1 0 /"|crtpts >>$1scr.out 2>>$1scr.out ### ### Screen output: ### -------------- echo $1$2$3.out ### ====================================================================