specsim: a fortran-77 program for conditional spectral simulation in 3d

11
SPECSIM: A FORTRAN-77 PROGRAM FOR CONDITIONAL SPECTRAL SIMULATION IN 3D TINGTING YAO* Department of Geological and Environmental Sciences, Stanford University, Stanford, CA 94305-2115 (Received 30 September 1997; revised 18 January 1998) Abstract—A Fortran 77 program, specsim, is presented for conditional spectral simulation in 3D domains. The traditional Fourier integral method allows generating random fields with a given covari- ance spectrum. Conditioning to local data is achieved by an iterative identification of the conditional phase information. A flowchart of the program is given to illustrate the implementation procedures of the program. A 3D case study is presented to demonstrate application of the program. A comparison with the traditional sequential Gaussian simulation algorithm emphasizes the advantages and draw- backs of the proposed algorithm. # 1998 Elsevier Science Ltd. All rights reserved Code available at http:11www.iamg.org/CGEditer/index.htm Key Words: Fast Fourier transform, Fourier integral method, Phase identification, Conditional spectral simulation, Stochastic imaging. INTRODUCTION The spectral simulation algorithm, Fourier integral method, is frequently used in electrical engineering to generate random fields with a given covariance spectrum (Borgman, Taheri and Hagan, 1984; Gutjahr and others, 1987; Nevels, 1993; Gutjahr, Bullerd and Hatch, 1994, 1997). The algorithm is particularly fast when based on fast Fourier transform (FFT) (McKay, 1988; Pardo-Iguzquiza and Chica-Olmo, 1993). According to the classical spectral representation theorem, any sequence of N values z(k) can be expressed as a finite series of Fourier coecients, a j and b j . In 1D, that series is written as, Bracewell (1986): zk X N1 j0 a j cos2pjk=N b j sin2pjk=N k 0, ... , N 1 1 Or, equivalently, using a complex exponential Fourier series: zk F 1 A j X N1 j0 A je i2pkj=N 2 where A(j)= a j ib j =vA(j)ve ij(j) is the jth complex Fourier coecient, vA(j)v= a 2 j b 2 j q is the ampli- tude, j(j) = tan 1 ( b j /a j ) is the phase of the jth Fourier coecient and i= 1 p is the imaginary unit. The amplitudes vA(j)v are related to the discrete spectral density s(j) or Fourier transform of the Z- covariance by the relation: jA jj 2 s j, j 0, ... , N 1: 3 Knowledge of the spectrum s(j) only provides in- formation about the amplitude vA(j)v of the Fourier coecients. Since the phase j(j) does not aect the covariance of the series z(k), it can be taken as ran- dom uniformly distributed between 0 and 2p, j(j) 0U(0, 2p). Finally, the complex Fourier coe- cient is written as: A j jA jje ij j jA jjcos j j ijA jjsin j j: 4 The inverse Fourier transform (Eq. 2) of the complex coecients A(j) provides the discrete finite realization {z(k), k = 0, ... , N 1} with the speci- fied covariance spectrum s(j). Such inverse discrete Fourier transform (Eq. 1) can be rapidly and e- ciently computed by Fast Fourier transform (Bruguera, 1996). This Fourier integral method, however, can only generate unconditional realizations, in that the series z(k) does not identify any specific z-data values. The traditional way to condition a realiz- ation to local data is to add to the non-conditional realization an independently simulated residual obtained by kriging (see Journel and Huijbregts, 1978). Computers & Geosciences Vol. 24, No. 10, pp. 911–921, 1998 # 1998 Elsevier Science Ltd. All rights reserved Printed in Great Britain 0098-3004/98 $ - see front matter PII: S0098-3004(98)00059-4 *E-mail: [email protected]. 911

Upload: tingting-yao

Post on 15-Sep-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: specsim: A Fortran-77 program for conditional spectral simulation in 3D

SPECSIM: A FORTRAN-77 PROGRAM FOR CONDITIONAL

SPECTRAL SIMULATION IN 3D

TINGTING YAO*

Department of Geological and Environmental Sciences, Stanford University, Stanford, CA 94305-2115

(Received 30 September 1997; revised 18 January 1998)

