April 2009 by Arthur Snoke (snoke@vt.edu)

This update to the July 2008 package has four changes:

1. A code change in subroutine finrng.f of program remodl solved an instability
that occurred when using the Sun f95 compiler.

2.  The test of the traveltime tables using program ttimes has been enhanced to
include a SAC script that plots predicted arrival times on observed waveforms. 
For the example used, it is found that one predicted phase based on the phase
set calculated by the iaspei-tau package is not the correct phase.  This is
discussed in a PDF file "phases.pdf" located in subdirectory
./iaspei-tau/tests/.

3.  To reach a wider audience about the history and availability of the
iaspei-tau package, I published a paper in Seismological Research Letters.  The
citation information is

Snoke, J.A. (2009), Traveltime Tables for iasp91 and ak135, Seismological
Research Letters, 80(2), 260-262.

4.  The build instructions have been modified slightly.  Now one enters
./build_package from the ./iaspei-tau directory.  This builds the executables
and makes the tables.  If one is not using gfortran, one must change FCOMP
before entering ./build_package.  The wording below has been modified to reflect
the updated instructions.
 
July 2008

This package contains the necessary software for building the traveltime tables
for velocity models iasp91 and ak135. The method is the one used in constructing
the ak135 traveltime tables (Kennett, Engdahl, and Buland, 1995), and a Fortran
compiler is required.  Also included is a program (ttimes) that can be used to
produce traveltimes, take-off angles, ray parameters, etc., for selected phases
and specified station-event geometry using iasp91 and/or ak135.  Sample output
files are included.  The ttimes source code (ttimes.f) can be used as a primer
for learning the syntax for reading the tables. 

The package is distributed in a gzipped tar file, iaspei-tau.tgz. On Unix, one
can both uncompress and expand this file with a single command:    

      tar -xzf iaspei-tau.tgz

or, if you are using an older version of tar that does not recognize -z,

      gzip -d -c iaspei-tau.tgz | tar -xf - 

This operation produces a directory ./iaspei-tau with two .txt files (an
expanded version of this file plus a history file) plus four sub-directories:
bin, tables, src, and tests.

To build the programs needed to create the two binary-format table files for
velocity models ak135 and iasp91 and to build the tables, it should suffice to
enter "./build_package" in directory ./iaspei-tau/.  If you are not using the
gfortran compiler, you will need to edit "build_package", changing FCOMP to use
your compiler.  The script first clears all files produced by previous builds or
tests, then it runs the makefile in ./iaspei-tau/src/ to build the programs, and
finally it builds the tables in subdirectory ./iaspei-tau/tables/.   This script
produces two files ending in ".term" that are the console output that would have
appeared if a script had not been used.  Files starting with "test-" in
./tables/ are the ".term" files produced by my runs (using gfortran 4.3.1 on OS
X PPC).  The files of interest produced by the script are iasp91.hed,
iasp91.tbl, ak135.hed, and iasp91.tbl.  Other files are produced, but they are
moved into a subdirectory ./iaspei-tau/tables/stuff/.  These files should only
be of interest if the table builds were unsuccessful.

To test the newly created tables, go to directory ./iaspei-tau/tests/" and enter
"run_ttimes". If the run is successful, three output files are produced: 
ttimes_iasp91.lst,  ttimes_ak135.lst, and (the console output) ttimes.term. 
Files starting with "sample_" were produced in my test run.

It is strongly recommended that users build the tables using the same Fortran
compiler on the same platform as the analysis programs (such as ttimes) are
compiled.  Although there is some portability -- tables built on Mac OS X PPC
using gfortran (versions 4.2 or higher) or g77 can be used on Sun Solaris (for
programs built using Sun's f77, f95, or g77), there is limited portability among
little-endian architectures such as Mac OS X i686 (Intel) and Linux systems. In
addition to differences among Fortran compilers on Linux in conventions for
unformatted sequential-access files, there are incompatibilities between 32-bit
and 64-bit architectures.  In all cases tested, program ttimes worked on the
systems on which the tables were built.

You may have programs that do not use the binary iasp91-format tables but want
to make sure traveltimes you produce are consistent with the "official" iasp91
and/or ak135 models.  The files ak135.tvel and iasp91.tvel in directory
./iaspei-tau/build-tables are ASCII files that were used by Kennett and Buland
to create the final versions of the tables.  Starting with line 3 in the .tvel
files, each line has a depth, v_p, v_s, and density at the upper boundary of
layers starting from the surface of the Earth.  Constant-velocity layers are
those for which two successive lines have the same velocities and density but
different depths, and a first-order discontinuity is represented by two
successive lines with the same depth but different velocities and/or densities.

One can (in principle) build tables for other models as well, if that model is
put in the format of iasp91.tvel or ak135.tvel.  The code was optimized for the
iasp91 model, so this procedure may not work for models that differ
significantly. For example, all successful builds that I have done have a
2-layer crust.  Using program rsetbrn, a stripped-down version of setbrn with
only the main P and S branches, may help. 
