Next: AN EXAMPLE OF A Up: HOW TO BUILD A Previous: Notion of a 3-D

## How to fill a GRID3_t object from a given model

The small program I designed fills a 3-D grid with velocity values extracted from a GOCAD model file. The main idea is to make a loop over all the nodes of the grid located on the top row. From each point so defined, a shoot is performed vertically inside the model to locate the intersection points with all the interfaces of the model. Then each node of the column is filled with the value of the velocity attached to the domain corresponding to the location of the node.

The executable produced from this program receives a parameters file as input and generates an SEP output file. The syntax to run this program is

grid par=input.par > output.H

grid
Figure 2
Notion of a GRID3 object in GOCAD. A 3-D grid in GOCAD is defined by its origin, the number of samples on each axis (nu, nv, nw), and three vectors , , giving the directions of each of the axes. The length of these three vectors gives the step on each axis.

The parameters file is written in a kind of SEP format. The script text below is an example of such a file:

project="ProjDiap.PJ"
model="Diapir.pa"

o1=7000.0
o2=3000.0
o3=0.0

d1=100
d2=100
d3=25

n1=150
n2=110
n3=200

vout=50
nout=60


The parameters file contains basically

• the name of a GOCAD project, containing the geometry and the topology of each surface composing the model,
• the name of a GOCAD model, where the domains are defined with the value of the velocity attached to each domain, and
• the parameters defining the 3-D grid: origin, step, and sampling on each axis (the suffixes 1,2,3 in this file replace respectively the suffixes u,v,w of the GRID3_t object).
The last two parameters describe the format of the output. Martin Karrenbach and I have chosen to view the 3-D grid slice by slice. vout is the value on the v axis corresponding to the first slice to be displayed. vout can vary from to n2. nout is the number of slice that will be shown. nout can vary from 1 to n2. If , the output will be the slice corresponding to the value ; if , nout slices of the grid will be displayed one after the other, as a movie, the first one being the frame numbered vout. The rule should always be observed.

An example of the results produced by the algorithm implemented is given in the next section. We have chosen this output arbitrarily. It is obvious that there exist many other possibilities for viewing the whole grid or part of it.

Next: AN EXAMPLE OF A Up: HOW TO BUILD A Previous: Notion of a 3-D
Stanford Exploration Project
11/17/1997