PREBCONV

Prepares pixel grid input file for BOMCRATR, using *.dat file from BOMTOM as input. MDATA in BOMTOM must = 0. The numbering system for corners and triangles is:

corners   001---002---003---004---005---006---007---008---009---010
triangles  |01/02|03\04|05/06|07\08|09/10|11\12|13/14|15\16|17/18|
corners   011---012---013---014---015---016---017---018---019---020
triangles  |19\20|21/22|23\24|25/26|27\28|29/30|31\32|33/34|35\36|
corners   021---022---023---024---025---026---027---028---029---030
triangles  |37/38|39\40|41/42|43\44|45/46|47\48|49/50|51\52|53/54|
corners   031---032---033---034---035---036---037---038---039---040
triangles  |55\56|57/58|59\60|61/62|63\64|65/66|67\68|69/70|71\72|
corners   041---042---043---044---045---046---047---048---049---050
trianges   |73/74|75\76|77/78|79\80|81/82|83\84|85/86|87\88|89/90|
corners   051---052---053---054---055---056---057---058---059---060

Input and output data file names are entered from the keyboard. Interactive instructions are given for creating a new input file if the specified input file is not found. The output file serves as the input file for BOMCRATR.

Written by Daryl Tweeton, Bureau of Mines, 5629 Minnehaha Ave. South, Minneapolis, MN 55417-3099. Phone (612) 725-4670. Latest revision Feb 2, 1993. (Increased MAXTTM to 1850.)

The following Bureau of Mines standard disclaimer applies. The Bureau of Mines expressly declares that there are no warrenties expressed or implied which apply to the software contained herein. By acceptance and use of said software, which is conveyed to the user without consideration by the Bureau of Mines, the user expressly waives any and all claims for damage and/or suits for or by reason of personal injury, or property damage, including special, conseqential, or other similar damages arising out of or in any way connected with the use of the software contained herein.

Input file is in same format as for BOMTOM, with MDATA = 0 for BOMTOM.

Units for length, travel times, and velocities must be self-consistent. Usual units are lenght in meters, time in milliseconds, velocity in m/ms. For labeling in the program, sources are assumed to be on the left and receivers on the right side. Pixel 1 is at top left. Pixel 2 is next pixel in top row.

All data are in list-directed format. Input numbers must be separated by a space or comma. They do not need to be in particular columns.

Output into PREBMCON.OUT or a different selected file consists of the following.

HEADER
One line of comments for the top of output file.

ITRMAX MSMTH MSTRT
ITRMAX = maximum number of iterations allowed. Set MSMTH=1 for smoothing after each iteration. Weighting is 20, 4, 1 for pixel, its nearest neighbors, and corner neighbors, respectively. Set MSTRT=1 to force all rays to be straight.

IPDAT IPITR IPSEG IRAYGRF IRAYTBL
IPDAT=1 causes printing of positions and travel times. IPITR=1 causes printing of ray information in *.RAY for all iterations instead of just the final one. IPSEG=1 causes printing of segment lengths for each path and pixel. (It makes a very large output file, useful mostly for debugging.) IRAYGRF=1 creates output file of graphical display of ray paths. IRAYTBL=1 creates output file of x,z at pixel sides along ray paths. Any value other than 1 suppresses the corresponding printing or display.

XTOPL ZTOPL XBOTL ZBOTL
XTOPL and ZTOPL are the x and z coordinates of the top left node. XBOTL AND ZBOTL are the x and z coordinates of the bottom left node. They should be set to minimize the intersection of nodes by rays, by approximately centering source and receiver positions vertically in pixels. If pixel 1 is too far above or to the left of the paths, then pixel indices may be larger than the dimension. If pixel 1 is below or to the right of a ray path, then that ray cannot be traced. The borders are assumed to be straight lines for this calculation. The node positions on the borders can be adjusted to account for curved boreholes.

XTOPR ZTOPR XBOTR ZBOTR
XTOPR and ZTOPR are the x and z coordinates of the top right node. XBOTR and ZBOTR are the x and z coordinates of the bottom right node.

NNODH NNODV NLATOP NLABOT NFXLFT NFXRHT
NNODH=number of columns of nodes (counting horizontally). NNODV=number of rows of nodes (counting vertically). If desired pixel height is EPIXV, set NNODV=1+(ZBOTR-ZTOPL)/EPIXV. NLATOP and NLABOT are the number of laterally invariant rows at top and bottom of the grid. The velocity in each of those rows is set equal to the average for that row after each iteration. NFXLFT and NFXRHT are the number of columns at the left and right sides of the grid in which the velocities are fixed at the initial values.