AbstractÐA Fortran 77 program, specsim, is presented for conditional spectral simulation in 3Ddomains. The traditional Fourier integral method allows generating random ®elds with a given covari-ance spectrum. Conditioning to local data is achieved by an iterative identi®cation of the conditionalphase information. A ¯owchart of the program is given to illustrate the implementation procedures ofthe program. A 3D case study is presented to demonstrate application of the program. A comparisonwith the traditional sequential Gaussian simulation algorithm emphasizes the advantages and draw-backs of the proposed algorithm. # 1998 Elsevier Science Ltd. All rights reserved

Code available at http:11www.iamg.org/CGEditer/index.htm

Key Words: Fast Fourier transform, Fourier integral method, Phase identi®cation, Conditional spectralsimulation, Stochastic imaging.

INTRODUCTION

The spectral simulation algorithm, Fourier integral

method, is frequently used in electrical engineering

to generate random ®elds with a given covariance

spectrum (Borgman, Taheri and Hagan, 1984;

Gutjahr and others, 1987; Nevels, 1993; Gutjahr,

Bullerd and Hatch, 1994, 1997). The algorithm is

particularly fast when based on fast Fourier

transform (FFT) (McKay, 1988; Pardo-Iguzquiza

and Chica-Olmo, 1993).

According to the classical spectral representation

theorem, any sequence of N values z(k) can be

expressed as a ®nite series of Fourier coe�cients, ajand bj. In 1D, that series is written as, Bracewell

(1986):

z�k� �XNÿ1j�0�aj cos�2pjk=N � � bj sin�2pjk=N ��

k �0, . . . , Nÿ 1 �1�

Or, equivalently, using a complex exponential

Fourier series:

z�k� �Fÿ1�A� j�� �XNÿ1j�0

A� j�ei2pkj=N �2�

where A(j) = ajÿibj=vA(j)veÿij(j) is the jth complex

Fourier coe�cient, vA(j)v=���������������a2j � b2j

qis the ampli-

tude, j(j) = tanÿ1(ÿbj/aj) is the phase of the jth

Fourier coe�cient and i=�������ÿ1p

is the imaginary

unit.The amplitudes vA(j)v are related to the discrete

spectral density s(j) or Fourier transform of the Z-covariance by the relation:

jA� j�j2 � s� j�, j � 0, . . . , Nÿ 1: �3�

Knowledge of the spectrum s(j) only provides in-formation about the amplitude vA(j)v of the Fouriercoe�cients. Since the phase j(j) does not a�ect the

covariance of the series z(k), it can be taken as ran-dom uniformly distributed between 0 and 2p,j(j)0U(0, 2p). Finally, the complex Fourier coe�-cient is written as:

A� j� �jA� j�jeÿij� j� � jA� j�jcos j� j�ÿ ijA� j�jsin j� j�: �4�

The inverse Fourier transform (Eq. 2) of thecomplex coe�cients A(j) provides the discrete ®nite

realization {z(k), k= 0, . . . , Nÿ 1} with the speci-®ed covariance spectrum s(j). Such inverse discrete

Fourier transform (Eq. 1) can be rapidly and e�-ciently computed by Fast Fourier transform(Bruguera, 1996).

This Fourier integral method, however, can onlygenerate unconditional realizations, in that theseries z(k) does not identify any speci®c z-data

values. The traditional way to condition a realiz-ation to local data is to add to the non-conditional

realization an independently simulated residualobtained by kriging (see Journel and Huijbregts,1978).

Computers & Geosciences Vol. 24, No. 10, pp. 911±921, 1998# 1998 Elsevier Science Ltd. All rights reserved

Printed in Great Britain0098-3004/98 $ - see front matterPII: S0098-3004(98)00059-4

*E-mail: [email protected].

911

Page 2: specsim: A Fortran-77 program for conditional spectral simulation in 3D

zsc�u� �zs�u� � �zK*�u� ÿ zs*�u�� � zs�u�

�Xni�1

li�z�ui � ÿ zs�ui �� �5�

where zsc(u): conditional simulated value; zs(u): non-

conditional simulated value; z(ui): conditioning

data, i = 1, . . . , n; zK*(u): kriging estimate using

the actual conditioning data; zs*(u): kriging estimate

using simulated values at data locations; li: krigingweights and n: number of neighboring data used for

kriging.

This conditioning process calls for solving one

kriging system per location. Hence, the speed ad-

vantage of spectral simulation over conditional

sequential algorithms such as sequential Gaussian

simulation, which also calls for one kriging system

per location (Deutsch and Journel, 1997) is lost.

Sometimes a faster way of conditioning is to use

