***********************************
Program package ANRAY, version 4.20
***********************************

Ivan Psencik,

Geophysical Institute, Acad.Sci. of the Czech Rep.,
Bocni II, 141 31 Praha 4, Czech Republic

***************************************
Working version, not yet fully debugged
***************************************

Main differences from the version 4.01
--------------------------------------
There are several new options offerred in this version. The most
basic are the following:

(a) The first test version of program WEAKAN based on the zero-order 
quasi-isotropic (QI) approximation for calculation of coupled qS waves 
in weakly anisotropic media or in singular regions of qS waves was
developed.

(b) The input data are read in by list-directed input (free format).

(c) Many errors and problems have been removed and other small scale
modifications have been made. Substantial changes were made in
program VELPL for plotting various velocity surfaces, smaller changes
were also made in the program ANRAYPL. Tests were indroduced, which
guarantee that polarization vectors vary smoothly along a ray and
do not jump by 180 degrees. The x- and y-components of displacement,
which were incorrectly called "radial" and "transverse" in previous
versions are called x- and y-components. Possibility to rotate 
horizontal axis, to which displacement is projected, was introduced 
to SYNTAN. I shall be grateful for indication of problems since with 
the new options, new bugs were surely introduced.


Description of the package
--------------------------
     Program package ANRAY can be used for computation of rays, 
travel times, ray amplitudes and ray synthetic seismograms (for qS 
waves also the QI approximation may be used) in 3-D laterally varying 
structures containing isotropic and/or anisotropic layers. 
Synthetic seismograms can be constructed at receivers distributed 
regularly or irregularly along surface, interfaces or vertical 
profiles.

    Program package consists of ten programs, basic program ANRAY 
and programs WEAKAN, ANRAYPL, SYNTAN, SEISPLOT, POLARPLOT, FRESAN, 
SYNFAN, BPLOT and VELPL.

    Program ANRAY is an updated version of program with the same 
name which has been used in packages ANRAY86 and ANRAY89 written by 
Gajewski & Psencik [1], [2]. It is 
designed for ray, travel time and ray amplitude computations. Two ways 
of approximation of distribution of elastic parameters are available. 
In the first, "B-spline approximation", elastic parameters in an 
arbitrary point of a layer are determined by B-spline approximation 
from values of parameters specified at grid points of a 3-D rectangular 
network. B-splines with tension by A.K.Cline [3] with 
additions by L.Klimes, also used in [4], are used. In 
the second way, "isosurface interpolation", elastic parameters are 
determined by vertical linear interpolation of values specified at 
interfaces, which represent surfaces of constant values of elastic 
parameters. Rays can be computed in two modes. In the first one, rays 
are specified by the point source location and the initial orientation 
of the slowness vector at the source: initial-value ray tracing. In 
the second mode, rays are specified by the point source location and 
a system of regularly or irregularly distributed receivers situated on 
surface or on an interface or on a vertical profile: two-point ray 
tracing. The point source can be situated at any point of the model. 
Polarization vectors, geometrical spreading and reflection, 
transmission and conversion coefficients may be evaluated along the rays. 
Program ANRAY can produce three files, one for plotting ray diagrams, 
travel times and ray amplitudes, second for computation of synthetic 
seismograms and third for plotting plane sections of slowness, phase 
velocity or group velocity surfaces. Program ANRAY consists of 6 blocks 
of routines, ANRAY.FOR, A2.FOR, A3.FOR, A4.FOR, A5.FOR, and 
MODBS.FOR or MODIS.FOR, which must be linked together. If B-spline 
approximation is to be used, MODBS.FOR must be used, if isosurface 
interpolation is to be used, MODIS.FOR must be used. The selection
can be made at the end of the file anray.for. 
Default is the B-spline interpolation. 
Refer to the description of program ANRAY.

    The program WEAKAN is a first version of the program for the
calculation of qS waves in weakly anisotropic media and in qS wave
singular regions, based on the quasi-isotropic (QI) approximation,
[5]. The two coupled linear differential equations 
for the calculation of frequency-dependent amplitudes in the zero-order 
QI approximation are solved here along rays, which were calculated in 
the program ANRAY in a background isotropic medium. The frequency-
dependent amplitudes are further used for the calculation of synthetic 
seismograms. At present, the program works only in the B-spline mode, 
i.e., it requires MODBS.FOR routines. As input file, it requires a file 
generated in program ANRAY (for background isotropic medium). The 
program WEAKAN generates a file to be further processed in program 
FRESAN and subsequent programs. 
Refer to the description of program WEAKAN.

    The program ANRAYPL can be used for plotting of horizontal and 
