Network ray tracing program package NET (general description)

Version: 3.00 Date: 1997, October 27 Authors: Ludek Klimes Department of Geophysics, Charles University Prague, Ke Karlovu 3, 121 16 Praha 2, Czech Republic, E-mail: klimes@seis.karlov.mff.cuni.cz Michal Kvasnicka Department of Geophysics, Charles University Prague, Ke Karlovu 3, 121 16 Praha 2, Czech Republic, E-mail: qasnicka@seis.karlov.mff.cuni.cz This is just a general overview, the detailed description of input data, procedures, and other important topics is included within the individual FORTRAN77 source code files. References: Klimes L. and Kvasnicka M. (1994): 3-D network ray tracing. Geophys.J.int., 116, 726-738. Klimes L. (1996): Grid travel-time tracing: second-order method for the first arrivals in smooth media. PAGEOPH, 148, 539-563. Purpose: Network ray tracing is designed to calculate first-arrival travel times and the corresponding rays. For your application, please, do not confuse the first-arrival travel times with the ray-theory body-wave travel times. The first-arrival travel times from the given source of any shape are calculated at all grid points of a given rectangular grid of points. Together with the first-arrival travel times, also their maximum errors may be automatically estimated. Model specification: For network ray tracing, the seismic model is specified in terms of grid velocities at a rectangular grid. The density of the grid should correspond to the accuracy required and to the computer memory available. In a layered or blocky medium, also the indices of geological blocks at gridpoints are recommended to be specified in addition to the velocities, in order to improve accuracy considerably. The model specification subroutine package 'MODEL' is recommended to describe the models and to generate the grid values, unless the user prefers his own model specification system. Attention: Array dimensions MIND, MGRID, MICB, MNFS, MPRED, MFS, MSRC, and MREC in 'net.for' should be adjusted according to a particular computer memory and particular application. In the basic version delivered, arrays in 'net.for' are roughly dimensioned for a computer with 16MB of RAM (see 'net.inc'), assuming no indexing of Fresnel volumes, and assuming all other options like forward-star optimization and geological block indexing enabled. If having adjusted the array dimensions in 'net.inc' and going to use 'netind.for', it is strongly recommended to adjust array dimensions MPOS and MTT in 'netind.for' according to MIND and MGRID in 'net.for'. ...................................................................... The network ray tracing subroutine package 'NET' consists of the following FORTRAN77 source code and demo files: (A) Documentation: 'net.htm'... Main HTML file containing basic description and links the files of this package. 'netdoc.htm'... This file containing a brief overview of the NET package. The detailed description of input data, procedures, and other important topics is included within the individual FORTRAN77 source code files. 'neterr.htm'... HTML file containing links to error descriptions. (B) Network ray tracing program 'NET': FORTRAN77 codes listed herein, together with auxiliary data files 'net.fs2' and 'net.fs3' containing template forward stars, form the complete and functional network ray tracing program 'NET'. Usually, no other files of this package are required to perform network ray tracing. 'net.for'... FORTRAN77 source code of the network ray tracing program. The source code also contains the description of the input and output data, and the brief comments on the program. 'net.inc'... Include file with most COMMON blocks for 'net.for'. 'netnode.inc'... Include file with a COMMON block for 'net.for'. 'ttt.for'... Part of the FORTRAN77 source code of the NET program responsible for the 2-D "second-order" grid travel-time tracing acording to Klimes (1996). 'ttt.inc'... Include file with a COMMON block for 'ttt.for'. 'eigen.for'... Subroutine 'EIGEN' of the IBM Scientific Subroutine Package. 'net.fs2'... Optimized spherical 2-D forward stars. 'net.fs3'... Optimized circular 3-D forward stars. (C) Programs designed to generate forward stars for the 'NET' program: These programs are not required when using the 'NET' program, because the forward stars for the net program are already generated and stored in 'net.fs2' and 'net.fs3'. They may be used if (1) larger forward stars than stored in the current versions of 'net.fs2' or 'net.fs3' are required (unlikely for most applications on most nowadays computers), or (2) if other than optimized forward stars are required for the purposes of comparing the performances of different algorithms or programs. 'fs-opt2.for'... Program generating 2-D optimized circular forward stars according to Section 4.3 of the paper by Klimes and Kvasnicka (1994). 'fs-opt3.for'... Program generating 3-D optimized spherical forward stars according to Section 4.3 of the paper by Klimes and Kvasnicka (1994). 'fs-mcir2.for'... Program generating 2-D circular Moser-Saito forward stars, containing all nodes within a circle except for the end nodes of the edges that would be parallel with shorter edges in a homogeneous medium. 'fs-msph3.for'... Program generating 3-D spherical Moser-Saito forward stars, containing all nodes within a sphere except for the end nodes of the edges that would be parallel with shorter edges in a homogeneous medium. 'fs-msqr2.for'... Program generating 2-D square Moser-Saito forward stars, containing all nodes within a square except for the end nodes of the edges that would be parallel with shorter edges in a homogeneous medium. Such forward stars have been used, e.g., by T-J.Moser or H.Saito. 'fs-mcub3.for'... Program generating 3-D cubic Moser-Saito forward stars, containing all nodes within a cube except for the end nodes of the edges that would be parallel with shorter edges in a homogeneous medium. Such forward stars have been used, e.g., by T-J.Moser or H.Saito. (D) Demo data files for the network ray tracing program itself: 'net.h'... SEP parameter file describing the grid dimensions. 'net.dat'... Sample input data file for the 'net.for' program, to perform 2-D network ray tracing in a simple model without interfaces. The velocities are gridded in 'vel.dat'. The data correspond to the example described in Subsection 6.1 of Klimes and Kvasnicka (1994). 'vel.dat'... Grid velocities in a 1-D constant velocity gradient model by P.Podvin and I.Lecomte (1991), Geophys.J.int., 105, 271-284. 'src.dat'... Coordinates of a point source. 'rec.dat'... Receiver coordinates. (E) Demo data files for network ray tracing in a model specified by means of the 'FORMS' or 'MODEL' subroutine packages: 'n2-mod.dat'... Input data for the 'MODEL' subroutine package to specify the model used in the example described in Subsection 6.2 of Klimes and Kvasnicka (1994). 'n2-sec.dat'... Main input data file for the 'sec.for' program of the package 'MODEL' to generate the velocity isolines in Fig.6 of Klimes and Kvasnicka (1994). The data file refers file 'n2-mod.dat' of this package. The referred file should be located in the current directory. 'n2-grid.dat'... Main input data file for the 'grid.for' program of the package 'MODEL'. The data file refers files 'n2-mod.dat' and 'n2-net.dat' of this package. The two referred files should be located in the current directory. Program 'grid.for' should generate output file 'vel.out'. 'n2-net.h'... SEP parameter file describing the grid dimensions. 'n2-net.dat'... Main input data file for the 'net.for' program of of the package 'NET'. The data file refers two files 'n2-src.dat' and 'n2-rec.dat' of this package, and to output file 'vel.out' of the 'grid.for' program. The three referred files should be located in the current directory. Program 'net.for' should generate four output files 'rays.out', 'end.out', 'tt.out', and 'err.out', containing rays, the first-arrival travel times at the receivers (endpoints), and the first-arrival travel times and their estimated errors in the rectangular grid of points. The data correspond to the example described in Subsection 6.2 of Klimes and Kvasnicka (1994) with the exception of the number of gridpoints and maximum forward-star size. Whereas 100*100*50 gridpoints are used in the paper, only 50*50*25 gridpoints are considered within the demo data in order to comply with the array dimensions of the basic version of 'net.for'. 'n2-src.dat'... Additional input data file for the 'net.for' program with the coordinates of a source point. 'n2-rec.dat'... Additional input data file for the 'net.for' program with the coordinates of receiver points. 'len-grid.dat'... Main input data file for the 'grid.for' program of the package 'MODEL'. The data file refers files 'model.dat' of the package 'MODEL', and 'len-net.dat' of this package. The two referred files should be located in the current directory. Program 'grid.for' should generate output files 'vel.out' and 'icb.out'. 'len-net.h'... SEP parameter file describing the grid dimensions. 'len-net.dat'... Main input data file for the 'net.for' program of of the package 'NET'. The data file refers two files 'len-src.dat' and 'len-rec.dat' of this package, and two output files 'vel.out' and 'icb.out' of the 'grid.for' program. The four referred files should be located in the current directory. Program 'net.for' should generate four output files 'rays.out', 'end.out', 'tt.out', and 'err.out', containing rays, the first-arrival travel times at the receivers (endpoints), and the first-arrival travel times and their estimated errors in the rectangular grid of points. The data correspond to the example described in Subsection 6.3 of Klimes and Kvasnicka (1994) with the exception of the number of gridpoints and maximum forward-star size. Whereas 120*80*60 gridpoints are used in the paper, only 60*40*30 gridpoints are considered within the demo data in order to comply with the array dimensions of the basic version of 'net.for'. 'len-src.dat'... Additional input data file for the 'net.for' program with the coordinates of a source point. 'len-rec.dat'... Additional input data file for the 'net.for' program with the coordinates of receiver points. 'ran-*.*'... Data, batch and script files to generate a representation of a random medium and to calculate the first-arrival travel times in it. (F) Indexing of Fresnel volumes (accuracy enhancement of two-point rays by means of network ray tracing within Fresnel volumes): 'netind.for'... Program to generate the index file mapping gridpoints onto the network nodes situated within the Fresnel volume corresponding to the maximum two-point travel-time error. It also may adjust the grid density in the input data for the 'net.for' program in order to achieve the best possible accuracy of network ray tracing. 'fv.bat'... MS-DOS batch file designed to control two-point network ray tracing within Fresnel volumes. It repeatedly runs programs 'grid.for' (package 'MODEL'), 'net.for', and 'netind.for'. If another operating system is used, the batch file may be used as a guide how to run these three programs to complete the task. Then it may be useful to know that only the label ':FV' (1 line), command 'GOTO :FV' (1 line), commands running the programs (6 lines with piping), and the COPY commands (6 lines) are important. All other lines may simply be deleted in order not to be confusing. The only important batch file parameter is the first one. The first batch file parameter is the prefix of the name of 6 input data files required by the batch file. The names of the data files are composed of the prefix immediately followed by 'gri1.dat', 'net1.dat', 'net2.dat', 'gri3.dat', 'net3.dat', and 'net4.dat', respectively. The first 3 files are for the first iteration and specify the data for model gridding, the data for network ray tracing from the first given point to the second given point, and the data for network ray tracing from the second given point to the first given point. The other 3 files are used for all subsequent iterations. Important note: Data '...gri3.dat' for the subsequent iterations should refer to '...net3.out' instead of '...net3.dat'. File '...net3.out' is created from '...net3.dat' by adjusting the numbers of gridpoints. For example refer to the demo data files. (G) Demo data files for network ray tracing within Fresnel volumes: For network ray tracing within Fresnel volumes, dimension mind in 'net.for' has to be adjusted properly (MIND=1 in the basic version). If there are no structural interfaces in the model, that is also the case of the following data, dimension MICB in 'net.for' may be decreased to NICB=1 to save the memory (MICB=MGRID in the basic version). Dimension MGRID in 'net.for' may be adjusted according to the memory available (MGRID=666666 in the basic version roughly corresponds to 16 MB of RAM). When having adjusted the dimensions in 'net.for', it is recommended to adjust the dimensions in 'netind.for' accordingly. Under MS-DOS the following data may be run by entering fv FV- from the command line. Here 'FV-' is the prefix of the input data files for the 'fv.bat' batch file. 'vgr-mod.dat'... Data for the 'MODEL' package specifying a 1-D constant velocity gradient model used by P.Podvin and I.Lecomte (1991), Geophys.J.int., 105, 271-284. 'fv-gri1.dat'... The data controlling model gridding for the first iteration. In particular, the data specify the model and the names of output files with gridded velocities and, if needed, indices of geological blocks. File 'fv-gri1.dat' refers model data file 'vgr-mod.dat', and file 'fv-net1.dat' to specify the grid dimensions which has to be, of course, the same as in 'fv-net2.dat'. The referred data files has to be located in current directory. Output file 'fv-vel.out' with gridded velocities will be generated. 'fv-net1.dat'... The data for network ray tracing from the first given point (file 'fv-src.dat') to the second given point (file 'fv-rec.dat') during the first iteration when no volume indexing is applied (no index file is specified). Velocities gridded in 'fv-vel.out' are referred. Output files 'fv-rays1.out' containing the two-point ray, 'fv-end1.out' containing the two-point travel time and its error, and 'fv-tt1.out' containing the travel-time field will be generated. 'fv-net2.dat'... The data for network ray tracing from the second given point (file 'fv-rec.dat') to the first given point (file 'fv-src.dat') during the first iteration when no volume indexing is applied (no index file is specified). Velocities gridded in 'fv-vel.out' are referred. Output files 'fv-rays2.out' containing the two-point ray, 'fv-end2.out' containing the two-point travel time and its error, and 'fv-tt2.out' containing the travel-time field will be generated. 'fv-gri3.dat'... The data controlling model gridding during all subsequent iterations. File 'fv-gri3.dat' refers model data file 'vgr-mod.dat', and file 'fv-net3.out' specifying the grid dimensions which has to be, of course, the same as in 'fv-net4.out'. Files 'fv-net3.out' and 'fv-net4.out' are created from 'fv-net3.dat' and 'fv-net4.dat' by adjusting the numbers of gridpoints according to the results of the previous iteration. Unlike 'fv-gri1.dat', 'fv-gri3.dat' refers to input index file 'fv-ind.out' describing the Fresnel volume. The Fresnel volume corresponding to the two-point travel-time error, and the updated grid density are determined by program 'netind.for'. The referred data files has to be located in current directory. Output file 'fv-vel.out' with gridded velocities will be generated. 'fv-net3.dat'... The data for network ray tracing from the first given point (file 'fv-src.dat') to the second given point (file 'fv-rec.dat') during the subsequent iterations. File 'fv-net3.dat' differs from 'fv-net1.dat' only by specifying input index file 'fv-ind.out' generated by program 'netind.for' according to the results of the previous iteration. The numbers of gridpoints in this file are not important. They are updated by program 'netind.for' and new updated file 'fv-net.out' is used for network ray tracing during each subsequent iteration. 'fv-net4.dat'... The data for network ray tracing from the second given point (file 'fv-rec.dat') to the first given point (file 'fv-src.dat') during the subsequent iterations. The numbers of gridpoints in this file are not important. They are updated by program 'netind.for' and new updated file 'fv-net.out' is used for network ray tracing during each subsequent iteration. ...................................................................... Released versions: 1.00 (1992, October): First released version. Includes optimization of forward-star sizes. No reasonable check for the computational volume or free space. 1.10 (1992, December): Input and output of forward stars enabled. Optional print of the numbers of template forward-star nodes. Important changes in subroutines SOURCE, GENER, and SRCREC, concerning free space and the computational (Fresnel) volume indexing. 1.20 (1993, January): Subroutines reordered and now listed. Name of the data file read from the * unit instead of the whole data file. Subroutine SETERR: evaluation of the negative travel-time error bound fixed. Subroutines OPTNFS, OPTMAT, and TRYMAT: considerable improvements with influence on the forward-star sizes. Subroutines TRACER, ONERAY, and SLOW: other corrections. The version likely able to properly consider free space, and computational (e.g. Fresnel) volume indexing. Complemented with demo-data package 'MOD-NET', ver.1.00. 1.30 (1993, April): Initial travel-time errors at source points enabled. WRTOUT: new subroutine with the code to generate the output files containing calculated grid values. Subroutine SETERR: evaluation of travel-time errors fixed. Subroutine OPTNFS: estimation of optimum forward-star sizes improved (according to Klimes and Kvasnicka, 1994). 1.40 (1993, June): Fatal formal array-indexing error in subroutine MIXDER fixed (error had no influence on the numerical results). Subroutine WRTOUT: null values generated in place of undefined grid values, and other minor changes. 2.00 (1994, August): Program 'net.for' merged with demo-data package 'MOD-NET' and extended to program package 'NET'. 'net.for': Subroutines SLOW and POS corrected. *** New input/output formats of points and rays. *** Error messages, previously generated by statements like STOP 'Error...', are now generated by PAUSE 'Error...' followed by the STOP statement, in order to suspend the batch files in the case of error. Some changes intended for future extensions has been made. Subroutine WRTOUT replaced by subroutine WARRAY of the 'MODEL' package, and then the following two files have been split off: 'array.for': Subroutines replacing subroutine WRTOUT. Common with package 'MODEL'. 'eigen.for': Subroutine EIGEN of the IBM Scientific Subroutine Package. 'mod-*.dat': Data files revised to correspond to Sec.6.3 of Klimes and Kvasnicka (1994). *** new ***: 'fs-opt2.for', 'fs-opt3.for', 'fs-mcir2.for', 'fs-msph3.for', 'fs-msqr2.for', 'fs-mcub3.for': New programs to generate 2-D or 3-D template forward stars. 'n2-*.dat': Demo data files related to Sec.6.2 of Klimes and Kvasnicka (1994). 'netind.for': Program to generate index files specifying Fresnel volumes. 'fv.bat', 'vgr-mod.dat', 'fv-*.dat': Batch file and demo data to perform iterative two-point network ray tracing in Fresnel volumes. 3.00 (1997, September): *** probably not all changes are listed here *** 'forms.doc': renamed to 'formsdoc.htm' and moved to package FORMS. 'net.for': Reading grid values and writing integer grid values through subroutines RARRAY, RARRAI, WARRAI. 'array.for': Renamed to 'forms.for', updated, supplemented with subroutines FORM1 and FORM2, moved to package FORMS. All error descriptions moved towards the corresponding reporting statements. *** new ***: Files converted from UPPERCASE to both UpperCase and LowerCase (for better reading and Unix systems). Fortran files supplemented with HTML references. All files with main programs supplemented with the INCLUDE statements to include all files with called subroutines to simplify the compilation and linking considerably. '*.inc': Include files with COMMON blocks. INCLUDE statement introduced for COMMON blocks. SAVE statement is now used consistently for COMMON blocks 'net.for', 'net.inc': Automatic memory allocation according to 'ram.inc' of package FORMS. 'net.for': Automatic determination of the maximum f.s. size NFSMAX (for NFSMAX=0 on input) added. Otherwise (NFSMAX>0), network ray tracing remains identical to Ver.2.00. 'net.for', 'ttt.for': 2-D grid travel-time tracing of the second order according to the paper by Klimes (1996) added for testing purposes (NFSMAX=-1). 'net.for','netind.for': Grid dimensions specified by SEP parameter file. ...................................................................... Application of the network shortest path ray tracing program 'NET' in the models described in terms of model specification subroutines of the package MODEL, version 4.00 or later (MODEL ver. 5.10 or later is strongly recommended): (1) Compile and link the program 'grid.for' of the package 'MODEL'. See the package 'MODEL' for details. Compile and link the program 'net.for' of this package. (2) Prepare the input data for the package 'MODEL', describing the seismic model of the medium. Example: In the demo data (E) of this package, the demo model data file 'model.dat' of the package 'MODEL' is assumed. (3) Program 'grid.for' of the package 'MODEL' generates the velocities and indices of geological blocks in the given rectangular grid of points. Example: In the demo data (E), the main input data file for 'grid.for' is called 'len-grid.dat' (thus, this name, embedded in apostrophes, has to be submitted manually to the program when it starts and asks for the filename). The input model file is 'model.dat' and the grid is described within the input data 'len-net.dat'. The output files with velocities and indices of geological blocks are generated under filenames 'vel.out' and 'icb.out', respectively. (4) The program 'net.for' of this package performs the network shortest path calculation of the first-arrival travel times in the generated discretized (raster) representation of the model. Example: In the demo data (E), the main input data file for 'net.for' is called 'len-net.dat'. This filename, in apostrophes, has to be submitted manually to the program when it starts and asks for the filename. Other input files are 'len-src.dat', 'vel.out', and 'icb.out'. The generated output files 'tt.out' and 'err.out' contain first-arrival travel times and their estimated maximum errors. ...................................................................... Two-point network shortest-path ray tracing within Fresnel volumes. Description of the algorithm employing programs 'NET' and 'NETIND'. Given: The model, the source point, and the receiver point. Algorithm: (1) Determination of the Fresnel volume: (1.1) Create source point file 'SRC' containing the coordinates of the source point, and receiver point file 'REC' containing the coordinates of the receiver point. The file format is described within the source code 'net.for'. Choose the rectangular grid for the network ray tracing: N1*N2*N3 big bricks, each containing one grid point. We assume here that this original grid is not indexed. (1.2) Generate the grid velocities (file 'VEL') and, possibly, indices of geological blocks (file 'ICB'). If using the model specification software package 'MODEL', this task is performed by the program 'grid.for'. (1.3) Calculate travel-time field 'TT1' from the source, and the two-point travel time with its error. This step is performed by the program 'net.for'. (1.4) Calculate travel-time field 'TT2' from the receiver. This step is performed by the program 'net.for'. (1.5) Run 'netind.for' program with the travel-time fields 'TT1' and 'TT2', and with the calculated two-point travel time plus its estimated error (as the maximum sum of travel times limiting the Fresnel volume). The Fresnel volume is determined and the corresponding index file 'IND' is created. (2) Two-point ray tracing within the Fresnel volume: (2.1) Edit the grid: Divide each of N1*N2*N3 big bricks into L1*L2*L3 small bricks, each small brick having the gridpoint at its centre. If big bricks cannot be divided (e.g. because being short of the computer memory), the algorithm has to be terminated here, without reaching the required accuracy. This step is usually completed together with step (1.5) or (2.5) by the 'netind.for' program. (2.2) Generate the grid velocities (file 'VEL') and, possibly, indices of geological blocks (file 'ICB'). The same as (1.2) except for the index file 'IND', describing the Fresnel volume, specified. The new files 'VEL' and 'ICB' correspond to the index file 'IND' and to the new subdivision of big bricks into small bricks. (2.3) Calculate new, indexed, travel-time field 'TT1' from the source, and the two-point travel time with its error. If the two-point travel time is sufficiently accurate, the procedure may be terminated here and the file 'TT1' is not required. This step is performed by the program 'net.for'. (2.4) Calculate new, indexed, travel-time field 'TT2' from the receiver. This step is performed by the program 'net.for'. (2.5) Run 'netind.for' program with the travel-time fields 'TT1' and 'TT2', and with the calculated two-point travel time plus its estimated error (as the maximum sum of travel times limiting the Fresnel volume). Then the new Fresnel volume is determined and the new index file 'OUT' is created. Whereas the old index file 'IND' corresponds to N1*N2*N3 big bricks, the new index file 'OUT' corresponds to (N1*L1)*(N2*L2)*(N3*L3) big bricks. In this way, the new index file upgrades the old small bricks to big bricks. (3) Changing to the new, finer Fresnel volume: (3.1) Edit the grid: Upgrade old small bricks to big bricks, i.e. write (N1*L1),(N2*L2),(N3*L3) in place of N1,N2,N3, while L1,L2,L3 become undefined. This step is usually completed together with step (2.5) by the 'netind.for' program. (3.2) Replace the old index file 'IND' by the new index file 'OUT'. (3.3) Proceed to (2.1). Strategy of array dimensioning for network ray tracing within Fresnel volumes: In 'net.for', neglecting the template forward stars, the most of the memory is used by the following 7 arrays: IND(N123)... Indexing of Fresnel volumes, P(L1234)... Slownesses (always used), TT(L1234)... First-arrival times (always used), IPOSQ(L1234)... Queue (always used), IPRED(L1234)... Predecessors (used in Fresnel volumes), NFS(L1234)... Optimum sizes of forward stars (often used), ICB(L1234)... Indices of geological blocks (often used). Here the dimensions denote the number of storage locations required. If the index array IND(N123) is used, the minimum dimension N123 is the number of big bricks in the whole model volume. The minimum dimension L1234 of the other 4 to 6 arrays is the number of small bricks in the Fresnel volume. Let us denote: NDIM=2,3 ... For 2-D or 3-D calculation, respectively, NARR=4,5,6 ... Number of arrays dimensioned by L1234, NMEM... Total memory available for the above 7 arrays. The error of arrival time is proportional to the grid step: error=constant*step. The grid step in the last but one iteration is dependent on the total number of small bricks in the model volume in that iteration, that is the number N123 of all big bricks in the last iteration: step=constant*N123**(-1/NDIM). The ratio of the Fresnel volume to the model volume depends on the error in the last but one iteration: ratio=constant*error**((NDIM-1)/2). Finally: ratio=constant*N123**(-(NDIM-1)/(2*NDIM)). Then the number of small bricks within the Fresnel volume is: L1234=L1*L2*L3*N123*ratio as an objective, we choose to maximize the total number Y of small bricks within the whole model volume during the last iteration: Y=L1*L2*L3*N123 =L1234/RATIO =constant*L1234*N123**((NDIM-1)/(2*NDIM)). The memory available for all the above arrays is: NMEM=N123+NARR*L1234. The object function Y=(constant/NARR)*(NMEM-N123)*N123**((NDIM-1)/(2*NDIM)) is extremal for N123=NMEM*(NDIM-1)/(3*NDIM-1), i.e. In 2-D: N123=NMEM/5, L1234=NMEM*4/(5*NARR), In 3-D: N123=NMEM/4, L1234=NMEM*3/(4*NARR). There is no considerable difference between this optimum choice and the smaller value of N123=NMEM/NARR. For example, if NARR=6, the difference of the grid step is 1/4 per cent in 2-D, and 1 per cent in 3-D. That is why in most cases the following two-iteration strategy will be sufficient: 1-st iteration: N123=0, L1234=NMEM/NARR, 2-nd iteration: N123=NMEM/NARR, L1234=NMEM*(NARR-1)/(NARR*NARR). In 3-D, the big bricks may be expected to be divided into 2*2*2 to 6*6*6 small bricks, depending on the complexity of the model. A finer division is unlike in inhomogeneous 3-D models. Although the number of network nodes in the first iteration is slightly greater than in the second iteration, the first iteration should be several times (2 to 6 times in 3-D) faster than the second iteration because of smaller optimized forward stars. On the other hand, if desirable to save the computation time, the following three-iteration strategy 1-st iteration: N123=0, L1234=NMEM*(NDIM-1)/(3*NDIM-1)/(2**NDIM), 2-nd iteration: N123=NMEM*(NDIM-1)/(3*NDIM-1)/(2**NDIM), L1*L2*L3=2**NDIM, 3-rd iteration: N123=NMEM*(NDIM-1)/(3*NDIM-1), L1234=NMEM*(2*NDIM)/(3*NDIM-1)/NARR may be little bit faster since nearly 2**(1.5*NDIM-0.5) times reducing the computation time of the first iteration. Let us note that the above strategies were suggested especially for 3-D, where the shortage of computer memory limiting the accuracy is a dominant feature. If, in 2-D, the computer memory does not limit the accuracy required, other strategies decreasing the computation time should be applied. ...................................................................... Output statements: Screen output: Output to the * external unit is intended for the screen. It is assumed that the first character of each output line is a control character: ' ' to advance to the next line, and '+' to rewrite the last line. If the compiler and operating system does not support this convention, it is adviced to pipe the screen output with user-defined filter in order to achieve the best look of the output screen. The width of the screen is usually assumed to be at least 79 characters. Error messages: The error messages are most frequently written by statements like PAUSE 'Error message' STOP The error messages in 'net.for' are numbered and described within the documentation in the beginning of 'net.for'. Programming language and code layout: Programming language: FORTRAN77-full language as specified in the ANSI standard: X3.9-1978: American National Standard Programming Language FORTRAN. American National Standards Institute, New York 1978. Extension: INCLUDE statement of FORTRAN90. Character set: Code: Character set of FORTRAN77 with capital letters (49 characters including the space): ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 =+-*/(),.$': Comments and character strings: ASCII characters of the 7-bit table. Line length: 72 characters ...................................................................... Acknowledgements: The development of the NET package and the related algorithms has been partially supported by: Faculty of Mathematics and Physics, Charles University, Prague. Institute of Geotechnics, Czechoslovak Academy of Sciences, Prague. Grant agency of the Academy of Sciences of the Czech Republic under Contracts 31223 and 346110. Grant Agency of the Charles University under Contracts 8/94 and 38/94. Grant Agency of the Czech Republic under Contract 205/95/1465. European Commission within the framework of the JOULE II Project 'Integrated Structural Imaging of Seismic Data'. Members of consortium 'Seismic Waves in Complex 3-D Structures'. ======================================================================