a single global dual kriging system (Chu and

Journel, 1994) instead of a series of local kriging

systems, one per location u, to determine the error

term zK*(u)ÿ zs*(u) in Equation 5. This alternative

utilizes the entire data set in one single and large

dual kriging system resulting in one single set of

dual weights applicable to all locations u. It requires

strict global stationarity and, although there is only

one single kriging system, it can be large if the totalnumber of conditioning data is large.

A new approach to conditioning the spectralsimulation through phase identi®cation has beenproposed (Yao, 1997). Further improvements of the

methodology proposed and the correspondingFortran 77 program specsim are presented here-after.

CONDITIONAL SPECTRAL SIMULATION

To avoid having to solve either a single largedual kriging system or many smaller systems, identi-

fying the free phase parameter values f(j) so as toapproximate the data values at sample locations issuggested. More precisely, the following algorithm

for conditional spectral simulation is proposed(Fig. 1):

Step 1

First evaluate all covariance values related to theentire discrete grid of size(2nx+1)� (2ny+1)� (2nz+1) and carry out fast

Fourier transform (FFT) to get the correspondingdiscrete spectrum density map s(i, j, k), i = 1, . . . ,2nx+1; j = 1, . . . , 2ny+1; k = 1, . . . , 2nz+1,

where nx, ny and nz are the maximum number of

Figure 1. Flowchart of program specsim

T. Yao912

Page 3: specsim: A Fortran-77 program for conditional spectral simulation in 3D

covariance lags in the x, y and z directions. Thatspectrum density map is corrected to ensure that all

values s(i, j, k) are positive. Retrieve the amplitudevA(i, j, k)v of the Fourier coe�cients according toEquation 3.

Step 2: Fourier integral method

(a) Randomly draw the initial phase values f(i, j,k) from a uniform distribution U(0, 2p).(b) Build up the Fourier coe�cient A(i, j, k) as:

A�i, j, k� �jA�i, j, k�jcos�f�i, j, k��ÿ ijA�i, j, k�jsin�f�i, j, k��,

i �1, . . . , 2nx; j � 1, . . . , 2ny;

k �1, . . . , 2nz

(c) Carry out inverse FFT on the Fourier coe�-cients A(i, j, k) to get the non-conditional simulatedvalues zs(i, j, k), i= 1, . . . , 2nx, j= 1, . . . , 2ny and

k = 1, . . . , 2nz (see Eq. 1).

Step 3

Consider the n data at grid nodes a= 1, . . . , n(some data relocation to the nearest grid node

might be necessary), calculate the di�erence betweenthe simulated values zs(ia, ja, ka) and the condition-ing data values z(ia, ja, ka), a = 1, . . . , n. The sum

of the absolute relative di�erence is taken as anobjective function to be minimized:

obj �Xna�1

���� zs�ia, ja, ka� ÿ z�ia, ja, ka�z�ia, ja, ka�

���� �6�

Step 4

If the objective function value obj is less than apreset limit value objmin, stop the iteration andaccept the simulated image as an approximately

conditioned simulated realization. Otherwise,change the simulated values into the data values atall n sample locations, i.e. set: zs(ia, ja, ka) = z(ia, ja,

ka), a = 1, . . . , n. For the ®rst iteration, also cor-rect all simulated values in a neighborhood of adatum location by the same amount that datumwas corrected. More precisely, the di�erence z(ia, ja,

ka)ÿ zs(ia, ja, ka) is added to all simulated nodesclose to z(ia, ja, ka). This spread of the correctionprevents generating discontinuities around the con-

ditioning data.

Step 5

FFT the altered simulated image, which provides

the real and imaginary parts of the new Fouriercoe�cients, here denoted R(A'(i, j, k)) and I(A'(i, j,k)). The new amplitudes and phases are then recal-culated as:

jA 0�i, j, k�j �������������������������������������������������������������R�A 0�i, j, k��2 � I�A 0�i, j, k��2

q,

f 0�i, j, k� �tanÿ1�I�A 0�i, j, k��R�A 0�i, j, k��

��7�

Because the previously simulated values havebeen updated in step 4, the spectrum s'(i, j,k) = vA'(i, j, k)v2 di�ers from the original target

spectrum s(i, j, k) deduced from the covariancemodel. Thus, discard this new spectrum s'(i, j, k)but keep the new phase f'(i, j, k) together with the