vertical ray diagrams, time-distance and amplitude-distance curves 
of individual elementary waves computed in the program ANRAY.
Several types of point sources, namely explosive source, single
force, double couple source can be considered. Program ANRAYPL is
a modification of the program RAYPLOT from the package SEIS83 
[6]. Program ANRAYPL consists of routines: 
ANRAYPL.FOR, BORDER.FOR, SOURCE.FOR and CALCOPS.FOR. 
Refer to the description of program ANRAYPL.

    The program SYNTAN can be used for time domain computation of 
ray synthetic seismograms from the results computed in the program 
ANRAY. Gabor wavelet is used as a source-time function. Hilbert 
transform of this wavelet is evaluated by approximate formula, see 
[7]. Several types of point sources, namely explosive 
source, single force, double couple source, can be considered. 
Program SYNTAN is a modification of the program SYNTPL from the 
program package SEIS83 [6]. Program SYNTAN consists 
of routines: SYNTAN.FOR, SOURCE.FOR and CALCOPS.FOR.
Refer to the description of program SYNTAN.

    Programs FRESAN and SYNFAN can be used for frequency domain 
computation of ray synthetic seismograms. Frequency response is
computed in the program FRESAN from the data generated by the 
program ANRAY and WEAKAN (if the QI approximation is used). In the 
program SYNFAN it is multiplied by the spectrum of the considered 
source-time function. Inverse Fourier transform is then used to 
evaluate synthetic seismograms. Programs FRESAN and SYNTAN are 
modifications of the programs GB and SYNTGB from the package 
BEAM87 by V.Cerveny. Program FRESAN consists of routines FRESAN.FOR, 
BORDER.FOR, SOURCE.FOR and CALCOPS.FOR. Program SYNFAN consists of 
routines SYNFAN.FOR and CALCOPS.FOR. 
Refer to the description of program FRESAN.
Refer to the description of program SYNFAN.

    Programs SEISPLOT, BPLOT and POLARPLOT can be used for plotting 
results computed in progams SYNTAN and SYNFAN. Program SEISPLOT can 
be used for plotting synthetic seismograms generated by the program 
SYNTAN, program BPLOT can be used for plotting synthetic seismograms 
generated by the program SYNFAN. The program POLARPLOT serves for 
plotting particle motion diagrams and can be used in both cases. 
Programs SEISPLOT and POLARPLOT are modifications of the programs 
with the same name from the package SEIS83, program BPLOT is a 
modification of the program with the same name from the package 
BEAM87. Program SEISPLOT consists of routines SEISPLOT.FOR, 
BORDER.FOR and CALCOPS.FOR. Program BPLOT consists of routines 
BPLOT.FOR, BORDER.FOR and CALCOPS.FOR. Program POLARPLOT consists 
of routines POLARPLOT.FOR, BORDER.FOR and CALCOPS.FOR.
Refer to the description of program SEISPLOT.
Refer to the description of program BPLOT.
Refer to the description of program POLARPLOT.

    Program VELPLOT can be used for plotting plane sections of
slowness, phase velocity and group velocity surfaces from the file
generated in the program ANRAY. Plots in polar or Cartesian coordinates
can be optionally generated. Program VELPLOT consists of routines 
VELPL.FOR and CALCOPS.FOR.
Refer to the description of program VELPLOT.

    All files with the main programs (anray.for, weakan.for, anraypl.for, 
syntan.for, fresan.for, synfan.for, seispl.for, bplot.for, polar.for and 
velpl.for) contain, at their ends, Fortran 90 INCLUDE commands to include 
all subroutine files required.  It is thus no need to compile subroutine
files separately and to submit them to a linker.

    FORTRAN77 is used throughout the program package ANRAY. Modified 
CALCOMP routines, namely PLOTS, PLOTN, PLOT, SYMBOL and NUMBER are used 
in plotting programs. Calcomp-PostScript interface containing the above 
listed routines and developed by L.Klimes, is a part of the package. This 
makes possible to generate the graphical output in the form of ASCII 
files coded in the PostScript level 2 language - encapsulated postscript 
file format version 3.0. The Calcomp-PostScript interface is a part of 
the block of routines CALCOPS.FOR. This block must be linked with each 
program of the package.

    The package is supplemented by a set of test input data.

    The data with extension ani are data for a VSP experiment in 
