ABOUT THIS README FILE This README file contains information related to the distribution of the 97.0108 version of the SPHYPIT90 software package. Differences between this distribution and the previous distribution (1296) are summarized at the end of this document. ABOUT THIS DISTRIBUTION This is a "minimalist" distribution which will evolve over time. The motivation for putting this out now is to provide interested investigators with something with which to work. The ususal provisos that accompany freely distributed software apply here as well, such as: 1. The author is not responsible for any problems you might experience using it and 2. Don't sell it, or incorporate it into a commercial product. This distribution was put together by Steve Roecker (roecker@harold.geo.rpi.edu). HOW TO RETRIEVE THIS DISTRIBUTION The contents of this distribution are stored in a compressed tarfile called sphypit90_1296.tar.Z, and resides in the anonymous ftp area of harold.geo.rpi.edu (128.113.15.10) in the pub/Programs directory. It can be retrieved either by anonymous ftp to harold.geo.rpi.edu or through the RPI Geophysics Software web page: http://gretchen.geo.rpi.edu/software.html Follow the directions on this page for ftping the Sphypit90 package. WHAT'S HERE An economical way to extract the contents of the tarfile is to issue the command: zcat sphypit90_1296.tar.Z | tar xvf - The contents, placed in a subdirectory called "sphypit90", are: README.0197 This file bin/ Executables compiled on a Sun Sparcstation LX. You can try these and see if they work for you to avoid the trouble of having to "remake" them. Because Sphypit90 requires setting certain paths before compiling, you may want to recompile it for convenience (the alternative is to set up a link to the directories named in "files.h" but this is a bit cludgey). data/ Various data files used by the software, like Herrin and IASPEI travel time tables. doc/ Documentation of the software, in this case a couple of HTML files that were developed using a NetScape 2.0 browser. example/ Contains two trial runs of the software. src/ Contains all the source code. INSTALLATION The src directory contains all the code for the following "principal" programs: Sphypit90 The tomographic inversion software Sphrel3d90 The earthquake relocation software Additionally, a few potentially useful utility programs are included: exhead Extracts location headers from the data files for use in plotting. gradloc Grades locations makenewmod Makes a new parameterization out of an existing one nev Counts the number of events in a local data file printbox Outputs a map to check cell reparameterization printvels Outputs a map to check velocity reparameterization qal1data Extracts best quality events from a graded header file refsyn Reformats the hypothetical travel time file produced by sphypit90 into a data file that can be used as input to sphypit90 or sphrel3d90. rmmfullsph Computes an inverse convariance matrix for use by Sphypit90 None of thee utility progrmas is required to run the inversion, but the user might find gradloc, nev, and qal1data to be helpful to include in the iteration process. I haven't used rmmfullsph in a long time and didn't test it with the later versions of sphypit90, so the user is cautioned to test this version of rmmfullsph out first before using it. A set of executables is included in the bin directory, but of course they may not run on your computer or you may want to modify the code. Before compiling Sphypit90, edit the pathnames in the file "files.h" in the src directory to correspond to the correct absolute pathname of the sphypit90/data directory. To compile any of these programs, go into the src directory and look for the Makefile. To compile the principal programs, simply type: make and return. If you wish to compile the utility programs, type: make utils If you wish to compile only a selected few of these programs, for example to compile just the program "nev", type: make nev After compilation, the executables reside in the src directory. If you wish to move them to another directory, edit the BIN_DIR variable in the Makefile so that it has the proper directory name (the default is sphypit90/bin) and then type: make install RELATED SOFTWARE Some potentially useful utility software not included in this distribution include the following: hyp2prof An Xwindows menu driven program to generate graphical input files for the program Xprofile from sphypit90 input and output files for plotting. Xprofile A versatile plotting routine that can be used for plotting the velocity models and hypocenters produced by sphypit90 and sphrel3d90 (in conjunction with hyp2prof). Check the web site (http://gretchen.geo.rpi.edu/software.html) for current status of these programs. DOCUMENTATION Documentation is scant by improving. At the moment HTML files discussing Sphypit90 and one of its subroutines (Cppkpo) are included in the "doc" directory. These are available over the Web as well (via http://gretchen.geo.rpi.edu/software.html) EXAMPLES This distribution contains two example runs that should help you decide if SPHYPIT90 and SPHREL3D90 are working properly on you machine. Don't worry if the floating point results are not exactly the same as there are variations in precision from machine to machine, but they should be "close". The two examples are in the directories: example/example1 An inversion of teleseismic data only example/example2 A joint inversion of local and teleseismic data EXAMPLE 1: Teleseismic Inversion only In this example, teleseismic data is inverted for structure starting with a one-dimensional model. The input files used in this example are: tele.parms The parameter file junk A dummy file (empty) junk2 Another dummy file (empty) tele.data The data file The output files included in this example are: tele.generic The "generic" output file tele.nslow The new slowness model tele.frac The fractional change in velocity tele.res The diagonals of the resolution matrix tele.tot The estimated total uncertainties To run this test, either start the program and answer the questions appropriately, or use the shell file "runtest" that created this example, as: csh runtest Note that the output file names in this shell file are the same as those in the directoy, so they will be overwritten if you do this. Either edit "runtest" or change the names of the output file if you wish to save the original files for comparison. A second iteration of this analysis can be run using the shell file runtest2, which has the contents: tele.parms2 tele.nslow junk2 tele.generic2 tele.nslow2 tele.frac2 tele.res2 tele.tot2 tele.data n ! In this case, the model used is "tele.nslow", and the preturbed model after the second iteration appears in "tele.nslow2". EXAMPLE 2: Joint Local and Teleseismic Inversion The directory example/example2 contains an example of a joint inversion of local and teleseismic data using the Sphyit90, location program SPHREL3D90 and some of the programs. To reproduce this example, start with the following input files: local.data File containing local earthquake data parameter_file File containing control parameters tele.data File containing teleseismic data old_slowness.file File containing the starting slowness model Note that in this case we are starting with a 3D file, and are using reparameterization as well. These files will be input to Sphypit90, which will then produce the following output files: generic.output File containing general information on results new_slowness.file File containing the new slowness model fractional.outfile File containing the fractional change between old and new models resolution.outfile File containing the resolution diagonals total_error.outfile File containing the total errors. Note that the beginning of this file will have event locations; these should be edited out before using this file. To run Sypit90, type the name of the program and answer all the questions, or you can run the script "run_sphypit90" which will do this for you. The contents of "runsphypit90" are: ../../bin/sphypit90 << ! parameter_file old_slowness.file local.data generic.output new_slowness.file fractional.outfile resolution.outfile total_error.outfile tele.data n ! Note that the original output files will be overwritten it you run this script, so be sure to back them up (or change their names) before you run this. The next step is to relocate the local events in the new model by running them through the program Sphrel3d90. Use the input files: parameter.file File containing control parameters local.data File containing local earthquake data new_slowness.file File containing the new slowness model (produced by SPHYPIT90) Sphrel3d90 can produce the following output files: local.hds File containing new location headers local.generic File containing the iteration by iteration summary local.sum File containing general information about the run To run Sphrel3d90, type the name of the program and answer all the questions, or you can run the script "run_sphrel3d90" which will do this for you. The contents of "runsphrel3d90" are: ../../bin/sphrel3d90 << ! parameter_file local.data new_slowness.file local.hds local.generic local.sum ! Again, the original output files will be overwritten it you run this script, so be sure to back them up (or change their names) before you run this. A useful next step is the grading of locations, using the program Gradloc.F. Input files are: grad.critcon File containing the grading criteria (see comments in gradloc.f for an explanation of these). local.hds File containing location headers made by SPHREL3D90. Output file is: local.hds_grad File containing graded headers. The following is an example of a run of gradloc: %> gradloc Enter name of criteria file: grad.critcon Enter name of old header file: local.hds Enter name of new header file: local.hds_grad condit# std.dev deviation converge tot.change 900.000 9.000 90.000 50.000 500.000 The next step is to separate quality one locations using the program Qal1data.f. The input files are the local.hds_grad Graded header file from GRADLOC local.data File containing local earthquake data Output files are local.data_q1 File containing quality 1 data local.data_notq1 File containing all other data (not quality 1). The following is an example of a run of Qal1data: %> qal1data Enter name of graded header file: local.hds_grad Enter name of data file: local.data Enter name of output q1 data file: local.data_q1 Use hypo. loc. from 0-data or 1-graded?: 1 Enter data format type (iform): 2 Enter name of output file for not q1 data: local.data_notq1 Total number of events = 471 Number Quality one events = 470 Number NOT quality one events = 1 The idea then is to use the final quality 1 data file (local.data_q1) as the input for the next iteration to Sphypit90, along with the new model (new_slowness.file) to produce the next refinement to the model, and continue this cycle for as many iterations as you like. Differences between the 97.0108 version and the 1296 version Most of the upgrades resulted from work done with Alex Calvert and Eric Sandvol of Cornell. These are: 1. Modifications to inrel2sph and instasph to handle local events near the equator and prime meridian correctly. 2. A formatting change in output of sphrel3d90 to prevent stars ('****') from being written to the header file. 3. Sphypit90 now automatically produces a file called "hitmap.out" that contains a summary of the hit distribution 4. There is a new parameter called "maksyn" which, if set to 1, will produce a filed containing calculated travel times. This file may be used with the utility program "refsyn.f" to produce an input file that can be used for testing with sphypit90 and sphrel3d90.