original spectrum s(i, j, k), hence keeping the orig-inal amplitude vA(i, j, k)v (see Eq. 3).Go back to (b) in step 2 and iterate the whole

process until objRobjmin or the number of iter-ations reaches a pre-de®ned limit, at which pointthe iteration is stopped.

All calculations during this iterative process arebased on FFT and the algorithm never requiresthe solution of any kriging system. Every time thesimulated values are reset to the conditioning data

values, the objective function necessarily decreases.Thus it is expected that the process will convergereasonably fast, as long as the target spectrum den-

sity, i.e. the covariance model, is consistent with theconditioning data used.A signi®cant practical advantage is that the pro-

posed spectral simulation only requires a spectrumdensity map. It does not require any analytical co-variance or variogram model as most other simu-lation algorithms do. Often such a variogram model

is di�cult to obtain; the spectrum density map canbe obtained directly by FFT of the experimental co-variance map, with appropriate smoothing to

ensure a corresponding positive de®nite covariancetable (Yao and Journel, 1997).The ¯owchart of the program specsim is shown

(Fig. 1).

CODE DESCRIPTION

The spectrum density map or table is input tospecsim. This spectrum map can be calculated froma given covariance model, or obtained automati-

cally by FFT of an experimental correlogram mapfollowed by appropriate smoothing. Program spec-

sim read these values from ®le spectrum.dat.

Conventions

The program specsim is written under the conven-

tions of the GSLIB software, Deutsch and Journel(1997).File format All input and output ®les are of a

simpli®ed Geo-EAS format, Englund and Sparks(1988), i.e.. The ®rst line in the ®le is taken as a title and

can be transferred to the output ®le.

Specsim: for conditional spectral simulation in 3D 913

Page 4: specsim: A Fortran-77 program for conditional spectral simulation in 3D

. The second line is a numerical value specifying

the number of numerical variables nvar in the data

®le.

. The next nvar lines contain character identi®-

cation labels and additional text (optional) that

describe each variable.

. The following lines, from nvar +3 until the endof the ®le, are the data values. There should be nvar

numerical values per line.

Simulation grid The input and output ®les consist

of regular grids of data values. The grid is de®ned

as follows:

. The X axis is associated with the east direction.

Grid node indices ix increase from 1 to nx in the

positive x direction, i.e. to the east.

. The Y axis is associated with the north direc-

tion. Grid node indices iy increase from 1 to ny in

the positive y direction, i.e. to the north.

. The Z axis is associated with the upward direc-

tion. Grid node indices iz increase from 1 to nz in

the positive z direction, i.e. upward.

The coordinate system is established by specifyingthe coordinates (xmn, ymn, zmn) of the center of

the ®rst block, the number of grid nodes (nx, ny,

nz) and the size of the elementary grid cell (xsiz,

ysiz, zsiz). A special ordering is used to store a

regular grid. This avoids having to specify node

coordinates or grid indices. The ordering of the

nodes proceeds ®rst to the east, then row by row to

the north, then level by level upward, i.e. x cyclesfaster, then y, then z. The location index of any

particular node ix, iy, iz is calculated as:

loc � ix� �iyÿ 1�*nx� �izÿ 1�*nx*ny:

The integer coordinates of a node at location loc

are retrieved as:

iz �1� int

�loc

nx*ny

�,

iy �1� int

�locÿ �izÿ 1�*nx*ny

nx

�,

ix �locÿ �iyÿ 1�*nxÿ �izÿ 1�*nx*ny:

The real coordinates of that node are then calcu-

lated as:

x �xmn� �ixÿ 1�*xsiz, y � ymn� �iyÿ 1�*ysiz,z �zmn� �izÿ 1�*zsiz:

Include ®le The 1978 ANSI Fortran 77 used here

does not allow for dynamic memory allocation.

Consequently, array dimensioning and memory al-

location must be hardcoded in all programs. To

mitigate this inconvenience, all dimensioning and

memory allocation are speci®ed in a single

``include'' ®le. This include ®le is common to all

subroutines.

Parameter ®le Once the source code is compiled,

at each run of the program, the user is asked for a

parameter ®le which includes all necessary input in-

formation. The parameter ®le follows a speci®ed

format. An advantage of this type of input is that

Figure 2. Parameter ®le for specsim

T. Yao914

Page 5: specsim: A Fortran-77 program for conditional spectral simulation in 3D

the parameter ®le provides a permanent record ofall the run parameters and can be modi®ed.

Parameter ®le of specsim

