seispack-an “hp-c” program for seismic refraction

Compurers & Geosciences Vol. 22, No. 3, PP. 305-332, 1996
Copyright 0 1996 Elsevier Science Ltd
Printed in Great Britain. All rights reserved
0098~3004(95)00080-l
0098-3004196 $15.00 + 0.00
Pergamon
SEISPACK-AN
“HP-C” PROGRAM
SEISMIC REFRACTION
INTERPRETATION
RAY-INVERSION
TECHNIQUE
SANKAR
KUMAR
SARADINDU
‘Department
ZDepartment
FOR
USING
NATH’, RIJU JOHN*, SANJIV KUMAR SINGH’,
SENGUPTA’,
and HARI PADA PATRA’
of Geology and Geophysics, Indian Institute of Technology, Kharagpur-721302,
of Geological Sciences, College of Arts and Sciences, Northwestern
University,
Evanston, Illinois 60208-2150, USA
(Received 16 September
1994; recked 29 December
India and
Lacy Hall,
1994)
Abstract--SEISPACK
is an interactive interpretation
software package on HP 9000/835 workstation
for
the systematic analysis of multifold seismic refraction data for engineering and groundwater
problems.
The algorithm
has been developed by using the basic principle of Ray Inversion for Near-Surface
Estimation (RINSE) and by introducing
downward continuation
of the refracted rays with the lowering
of the observation plane and subsequent stripping of the overlying layer. The source code for the algorithm
is written in “HP-C” and the supporting graphics modules have been developed using “Starbase” graphics
libraries in an HP-UX environment.
The listing of the source program implementing
the algorithm is
included. Because it is observed generally that raw field data yield useful information
only after some
preprocessing
to remove the error involved in first-break
picking, the present package also facilitates
an option for an optimization
of the raw data using a combinatorial
optimization
algorithm
before
proceeding
to the actual computational
stage. The package has been tested rigorously with the help of
both synthetic data for 2-, 3-, and 4-layer horizontal
and dipping interface Earth models and actual
refraction data acquired from five profiles at the field site at Keshpal, Midnapore
district, West Bengal,
India. The results of the latter are tested by interpreting the data using the generalized reciprocal method.
All the analyses carried out, some of which are presented in this paper, establish the applicability
and
usefulness of SEISPACK.
Key Words: SEISPACK,
HP-C,
HP-UX,
RINSE,
Downward
method
was the first seismic
Combinatorial
optimization.
The intercept time method probably is the best
known of all the techniques
of seismic refraction
interpretation.
It is relatively simple to use and
can be applied to any number of layers without the
computation
becoming excessively complicated. The
method uses a mathematical
model in which each
layer has a constant seismic velocity, is bounded by
straight interfaces, and seismic velocities must increase
monotonically with depth. Furthermore, the thickness
of each layer must be sufficient so that each layer can
be identified in the traveltime data.
Unfortunately,
these conditions are never reasonably satisfied. Seismic velocities within layers differ
laterally and under such circumstances GRM (Palmer,
1981, 1986) provides a better interpretation.
A major problem that arises in seismic data processing and interpretation
is how to correct for static
delays caused by an irregular near-surface structure.
Any near-surface
inhomogeneity
can be resolved
better by overlapping
seismic refraction
profiles.
Ray Inversion for Near Surface Estimation (RINSE)
(Jones and Jovanovich,
1985), is appropriate
for use
with this multifold seismic refraction data to infer the
INTRODUCTION
The refraction
continuation,
technique
used in petroleum exploration.
During the 192Os, it
achieved spectacular
success in the Gulf Coast of
the United States, with the detection of salt domes,
and in Iran with the mapping of large structures.
However, by the early 193Os, the reflection method
had become the most widely used of any geophysical
exploration
technique. The refraction method continued in limited use, as a reconnaissance
tool in
areas where the geology was not well known. Today,
refraction
surveys are used almost exclusively in
the shallow environment,
such as for engineering
site investigation,
groundwater
and alluvial mineral
exploration,
and weathered
layer corrections
for
reflection surveys or deep crustal studies.
There exist a number of interpretation
techniques
for refraction
data based on one-way traveltime
curves,
namely,
intercept
time method,
critical
distance method or critical angle refraction method,
etc., and on the basis of reversed traveltime curves
namely, Generalized
Reciprocal Method (GRM).
305
306
S. K. Nath and others
near-surface structure and hence the thickness of the
weathered layer. RINSE operates by using the slopes
of head wave traveltime curves to determine the
direction of refracted waves arriving at the surface
and leaving the source. Traveltime computed along
pairs of intersecting rays from the source to receivers
near the source then are compared with observed
traveltime to reconstruct the shape of the first refracting boundary beneath the surface and variation in
seismic velocity along the boundary.
This theoretical information is used as a basis for
further processing to determine depth and velocity
variations along the remaining refractors by downward continuation of the refracted rays. RINSE uses
head wave traveltimes and average velocity in the
layer above the refractor to determine the shape of
the refracting boundary, the refractor velocity being
determined as a secondary step. This approach has
an advantage that the effects of change in refractor
velocity upon the slope of the head wave traveltime
curves are separated from the effects of change in
refractor geometry.
In the present investigation, the theoretical background of RINSE is extended further to incorporate
downward continuation
along the refracted head
wave traveltimes and thereby developing a complete
refraction interpretation package named SEISPACK.
The performance of SEISPACK has been tested rigorously with 2-, 3-, and 4-layer horizontal and dipping
theoretical models. A detailed case study of Keshpal
(Latitude: 22”23’N-22”24’N and Longitude: 87”12’E87”20’E), Midnapore district, India also is presented.
The interpreted depth sections, on comparison with
those obtained by GRM technique, have a reasonable
match.
The interpretation scheme described here is given
together with the background theory of RINSE. The
source code for the algorithm, written in “HP-C” for
a HP9000/835 workstation, is listed in the Appendix.
This algorithm can be implemented easily in a
program running on a lap-top computer, allowing
reliable data analysis in the field itself.
BASIC THEORY
The ray inversion for near-surface estimation is a
powerful method for the delineation of the weathered
layer. Because the software under discussion is based
on RINSE, it is necessary to explain the basic aspects
of the theory as proposed by Jones and Jovanovich
(1985).
Let us consider the model in Figure 1A representing a layer with P-wave velocity V, overlying a half
space with P-wave velocity V,, (V2 > V,). Q and S
are two shots fired at the surface and A and B are
two surface receivers. For simplicity the shots and
receivers are drawn on horizontal surface. Figure 1B
shows the traveltime curves of the first arrivals for
shot Q and S, where the X-axis represents offset
along the surface from some fixed origin. Up to a
AA
f3
“2
kc-d?-DISTANCE
Figure 1. A, Critically
curves illustrating
FROM
B
ORIGIN
-
refracted ray paths. B, Traveltime
backward continuation.
certain offset from the shots the first arrivals are
direct waves traveling in the upper medium with
velocity V,. Beyond this distance, the first arrivals are
refracted waves traveling along the interface between
the two media with higher velocity V2. Let us assume
that at receiver B the first arrival from both the shots
is a refracted wave, whereas at receiver A the first
arrival from shot Q is a refracted wave, but from shot
S is a direct arrival.
The main assumption of the method is that the angle
of emergence i of the refracted arrival at the surface
such as B (Fig. IA) is independent of the position of
the shot.
Because
dt/dx = sin(i)/V,
(1)
where dt/dx is the slope of the traveltime curve,
meaning that the slope of the first arrival curve at B
(Fig. 1B) is the same for shot S and Q. A corollary
to this result is that the time difference 6 t between
refracted arrivals for different receivers also is independent of shot position. This allows extrapolation
backwards along the head-wave curve to infer the
arrival time t’ of the refracted arrival at receiver A
(Fig. 1B).
Equation (1) and the principles of backward
continuation of head-wave arrivals are basic to the
method of RINSE. This equation is used to project
refracted rays downward from the surface by measuring dt/dx and V, and then to calculate i. The principle
of backward continuation is used to project headwave arrival times to near offsets where they are
not recorded as first arrivals. It may be noted that
with multifold coverage there usually will be several
estimates of the head-wave slope at each station along
the line. These values can be averaged to provide a
more robust estimate of the head-wave slope.
SEISPACK-an
+
x, __(
A
S
Q
307
“HP-C” program
C
B
E
Figure
2. Illustration
of critically refracted
in ray-inversion
method.
raypaths
A
used
B
A
DISTANCE
Considering the more general situation shown in
Figure 2, Z represents an arbitrary refracting boundary separating the media with P-wave velocities V,
and V2. A shot is fired at S and recorded at a set of
surface receivers. Let SF represent a ray that impinges
upon Z at the critical angle for generation of headwave along Z. Point C on the surface represents the
critical distance Xc from S at which head wave from
C just becomes the first wave to reach the surface.
The aim of the ray-inversion technique is to locate the
point F on C. If this can be done for all the shots
along the line then Z can be mapped.
To locate F, let A and B be two inline surface
receiver positions that are located, respectively, less
than and greater than the critical distance Xc from S.
Let the head-wave traveltime from S to B be t,.
Let Q represent a more distant shot from which the
head-wave arrival times tQaand tQsare measured at
A and B, respectively.
From Figure 2, we get,
II
DISTANCE
Figure 3. A,
and computed
FROM
SHOT
I
I
I
B
I
I
I
A
xc
B
FROM
S -
SHOT
S -
Observed
head-wave
traveltimes
t,,,
t,
traveltimes
(iR and t&. B, Determination
of x,.
tss = (SF + GB)/V, + FG/Vz
tQB
-tPA=(GB-HA)/V,+HG/V2.
(3)
We define the quantity t, by principle of backward
continuation of the head-wave arrival times as,
t, = (SF + HA)/V,
- HFIV,.
(4)
Considering the paths SDA and SEB in Figure 2
formed by the intersection of critical angle ray from
shot S with the refracted rays reaching the receivers
at A and B. We define,
t&, = (SE + EB)/V,
=
(SF + GB)/V,
t& = (SD + DA)/V,
+ (FE + EG)/V,
(5)
- (DF + HD)/V,.
(6)
=
(SF + HA)/&
From Figure 1 and Equations (2) and (5) we
see that t& > t, and similarly, tiA < tSA. If we
plot the times t,, t,,, tiA and t& vs the horizontal
distance from S, we obtain the situation shown in
Figure 3A.
Assuming the refractor boundary to be straight
between H and G (Fig. 2), which is a reasonable
assumption if A and B are spaced closely, then the
straightlines jointing t,, t,,, tiAia,and t& intersect
at critical distance Xc (Fig. 3B) at a time t, corresponding to travel along the path SFC in Figure 2.
Once Xc and t, are known, point F on the refractor
boundary can be determined by interpolation along
ray SE between D and E to obtain the point at which
the computed traveltime for path SFC is equal to the
traveltime t,, .
Thus one boundary point for each shot in end-on
shooting and two boundary points are obtained for
split-spread shooting on either side of the shot point.
Once the refractor shape is known, the traveltimes
of the rays from shot to the refractor and from the
refractor to the surface receivers can be computed.
Subtraction of these times from the observed headwave arrival times leaves traveltimes for the refractor,
from which the refractor velocity can be determined.
This explains the mapping of the first refracting
interface. To obtain the other refracting interfaces,
308
S. K. Nath and others
the method is to follow the same process after down-
the segment until WC reach a point where the Xc value
ward continuation
changes abruptly.
of the traveltimes
lowering of the observation
Xc is assumed
looking
along with the
plane. In this procedure
to be the deciding parameter.
By
at the time distance curve. it is impossible
the depth of this intcrfacc the previous
observation
time-distance
first refraction
we keep on calculating X,. values at each point along
FLOW
plane has to he lowered xrtically
point
OPTIMISATION
VALUES
a
I
Xc
WHICH
the horizontal
CHART
Xc
PLOTS
X,
VALUES
t
LAYER
Figure 4. Flowchart for SEISPACK
to the
(say F in Fig. 2) obtained
the first scan. In other words.
T-D
COMPUTE
abrupt change indicates that
point onwards the arrivals are from a different layer.
To determine
to predict as to whether all the points on a particular
segment belong to the same refractor.
This
this point belongs to a deeper interface. Hence, this
STRIPPING
in
plane
SEISPACK-an
passing through the point F belonging to the first
refractor becomes the new observation plane for the
scan for the second interface. Subsequently the traveltimes at different geophone locations are to be
reduced to conform to this new observation plane.
This process will continue from the shallowest to the
deeper layers with the stripping of each preceding
layer and the corresponding refractor points mapped
until the entire data are exhausted.
PROGRAM DESCRIPTION
SEISPACK is written in ‘HP-C’ language for
HP9000/835 workstation and can be executed in
UNIX environment operating on HP-UX 7.0 version.
The flowchart for the program is given in Figure 4
and the listing of the source code is given in the
Appendix. The software consists of the following
modules.
1. Time distance (t-d) plotting
A data file consisting of first breaks (either digitized
or hand-picked) and the corresponding geophone
spacing for all the shots, either unidirectional or both
direct and reverse, is input to this module. The t-d
curves then are drawn and projected on the monitor
screen. The interpreter on viewing the data quality,
decides as to whether the data needs any preprocessing before passing it to the next interpretation
module.
2. t-d optimization
Here the data are optimized by the combinatorial
optimization technique (Micciancio, 1993). This technique fits least-square straightlines to each segment
(corresponding
to arrivals from different layers)
and determines the minimum of the sum to key-in the
number of layers and the geophone number where
change in the arrivals occurs. One can give many sets
of data and this function determines the best of the
lot. The t-d optimization is an option and is required
only for noisy field data. One type of noise might be
the result of the error in picking first breaks.
3. X,-computation
In this module critical distances are calculated for
each shot or pair of shots. The Xc value is computed
as discussed in the previous section. The Xc value is
fairly constant for arrivals from the same interface,
but is marked by an abrupt change when the arrivals
come from a different interface. This way we can
determine the channel number at which the arrivals
come from different layers. This is not done automatically by the computer because it leaves scope for
error. Here the user has to apply his own judgment
and feed in the appropriate parameter.
4. X,-plotting
This module plots the Xc values at various geophone positions and projects it on the monitor screen.
309
“HP-C” program
This plot helps the interpreter
points.
select the change
5. Depth computation
This module utilizes the Xc values computed earlier
and determines the depth of the first interface. The
depth is determined, as discussed in the previous
section, using the Xc values. Because an interface of
the corresponding Xc values also is constant, we get
only one depth value. This depth value is obtained by
projecting the rays backward from the surface point
at a distance Xc from the shot and projecting the rays
forward from the shot point itself. The intersection of
these two rays lies on the refractor interface. Both the
depth values and Xc values of all the shots are stored
in separate arrays.
6. Layer stripping
Once all the depth points of the first interface are
determined, we go in for stripping the traveltime
curve of the first layer. This is done by bringing down
the observation plane to a plane passing through the
first interface by downward continuation. The traveltime curves then are reduced correspondingly to
make it conform to the new observation plane. Even
though the first refractor may not be horizontal, the
observation plane is assumed to be horizontal.
Modules 5 and 6 are repeated until all the refracting interfaces are mapped or until all the data of
the traveltime curves are exhausted. Thus, we get the
depths to all the interfaces for all the shots.
7. Time-depth plotting
This module produces a plot for all the shots
together and a depth section. The entire package is
graphics driven and needs the user’s discretion in
parameter selection at each step. Any error in the
parameter estimation will lead to erroneous interpretation.
APPLICATIONS
(A) Synthetic example
The software is applied initially to synthetic traveltime data generated from both horizontal and dipping
layer Earth models. In all, about ten synthetic models
are tested. Here the cases of a four-layer horizontal
interface model, a four-layer dipping interface model
together with an error analysis using a three-layer
horizontal interface model are presented.
(i) Four-layer horizontal interface model. Figure 5
represents the configuration and physical parameters
of this model. Figures 6 and 7 illustrate the interpretation results for this model. In Figure 6 the Xc
plot is presented. The change in the Xc value occurs
at geophone no. 6, 11, and 17 for both direct and
reverse profiles. In Figure 7 a composite plot of the
timedistance curves and the interpreted depth section
is presented. On comparing the depth section in
Figure 7 with that of the model in Figure 5B we
S. K. Nath and others
310
DISTANCE
0
16
32
I
48
I
I
64
00
I
4-
(ml
96
I
112
I
I
V, = 1000
128
144
160
I
I
I
m/s
-4
8
78
12 -
- 12
V2 = 1500 m/s
16 -
- 16
1 20
20
V3= 2000
.
DISTANCE
0
32
64
1
96
I
(m 1
128
I
m/s
160
I
I
192
I
224
256
I
I
-
V, = 1000 m/s
8
8
VP= 1500
m/s
16 -
- I6
24 -
- 24
V3= 2000
m/s
32 -
- 32
V4 = 2500
DISTANCE
0
16
I
32
8
I2 16;
(m 1
48
64
I
I
VI
m/S
I
=
600
80
I
m/s
V2= 1200 m/s
20 -
32 -
1850 m/s
v3:
-8
; I2
- I6
- 24
- 28
V4= 2475
m/s
Figure 5. A, three-layer horizontal interface model; B, four-layer horizontal
C, four-layer dipping interface model.
observe a complete match in both the depth and the
velocity values.
(ii) Four-layer dipping interface model. Figure 5C
represents the configuration and physical parameters
of this model. Figures 8 and 9 illustrate the interpretation results. In Figure 8 we see that the change in the
Xc value occurs at geophone no. 6, 12, and 22 for
direct profile and at geophone no. 8, 12, and 22 for
the reverse profile. On comparing the depth section
of Figure 9 with that of the model in Figure 5C it is
obvious that the two do not match exactly. There is
a minor shift for the depth values obtained for reverse
I
7 20
24 28;
96
32
interface model; and
profiles. This deviation can be attributed to the interface being assumed to be horizontal while computing
the Xc and the depth values. This error is minimized
by calculating an average dip at the interface from
already computed depth values and subsequently
correcting the Xc and depth values using this approximate dip of the interface. The velocities recorded
on the depth section are the average velocities of
each layer, obtained by averaging the updip and
downdip velocities. Comparing them shows a good
approximation of the true P-wave velocities in each
layer.
SEISPACK-an
xc
PRTILE
ID
311
“HP-C” program
PLOT
: FM_HQI_4
91oTNo:5
~OQIBP1nm%YUU1108165(321
Geophone no.
Figure 6. Representative Xc plot for direct and reverse shot pair for four-layer horizontal interface model
of Figure SB.
T/ME-D/STANCE PLOT
Kmber
Nrnber of Geophones : 24
PRDFILE
of shots : 10
ShotSpacIng:
Qeo@wneSpidng:8.OOm
IDENTIFIDATIDN
8.OOm
CODE : FM_HDFl_4
E
6
8
DEPTH PLOT
Figure 7. Time-distance curves and depth section for four-layer horizontal interface model.
CAOEO
*q--1
S. K. Nath
312
PROFILE
and others
xc
ID
PLOT
: FM-DIP-4
gY)TNo:4
Geophone
Figure
8. Representative
Nunber
of Geophones
Spacing :
Geoptww
no.
Xc plot for direct and reverse shot pair for four-layer
dipping
interface
model.
T/M?-LMSTANCEPLOT
: 24
4.00
PROFILE
lulber
m
Shot
IDENTIFICATION
CODE
of
Spacing
st-Bot.5
:
: 4
4.00 m
: FM-DIP-4
a7
DISTANCE
,~,,,,,,,,‘,,‘,,,,,,,,,,,,
l6
24
F
id_
32
40
4%
50
M
64
72
a0
BB
G6
-
o
4
8
Id=
12
vz=
iz~ab
Id=
I&x5&s
YIP
2-h
-20
24,
28,
-24
-28
-
_
32
1
DEPTH PLOT
Figure
9. Time-distance
twws
-18
20 _
32
104
curves
and depth
section
for four-layer
dipping
interface
model.
SEISPACK-an
(iii) Error analysis (three-Iayer horizontal earth
model). Figure 5A represents the configuration
and
the physical parameters of the model. In Figure 10,
a composite
plot of time-distance
curves and the
interpreted depth section is presented. A total match
is obtained with the model parameters. Subsequently,
a f 1% error is introduced to alternate values of the
original synthetic data. In Figure 11 we present the
resulting time-distance
curves and the interpreted
depth section together
with the velocity values.
Comparing the results presented in Figure 10 and 11,
a complete
match of the depth values is noted,
whereas there is a minor change in the velocity values.
Therefore, the error introduced
in the traveltime is
reflected in the layer velocities only. In Table 1 the
comparative
layer parameters
with rf: 1% error is
presented.
(B) Field example
SEISPACK
also has been tested
refraction
data acquired in and
village located between 22”23’N and
and 87” 12’E and 87”20’E longitudes.
73y. See the Location map: Fig.
313
“HP-C” program
with the seismic
around Keshpal
22”24’N latitudes
(Toposheet No.
12). The area is
about 15 m to the northeast of IIT, Kharagpur. The
total area investigated was about 20 sq km. The area
has an average elevation of 30 m above mean sealevel.
The characteristic formation of the district is laterite
except towards east and south of the district where
alluvium is present. To the northwest of the district,
micaceous schists are exposed. Older alluvium with
laterite covers the major rock types of the study area.
In all, five profiles, J, K, L, M, and N, were taken
(Fig. 12). A sledge-hammer
blow on a base plate
placed on the ground was the source of energy. The
sledge-hammer
weighed 15 kg and the metal base
plate weighed 20 kg. The plate was 1.5 in thick and
had a diameter of 1 ft. A digital stacking type OYO
McSEIS 160 Signal Enhancement
Seismograph with
12/24 channels
and a thermal printer with high
resolution
was used as the recording
instrument.
Twenty-four digital grade OYO geophones were used
for data acquisition and a piezo-electric sensor with
the hammer-switch
was used for triggering. On a trial
method the acquisition parameters were selected as:
4 m geophone interval, 32 m shot interval and 4 m
near offset. An end-on shooting pattern was used.
The detailed field layout is shown in Figure 12.
7’XME-lV.SsirANCE
PLOT
Kmber
of Geophones
: 24
NunbetGeoptme
Spacing
:
4.00 m
PROFILE
Figure
10. Time-distance
Shot
IDENTIFICATION
curves and depth
of shots
Spacing :
: IO
8.00 m
CODE : l=M_l+DFt_3
section
for three-layer
horizontal
interface
model
S. K. Nath and others
314
T’ME-O/STANCE
wrberof oeophwles
: 24
(3eopMne
Sp&ng
:
PLOT
Nu&er of Shots : 10
Shot Swzlng:
4.00 m
8.OOm
PROFILE IDENTIFICATION CODE : FM_HCR_3_Cl#
72
P
Y
iz
3
F
8
DEPTH PLOT
Figure 11. Time-distance curves and depth section for three-layer horizontal interface model with + 1%
error introduced in synthetic data.
Table 1. Error analysis considering three-layer horizontal
interface model
Layer
parameters
Original
model
Error
model
4
8.0 m
20.0 m
1000 ms-’
1500 ms-’
2000 ms-’
8.0 m
20.0 m
102 ms- I
1517 ms-’
1988 ms-’
d2
t’l
02
03
% error
0.0
0.0
0.2
1.13
0.6
SEISPACK-an
LOCATION
MAP
“HP-C” program
OF KESHPAL
WITH
FIELD
315
LAYOUTS
87’
\
\I
,\
P”
\\
0513
\\
I
\’
\\
\\
)
j 15,
I
”
\\. K 0
\’
\\
516
II
I
1
\\
\\
\t
\\
\\
\\
\\
M
\I y
\\
\\
7
\I
\\
Figure 12. Location map of Keshpal and field layout.
II
0
’
1OOm
I
316
S. K. Nath
and others
xc
PLOT
PROFILE
6.5
ID : KES-PAL_J
SHOTNO:
T ‘.-
5.Q
I
Geophone
Figure
13. Representative
Nunber
of Geophones:
Geophom
Spacing:
no.
Xc plot of direct and reverse shot pair of profile
KeshpalLJ.
T/ME-D/STANCE PLOT
4.00
PRCFIE
24
lvnber
m
of shots : 6
Shot Spacing:
IOENTIFICATIoN CODE : KEsHpAL_J
DISTANCE
3200 m
W
UEPT# PLOT
Figure
14. Time-distance
curves and interpreted
depth
section
for profile KeshpalLJ
SEISPACK-an
“HP-C”
program
317
T/ME--D/STANCE PLOT
Nnber
of &optWles : 24
oeophone Spacing : 4.00 10
PROFILE IDENTIFICATIDN
Mnber
: 5
of snots
Shot Spacing : 3200 m
CCDE : KESWAL_M
_.
_.
DEPTH PLOT
Figure
15. Time-distance
curves
and interpreted
All the five profiles are interpreted using both
GRM and RINSE techniques. The representative
interpretation results for profiles J and M are given
next.
(i) Projile KESHPAL-J.
The first-breaks picked
from the field seismograms acquired are given as
input to create the data file. The interpretation
procedure for this profile is as follows:
depth
Table
Profile
J
d,
d>
VI
d,
d,
vi
02
03
L
d,
d2
v
of results
RINSE
obtained
Ray inversion
by GRM
and
GRM
3.9
18.0
500
1347
2167
m
m
ms-’
mss’
ms-’
4.1
18.2
502
1350
2165
m
m
ms--’
ms -I
ms -’
4.5
18.0
661
1394
2000
m
m
ms ’
ms-’
ms-’
5.0
18.6
656
1380
2028
m
m
ms-’
ms-’
ms
m
m
ms-’
ms-’
ms-’
6.8
20.0
600
1380
2030
m
m
ms-’
ms-’
mss’
!
“3
6.0
19.0
619
1364
2000
M
d,
dz
L’I
v2
u3
4.8
18.0
556
1361
2000
m
m
ms-’
ms-’
ms-’
5.0
18.2
550
1380
1975
m
m
ms-’
ms-’
ms- ’
N
d,
d2
L’I
4.6
19.0
667
1361
2000
m
m
ms-’
ms-’
ms-’
5.2
18.8
665
1375
1963
m
m
ms-’
ms- ’
ms- ’
02
(3) The first interface depth point then is determined.
(4) The traveltime data are stripped of their first
layer by shifting the traveltime curve to the first
change point. The first-breaks then are reduced
subsequently to conform to the new datum plane
which is a horizontal plane passing through the
first interface.
Parameter
02
K
for profile Keshpal-M
2. Comparison
q
(1) From the t-d plots for each shot, the first and
second change point is keyed into the program.
(2)’ The Xc values are computed and a plot of
the Xc values against geophone no. produced. The
change points in the Xc curve are determined and
fed into the program. (Here we got the changes at 5
and 16 for direct and 4 and 17 for reverse profiles.)
A representative Xc plot is shown in Figure 13.
section
“2
VI
318
S. K. Nath and others
(5) Steps 2 to 3 are repeated until all the data are
exhausted. In this situation the stripping was done
twice.
(6) After the depth points to all the interfaces are
computed, a plot of the traveltime curves along
with the depth section is determined. This plot is
presented in Figure 14.
(ii) Profile KESHPAL-M.
The interpretation
is
carried out in the same way as in the previous profile
following the steps l-6. In this example the change
points are 4 and 18 for both direct and reverse profiles
in the Xc plot. The final result is presented
in
Figure 15.
All the profiles are interpreted using the GRM
package. The layer parameters (thickness and velocity)
obtained for the five profiles, as interpreted by both
GRM and ray-inversion techniques, are presented in
Table 2. A close inspection of the results shows a
good match.
CONCLUSION
RINSE can be used to interpret complex geological
problems with less or no ambiguity as compared to
the other existing classical interpretation methods.
The interpretation package SEISPACK, developed
utilizing the basic principle of RINSE can handle
lateral variations in the velocity and refractor
geometry effectively needing the least human
judgment.
From the various synthetic and field case studies
presented in the previous section, one can estimate
the accuracy and robustness of this interpretation
package. This package has an additional advantage
of handling noisy field data. The package is userfriendly and graphics oriented and can be used with
ease and accuracy as compared to the other packages.
The entire package was developed under UNIX
environment. However, it can be changed easily on
a PC-based workstation under suitable operating
system. Because the graphics have system dependent
features, the plotting program has to be modified
to conform to the operating system being used.
REFERENCES
Jones, G. M., and Jovanovich, D. B., 1985, A ray inversion
method for refraction analysis: Geophysics, v. 50, no. 11,
p. 1701-1720.
Micciancio, S., 1993, A combinatorial algorithm for the
optimization of refraction seismics data inversion:
Computers & Geosciences, v. 19, no. 7, p. 873-886.
Palmer, D., 1981, An introduction to the generalized
reciprocal method of seismic refraction interpretation:
Geophysics, v. 46, no. 11, p. 1508-1518.
Palmer, D., 1986, Refraction seismics: Geophysical Press,
London. Amsterdam, 269 p.
APPENDIX
Program listing
SE1SPACK.C:
Interactive interpretation
package for seismic refraction data using ray-inversion technique
for near-surface estimation
Developed by: Dr Sankar Kumar Nath and Mr Riju John,
Department of Geology and Geophysics, IIT, Kharagpur, India (1994).
#include<starbase.c.h>
#include<stdio.h>
#include<math.h>
#define Edge
#define EndOfLine
#define NO_GEO_MAX
#define NO_SHOTS_MAX
#define NO_LAYERS_MAX
#define NO-SETS-MAX
FUNCTIONS
/*
TRUE
FALSE
25 /* Maximum no. of Geophones +1 */
20 /* Maximum no. of Shots *j
6 /* Maximum no. of Layers */
10 /*Maximum no. of Sets for optimisation*/
*I
void read_data(),td_plots(),xc_compute(),depth_compute(),tr_extrapol();
void time depth_plots(),
data optimisationo,
layer_strip();
int min_find();
/*Finds the minimum value of the data in an array
float maximum(),
velo_fun();
GLOBAL VARIABLES
*/
/*
int
float
no-shots, no_geo,change[NO_SHOTS_MAX][NO_LAYERS_MAX][Z],
no_layers[NO_SHOTS_MAX];
tr[NO_GEO_MAX][NO_SHOTS_MAX][Z],
tr_orig[NO_GEO_MAX][NO_SHOTS_MAX][2],
tr_temp[NO_GEO_MAX][NO_SHOTS_MAX]
[2],
tr_calc[NO_GEO_MAX][NO_SHOTS_MAX][NO_LAYERS_MAX][2],
tr_comp[NO_GEO_MAX][NO_SHOTS_MAX][NO_L.AYERS_M.AX][2],
xcoord[NO_GEO_MAX][NO_SHOTS_MAX][2],
xc[NO_GEO_MAX][NO_SHOTS_MAX][2],
xc_average[NO_SHOTS_MAX][NO_LAYERS_MAX][2],
*J
SEISPACK-an
char
main0
“HP-C” program
depth_value[NO_SHOTS_MAX][NO_LAYERS_MAX][Z],
lsqerr[NO_SHOTS_MAX][NO_SETS_MAX],
velo[NO SHOTS_MAX][NO_LAYERS_MAX][2],
Velo_orig[NO_SHOTS_MAX][NO_LAYERS_MAX][2],
shot space, gee_space;
prof?le_id[25];
(
i,j,x_start,x_stop,ll,l2,13,count,lO;
int
changel,change2,shot_no,fildes,sgeom;
int
float
trl,tr2,tr3,td,tr4,depthl,depth2,depth3,depth4,
vell,ve12,ve13,ve14,vel5,xcord,velol=O.o,kl,k2,k3,
thetal2,thetal3,theta23,thetal4,theta24,theta34,
thetal5,theta25,theta35,theta45;
shot arient,ansl,t,x,o,.ans2,answer;
char
*fop&(),
*dl, *d3;
FILE
printf("Input
0 if the shooting is in one direction only\n");
printf("InpUt
1 if the shootihg is in both the directions\n");
scanf('*%d",&sgeom);
printf("To
Continue
(y / n)\n");
fflush(stdin);
scanf("%c", &answer);
if(answer == 'y' (1 answer == 'Y') (
read_data(sgeom);
d3=fopen("data
exp","~");
fprintf(d3,a1%d\n",no_geo);
fprintf(d3,"%d\n",no_shots);
fprintf(d3,v%f\n",geo_space);
fprintf(d3,"%f\n",shot_space);
for(i=O;i<no
shots;i+=l)
(
td_plots(i,O,O,sgeom);
fprintf(d3,8'%dd\n8' I i+l).I
for(j=O;j<=no_geo;j+=l)
(
fprintf(d3,"%f
%f\n",xcoord[j][i][O],tr[j][i][O]);
tr_orig[j][i][o]
= tr[j][i][O];
1
if(sgeom == 1) (
fprintf(d3,"%dr\n",i+l);
for(j=O;j<=no_geo;j+=I)
{
fprintf(d3,"%f
%f\n" ,xcoord[jl[il[l],tr[j][il[l]);
tr_orig[jl[il[11
= tr[j][i][l];
printf(" optimisation
of field data is done by least\n");
printf(" square method assuming straight refractors.\n");
printf(" DO you want to optimise the T-D data (y/n):**);
fflush(stdin);
scanf("%c" ,&ans2);
if(ans2 == 'y' 11 ans2 == 'Y') data_optimisation(i,sgeom);
switch (sgeom) {
case 0:
printf("\n Give the geophone no. where *I);
printf("\n
first change in slope occurs\n");
scanf("%d",&change[i][l][O]);
printf("\n Give the second change points\n");
scanf("%dV~,&change[i][2][0]);
break;
case 1:
printf("\n Give the geophone no. where 'I);
printf("\n
first change in slope occurs \n 'I);
printf(" for both direct and reverse profiles \n");
scanf("%d %d",&change[i][l][O],&change[i][l][l]);
printf("\n Give the second change points \n");
scanf("%d %d",&change[i][2][O],&change[i][2][1]);
break;
1
w?lO[ i][o][o] = velo_fun(O,change[i][l][O],i,O,O);
velo[ i][l][O] = velo_fun(change[i][l][O],
change[i][2][0],i,O,O);
if(sgeom == 1) {
vela[i][OJ[l]
= velo_fun(O,change[i][l][lJ,i,O,l);
velo[i][l][l]
= velo_fun(change[i][l][l],
change[i][2][l],i,O,l);
)
x-start = 2, x_stop = 4;
xc_compute(x_start,x_stop,no_geo,i,O,0);
if(sgeom == 1) xc_compute(x_start,x_stop,no_geo,i,O,i);
td_plots(i,2,x_stop,sgeom);
319
320
S. K. Nath and others
count -
1;
change[i](0][O]=change[i][O][l]=0;
switch (sgeom) (
case 0:
printf("Give
the geophone no. at which");
printf(" xc value changes\n*') ;
break;
case 1:
printf("Give
the geophone nos at the which xc \n");
printf("value
changes for both the profiles \n");
break;
do
switch (sgeom) {
case 0:
printf("\n
Change at :“)’
scanf("%d",hchange(i](co~nt](O]);
fflush(stdin);
printf("\n Any more changes
(y/n):");
scanf("%c",hansl);
count++;
break;
case 1:
printf("\n
change at :“)*
scanf("%d %d",bchange(i];count](O],
bchange[i][count][l]);
fflush(stdin);
printf("\n Any more changes
(y/n):");
scanf("%c",&ansl);
count++;
break;
1
while(ans1
=='y');
change[i][count](O]=no
geo;
if(sgeom == 1) change[i](count][l]=no_geo;
no_layers[i]
= count;
fprintf(d3, "%d\n",count) .
for(l0 = 0;lO < no_layeri[i];lO
+= 1) {
velo[i][lO][o]
= velo_fun(change[i][lO][O],
change[i][10+1](0],i,0,0);
1'
= velo_fun(change[i](
velo_orig[i][lO][O]
Ol[Olt
change[i][lO+l][O],i,O,O);
if(sgeom == 1) {
= velo_fun(change[i][lO 'I(11,
velo[i][lO][l]
change[i][lO+l][l],i,O,l);
velo_orig[i][lOJ[l]
= velo_fun(change[
1[~01[11~
change[i][lO+l][l],i,O,l);
fprintf(d),"%f
%f\n",velo(i][lO][O],velo[i][lO][l]);
for(10=0;10<=count;lO+=I)
switch (sgeom) (
case 0:
fprintf(d3,"%d
break;
case I:
fprintf(dJ,"%d
(
%d\n'~,change[i][lO][O]);
%d\n",change[i][lO][O],
change(i][lO][l));
break;
1
depth_compute(i
,sgeom);
1
time_depth_plots(sgeom);
fclose(d3);
)
void read_data(pdir)
int pdir;
i,j,k,shot_no;
int
filename[l5],orient(lS];
char
FILE
+fopen(), lfile_ptr;
printf(" Give the Data File Name :");
scanf("%s", f ilename);
printf("\n
File Name is : OS \n",filename);
SEISPACK-an
“HP-C” program
file_ptr = fopen(filename,"r");
Code :'I);
printf(" Give the Profile Identification
scanf("%s",profile_id);
printf("Profile
Identification
code is : %s\n",profile_id);
fscanf(file_ptr,"%d
\n",&no_geo);
fscanf(file_ptr,"%d
\n",&no_shots);
fscanf(file_ptr, "%f \n",&geo_space);
fscanf(file_ptr,"%f
\n",&shot_space);
fscanf(file_ptr,"%s
\n",orient);
printf("%s
\n",orient);
for(i=O;i<no_shots;i+=l)
{
fscanf(file_ptr,"%d
\n",&shot_no);
for(j=O;j<=no_geo;j+=l)
fscanf(file_ptr,"%f
%f \n",&xcoord[j][i][O],&tr[j][i][O]);
)
if(pdir
== 1) {
fscanf(file_ptr,"%s
\n",orient);
printf("%s\n",orient);
for(i=O;i<no_shots;i+=l)
{
fscanf(file_ptr,"%d
\n",&shot_no);
for(j=O;j<=no_geo;j+=l)
fscanf(file_ptr,"%f
%f \n",&xcoord[j][i][l],
&tr[jl[il[ll);
fclose(file_ptr);
float
int
velo7fun(i,j,sn,optionl,option2)
l,j,sn,optionl,option2;
int
k;
float
vel;
switch (optionl) {
case 0:
switch (optionl) {
case 0:
vel=0.0;
for(k=i+l;k<j;k+=l)
vel += geo_space/(tr[k][sn][O]-tr[k-l][sn][O]);
vel = vel/(float)(j-i-l);
return(ve1);
break;
case 1:
ve1=0.0;
for(k=i+l;k<j;k+=l)
vel += geo_space/
(tr_temp[k][sn][O]-tr_temp[k-l][sn][O]);
vel = vel/(float)(j-i-l);
return(ve1);
break;
,
break;
case 1:
switch (optionl) {
case 0:
vel=0.0;
for(k=i+l;k<j;k+=l)
vel += geo_space/(tr[k][sn][l]-tr[k-l][sn][l]);
vel = vel/(float) (j-i-l);
return(ve1);
break;
case 1:
ve1=0.0;
for(k=i+l;k<j;k+=l)
vel += geo_space/
(tr_temp[k][sn][l]-tr_temp[k-l][sn][l]);
vel = vel/(float)(j-i-l);
return(ve1);
break;
break;
; *******************
.-“pICTION
TO
COMPUTE
void xc_compute(l,k,m,i,optionl,option2)
xc "AL"ES
************************/
321
S. K. Nath and others
322
int l,k,m,i,optionl,option2;
{
int j;
float xa,dsa,tsad,tsa,xb,dsb,tsbd,tsb,ml,m2,x_max;
switch (optiona) {
case 0:
switch (optionl) {
ca*e 0:
xa = 1*qeo_space;
dsa = ,a*velo[i][l][O]/velo[i][O][O];
tsad = dsa/velo[i][O][O];
for(j=k;ji=m;j+=l)
{
xb = j*geo_space;
dsb = xb*velo[i][lJ[O]/velo[i][O][OJ;
tsbd = dsb/velo[i][O][O];
tsb = tr[j][i][O];
tsa = tr[j][i][O]
+ (tr[j][i][O]-tr[j-l][i][O])
/geo_space*(xa-xcoord[j][i][O]+i*shot_space);
ml = (tsbd-tsad)/(xb-xa);
m2 = (tsb-tsa)/(xb-xa);
xc[j][i][O]
= (tsa - tsad + (ml - m2)*xa)/(ml-m2);
1
break;
case 1:
xa = 1*geo_space;
dsa = xa*velo[i][l][O]/velo[i][O][O];
tsad = dsa/velo[i][O][O];
for(j=k;j<=m;j+=l)
{
xb = j*geo_space;
dsb = xb*velo[i][l][o]/velo[i][O][0];
tsbd = dsb/velo[i][O][O]i
tsb = tr_temp[j][i][O];
tsa = tr_temp[j][i][o]
+ (tr_temp[j][i][O]-tr_temp[j-l][i][O])
/geo_space*(xa-xcoord[j][i][O]+i*shot_space);
ml = (tsbd-tsad)/(xb-xa);
m2 = (tsb-tsa)/(xb-xa);
xc[j][i][O]
= (tsa - tsad + (ml - mZ)*xa)/(ml-m2);
1
break;
break;
case 1:
switch (optionl) {
case 0:
x_max = xcoord[O][i]\ 1‘ 1;
xa = 1*geo_space;
dsa = xa*velo[i][l][l I /velo[il[ol[11;
tsad = dsa/velo[i][O]
11;
for(j=k;j<=m;j+=l)
{
xb = j*geo_space;
dsb = xb*velo[i][l
tsbd = dsb/velo[i] [
tsb = tr[j][i][l];
tsa = tr[,][i][l]
+
(tr[j][i][l]-tr[j-l][i][l])/geo_space*(xa-xb);
ml = (tsbd-tsad)/(xb-xa);
m2 = (tsb-tsa)/(xb-xa);
xc[j][i][l]
= (tsa - tsad + (ml - mz)*xa)/(ml-m2);
break;
case 1:
x_max = xcoord[O][i][l];
xa = l*geo_space;
dsa = xa*velo[i][l][l]/velo(i][O][l];
tsed = dee/Velo[i][O][l];
for(j=k;j<=m;j+=l)
{
xb = j*geo_space;
dsb = xb*velo[i][l][l]/velo[i][O][l];
tsbd = dsb/velo[i][O][l];
tsb = tr_temp[j][i][l];
tsa = tr_temp[j][i][l]
+ (tr_temp[j][i][l]tr_temp[j-l][i][l])/geo_space*(xa-xb);
ml = (tsbd-tsad)/(xb-xa);
m2 = (tsb-tsa)/(xb-xa);
xc[j][i][l]
= (tsa - tsad + (ml - m2)*xa)/(ml-m2);
>
break;
1
break;
SEISPACK-an
I*************
FUNCTION
TO OPTIMISE
NOISY
“HP-C”
FIELD
program
DATA
323
**************I
void data_optimisation(snu,pdir)
int snu;
{
i,j,k[NO_LAYERS_MAX](NO_SETS_MAX][2]
l,m,n,s_no,changel,change2;
nola,noset,count,l_min,shot_dir;
x=o.,xsq=o.,y=o.,xy=o.,
aO[NO_LAYERS_MAX][NO_SETS_MAX][2],
denom,al[NO_LAYERS_MAX][NO_SETS_MAX]
21;
char
t,o;
*fopen(), *dl, *d2;
FILE
printf("
@@@@@@ SHOT NO %d @@@@@@\n",snu+l);
td plots(snu,O,O,pdir);
pr&tf("how
many layers\n");
scanf("%d",&nola);
printf(" Please give the geophone no's at which the\n");
printf(" arrivals are from a differrent
layer. This \n");
printf(" otimisation
program determines the least square\n'*);
printf(" fit straight for each part of the T-D curve \n");
printf(" \n HOW many different sets do you want to analyse \n”)
scanf("%d'*,&noset);
for(l=O;l<noset;l+=l)
{
printf("@@@@
Data for Set no %d @@@@\n",l+l);
k(01[1l[‘Jl
= 0;
k(01[11[11
= 0;
for(m=l;m~=nola;m+=l)
{
printf(“Give
the geophone
no. for change
no %d\n");
printf("of
both direct & reverse profiles:
",m);
scanf("%d %d",&k[m][l][O],&k[m][l][l]);
int
int
int
float_
;
1
for(shot_dir=O;shot_dir<=pdir;shot_dir++)
for(l=O;l~noset;l+=l)
{
xsq= xy=O.O; count = 0;
for(j=k[O][l][shot_dir];j<k[l][l][shot_dir];j++)
xsq += j*geo_space*j*geo_space;
xy += j*geo_space*tr[jJ[snu][shot_dir];
count++;
aO[l][l][shot_dir]
= 0.0;
al[l][l][shot_dir]
= xy/xsq;
for(m=2;m<=nola;m+=l)
{
x= xsq= y= xy=o.o;
count = 0;
for(j=k[m-l][l][shot_dir];j~k[m][l][shot_dir];j+=l)
x += j*geo_space;
xsq += j*geo_space*j*geo_space;
y += tr[j][snu][shot_dir];
xy += j*geo_space*tr[j][snu][shot_dir];
count++;
denom = count*xsq
aO[m][l][shot_dir]
al[m][l][shot_dir]
{
{
- x*x;
= (y*xsq - x*xy)/denom;
= (count*xy - x*y)/denom;
printf("@@@
STAGE 1 @@@\n");
for(shot_dir=O;shot_dir<=pdir;shot_dir++)
for(l=0;l<noset;l+=l)
for(m=l;m~=nola;m+=l)
for(j=k[m-l][l][shot_dir];j~=k[m][l][shot_dir];j+=l)
tr_calc[j][snu][l][shot_dir]
= al[m][l][shot_dir]
*j*geo_space
+ aO[m][l][shot_dir];
for(l=O;l<noset;l+=l)
{
td_plots(snu,l,l,pdir);
lsqerr[l][snu]
= 0.0;
for(j=O;j<=no_geo;j+=l)
{
lsqerr(l](snu]
+= (tr calc[j][snu][l][o]
- tr[j][snu][o])
*(tr_calc[j][snu][l][O]
- tr[j][snu][O]);
if(pdir == 1)
lsqerr(l](snu]
+= (tr_calc[j][snu][l][l]
- tr[j][snu]jl])
*(tr_calc[j][snu][l][l]
- tr[j][snu][l]);
324
S. K. Nath and others
printf(" set no: %d , least sq. error:
%f \n",l,lsqerr[l][snu]);
1 min = min find(noset,snu);
p;intf("l_m?n
= %d\n",l_min);
for(j=o;j<=no_geo;j++)
{
tr[j][snu][o]
= tr_calc[j][snu][l_min][o];
if(pdir == 1) tr[j][snu][l]
= tr_calc[j][snu][l_mi"][l];
td plots(snu,O,O,pdir);
pri"tf("@@@@@@
STAGE
I************
FUNCTION
!
@@@@@@\n");
TO FIND MINIMUM
LEAST
SQUARE
ERROR
************I
int min_find(no_sets,sn)
int no _ sets,sn;
int
i,j,l;
float
minimum = 1000.0;
for(j=O;j<no_sets;j++)
if(lsqerr[j][sn]
<= minimum)
minimum = lsqerr[j][sn];
1 = j;
printf("lmin
= %d \n",l);
{
1
return(l);
void td_plots(sn,choice,set_no,pdir)
int sn,set_no,choice,pdir;
int
fildes,i,j,l,bn,shot_dir,
no_copies,copy_no;
float
x_max,y max,x_min,y_min,ymaxl,ymax2,max,min,X,Y;
float
x_tic_s?ze,y_tic_size,char_ht,dely;
float
dcoord[25][2],mcoord[25][2];
char
Stringl[lO],String2[lO],ans,String[lO];
FILE *fopen(), *fl;
if((fildes = gopen("/dev/crtO",
OUTDEV, "hp98550", INIT)) == -1)
exit(-1);
switch (choice) {
case 0:
x_min = xcoord[O][sn][O];
y_min = 0.0;
x_max = xcoord[no_geo][sn][O];
y_max = tr[no_geo][sn][O];
if(pdir == 1)
if(tr[no_geo][sn][l]
> y_max)
y_max = tr[no_geo][sn][l];
x-tic-size
= y_max/750.0;
y-tic-size
= y_max*lO.O;
char_ht = y_max/23.0;
break;
case 1:
x_min = xcoord[O][sn][O];x_max
= xcoord[no_geo][sn][O];
ymaxl = tr[no_geo][sn][o];
if(pdir == 1)
if(tr[no_geo][sn][l]
> ymaxl)
ymaxl = tr[no_geo][sn][l];
y_min = 0.0;
ymax2 = tr_calc[no_geo][sn][set_no][o];
if(pdir == 1)
if(tr_calc[no_geo][sn][set_no][l]
> ymax2)
ymax2 = tr_calc[no_geo][sn][set_no][l];
y_max = maximum(ymaxl,ymax2);
x-tic-size = y_max/750.0;
y-tic-size = y_max*lo.O;
char_ht = y_max/23.0;
break;
case 2:
bn = set no; max = min = 0.0;
x_min = &oord[O][sn][O];
x_max = xcoord[no_geo][sn][O];
for(j=bn;j<=no_geo;j+=l)
{
if(xc[j][sn][O]
>= max) max = xc[j][sn][O];
if(xc[j][sn][O]
<= min) min = xc[j][sn][O];
if(pdir == 1)
if(xc[j][sn][l]
>= max) max = xc[j][sn][l];
if(xc[j][sn][l]
<= min) min = xc[j][sn][l];
y-ma
= max; y_min = min;
x-tic _ size = y_max/aO.O;
y-tic-size
= y_max/l5.0;
SEISPACK-an
char_ht
break:
)
dely
=
(y_max
“HP-C” program
= y_max/ZO.O;
- y_min)/lO.O;
GRAPHICS INITIATION
/*
*/
vdc_extent(fildes,
0.0, 0.0, 0.0, 1.25, 1.0, 0.0);
view port(fi1des,0.2*1.25,0.2,0.8*1.25,0.8);
inte;ior_style(fildes,
INT_HOLLOW,
Edge);
perimeter_color_index(fildes,Z);
rectang1e(fi1des,0.2*1.25,0.2,0.8*1.25,0.8);
TITLE
*/
/*
text-color
index(fildes,3);
text_font_index(fildes,6);
text_alignment(fildes,TA_CENTER,TA_TOP,0.0,0.0);
character_slant(fildes,O.4878);
character_height(fildes,O.O5);
switch (choice) {
case 0: case 1:
textZd(fildes,0.625,0.9,"TIME-DISTANCE
PLOT"
,VDC_TEXT,EndOfLine);
break;
case 2:
"XC PMT*t,VDC TEXT,EndOfLine);
text2d(fildes,0.625,0.9,
sprintf(String,"PROFILE
ID : %s SHOT-NO : %d",profile_id
, sn+l);
character_height(fildes,O.O3);
character_slant(fildes,O.O);
text2d(fildes,0.625,0.84,String,VDC_TEXT,EndOfLine);
break:
FOOTER
*/
:*
text_color;index(fildes,7);
text_font_lndex(fildes,6);
text_alignment(fildes,TA_CENTER,TA_BOTTOM,O.0,0.0);
character_slant(fildes,O.O);
character_height(fildes,0.05);
text2d(fildes,0.625,0.100,"Geophone
no.",VDC_TEXT,EndOfLine);
RETURN TO CONTINUE
*/
/*
text-color
index(fildes.5);
text_font_index(fildes,4);
text_alignment(fildes,TA_LEFT,TA_BOTTOM,0.0,0.0);
character_slant(fildes,O.O);
character_height(fildes,O.O3);
text2d(fildes,0.02,0.OZ,"Return
To Continue",
VDC_TEXT,EndOfLine);
SIDE LABELS
/*
*/
text-color
index(fildes,7);
text_font_index(fildes,6);
text_orientationld(fildes,-1.0,0.0,0.0,1.0);
text_alignment(fildes,TA_CENTER,TA_TOP,O.0,0.0);
character_height(fildes,O.O5);
switch (choice) {
case 0: case 1:
text2d(fildes,0.125,0.5,"TIME
(ms)",VDC_TEXT,EndOfLine);
break;
case 2:
text2d(fildes,0.125,0.5,"XC
Value(m)",VDC_TEXT,EndOfLine);
break;
1
DEFINING WINDOWS
*I
view_window(fildes,x_min,y_min,x_max,y_max);
PLOTTING THE TICS
/*
*I
line color_index(fildes,3);
clip~indicator(fildes,CLIP_TO_VIEWPORT);
Tics(fildes,'X',y_min,x_min,x_max,geo_space,x_tic_size,5);
Tics(fildes,'Y',x_min,y_min,y_max,dely,y_tic_size,5);
LABEL THE X TIC MARKS
/*
*/
text-color
index(fildes,7);
text_font_?ndex(fildes,4);
clip_indicator(fildes,CLIP_TO_VDC);
text_orientation2d(fildes,O.O,l.O,l.O,O.O);
character_height(fildes,char_ht);
character_width(fildes,l.O);
text_a1ignment(fildes,TA_CENTER,TA_TOP,O.0,0.0);
for(X=x_min;X<=x_max;X+=geo_space)
switch (choice) {
case 0: case 1:
sprintf(Stringl,"%d",(int)((X-x_min)/geo_space));
I*
325
S. K. Nath and others
326
sprintf(StringZ,"%d",(int)((x_max-X)/geo_space));
text2d(fildes,X,y_min,Stringl,WORLD_COORDINATE_TEXT,
EndOfLine);
text2d(fildes,X,y_min-0.75*char_ht,String2,
WORLD _ COORDINATE_TEXT,EndOfLine);
break;
caee 2:
sprintf(Stringl,"%d*,(int)((X-xcoord[O][sn][O])/
geo_sPece));
sprintf(String2,"%d",(int)((
xcoord[no_geo][sn][O]-X)/
gee_space));
text2d(fildes,X,y_min,Stringl,WORLD_COORDINATE
TEXT,
EndOfEine);
text2d(fildes,X,y_min-0.75*char_ht,String2,
WORLD COORDINATE_TEXT,EndOfLine);
break;
I
LABEL THE Y TIC MARKS
"I
/*
text_alignment(fildes,TA_RIGHT,TA_HALF,O.0,0.0);
for(Y=y_min;Y<=y_max+O.OOl;Y+=dely)
switch (choice) {
caee 0: easel:
sprintf(Stringl,"%6.lf",Y*1000);
textld(fildes,x_min-y_tic_size,Y,Stringl,
WORLD_COORDINATE_TEXT,EndOfLine);
break;
case 2:
sprintf(Stringl,"%4.Of",Y);
text2d(fildes,x_min-y_tic_size,Y,Stringl,
WORLD _ COORDINATE_TEXT,EndOfLine);
break;
/*
PLOT THE DATA
*I
line_color_index(fildes,5);
line_type(fildes,SOLID);
marker_color_index(fildes,2);
marker_size(fildes,
0.010, FALSE);
marker_type(fildes,2);
switch (choice) {
case 0:
for(shot_dir=O;shot_dir<=l;shot_dir+t)
{
for(j=O;j<=no_geo;j+=l)
{
dcoord[j][O]
= xcoord[j][sn][shot_dir];
dcoord[j][l]
= tr[j][sn][shot_dir];
mcoord[j][O]
= xcoord[j][sn][shot_dir];
mcoord[j][l]
= tr[j][snJ[shot_dir];
1
polyline2d(fildes,dcoord,no
geo+l,O);
polymarker2d(fildes,mcoord,~o_geo+l,O);
)
break;
case 1:
for(shot_dir=O;shot_dir<=pdir;shot_dirt+)
{
for(j=O;j<=no_geo;j+=l)
{
dcoord[j][O]
= xcoord[j][sn][shot_dir];
dcoord[j][l]
= tr[j][sn][shot_dir];
mcoord[j][O]
= xcoord[j][sn][shot_dir];
mcoord[j][l]
= tr[j][sn][shot_dir];
)
polyline2d(fildes,dcoord,no_geo+l,O);
polymarker2d(fildes,mcoord,no_geo+l,O);
line color_index(fildes,3);
for(j=O;j<=no_geo;jt=l)
{
dcoord[j][O]
= xcoord[j][sn][shot_dir];
dcoord[j][l]
= tr_calc[j][sn][set_no][shot_dir];
mcoord[j][O]
= xcoord[j][sn][shot_dir];
mcoord[j][l]
= tr_calc[j][sn][set_no][shot_dir];
1
polyline2d(fildes,dcoord,no_geotl,O);
polymarker2d(fildes,mcoord,no_geo+l,O);
1
break;
case 2:
for(shot_dir=O;shot_dir<=pdir;shot_dir++)
{
line color_index(fildes,shot_dir+5);
for(j=O;j<bn;j++)
{
dcoord[j][O]
= xcoord[j][sn][shot_dir];
dcoord[j][l]
= 0.0;
SEISPACK-an
mcoord[j][O]
mcoord[j][l]
“HP-C"
321
program
= xcoord[j][sn][shot_dir];
= 0.0;
)
for(j=bn;j<=no_geo;j+=l)
{
dcoord(j](O]
= xcoord[j][sn][shot_dir];
dcoord[j][l]
= xc[j][sn][shot_dir];
mcoord[j][O]
= xcoord[j][sn][shot_dir];
mcoord[j][l]
= xc[j][sn][shot_dir];
polylineZd(fildes,dcoord,no_geo+l,O);
polymarker2d(fildes,mcoord,no_geo+l,O);
break;
PLOT THE GRIDS
*/
line_color_index(fildes,4);
line_type(fildes,DASH);
for(X=x_min+geo_space;X~=x_max-geo_space;X+=geo_space)
moveld(fildes,X,y_min),
drawZd(fildes,X,y_max);
PLOT THE OUTER RECTANGLE
*/
I*
flush_matrices(fildes);
vdc extent(fildes,
0.0, 0.0, 0.0, 1.25, 1.0, 0.0);
view port(fildes,O.O,O.O,l.O*l.25,l.O);
interior_style(fildes,
INT_HOLLOW,
Edge);
perimeter_color_index(fildes,3);
rectangle(fildes,O.O,O.O,l.O*l.25,l.O);
gclose(fildes);
fflush(stdin);
getchar();
if ((fildes = gopen("/dev/crtO",
OUTDEV, "hp98550",
exit(-1);
gclose(fildes);
I*
I*************
FUNCTION
float maximum(xl,x2)
float x1,x2;
if(x1
TO FIND MAXIMUM
> x2) return(x1);
/***********************
FUNCTION
OF TWO NUMBERS
INIT))
== -1)
**************I
else return(x2);
TO
~0p.p”~~
DEPTH
******************/
void depth_compute(sn,pdir)
int sn,pdir;
int
i,j,k,l,liter,m,st_no,count,strip_no,nola,shot_dir;
float
theta,depthl;
for(shot_dir=O;shot_dir<=pdir;shot_dir++)
{
for(j=O;ji=no_geo;j++)
tr_temp[j][sn][shot_dir]
= tr[j][sn][shot_dir];
theta = asin(velo[sn][O][shot_dir]/velo[sn][l][shot_dir]);
xc_compute(2,change[sn][l][shot_dir]+l,
change[sn][2][shot_dir]-l,sn,l,shot_dir);
xc_average[sn][O][shot_dir]
= 0.0;
count = 0;
for(j=change[sn][l][shot
dir]+l;
j<=change[sn][Z][shot_zir]-l;j++)
{
xc_average[sn][O][shot_dir]
+= xc[j][sn][shot_dir];
count++;
depth_value[sn][O][shot_dir]
= xc_average[sn][O][shot_dir]
/(2.0*count*tan(theta));
depth1 = depth_value[sn)[O][shot_dir];
xc_average[sn][O][shot_dir]
= sn*shot space +
xc_average[sn][O][shotIdir]/count;
tr_extrapol(sn,shot_dir);
st_no = 1; nola = no_layers[sn];
for(strip_no=nola;strip_no22;strip_no-=l)
{
layer_strip(sn,strip_no,depthl,shot_dir);
theta = asin(velo[sn][O][shot_dir]/velo[sn][l][shot_dir]);
xc_compute(2,change[sn][l][shot_dir]+l,
change[sn][2][shot_dir]-l,sn,l,shot_dir);
xc_average[sn][st_no][shot_dir]
= 0.0;
count = 0;
for(j=change[sn][l][shot_dir]+l;
j<=change[sn][2][shot_dir]-l;j++)
{
xc_average[sn][st_no][shot_dir]
+= xc[j][snj[shot_dir];
count++;
S. K. Nath and others
328
depth1
= xc_average[sn][st_no][shot_dir]/
(2.0*count*tan(theta));
depth_value[sn][st_no][shot_dir]
=
depth_value[sn][st_no-l][shot_dir]
+ depthl;
xc_average[sn][st_no][shot_dir]
= sn*shot_space
+
xc_average[sn][st_no][shot_dir]/count;
st_no++;
1
I*********
void
int
float
FUNCTION
TO STRIP
LAYERS
BY DOWNWARD
CONTINUATION
**********I
layer_strip(sno,layer_left,depth,sdir)
sno,layer
left,sdir;
depth;
int i,j,k,l,count;
float alfa;
for(i=O;i<layer_left-l;i++)
{
alfa = asin(velo[sno][O][sdir]/velo[sno][i+l][sdir]);
for(j=O;j<=no
geo;j++)
tr_comp[j]Ci][sno][sdir]
= tr_comp[j][i+l][sno][sdir]
- 2.0*depth*cos(alfa)/velo[sno][O][sdir];
change[sno][O][sdir]
= 0;
for(i=O;i<layer_left_2;i++)
{
count = 0;
for(j=O;j<=no
geo;j++) {
if(tr_compCj][i][sno][sdir]
<= tr_comp[j][i+l][sno][sdir])
tr_temp[j][sno][sdir]
= tr_comp[j][i][sno][sdir],
count++;
else tr_temp[j][sno][sdir]
= tr_comp[j][i+l][sno][sdir];
change[sno][i+l][sdir]
= count;
change[sno][layer_left-l][sdir]
= 24;
for(i=O;i<layer_left-l;i++)
velo[sno][i][sdir]
= velo[sno][i+l][sdir];
: **z&************
FUNCTION
TO EXTRAPOLATE
T-D
DATA
****************I
void tr_extrapol(snu,pd)
int snu,pd;
int
i,j,k,changel,changez,layer_no;
float slope1,slope2;
for(layer_no=O;layer_no~no_layers[snu];layer_no++)
{
change1 = change[snu][layer_no][pd];
change2 = change[snu][layer_no+l][pd];
for(i=changel;i<=change2;i+=l)
tr_comp[i][layer_no][snu][pd]=tr_temp[i][snu][pd];
slope1 = (tr_comp[changel+l][layer_no][snu][pd]
tr_comp[changel][layer_no][snu][pd])/geo_space;
for(i=changel;i>=O;i-=l)
tr_comp[i-l][layer_nol[snul[pd]
=
tr_comp[i][layer_no][snul[pd]
- slopel*geo_space;
slope2 = (tr_comp[change2][layer_no][snu][pd]
tr_comp[change2-l][layer_no][snu][pd])/geo_space;
for(i=changeZ+l;i<=24;i++)
tr_comp[i][layer_no][snu][pd]
=
tr_comp[i-l][layer_no][snu][pd]
+ slope2*geo_space;
)
#define DEG
*3.1415926535897/180.0
,*****,z********** FUNCTION TO PLOT
void time_depth_plots(pdir)
T-D
& DEPTH
**f*****************,
fildes,i,j,l,bn,no_la,s_dir,no_copies,copy_count;
x_maxl,y_maxl,x_minl,y_minl,ymaxl,ymax2,max,min,X,Y;
x_max2,y_max2,x_minl,y_min2,maxv,minv;
x_tic_size,y_tic_size,char_ht,dely,depth[lO][5];
dcoord[NO_GEO_MAX][2],mcoord[NO_GEO_MAX][2],
dcord[NO_SHOTS_MAX][2],mcord[NO_SHOTS_MAX][2];
float
mcord2[25][2],radii,start,stop,turn,angle,depthO;
float
velo_average;
char
string[lO],ans;
FILE
*fopen(), *fptr, *fl;
if((fildes = gopen("/dev/crtO",
OUTDEV, "hp98550", INIT))
exit(-1);
int
float
float
float
float
== -1)
SEISPACK-an
“HP-C"
329
program
COMPUTING MAXIMUM MINIMUM VALUES
/*
max = x_minl = y_minl = 0.0;
x_maxl = xcoord[no_geo][no_shots-l][O];
for(i=O;i<no
shots;i++)
{
if( tr_orig["o_geo][i][O]
>= max) max =
tr_orig[no_geo][i][O];
if(pdir == 1)
if( tr_orig[no_geo][i][l]
>= max) max =
tr_orig[no_geo][i][l];
"I
y_maxl
= max;
x-tic-size = y_maxl/80.0;
y-tic-size = y_maxl*15.0;
char_ht = y_maxl/ll.O;
dely = (y_maxl - y_minl)/lO.O;
"o-la = "o_layers["o_shots-11;
GRAPHICS INITIATION
*I
/*
vdc extent(fildes,
0.0, 0.0, 0.0, 1.25, 1.0, 0.0);
view port(fi1des,0.2*1.25,0.50,0.8*1.25,0.80);
i"te;ior_style(fildes,
INT_HOLLOW, Edge);
perimete~_color_index(fildes,2);
re&_ang1e(fi1des,0.2*1.25,0.50,0.8*1.25,0.80);
TITLE
*/
/*
text-color
index(fildes,3);
text_fo"t_i"dex(fildes,6);
text_alignment(fildes,TA_CENTER,TA_TOP,O.O,O.O);
character_slant(fildes,O.4878);
character_height(fildes,O.O5);
text2d(fildes,0.625,0.99,"TIME-DISTANCE
PLOT",
VDC_TEXT,EndOfLine);
text2d(fildes,0.625,O.OG,"DEPTH
PLOT",
VDC_TEXT,EndOfLine);
WRITING VELOCITIES
*/
/*
text_color_index(fildes,2);
text_alignment(fildes,TA_LEFT,TA_BOTTOM,O.0,0.0);
character_height(fildes,0.02);
for(j=o;j<no_la;j++)
{
minv = 10000.0; maxv = 0.0;
for(i=O;i<no
shots;i++)
{
if(velo_o~ig[i][j][O]~=mi"v)
minv=velo_orig[i][j][O];
if(velo_orig[il[j][0]~=maxv)
maxv=velo_orig[i][j][O];
if(pdir == 1) {
if(velo_orig[i][j][l]<=minv)
minv=velo_orig[i][j][l];
if(velo_orig[i][j][l]~=maxv)
maxv=velo_orig[i][j][l];
>
velo_average
= (minv + maxv )/2.0;
sprintf(String,"v%d
= %5.0f m/s",j+l,velo
average);
text2d(fildes,0.84*1.25,0.4
- (j+l)*O.O5,&ring,
VDC_TEXT,EndOfLine);
FIELD GEOMETRY LABELS
/*
*/
text color i"dex(fildes,4);
textIfo"t_i"dex(fildes,S);
text_alignment(fildes,TA_CENTER,TA_TOP,O.O,O.O);
character_slant(fildes,O.O);
character_height(fildes,O.O3);
sprintf(String, "Number of Geophones
: %d",no geo);
text2d(fildes,0.3125,0.93,String,VDC
TEXT,E"dOfLi"e);
sprintf(String, "Number of Shots : %d',no shots);
text2d(fildes,O.9375,0.93,Stri"g,VDC_TEX~,E"dOfLi"s);
sprintf(Stri"g, "Geophone Spacing : %5.2f m",geo space);
text2d(fildes,0.3125,O.895,Stri"g,VDC_TEXT,E"dO~Li"e);
sprintf(String,"Shot
Spacing : %5.2f m",shot space);
text2d(fildes,O.9375,0.895,Stri"g,VDC_TEXT,E~dOfLi"e);
sprintf(String, "PROFILE IDENTIFICATION
CODE : %s",profile
id);
text2d(fildes,O.625,0.86,String,VDC_TEXT,EndOfLine);
_
FOOTER
/*
*/
text color index(fildes,2);
text_fo"t_~"dex(fildes,2);
text-alignment(fildes,TA
CENTER,TA_BOTTOM,O.O,O.O);
character_sla"t(fildes,O~O);
character_height(fildes,O.O3);
text2d(fildes,O.625,0.435,
"DISTANCE
(m)",VDC _ TEXT,EndOfLine);
SIDE LABELS
/*
*/
text orientation2d(fildes,-l.O,o.O,O.O,l.o);
tsXt~alig"me"t(fildeS,TA_CENTER,TA_TOP,O.0,0.0);
character_height(fildes,O.O3);
S. K. Nath and others
330
text2d(fildes,0.l30,O.65,"TIME
(ms)",VDC_TEXT,EndOfLine);
text2d(fi1des,0.130,0.25,"DEPTH
(m)",VDC_TEXT,EndOfLine);
RETURN TO CONTINUE
*/
I*
text_orientation2d(fildes,O.O,l.O,l.O,O.O);
text_color;index(fildes,5);
text_font_lndex(fildes,4);
text_alignment(fildes,TA_LETT,TA_BOTTOM,O.O,O.O);
character_slant(fildes,O.O);
character_height(fildes,O.O4);
text2d(fildes,O.OlO,O.OlO,"Return
To Continue",
VDC_TEXT,EndOfLine);
DEFINING WINDOWS
*/
/*
view_window(fildes,x_minl,y_minl,x_maxl,y_maxl);
PLOTTING THE TICS
*/
/*
line_color_index(fildes,));
clip_indicator(fildes,CLIP
TO_VIEWPORT);
tic size,5);
Tics(fildes,'X' ,y_minl,x_min1,x_maxl,geo_space,x
Tics(fildes,'Y', x_minl,y_minl,y_maxl,dely,y_tic_~ize;5);
Tics(fildes,'Y', x_maxl,y_minl,y_maxl,dely,y_tic_size,5);
LABEL THE X TIC MARKS
fl
I*
clip_indicator(fildes,CLIP_TO_VDC);
text_orientation2d(fildes,O.O,l.O,l.O,O.O);
character_heiqht(fildes,char_ht);
character_width(fildes,2.00);
text_alignment(fildes,TA_CENTER,'rA_TOP,O.O,O.O);
text_color_index(fildes,3);
for(X=x_minl;Xi=x_maxl;X+=2.O*geo_space)
(
sprintf(Strinq,"%d",(int)X);
text2d(fildes,X,y_minl,String,WORLD_COORDINATE_TEXT,EndOfLine);
LABEL THE Y TIC MARKS
*/
/*
text_alignment(fildes,TA_RIGHT,TA_HALF,O.O,O.o);
for(Y=y_minl;Y~=y_maxl+O.OOl;Y+=2.O*dely)
(
sprintf(Strinq,"%4.0f",Y*10000);
text2d(fildes,x_minl
- y_tic__size,Y,String,
WORLD _ COORDINATE_TEXT,EndOfLine);
)
text alignment(fildes,TA
LEFT,TA HALF,O.O,O.O);
for(~=y_minl;Y~=y_max1+O~OOl;Y+=~.O*dely)
{
sprintf(string,"%4.0f",Y*1000);
text2d(fildes,x
maxi ,Y,Strinq,
WORLD COoRDINATE _ TEXT,EndOfLine);
1
PLOT THE DATA
*/
line_color_index(fildes,5);
marker_color_index(fildes,2);
marker_type(fildes,2);
for(s dir=O;s dir<=pdir;s
dir++)
for(i=O;i<no_shots;i++y
(
for(j=O;j<=no_geo;j+=l)
(
dcoord[j][O]=xcoord[j)[i](s_dir];
dcoord[j][l]
= tr_orig[j][i][s_dir
mcoord[j][O]=xcoord[j][i][s_dir];
mcoord[j][l]
= tr_oriq[j][i][s_dir
/*
‘I ;
‘1;
)
polyline2d(fildes,dcoord,no_geo,O);
polymarker2d(fildes,mcoord,no_geo,O);
)
flush_matrices(flldes);
max = y_min2 = 0.0;
for(i=O;i<no_shots;i++)
for(j=O;j<no_la;j++)
(
lf(depth_value[l][]][O]
>= max) max =
depth_value[i][j][O];
if(pdir == I)
if(depth_valueji]:jj[l]
>= max) max =
depth_value[ij:j][lJ;
y_max2
= max + 4.0;
x-tic-sine = (y_max2)/40.0;
y-tic-size
=
(y_max2)/30.0;
char_ht = (y_max2)/13.0;
if(y_maxl >= 15.0 &h y_max2 <= 40.0) dely = 2.0;
if(y_maxl >= 40.0 && y_max2 <= 70.0) dely = 4.0;
if(y_max2 c= 15.0) dely = 1.0;
vdc_extent(fildes,
0.0, 0.0, 0.0, 1.25, 1.0, 0.0);
view_port(fi1des,0.2*1.25,0.10,0.8*1.25,0.40);
interior_style(fildes,
INT_HOLLOW,
Edge);
perimeter_color_index(fildes,2);
SEISPACK-an
331
“HP-C” program
rectang1e(fi1des,0.2*1.25,0.10,0.8*1.25,0.40);
DEFINING WINDOWS
If
l/
view_window(fildes,x_minl,y_min2,x_maxl,y_max2);
PLOTTING THE TICS
l/
I*
line_color_index(fildes,3);
clip_indicator(fildes,CLIPTTO_VIEWPORT);
Tics(fildes,'X',y_max2,x_mlnl,x_maxl,geo_space,x_tic_size,5);
Tics(fildes,'Y',x_minl,y_
min2,y_max2,dely,y_tic_size,2);
Tics(fildes,'Y',x_maxl,y_min2,y_max2,dely,y_tic_size,2);
LABEL THE X TIC MARKS
*/
/*
text color_index(fildes,3);
clipIindicator(fildes,CLIP_TO_VDC);
text_orientation2d(fildes,O.O,l.O,l.O,O.O);
character_height(fildes,char_ht);
character_width(fildes,2.00);
text_a1ignment(fildes,TA_CENTER,TA_BOTTOM,O.0,0.0);
for(X=x_minl;X~=x_maxl;X+=2.O*geo_space)
{
sprintf(Strinq,"%d",(int)X);
text2d(fildes,X,y_max2,String,WORLD_COORDINATE_~~EXT,
EndOfLine);
LABEL THE Y TIC MARKS
I*
*/
text_alignment(fildes,TA_RIGHT,TA_HALF,O.O,O.O);
for(Y=y_max2;Y>=y_min2;Y-=2.O*dely)
(
sprintf(String,"%d",(int)(y_maxZ-Y));
text2d(fildes,x_minl-y_tic_size,Y,String,
WORLD_COORDINATE_TEXT,EndOfLine);
1
text_aliqnment(fildes,TA_LEFT,TA_HALF,O.O,O.O);
for(Y=y_max2;Y>=y_min2;Y-=2.O*dely)
(
sprintf(Strinq,"%d",(int)(y_max2-Y));
text2d(fildes,x_maxl+y_tic_size,Y,Strinq,
WORLD _ COORDINATE _ TEXT,EndOfLine);
)
PLOT THE DATA
/*
*/
line_color_index(fildes,7);
marker_size(fildes,
0.005, FALSE);
marker_type(fildes,2);
fptr = fopen("data
plot","~");
for(j=O;j<"o_la-l;j+=l)
(
for(i=O;i<no_shots;i++)
{
marker color_index(fildes.5);
mcord(i][O]
= xc_averaqe[i][j][O];
mcord(i][l]
= y_max2 - depth_value[i][j][O];
radii = depth_value[i][j][O];
angle = 5.5 l (y_max2/depth_value[i][j)[O]);
start = -(90.0 + angle) DEG;
stop = -(90.0 - anqle) DEG;
turn 5 160 DEG;
arc(fildes,radii,radii,mcord(i](O],y_max2,start,
stop,0.0,0);
%f\n",mcord[i][O],mcord(i](l]);
fprintf(fptr,"%f
)
polymarker2d(fildes,ncord,no_shot
,O);
if(pdir == 1) (
fprintf(fptr,"\n");
for(j=O;j<no_la-l;j+=l)
{
for(i=O;i<no_shots;i++)
{
marker_color_index(fildes,5);
mcord2[i][O]
= xcoord(no_qeo](i][O]
xc-average
il[jl~ll
+ i*shot_space;
fprintf(fptr,"%f\n",xcoord(no_geo](i][O
).
mcord2[i][l]
= y_max2 - depth_value(i][ j
radii = depth_value(i][jj;l];
angle = 5.5 * (y_max2/depth_value[i][j]
111;
start = -(90.0 + angle) DEG;
stop = -(90.0 - angle) DEG;
turn = 160 DEG;
arc(fildes,radii,radii,mcord2[i][O],y_max2,
start,stop,O.O,O);
%f\n",mcord2[i][O],mcord2(i](l]);
fprintf(fptr,"%f
ILli
1
polymarker2d(fildes,mcord2,no_shots,O);
)
1
fclose(fptr);
332
S. K. Nath and others
OUTER RECTANGLE
/*
*/
flush_matrices(fildes);
vdc extent(fildes,
0.0, 0.0, 0.0, 1.25, 1.0, 0.0);
view port(fildes,O.O,O.OO,l.O*l.25,l.O);
inte;ior_style(fildes,
INT_HOLLOW,
Edge);
perimeter_color_index(fildes,3);
rectangle(fildes,O.0,O.OO,l.O*l.25,l.O);
gclose(fildes);
fflush(stdin);
qetchar();
if((fildes = gopen("/dev/crtO",
OUTDEV, "hp98550",
exit(-1);
gclose(fildes);
INIT))
== -1)
Tics(fildes,Axis,Location,Start,End,Delta,Size,Major)
fildes, Major;
int
Axis; /* which axis are the tics for */
char
Location, Start, End, Delta, Size;
float
Len (Tic%Major!=O
? Size: Z.O*Size)
#define
move 0.0 /* for polyline flags *f
#define
draw 1.0 /* for polyline flags */
#define
int
Tic; /* which tic are we on */
float x,y, TicMks[1200],
*TicPtr;
TicPtr=TicMks;
switch (Axis) {
case 'X':case'X':
for(x=Start,Tic=O;x<=End;x
+= Delta,Tic++)
{
*TicPtr++=x,
*TicPtr++=Location-Len,
*TicPtr++=move;
*TicPtr++=x,
*TicPtr++=Location+Len,
*TicPtr++=draw;
break;
case'y' : case’l’:
for(y=Start,
Tic=O;y<=End;y+=Delta,Tic++)
*TicPtr++=Location-Len,
*TicPtr++=y,
*TicPtr++=Location+Len,
*TicPtr++=y,
break;
}/* switch */
polyline2d(fildes,TicMks,(TicPtr
{
*TicPtr++=move;
*TicPtr++=draw;
- TicMks)/3,TRUE);