IDSOR(ISOR) XSOR(ISOR) ZSOR(ISOR) (One line for each ISOR = 1 to NSOR) End with -99 -99. -99.
IDSOR(ISOR) is the identification number of the source position. They do not need to be sequential. XSOR AND ZSOR are X and Z coordinates of source positions. Z increases with depth. Sources should not be exactly on a border or pixel side.

IDREC(IREC) XREC(IREC) ZREC(IREC) (One line for each IREC = 1 to NREC) End with -99 -99. -99.
IDREC(IREC) is the identification number of the receiver position. XREC and ZREC are X and Z coordinates of receiver positions. Receivers must be on a border, but not in a corner.

ADJTTM
ADJTTM is added to all experimental travel times.

IDSORT(IEXPTM) IDRECT(IEXPTM) EXPTT(IEXPTM) (One line for each IEXPTM = 1 to NEXPTM) End with -99 -99 -99.
IDSORT and IDRECT are the identification numbers of the source and receiver positions for the travel time EXPTM(IEXPTM)

SMFPLL VELMIN VELMAX INVOPT
SMFPLL is the lower limit for the sum of fractions of path lengths in a pixel (segment length in pixel/length of path from source to rec). if the sum is less than or equal SMFPLL, then the velocity for the pixel is displayed as ###, and is not calculated.
VELMIN and VELMAX are the low and high limits for the calculated velocities. If a velocity is out of that range, it is set = the limit. If no limit is desired, set the limit to -99.
INVOPT specifies the option for inputting the initial guesses of velocities.
If INVOPT = 1, input is uniform and the format is: VEL(1) BOMCRATR sets initial velocity = VEL(1) for every node.

If INVOPT = 2, input is row by row and the format is: IROWV VEL(IROWV) (One line for each row, NNODV lines) IROWV is the row number. Rows can be input in any order. BOMCRATR sets initial velocities = VEL(IROWV) for all nodes in that row. This option facilitates varying the pattern of initial guesses to test the uniqueness of a solution.

If INVOPT = 3, input is node by node and the format is: IROWV (VEL(I),I=1,NNODH) (One line for each row, NNODV lines) IROWV is the row number. VEL(I) is the initial velocity for row IROWV, column I. This option is used when resuming a run using a data file as input.

I XNOD(I) ZNOD(I) (One line for each node.)
I - number of node, starting with I=1,monotonically increasing, maximum set to MAXNOD (see parameter definition) XNOD(I),ZNOD(I) - x,z-coordinates of node I
Terminate this set with -99 -99. -99.

XNOD(J) every second position, at top of grid ZNOD(INODV) LGLVAR(J + (INODV-1)*NNODH) J=1,number of node columns One line for each row of velocity node points. XNOD(J) every second position, at bottom of grid

This matrix of logical variables is for conveniently specifying whether the velocity should be fixed to the initial value (F) or allowed to vary (T). XNOD and ZNOD are displayed around the matrix to facilitate selecting the velocity points to fix. They are read into an array that is temporarily not in use, and not used as new data. Fixing velocities with NFXLFT of NFXRHT overrides T in this matrix.

J K(J,1) K(J,2) K(J,3) LJ(J,1) LJ(J,2) LJ(J,3) (One line for each triangular pixel.)
J - number of triangles,starting with J=1,monotonically increa- sing, maximum J = MAXTRI (see parameter definition) K(J,1) K(J,2) - nodepoints (I) of this triangle, in mathematically k(J,3) positive direction, i.e. counterclockwise LJ(J,1) LJ=indices of neighboring triangles of triangle J LJ = -32111,-32222,-32333,-32444 indicate left, LJ(J,2) bottom, right, top borders of grid, respectively. LJ given in counterclockwise direction. LJ(J,1) is the LJ(J,3) index of the neighboring triangle across the triangle side with the nodes K(J,1) and K(J,2), etc. End of this set is -99 -99 -99 -99 -99 -99 -99

parameter:
MAXNOD - max. # of nodes allowed.
MAXTRI - max. # of triangles allowed.
MAXNDB - max. # of nodes on a border.
MAXCOL - max. # of pixel columns = horizontal nodes - 1.
MAXROW - max. # of pixel rows = vertical nodes - 1.
MAXLOC - max. # of source or receiver locations.
XTTM - max. # of experimental travel times.