An example of the parameter ®le for specsim is

shown in Figure 2.The input parameters are:. spec¯: The input spectrum density ®le. To be

consistent with the fast Fourier transform subrou-tine, x increases eastward, y increases southwardand z increases downward. This ®le can be obtained

from the FFT of a covariance map calculated froma given variogram model.. nclsx, nclsy, nclsz: Number of columns of the

spectrum density map in x, y and z axis. These

numbers should be power of 2 to facilitate im-plementation of FFT.. xmn, ymn, zmn: Coordinates of the center of

the ®rst simulation cell.. xsiz, ysiz, zsiz: Size of the simulation cell.. condat¯: Input conditioning data ®le in a sim-

pli®ed Geo-EAS format.. icolx, icoly, icolz, icolvr: Column addresses for

the x, y and z coordinates and the variable to be

simulated in ®le condat¯.. tmin, tmax: All values strictly less than tmin

and greater than tmax are ignored.. seed: Random number seed, a large odd num-

ber.. nsim: Number of realizations.. out¯: The output ®le which contains the

gridded simulation results, cycling faster on x, thenon y, then on z.. objmin: Target objective limit value: the iter-

ation stops when the objective function value is lessthan this. The lower this value, the closer are thesimulated values to the conditioning data at samplelocations.

. maxitn: Maximum number of iterations, theprogram stops when the number of iterationsreaches this value.

The source code of specsim.f and its include ®lespecsim.inc are available on the web site ofIAMG.ORG.

3D CASE STUDY

The proposed conditional spectral simulation al-gorithm is applied to a 3D data set. The results are

compared to those of the traditional sequentialGaussian simulation algorithm using the GSLIBprogram sgsim (Deutsch and Journel, 1997). For

both specsim and sgsim, all simulations are carriedout in the normal score space, or, similarly, thesimulations are performed on Gaussian-distributed

variables.First, a 3D reference volume of values is simu-

lated using unconditional spectral simulation. Thevolume comprises 64�64� 16 nodes with unit spa-

cing 1.0�1.0�1.0. The variogram model used for

this simulation is spherical, anisotropic with princi-

pal ranges 20, 10 and 5 and unit variance:

g�jhj� � Sph

� ���������������������������������������������������������h120

�2

��h210

�2

��hz5

�2s �

where h1 corresponds to the major horizontal direc-

tion of continuity, here N458E, h2 is the horizontal

direction perpendicular to h1, h3 is the vertical

direction. From this variogram model, a covariance

map can be calculated. This covariance map can be

Fourier transformed to provide a density spectrum

to be input in program specsim.

This simulated reference volume is shown at the

top of Figure 3. Also given are the histogram and

input variogram model (bold line) together with the

resulting simulated variograms in the three principal

directions. The variogram model is seen to be

reasonably well reproduced.

From this reference data set, we retain 20 vertical

sets of data to mimic wells, that is a total of

20�16 = 320 samples to be used as conditioning

data in the later simulation. The location map and

histogram of these 320 sample data are shown in

Figure 4.

Using program specsim, twenty 3D realizations

are generated; all realizations honor the 320 pre-

vious conditioning data with a total relative devi-

ation less than 1%. One speci®c realization volume

and the 20 simulated variograms with the input

model (bold) are shown (Fig. 5). The simulated var-

iograms display expected ¯uctuations around the

input variogram model. It takes about 20 to 23 iter-

ations to reach the preset minimum objective func-

tion (1%). Each realization took less than 5 cpu

minutes on an IBM workstation. This is reasonably

fast for a simulation involving 64�64�16 = 65536

nodes.

To avoid the step of correcting all simulated

values in the neighborhood of sampled values in the

®rst iteration of step 4, one could start from a ``bet-

ter'' initial image, at some extra cpu cost. Rather

than building that initial image from pure random

phases, one can use a kriged image, (Yao, 1997). At

each node, kriging provides an estimated value and

an estimation variance. From these parameters, an

initial value is simulated as: zÃ(u) + s(u)�E(u) where

E(u) is a random standard normal score. As

opposed to a full sequential simulation, this initial

pseudo ``simulation'' does not use any previously

simulated values and is thus reasonably fast, but

does not reproduce any variogram model. From

this improved initial image, we calculate the initial

phases which are thus not random. Then, return to

step 2(b) to start the whole iteration process until

convergence of the objective function. Another

twenty simulated realizations were drawn. One