a vertically inhomogeneous model of HTI medium with axis of symmetry 
45 degrees out of the plane containing the source and the borehole. 
The data anray.ani are specified for B-spline approximation, 
i.e. for the program ANRAY linked with MODBS. Program ANRAY 
with these data generates "anisotropic" ray results for two qS waves. 
The data anraypl.ani are input data for the program ANRAYPL. 
They generate postscript files anrpl1.ps and anrpl2.ps with ray diagrams, travel-
time and amplitude curves of the two qS waves. The data fresan.ani, 
synfan.ani and bplot.ani are input data for programs FRESAN, SYNFAN 
and BPLOT. They generate the postscript file seisanv.ps with section 
of ray synthetic seismograms of a vertical component. The data 
polar.dat generate the postscript file polatv.ps with projections 
of particle motion diagrams into the transverse-vertical plane if files 
with ray synthetic seismograms generated by BPLOT for vertical and 
transverse components are available.

   The data with extension 'qi' are data for the same experiment as
the data above ('ani') but the computations are based on the QI 
approximation. The data anray.qi are specified for an isotropic model 
forming a background of the model 'ani'. Again, B-spline approximation 
is used. Program ANRAY with these data generates "isotropic" ray 
results for an S wave. The data anraypl.qi are input data for the 
program ANRAYPL. They generate postscript file anrplis.ps with ray 
diagram, travel-time and amplitude curves of the S wave. The data 
weak.qi are the input data for the program WEAKAN, in which the two 
coupled differential equations of the QI approximation are solved. 
The data fresan.qi, synfan.qi and bplot.qi are input data for 
programs FRESAN, SYNFAN and BPLOT. They generate the postscript 
file seisqiv.ps with section of synthetic seismograms of a vertical 
component in the QI approximation. The data polar.dat may generate 
the postscript file polqtv.ps with projections of particle motion 
diagrams into the transverse-vertical plane if files with QI 
synthetic seismograms generated by BPLOT for vertical and transverse 
components are available and if the name "polqtv.ps" is specified
in the input data.

   The data with extension 'chs' are data for another VSP experiment
based on the ray computations in a model, in which isosurface 
approximation is used. It means that the porgram ANRAY must be 
linked with MODIS in this case. Program ANRAY with the data 
anray.chs generates "anisotropic" ray results for a qP wave and 
two qS waves. The data syntan.chs and seispl.chs 
are input data for programs SYNTAN and SEISPL. They generate the postscript file 
seischs.ps with section of ray synthetic seismograms of a vertical 
component of displacement vector.

    The data anray.vel are the input data for the ANRAY program, 
generating a file for plotting a section of the phase velocity 
surface in the program VELPL. The section is calculated in the 
above model 'ani', close to the model surface. The data velpl.vel 
are the input data for the program VELPL. They generate a postscript 
file phvel.ps.

    In case of publication of results obtained with the program        
package ANRAY, the users are asked kindly to refer to this report.

Good luck!

Praha, September 1998


REFERENCES
                                                        
[1] Gajewski,D., Psencik,I., 1986. Numerical modelling of seismic
    wave fields in 3-D laterally varying layered anisotropic
    structures - Program ANRAY86, Internal Report Inst.of Earth and
    Planet.Phys., University of Alberta, Edmonton.
                                                        
[2] Gajewski,D.,  Psencik,I.,1989. Ray  synthetic seismograms  in 3-D
    laterally inhomogeneous anisotropic structures - Program ANRAY89,
    Internal  Report   Centre  for  Computational   Seismology,  LBL,
    Berkeley.
                                                        
[3] Cline,A.K.,1981. FITPACK, Dept. of Computer Sciences, Univ. of 
    Texas at Austin.
                                                        
[4] Cerveny,V., Klimes,L., Psencik,I.,1988. Complete seismic ray
    tracing in three-dimensional structures. In: Seismological
    Algorithms, D.J.Doornbos edit., Academic Press, New York, pp.89-168.
                                                        
[5] Psencik,I.,1997. Green functions for inhomogeneous weakly anisotropic 
    media. In: Seismic Waves in Complex 3-D Structures, Report 6, Dept.of 
    Geophysics, Charles University Prague, pp.263-282.
                                                        
[6] Cerveny,V., Psencik,I.,1984. Documentation of earthquake
    algorithms. SEIS83 - Numerical modeling of seismic wave fields
    in 2-D laterally varying layered structures by the ray method.
    E.R.Engdahl, edit., Report SE-35, Boulder, 36-40.
                                                        
[7] Cerveny,V., Molotkov,I.A., Psencik,I.,1977. Ray method in seismology,
    Univerzita Karlova, Praha.