#!perl                                                      #<HTML><PRE>
#
# Subroutine SRPCRT($NAME,$NUM1,$NUM2)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Perl subroutine designed 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.
#
# Input:
#     $NAME...prefix of data files (name of the job).
#     $NUM1...integer configuration parameter.
#     $NUM2...optional second configuration parameter.
#
# No output.
#
# Executable programs required:
#     srp, crt, crtpts
# Input files:
#     NAMEsrp.dat... input file for the 'srp' program to generate
#             source and receiver files for given configuration
#             parameters.  The receiver file must be named
#             NAME-rec.out.  Source and receiver names will be
#             prefixed with NUM1-.
#     NAMEcrt.dat... input file for the 'crt' program.
# Output files:
#     NAMENUM1NUM2.out... file containing travel times, slowness
#             vectors and amplitudes (in R.C.C.S.) at
#             the receivers.
#     NAMEscr.out... collected screen output of programs 'srp',
#             'crt', and 'crtpts' (written in an append mode).
#
# Version: 5.20
# Date: 1998, October 9
#
# ----------------------------------------------------------------------
#
# Include files required:
  require 'go.pl';
#
  sub SRPCRT {
#
#   Source and receiver points for given configuration parameters:
    &RUN("srp>>$_[0]scr.out","'$_[0]srp.dat' '$_[1]-' $_[1] $_[2] /");
#
#   Ray tracing:
    &RUN("crt>>$_[0]scr.out","'$_[0]crt.dat' /");
#
#   The above command should be modified if 'scropc.for' were included
#   within 'crt.for'.
#
#   Results of ray tracing:
    &RUN("crtpts>>$_[0]scr.out","'$_[0]rec.out' 3* '$_[0]$_[1]$_[2].out' 11 0 1 0 /");
#
#   Screen output (output filename):
    print "Output filename: $_[0]$_[1]$_[2].out \n";
  }
1;                                                               #</PRE>