speci®c realization and the 20 simulated variograms

are shown (Fig. 6). Compared with previous results

Specsim: for conditional spectral simulation in 3D 915

Page 6: specsim: A Fortran-77 program for conditional spectral simulation in 3D

(Fig. 5), the simulated variograms show much less

¯uctuations around the input variogram model

(bold line). This may be due to the 20 initial images

being closer to each other, since they are built from

the same kriging map. The number of iterations

needed for convergence remains at between 20 to

23. The cpu time per realization remains about the

same.

For comparison, we also apply the traditional

sequential Gaussian simulation with program sgsim

Figure 3. A simulated 3D reference volume with input variogram model (bold line) and simulated var-iograms (®ne line). (A) Reference volume; (B) experimental variogram and variogram model in verticaldirection; (C) experimental variogram and variogram model in N458E direction; (D) experimental var-

iogram and variogram model in N458W direction and (E) histogram of reference volume

T. Yao916

Page 7: specsim: A Fortran-77 program for conditional spectral simulation in 3D

to generate 20 realizations. One speci®c realization

and the 20 simulated variograms are shown (Fig. 7).

Compared with previous results (Figs 5 and 6), the

simulated variograms show more extensive ¯uctu-

ations around the input model. In the sgsim algor-ithm, the kriging system at each grid node considers

only correlation within the search neighborhood.

Thus, only short variogram lags up to the neighbor-

hood distances are reproduced in the simulated

image whereas the entire covariance/spectrum

volume is used in the specsim algorithm. The cputime is approximately 1 min per realization. This

Figure 4. Location map of randomly sampled 20 wells and histogram of total 320 data

Specsim: for conditional spectral simulation in 3D 917

Page 8: specsim: A Fortran-77 program for conditional spectral simulation in 3D

signi®cantly faster speed is obtained at the cost of

poorer variogram reproduction. Indeed, the cpu

time of sgsim is controlled by the search strategy

adopted for building the kriging systems at each

grid node. In this situation, the search radius is half

the ®eld size and the maximum number of neigh-

borhood data points retained is only 8.

The cpu cost of the specsim algorithm could be

signi®cantly improved by reading tables of sines

and cosines within each call of the FFT subroutine,

Figure 5. One 3D realization volume with input variogram model (bold line) and 20 simulated vario-grams (®ne lines), using specsim starting from random phases. (A) simulated volume; (B) simulated var-iogram and variogram model in vertical direction; (C) simulated variogram and variogram model inN458E direction; (D) simulated variogram and variogram model in N458W direction and (E) histogram

of simulated volume

T. Yao918

Page 9: specsim: A Fortran-77 program for conditional spectral simulation in 3D

rather than recalculating repetitively. Indeed, most

of the running time of specsim is spent in calculat-

ing FFTs: at each iteration, a forward FFT is

required to calculate the phases and an inverse FFT

is called to retrieve the simulated ®eld (see ¯ow-

chart, Fig. 1). In situations where the simulation

node is not power of 2, another fast Fourier trans-

form algorithm, prime factor algorithm (PFA), can

be applied. The idea is still to split a long sequence

into shorter ones, without the constraint of the

Figure 6. One 3D realization volume with input variogram model (bold line) and 20 simulated vario-grams (®ne lines), using specsim starting from a kriged map. (A) Simulated volume; (B) simulated vario-gram and variogram model in vertical direction; (C) simulated variogram and variogram model inN458E direction; (D) simulated variogram and variogram model in N458W direction and (E) histogram

of simulated volume

Specsim: for conditional spectral simulation in 3D 919

Page 10: specsim: A Fortran-77 program for conditional spectral simulation in 3D

power of 2. For details of this approach, refer to

Kar (1994) and Lam (1995).

One critical advantage of the proposed con-

ditional simulation algorithm is that no analytical

(cross) variogram model is required for as long as

an acceptable spectrum density map is provided.

Such (cross) spectrum density map can be obtained

directly from FFT of a training image or of an ex-

perimental correlogram map (Yao and Journel,

1997).

Figure 7. One 3D realization volume with input variogram model (bold line) and 20 simulated vario-grams (®ne lines), using sgsim. (A) simulated volume; (B) simulated variogram and variogram model invertical direction; (C) simulated variogram and variogram model in N458E direction; (D) simulated var-

iogram and variogram model in N458W direction and (E) histogram of simulated volume

T. Yao920

Page 11: specsim: A Fortran-77 program for conditional spectral simulation in 3D

CONCLUSIONS

A Fortran 77 program, specsim, for conditionalspectral simulation in the frequency domain is pro-

posed. The algorithm builds on the Fourier integralmethod for unconditional spectral simulation andan iterative identi®cation of phases to honor datavalues at sample locations.

The input variogram model is reproduced signi®-cantly better than when using the traditionalsequential Gaussian simulation algorithm, because

the entire covariance/spectrum density map de®nedover the whole simulation ®eld is involved, ratherthan the few covariance lags within the kriging

neighborhood of sequential algorithms.The present disadvantage in cpu time compared

with the traditional sgsim could be reduced by a

more e�cient programming of the fast Fouriertransform subroutine.A critical advantage of the proposed algorithm is

that it does not require any analytical variogram

model and hence o�ers the potential for a fullyautomatic conditional simulation procedure.

AcknowledgmentsÐThis work has been supported by theStanford Center for Reservoir Forecasting (SCRF),Stanford University and gained from the constant atten-tion of Professor Andre Journel. I also would like tothank Dr Tapan Mukerji for some illuminating discus-sions.

REFERENCES

Borgman, L., Taheri, M. and Hagan, R. (1984) Three-dimensional frequency-domain simulations of geologi-cal variables. In Geostatistics for Natural ResourcesCharacterization, ed. G. Verly, M. David, A. G.Journel and A. Marechal, NATO ASI Series Part 1,pp. 517±541. Reidel Publ.

Bracewell, R. (1986) The Fourier Transform and itsApplication. Mc-Graw Hill, Singapore, 474 pp.

Bruguera, J. (1996) Implementation of the FFT butter¯ywith redundant arithmetic. IEEE Transactions onCircuits and Systems Part II 43(10), 717±723.

Chu, J. and Journel, A. (1994) Conditional fBm simu-lation with dual kriging. In Geostatistics for the NextCentury, ed. R. Dimitrakopoulos, pp. 407±421, KluwerPubl., Dordrecht.

Deutsch, C. and Journel, A. (1997) GSLIB: GeostatisticalSoftware Library and User's Guide, 2nd edn. OxfordUniversity Press, Oxford, 340 pp.

Englund, E. and Sparks, A. (1988) Geo-EAS 1.2.1 User'sGuide. EPA Report # 60018/008. EPA-EMSL, LasVegas, NV, variously paged.

Gutjahr, A., Bullard, B. and Hatch, S. (1994) Joint con-ditional simulations and ¯ow modeling. In Geostatisticsfor the Next Century, ed. R. Dimitrakopoulos, pp.185±196. Kluwer Publ., Dordrecht.

Gutjahr, A., Bullard, B. and Hatch, S. (1997) Generaljoint conditional simulations using a fast Fourier trans-form method. Mathematical Geology 29(3), 361±390.

Gutjahr, A., Kallay, P. and Wilson, J. (1987) Stochasticmodels for two-phase ¯ow: a spectral-perturbationapproach. EOS Transactions American GeophysicalUnion 68(44), 1266±1267.

Journel, A. and Huijbregts, C. (1978) Mining Geostatistics.Academic Press, New York, 600 pp.

Kar, D. (1994) On the prime factor decomposition algor-ithm for the discrete sine transform. IEEE Transactionson Signal Processing 42, 3258±3260.

Lam, K.-M. (1995) Computing the inverse DFT with thein-place, in-order prime factor FFT algorithm. IEEETransactions on Signal Processing 43, 2193±2194.

McKay, D. (1988) A fast Fourier transform method forgeneration of random ®elds. M.Sc. Thesis, NewMexico Institute of Mining and Technology, Socorro,92 p.

Nevels, R. (1993) Fourier transform path integral method:numerical technique for scalar scattering in inhomo-geneous regions. IEEE Proceedings Part H 140 , 488±494.

Pardo-Iguzquiza, E. and Chica-Olmo, M. (1993) TheFourier integral method: An e�cient spectral methodfor simulation of random ®elds. Mathematical Geology25(4), 177±217.

Yao, T. (1997) Conditional spectral simulation with phaseidenti®cation. Mathematical Geology (in press).

Yao, T. and Journel, A. (1997) Automatic modeling of(cross) covariance tables using Fast FourierTransform. Mathematical Geology (in press).

Specsim: for conditional spectral simulation in 3D 921