Delivery Massager: A tool for propagating seismic ... · PDF fileComputers & Geosciences 33...

19
Computers & Geosciences 33 (2007) 630–648 Delivery Massager: A tool for propagating seismic inversion information into reservoir models James Gunning a, , Michael E. Glinsky b , Chris White c a CSIRO Division of Petroleum Resources, Bayview Ave, Clayton, Vic. 3150, Australia b BHP Billiton Petroleum, 1360 Post Oak Boulevard Suite 150, Houston, TX 77056, USA c Department of Petroleum Engineering, CEBA Building Room 3516, Louisiana State University, Baton Rouge, LA 70803, USA Received 23 February 2006; received in revised form 8 September 2006; accepted 10 September 2006 Abstract We introduce a new open-source program for transforming inversion data from the open-source Delivery seismic inversion software to industry-standard cornerpoint grid formats suitable for reservoir modelling and flow simulations. The seismic inversion data produced by Delivery is an array of trace-local stochastic samples from a Bayesian posterior distribution of reservoir layer parameters, which contains complex correlations between layers boundaries, rock properties and fluid information, but no transverse correlations. This correlation structure is merged with lateral correlation requirements imposed by geological modelling inputs to the conversion process, thus producing cornerpoint grid models of the reservoir that honour seismic inversion, well data, and the desired lateral continuities. Realisations from the joint ‘structural-stochastic’, multi-property 3D correlated model can be drawn using a generalised p-field simulation algorithm. Distribution of volumetric quantities of commercial interest (e.g. net-hydrocarbon) can be directly generated. The software can produce both most-likely cornerpoint grids, and stochastic grids, which can be carried forward into production forecast studies for risking and uncertainty studies. r 2006 Elsevier Ltd. All rights reserved. Keywords: Seismic; Inversion; Shared earth model; Cornerpoint grid; Bayesian; Stochastic; Downscaling; Geostatistics; Open-source 1. Introduction At the time an oil or gas field is being appraised or developed, the development of a reservoir model usually centres on the task of building computer models suitable for forward flow simulation. Prior to this, much of the work will have focused on data acquisition and interpretation, and the construction of models suitable for simple volumetric calcula- tions or drilling decisions. In particular, much of the interpretative work will be based on surface seismic data, and this is routinely fed into various inversion routines which produce pointwise (trace-local) estimates of the properties of direct interest, such as surface positions, layer thicknesses, hydrocarbon content, net-to-gross etc. In previous publications (Gunning and Glinsky, 2004, 2006), 1 we have introduced an open source tool Delivery that enables users to perform a fully ARTICLE IN PRESS www.elsevier.com/locate/cageo 0098-3004/$ - see front matter r 2006 Elsevier Ltd. All rights reserved. doi:10.1016/j.cageo.2006.09.004 Corresponding author. Tel.: +61 3 95458396; fax: +61 3 95458380. E-mail address: [email protected] (J. Gunning). 1 Delivery website: follow links from http://www. petroleum.csiro.au

Transcript of Delivery Massager: A tool for propagating seismic ... · PDF fileComputers & Geosciences 33...

ARTICLE IN PRESS

0098-3004/$ - se

doi:10.1016/j.ca

�Correspondfax: +613 9545

E-mail addr

Computers & Geosciences 33 (2007) 630–648

www.elsevier.com/locate/cageo

Delivery Massager: A tool for propagating seismic inversioninformation into reservoir models

James Gunninga,�, Michael E. Glinskyb, Chris Whitec

aCSIRO Division of Petroleum Resources, Bayview Ave, Clayton, Vic. 3150, AustraliabBHP Billiton Petroleum, 1360 Post Oak Boulevard Suite 150, Houston, TX 77056, USA

cDepartment of Petroleum Engineering, CEBA Building Room 3516, Louisiana State University, Baton Rouge, LA 70803, USA

Received 23 February 2006; received in revised form 8 September 2006; accepted 10 September 2006

Abstract

We introduce a new open-source program for transforming inversion data from the open-source Delivery seismic

inversion software to industry-standard cornerpoint grid formats suitable for reservoir modelling and flow simulations.

The seismic inversion data produced by Delivery is an array of trace-local stochastic samples from a Bayesian posterior

distribution of reservoir layer parameters, which contains complex correlations between layers boundaries, rock properties

and fluid information, but no transverse correlations. This correlation structure is merged with lateral correlation

requirements imposed by geological modelling inputs to the conversion process, thus producing cornerpoint grid models of

the reservoir that honour seismic inversion, well data, and the desired lateral continuities. Realisations from the joint

‘structural-stochastic’, multi-property 3D correlated model can be drawn using a generalised p-field simulation algorithm.

Distribution of volumetric quantities of commercial interest (e.g. net-hydrocarbon) can be directly generated. The software

can produce both most-likely cornerpoint grids, and stochastic grids, which can be carried forward into production

forecast studies for risking and uncertainty studies.

r 2006 Elsevier Ltd. All rights reserved.

Keywords: Seismic; Inversion; Shared earth model; Cornerpoint grid; Bayesian; Stochastic; Downscaling; Geostatistics; Open-source

1. Introduction

At the time an oil or gas field is being appraisedor developed, the development of a reservoir modelusually centres on the task of building computermodels suitable for forward flow simulation. Priorto this, much of the work will have focused on dataacquisition and interpretation, and the constructionof models suitable for simple volumetric calcula-

e front matter r 2006 Elsevier Ltd. All rights reserved

geo.2006.09.004

ing author. Tel.: +61 3 95458396;

8380.

ess: [email protected] (J. Gunning).

tions or drilling decisions. In particular, much of theinterpretative work will be based on surface seismicdata, and this is routinely fed into various inversionroutines which produce pointwise (trace-local)estimates of the properties of direct interest, suchas surface positions, layer thicknesses, hydrocarboncontent, net-to-gross etc.

In previous publications (Gunning and Glinsky,2004, 2006),1 we have introduced an open sourcetool Delivery that enables users to perform a fully

.

1Delivery website: follow links from http://www.

petroleum.csiro.au

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648 631

probabilistic seismic inversion for a layer-basedmodel of the reservoir. This is a trace-basedinversion, so it produces an ensemble of realisationsof the relevant reservoir parameters at each point inthe imaged seismic grid over a field. The inversiondata produced by this program is suitable foranswering the simple kind of questions mentionedabove, such as pointwise histograms of layerthickness, maps of hydrocarbon probability etc,but is not directly suitable for flow calculationsper se.

For the calculation of volumetric (not pointwise)uncertainties, and the task of flow simulation, it isnecessary to carry these inversion calculations overto grid formats that are more directly useful in 3Dvolumetric calculations and flow calculations. Var-ious types of 3D grids are in common use, butperhaps the most ubiquitous is the cornerpoint grid(Ponting, 1989), which is used in the commerciallydominant ECLIPSE family of flow simulators.2

Moreover, the effect of intertrace correlations in theseismic data (which is deliberately neglected inDelivery) can be approximately modelled in thisremapping calculation. The aim is to produce 3Dmodels that capture both transverse correlationsknown from either well data or analogues, and thevertical inter-layer and inter-property correlationsthat seismic inversion can reveal. The joint processof remapping and merging of correlations is one wehave dubbed ‘massaging’, hence the software name.

Since the inversion models are probabilistic, it isnatural for the remapped or ‘massaged’ models toinherit this probabilistic character. Objects ofinterest will then naturally be the ‘most likely’massaged model, as well as a suite of ‘realisation’models, which enable stochastic forward flowsimulations to be performed for risking or un-certainty evaluation purposes. Volumetric statisticsof interest can of course be calculated on the fly aswell.

The remainder of this paper is organised asfollows. In Section 2 we define the conceptualproblem in closer detail . The geostatistical smooth-ing estimator and simulation, containing most ofthe notation and requisite algorithms, is covered inSections 3 and 4. A brief description of the softwarefollows in Section 5. Section 6 provides an overviewof workflow issues, and some examples, both

2See Schlumberger ECLIPSE website, http://www.

slb.com/content/services/software/reseng/

eclipse_simulators/index.asp

synthetic and real life, follow in Section 7. Wepresent our conclusions in Section 8. Much of thetedious but necessary detail is relegated to Appen-dices, which will be helpful to readers wishing toobtain the software and run examples of their own.

We do not hope to offer exhaustive practicaldetails and illustrations from examples in this paper.It is intended to serve chiefly as a technicalstatement of the generic motivation, algorithmsand code operation for later reference, though wehope the examples of Section 7 are a sufficient hors

d’oeuvre for readers. We expect to publish severalpapers illustrating field examples and discussingpractical issues at more length in the near future,along the lines of Glinsky et al. (2005).

2. Problem definition

The trace-based Bayesian inversion model im-plemented by Delivery produces an ensemble ofrealisations from the posterior distribution of themodel parameters at each common midpoint(CMP) gather, or trace, of the imaged seismic data.At each trace, the inversion model is quasi 1D, witha sequence of layers parametrised by times describ-ing the (local) geometry, and each layer is char-acterised by a laminated mixture of permeable andimpermeable rocks, with rock velocities, density,porosity and fluid content as additional modelparameters. The depths of each layer are computedfrom relative traveltimes and velocities, hung from anominated reference layer and supplied referencedepth. For the purposes of reservoir simulation, themodel parameters of interest are the layer depth d,the thickness, net-to-gross NG (or NG), fluidcontent net-hydrocarbon, and porosity (toname the interesting quantities accessible fromDelivery inversions in typewriter font). TheMonte Carlo ensemble produced by the inversionencapsulates the coupling or correlations betweenthese properties which is demanded by consistencywith the seismic data and the prior model.

The imaged traces are typically spaced anywherefrom 15 to 200m apart, in a regular array, and theinversion does not model the coupling that mayoccur between model parameters at different traces,chiefly in order to make the inversion problemtractable (a more detailed discussion of these issuescan be found in Gunning and Glinsky, 2004). Verystrong lateral correlations are induced in the mean(or most-likely) posterior models by the prior andseismic data, but the overall distribution describing

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648632

the model fluctuations formed by a naive resam-pling from the Delivery outputs is a product oftrace-local distributions, and thus contains nolateral correlation. A necessary and strong qualifi-cation to this statement is that any spatial inter-polations of the Delivery outputs will necessarilyinduce correlations via the interpolation algorithms,and indeed we often recommend running theinversion on relatively coarse spacings and usinginterpolation to smooth; this has the merit ofreducing the inversion run-time considerably.

Geologists are accustomed to thinking of trans-verse correlations in terms of ‘characteristic’ bodysizes and depositional directions. Large scale bodyshapes will usually be explicitly visible in theseismic, and thus will propagate into the meanposterior models. The residual fluctuations aboutthese means, for many environments, are mostsimply characterised by two-point statistics and adistance metric which reflects depositional direc-tions, a construct which is familiar to geologists asthe conventional semivariogram. Continuity ofsurfaces is broken at fault locations, though manyinternal properties may be preserved across thefault. Faulting is usually modelled explicitly inreservoir geomodelling packages like PETREL orGOCAD, and these faults will be embedded in thecornerpoint grids we use as the receptacle for themassaging process. Additionally, hard data forvarious properties will be available at well locationsthat have been logged.

It is clear that the combined spatio-multi-prop-erty posterior distribution we are able to build,having neglected inter-trace correlations in theinversion, will be a constructed entity. The overalldimensions of the problem, for a large model, willbe 106 parameters or more, so perhaps the onlycomputationally feasible way to proceed is to mergethe first and second order statistics from theinversion with the second order statistics implicitin the variograms in a pseudo-Gaussian framework.In terms of second order statistics, it is natural tothink of the correlation matrix of the overallstructure as a block matrix, with the inversionensemble furnishing the blocks for the inter-property correlations at each location, and thespatial variogram defining how off-diagonal blocksare coupled. The overall correlation matrix is then adirect (or Kronecker) product of correlation ma-trices, and the natural and efficient approximationto sampling from the Gaussian distribution at-tached to this correlation is a generalised p-field

algorithm. The great advantage of this approach isthat it is only necessary to form approximations tothe first and second order statistics (mean andcovariance), and then simulation is direct.

Some approximations are required in forming thestatistics from the seismic inversion ensemble. All ofthe quantities of interest are non-negative, and willbe approximately Gaussian if the forward seismicmodel is reasonably linear over the support of theprior (e.g. the thickness of a reservoir layer that iswell above seismic resolution). But there are regionswere approximate linearity does not hold, andmodel parameters are also often truncated at oneend, so their posterior univariate distribution is amixture of a spike at the truncation and acontinuous tail (see especially the first example inSection 7, and Fig. 4). The median value is then amuch better statistics for defining a most-likelymodel, since the mean of a skewed or truncateddistribution is less likely than the median. Especiallyin the case of thicknesses, use of the mean statisticcan often generate thin layers (sub seismic-resolu-tion) over extensive areas of space. Obviously themulti-Gaussian model is a heavy approximation inthis regime, so the means in the distribution have tobe adjusted in this way to eliminate the worst biases.Output samples drawn from the ‘massaged’ dis-tribution are obviously truncated in the samefashion. Some further interesting aspects of thethin-layers problem are discussed in Appendix E.

2.1. Gridding considerations

The input-grid formed by the x; y locations of thesequence of seismic traces is usually regularlysampled transversely, but the inversion region mayhave been confined to some polygon of interest.This grid may or may not strictly contain theextremity of the desired output grid. See Fig 1.Typically from the inversion, we have available thedistribution of (among others) layer-thickness, NG,layer-top depth, and net-hydrocarbon for thesequence of model layers at each trace x; y location.

Conversely, reservoir geological models areusually built with uneven spatial sampling, andoften with less transverse resolution than thatavailable in the seismic inversion. Various kinds ofgrid geometry are possible (Deutsch, 2002), but wehave chosen the widely used cornerpoint grid (seeFig. 2) format for exporting inversion informationto reservoir modelling packages. These grids areused by the ECLIPSE reservoir simulator, so we use

ARTICLE IN PRESS

x x

y y

a b

Fig. 1. (a) Typical layout of input-grid trace array for seismic inversion: regular spaced points in a polygon. (b) Typical output grid for

some layer, derived from ECLIPSE-style corner point grids with replication of grid points at fault planes. Different symbols identify

segments or fault blocks.

B

layer 1

layer 1layer 2

layer 2

A

Fig. 2. Architecture of corner point grids. Typical vertical fault

shown. Each layer’s output grid is formed from x; y projections of

edge midpoints (little circles). Thickness and depth information

can be shared by blocks that meet at a common points (A), but

this information must be replicated at corners along a fault plane

(B).

J. Gunning et al. / Computers & Geosciences 33 (2007) 630–648 633

the adjectives ‘cornerpoint’ and ‘Eclipse’ as looselyinterchangeable.

Cornerpoint grids specify lines for the ‘vertical’corners of each column of gridblocks, and a set of 8depth ðzÞ points which define the top and bottomface of any particular gridblock. (The faces are notstrictly planar, but flow calculations make suitableprojections so as to conserve mass and representflux correctly). Blocks are indexed by an i; j; k triple,and usually many blocks are tagged as ‘inactive’ ifthey represent an uninteresting region of space. Thefile formats consist of chunks denoting the grid size,local origin, block-corner lines (COORD), corner-depths (ZCORN), and block-centred properties,such as ‘active’ flags, and segment labels.

For the massaging calculation, we form, for eachlayer, a 2D output grid comprising the ðx; yÞ

projections of the midpoints of the edges of eachcorner point block (see little circles in Fig. 2). Eachsuch point has an associated ‘segment’ or ‘fault-block’ tag, and points along the fault plane arerepeated according to the number of intersectingsegments.

A typical plan view of the cornerpoint geometry isshown in Fig. 1(b). In the algorithms describedbelow, all properties are interpolated or simulatedat the corner points. Block centred properties likeporosity are later formed by suitable 4-corneraverages (e.g. thickness-weighted averages, or moreelaborate weights based on integration of theJacobian (Peaceman, 1996)).

3. Smoothing and simulation algorithms

The overall simulation process is perhaps easierto describe in words than mathematically. Typi-cally, we concentrate on the properties fdepth, net-sand, thickness, net-hydrocarbon, and porosityg,but subsets of these or an augmented list can beused if the context permits. Roughly speaking, wespatially smooth the means and covariances of themulti-property Delivery output ensembles to pro-duce a smooth trend map for each property and asmooth between-properties trend covariance. Thetrend map may be allowed to have discontinuities atfaults for certain properties. The property trends arethen deformed by a kriging adjustment from wellobservations to produce a trend that passes throughall hard observations. The kriging-variance mapsproduced in the kriging calculation are normalised

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648634

and stored for each property, for later use. Themaps may be truncated or clipped depending onconsistency requirements for the properties (e.g. net-sand will be clipped to less than total thickness). Thetrend maps then constitute the most-likely maps ofproperties. The uncertainty maps are computedfrom the diagonal entries of the smooth trendcovariance multiplied by the kriging variance maps:the square root of this product is then a local‘standard deviation’ for each property, whichhonours the inversion uncertainties and the welldata.

To generate realisations, a set of normalised,spatially correlated random fields (p-fields) aresimulated for each property and layer. At eachspatial location these fields are then mixed in alinear combination described by the Cholesky factorof the smoothed between-properties trend covar-iance. The final set of fields are then scaled by thenormalised kriging-variance maps and added to thetrend maps to produce a series of realisations.

The actual program execution follows the steps ofSections 3.2 and 3.3 reasonably literally, but we willneed some notation first.

3.1. Notation

In general there exists a seismic grid on which theinversion is run, which we call the input grid (GI ).The properties are to be generated on a differentgrid, called the output grid (GO). This is treated as asequence of 2D grids for each layer, GO;l . The indexl pertains to layers, p to properties, j to nodes on GI

or a particular GO;l (as arranged in convenientordering—say a raster scan). The set of hard wellobservations (O) may be suffixed l or p with impliedconstraint to layer l or property p. A vector m ofproperties of interest may be suffixed mðl;pÞ, whichdenotes a generic unrolled index of property p onlayer l. Segment labels for node j are denoted Sj.

The local neighbours of node j are denoted byj0�j, or j0 2 qj. Neighbours are defined by aEuclidean distance metric confined to the samelayer, with azimuth angle and principal rangesinherited from a conventional variogram specifiedby the user. Neighbours used in the trend smoothingare defined by the trend-smoothing variogram (withassociated covariance Csmð�Þ), whereas observation-kriging and simulations are associated with aseparate, layer-specific ‘interpolation’ variogram(associated with covariance Cð�Þ). Since the gridsare large and irregular in general, a kd-tree

algorithm is used for efficient nearest neighboursearching (Skiena, 1997). Nearest neighboursearches in the sequential simulation algorithmsmust be confined to previously visited nodes, andthis is achieved by a naive dynamic kd-treeimplementation.

3.2. Initialisations

3.2.1. Re-ordering of properties

Internally, the property vectors are re-ordered tothe following sequence: fdepth, thickness, net-sand,other properties. . . ;NGg, if all the italicised proper-ties are available. ‘‘Other properties’’ can includeporosity, net-hydrocarbon, or any other propertyDelivery makes available that might be of interest insubsequent work (typically those explicitly justnamed are sufficient). This enables truncation rulesto be sensibly applied from known quantities laterin the calculation.

3.2.2. Input grid segmentation

Fault-sensitive smoothing of the Delivery statis-tics requires a segment label to be attached to eachinput grid point. In corner-point style grids,segments labels are associated with block centres.The input grid can then naturally inherit thesegment label associated with the corner-point gridblock in which it falls, as computed for the user-specified reference layer.

3.2.3. Some notes on Kriging

Kriging is used in the ensuing material for bothintegrating well observations and interpolating fromthe input to the output grid. Interpolation krigingcalculations are performed with a fixed number ofnearest neighbours, typically 8. For well observa-tion kriging, all hard-data values are used, and forthe sequential simulation routine described later,around 25 neighbours are used. Because the outputgrid may contain coincident points, and alsobecause we allow the use of pure Gaussianvariograms, some ill-conditioned kriging systemscan arise. Robust solution of these is performedusing an adaptation of the Schnabel–Eskow mod-ified Cholesky decomposition (Schnabel and Eskow,1999).

3.2.4. Well observations

For each layer l, for the observation q at locationrq, we construct and solve the ordinary kriging (OK)

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648 635

system for fwj0 ; gg,Xj002qq

Cðrj0 ; rj00 Þwj00 þ g ¼ Cðrj0 ; rqÞ; j0 2 qq � GO,

Xj002qq

wj00 ¼ 1, ð1Þ

where the covariance C used is that proper tointerpolation for the layer, with unit sill. We store adata structure for the kriging weights and neigh-

bours, viz. fwðOÞðl;qÞ;j0 ; j

0 2 qq � GOg, writing all the

bookkeeping. This is used in Eq. (6).

3.2.5. Grid interpolation

For each layer l, at the output grid locationj 2 GO, we construct and solve the OK system forinterpolation from the input grid to the output gridXj002qj

Cðrj0 ; rj00 Þwj00 þ g ¼ Cðrj0 ; rjÞ; j0 2 qj � GI

Xj002qj

wj00 ¼ 1, ð2Þ

using, again, the interpolation covariance with unitsill. We save a data structure for the kriging weightsand neighbours fw

ðGI Þ

ðl;jÞ;j0 ; j0 2 qj � GIg. This is used in

Eq. (14).

3.2.6. Smoothing

If mðGI Þ

l;p;j is the p50 statistic from the Delivery

inversion for property p, layer l, location j 2 GI , wesmooth this onto the output grid using a movingaverage filter whose weights are based on thecovariance Csmð Þ specified by the trend-smoothingvariogram. Specifically,

mðGOÞ

l;p;j ¼1

N

Xj0�j

W l;p;j0 ;jmðGI Þ

l;p;j0 ; j 2 GO; j0 2 GI , (3)

where the weights W are defined by

W l;p;j0;j ¼Csmðrl;j0 ; rl;jÞ

0 j0 and j not in same segment; and p

discontinuous across faults;

1 otherwise

8>><>>:

ð4Þ

and the normalisation constant N �P

j0�jW l;p;j0;j .A larger number of nearest neighbours are usedhere, typically 50 or so.

For the covariances, the full covariance matrix(coupling all layers and properties) is smoothed backonto the input grid (for reasons which will become

apparent later), without regard to segmentation. Thesegmentation is ignored, as uncertainties can beexpected to be continuous across faults. In accordwith the usual rules for the sum of independentrandom processes (and also, conveniently, to ensurepositive definiteness), the smoothed covariance is

CðGI Þ

l;p;l0 ;p0 ;j ¼1

N0

Xj0�j

W 2l;p;j0;jC

ðGI Þ

l;p;l0 ;p0 ;j0; j; j0 2 GI (5)

here, CðGI Þ

l;p;l0 ;p0 ;jis the Delivery covariance statistic for

property p, layer l with property p0, layer l0, evaluated

at location j 2 GI . The normalisation constant N0 is

the sum of the weights W 2l;p;j0;j.

It is also useful to interpolate the smoothed trendsurface at the well observation points (for later usein computing the trend residual, Eq. (7))

mðOÞl;p;q ¼

Xj0�q

wðOÞðl;qÞ;j0m

ðGOÞ

l;p;j0 , (6)

using weights w from Eq. (1).FFT based methods for smoothing are awkward

to use for this problem, on account of thesegmentation and the irregular grid.

3.2.7. Trend adjustment from well observations

A final initialisation calculation is the adjustmentof the trend surface via simple kriging (SK) so itpasses through the well data. For each layer andproperty, at each location j 2 GO we compute theresidual trend adjustment

DmðGOÞ

l;p;j ¼X

q2Ol;p

wqðmðOÞl;p;q � m

ðOÞl;p;qÞ; j 2 GO, (7)

where mðOÞl;p;q is the qth observation of property p on

layer l. The simple kriging weights wq are the

solution of the set of equationsXq02Olp

Cðrq; rq0 Þwq0 ¼ Cðrq; rjÞ; q 2 Ol;p; j 2 GO.

(8)

Again, the covariance Cð�Þ used in this SK step isnormalised to unit sill. The new trend surface is thendefined to be

m0ðGOÞ

l;p;j ¼ mðGOÞ

l;p;j þ DmðGOÞ

l;p;j ; j 2 GO, (9)

using Eqs. (3) and (7).We store also the kriging variance

s2l;p;j ¼ 1�X

q2Ol;p

wqCðrq; rjÞ; j 2 GO (10)

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648636

which is used in the subsequent p-field simulation,Eq. (15).

A final step in the trend adjustment is applicationof a set of truncation rules. The loop over propertiesp occurs innermost in the calculation, and theinternal ordering of properties described earlierenables successive application of these rules: (i)net-sand ¼ min(net-sand, thickness), (ii) NG ¼ net-sand/thickness, (iii) p ¼ maxðp; 0Þ, (iv) if p is normal-ised, p ¼ minðp; 1Þ.

3.3. Realisations

Realisations are generated using a generalised p-field technique (Deutsch and Journal, 1998), whichrequires a set of unconditional correlated realisa-tions on the output grid. There are various ways todo this, but the sequential simulation technique ismost easily adapted to the unstructured grid.

Some notation and apparatus is necessary. For eachlayer l, we construct a pseudo-multigrid path Pl ,which is a visiting sequence for all the nodes in thelayer. The sequence is pseudo-multigrid in the sensethat the grid nodes are visited in a sequence derivedfrom a breadth-first traversal of a binary treerepresentation of the nodes. This ensures that widelyspaced points are visited early in the path. For thevisited node j, we denote by qj the nearest neighbour-ing points of j that have already been visited, up tosome maximum of Nn neighbours, and with thenotion of distance derived from the layer variogram.We will generate and store a ¼ 1 . . .NR realisations ateach grid point during the path traversal.

At node j, the conditional distribution for the p-fieldxl;p;j;a is Nðml;p;j;a; s

2l;p;jÞ, where the conditional mean is

ml;p;j;a ¼Xj02qj

wðSKÞ

j0 x

l;p;j0;a, (11)

the conditional variance (geometry dependent only) is

s2l;p;j¼ 1�

Xj02qj

wðSKÞ

j0 Cðj

0; jÞ, (12)

and the simple kriging weights in these last tworelations are the solution of the SK systemXj002qj

Cðrj0 ; r

j00 ÞwðSKÞ

j00 ¼ Cðr

j0 ; rjÞ; j

02 qj � GO. (13)

hmðRÞl;p;jm

ðRÞ

l0 ;p0 ;j0i ¼

SðWOÞl;p;j S

ðWOÞ

l0;p0 ;jCðGOÞ

l;p;l0 ;p0 ;j Sam

SðWOÞl;p;j S

ðWOÞ

l0;p0 ;j0CðGOÞ

l;p;l0 ;p0 ;j0Cðrj ; r0jÞ Sm

8><>:

Again, the variogram is normalised, so the p-fields xhave univariate distribution Nð0; 1Þ. The fields xl;p;j;a

are then drawn from the distribution Nðml;p;j;a;s2l;p;jÞ

and stored, in a fully nested loop on l, j, p and a.These p-fields x are now unconditional correlated

fields that contain the necessary spatial correlationon the output grid, but honour neither the inter-property/ inter-layer correlations from the seismicinversion nor the hard well data.

To introduce the inter-property/layer correla-tions, a local interpolated covariance matrix iscomputed at each node j 2 GO;l (in a conventionalloop over the output grid l) as

CðGO;l Þ

l;p;l0;p0 ;j ¼1

N

Xj2qj

ðwðGI Þ

l;j;j0 Þ2CðGI Þ

l;p;l0 ;p0 ;j0 ; j0 2 qj � GI ,

(14)

using the saved OK/interpolation weights from Eq.(2). The normalisation N is again defined as thesum of the squared OK/interpolation weights:squaring is used again to ensure positive definite-

ness. Define by LðGO;l Þ

j the conventional (left)

Cholesky factor of fCðGO;l Þ

l;p;l0 ;p0 ;jg where we unroll the

indices l; p in the usual way. Realisations are themcomputed on the fly by ‘mixing’ the correlated p-fields and adding back the trend (Eq. (9)):

mðRÞl;p;j;a ¼ S

ðWOÞl;p;j

Xl0 ;p0

LðGO;l Þ

l;p;l0 ;p0 ;jxl0 ;p0 ;j;a þ m0ðGOÞ

l;p;j ; j 2 GO;l ,

(15)

using the diagonal scaling matrix SðWOÞl;p;j � sl;p;j

computed from Eq. (10). This is the p-field mixingEq. which imposes the inter-property/layer correla-tions and well constraints on the correlated fields toproduce the realisations. A final step consists of

imposing the property truncation rules on mðRÞl;p;j;a, as

per the mean trend calculation.Under this construction, the covariance of the

residuals DmðRÞl;p;j;a (the first term on the RHS of

Eq. (15)) can be shown to have these reasonablespecial cases

e location; j ¼ j0;

oothed inversion statistics match at j; j0:ð16Þ

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648 637

4. Downscaling, or ‘decoration’ algorithms

In most realistic applications, fluid flow will besensitive to the manner in which impermeable facies(we use the placeholder ‘‘shales’’) are spatiallydispersed within the ‘meso-scale’ reservoir layersused for the inversion. Capturing this effect willrequire subdivision of the vertical gridding andsuitable categorical simulation of the shales within ameso-scale layer.

This categorical simulation must be consistent withthe net-to-gross NG obtained from the seismicinversion, or, equivalently, a ‘massaged’ realisation.The inversion forward model uses an effective-mediumapproximation based on a separation of length scalesbetween the vertical spatial scales characterising theshale distribution and the seismic wavelength. In thisregime, the effect of the shale on the seismic response isthen captured by an effective macroscopic parameter,the layer net-to-gross (NG), via the Backus average.The model also assumes a laminated distribution ofshale, which is a respectable assumption for reservoirswhere internal shales are gently dipping.

We have implemented a ‘‘demonstration solu-tion’’ to this problem using truncated Gaussianfields (LeLoc’h and Galli, 1996); more details aregiven in Appendix D. Users are expected to furnisha 3D variogram describing the spatial continuity ofthe underlying Gaussian field, which can beestimated in consultation with a geologist. Thisvariogram is embedded in the (normalised) covar-iance function CTGð Þ.

The algorithm below is somewhat heuristic, butvery efficient, and strikes a good compromisebetween the connectivity embedded in the vario-gram and the coarse-scale constraints. It may beloosely described as a greedy, optimising, sequentialtruncated Gaussian simulation.

Conditional on some known realisation of NG onthe coarser grid:

Vertically subdivide the layer l into a more finelymeshed grid GOD, with whatever style of griddingis appropriate, preserving the lateral spacing.Suppose there are NZ fine gridblocks in a subgridcolumn. � Form a multigrid traversal path for GOD,comprising an outer 2D multigrid path Pcol for‘column’ visiting, and a inner 1D path Pz forvisiting gridblocks within the chosen column.

3Delivery website: follow links from http://www.petroleum.

csiro.au

At each column in the outer path, loop overblocks j 2 Pz in the column, forming and solving

the set of SK equation for each block, condi-tioned on the nearest known blocks frompreviously visited columns and previously visitedblocks in the current column. The SK systems usethe covariance CTGð Þ. We store the weights

wðSKÞ

ðjÞ;j0 ; j02 qj for all Nn nearest neighbours j

0of

all blocks j in the column.

� From the coarse grid simulation or map of NG atthis column, use the local threshold y ¼ G�1ðNGÞ

to form the truncated Gaussian field, whereG�1ð Þ is the inverse Normal CDF. If the under-lying coarse grid simulation is spatially smooth(expected), the threshold y will be as well.

� Form a set of, say, a0 ¼ 1 . . . 50 realisations Z ofthe underlying Gaussian field for the currentcolumn, by repeatedly running the sequentialsampler over the column path, using the pre-stored weights and the conditional cdfsNðmj;a0 ; s

2jÞ, with conditional mean

mj;a0 ¼Xj02qj

wðSKÞ

j0 Z

j0;a0 , (17)

and conditional variance

s2j¼ 1�

Xj02qj

wðSKÞ

j0 Cðj

0; jÞ. (18)

This is very fast, requiring only OðNzNnÞ flopsper simulation. We greedily accept the simulation

whose associated truncated field ZTGj;a0¼ HðZj;a0 � yÞ

best matches the column NG (a columnwise sum),and proceed to the next column in the 2D multigridcolumn path.

The complexity of this algorithm is only a smallmultiple of the workload of a conventional sequen-tial simulation, typically Oð103Þ flops per node.

The field-case example of Section 7.2 illustratessome realisations drawn using this algorithm,especially Fig. 10.

5. The software

The software is written in ANSI C, and dis-tributed along with the open-source Delivery andWaveletExtractor codes (Gunning and Glinsky,2004, 2006).3 Library dependencies are all opensource. It contains an ECLIO library for handlingECLIPSE-style cornerpoint grids, and links to the

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648638

high performance ATLAS library for the intensivelinear algebra work (Whaley et al., 2001). Thesupplied kd-tree range-search library is based onRanger from Stonybrook (Skiena, 1997). For largemodels, the grid smoothing is intensive as well as thesequential simulation, and RAM sizes over 1Gbmay be required.

Compilation instructions are provided in theREADME file at the top level of the source tree.Installation of the third party ATLAS, glib, andlibxml libraries is straightforward on any variety ofUnix/Linux, but should also be possible on otherarchitectures with an ANSI compiler. The binariessupplied will be valid for current Intel Linuxarchitectures.

6. Workflows and context

This software is expected to be used at a point inthe reservoir characterisation workflow where theimpact of reservoir uncertainties on business deci-sions is crucial, often at the appraisal or earlydevelopment stage. Since model-based inversion (asused in Delivery) is the only real way to integrate thecoupling between rock properties, fluid content andgeometric structure into volumetric uncertaintyestimates, the real benefit of this software is thecapacity to do this calculation at the time ofmaximum business opportunity, i.e. using all ofthe rich information available from seismic inver-sion to produce reservoir models with full uncer-tainty statements. Approximate methods ofintegrating seismic data, such as simple cokrigingapproaches, cannot hope to encapsulate this rich-ness. The software is designed so its outputs can beimmediately read back into the geomodellingpackages used to set up the inversion, so thisinformation is then available in the original model-ling environment.

Very little extra work is required to run the‘‘massaging’’ process compared to setting up andrunning the Delivery inversion. Typically, the latterrequires the setup of a ‘‘prior’’ model (within ageomodelling package), which comprises: (1) pick-ing seismic surfaces, (2) picking faults, (3) inter-spersing layer surfaces of subseismic layers,(4) kriging NG and/or isopach maps (and std.deviations) from well data, (5) kriging fluid prob-ability maps from well and/or contact data. Thisinformation is exported on the seismic grid forrunning Delivery (and bundled into SU format bythird party utility routines, e.g. Matlab scripts), and

the receptacle cornerpoint ‘‘container’’ grid to beused in the post-inversion massaging process can beexported from the same model. The meso-layer welldata to be used in the massaging process (thickness,net-sand, NG, depth, net-hydrocarbon, porosity)will be available from the same modelling package.Estimates of transverse variogram ranges for themassaging step are also routinely obtainable fromthese packages or analog geological models. Oncethe inversion is run (often a very CPU intensivecalculation), the only further work required for themassaging step is producing the compressed sum-mary-statistics analysis file from the inversion (usedin Eqs. (3) and (5); see also the examples below),and preparing the XML master file for the massa-ging step.

Permeability information, while critical to flowcalculations, is very rarely directly informative ofseismic character (with some exceptions, e.g. De-Martini and Glinsky, 2006). We expect permeabilitywill likely be co-simulated/kriged from porositydata in the modelling packages after the massagedrealisations or most-likely models have been re-imported, i.e. as a post processing step.

The chief emphasis of the Delivery software andits companions is to perform model-based prob-abilistic seismic inversion (and the consequentpredictions) correctly, rather than simply, naively,and probably wrongly. This emphasis and its open-source nature require it to exist independently ofcommercial modelling packages, so the requiredinput data is usually exported from such packages.Since oil companies are likely to remain dependenton such proprietary modelling packages indefinitely,the software infrastructure to expedite this tediouspreparatory work is best implemented as a moduletightly integrated to a company’s chosen modellingpackage: the scientific tasks therein are rathermundane and ill-suited to incorporation in theDelivery suite.

7. Examples

7.1. Example 1: simple wedge with graben-like fault

This very simple synthetic example has beenconstructed to illustrate some of the main con-siderations in constructing a workflow involving themassaging software. All the files referred to areavailable in the distribution tarball (see the3LayerFaultedWedge example directory), soare not listed here.

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648 639

This model is constructed as a 2D case forvisualisation simplicity. Fig. 3 shows a ‘truth-case’cross-section of the 40� 1 cornerpoint grid withseismic.

It is common to fix a reference depth layer to thestrongest reflection—often the top of a reservoir,which is chosen as the top of layer 2 (see alsoAppendix C). This reference is invisible when thesand pinches out, so is extrapolated horizontally forsimplicity. A depth uncertainty of sz ¼ 5m isattached to this surface in the Delivery prior; allother depths are referenced to this and computedfrom layer velocities and times. After the deliveryinversion is run, typically with

%delivery� PD� v3� RWS �N100�mprior_traces:suModelDescription:xml,

the summary file of statistics is generated for use inthe massaging step:

%deliveryAnalyser� irealisations:su�massage� analyseep; cdp; gx; gyn1; 2; 3d ; thickness; net� sand;NGmassage_analysis:mab

which produces a set of median and covariancestatistics for layers 1,2,3 and properties depth,thickness, net-sand, and NG in the file massa-ge_analysis.mab. The seismic header wordsep,cdp,gx,gy are reproduced in the file forspatial locations. This file will be very large for bigmodels, so special binary compression techniquesare used.

The detail of what happens with the statistics nearthe pinchout is interesting. Fig. 4 shows thehistogram of the layer-2 thickness computed fromexhaustive (5000 realisations) samples at four of the

0 10 20 30 40

2000

2050

2100

2150

depth

grid block number

layer 1

layer 3

layer 2

Fig. 3. Truth-case faulted 3-layer shale/sand/shale wedge model, with

seismic ‘interpretation’ in the cornerpoint grid are shown grayscale co

seismic (right inset) is sampled at 40m spacing, i.e. denser traces than

traces where the sand is thin. Note the evolutiontowards symmetric Gaussian-like distributions asthe layer thickens.

Producing corner-point style grids is thenstraightforward. An XML file Massager.xml iscreated with suitable entries for the requiredproperties, smoothing variograms, residuals’ vario-grams, and hard well data etc. A typical runtimecommand is then

%deliveryMassagerMassager:xml � v3� a�N10� �ecl

which would produce 10 realisations of the corner-point grid, plus the p50 model, in files with obvious

names like MassagedEclPropertiesLayer* and suitablesuffixes. See Appendices A and B for more details.

The layer depths extracted from the p50 statisticsat each seismic trace lack spatial continuity for tworeasons: (1) noise in the seismic traces feeding theinversion, and (2) sampling error in the MCMCensemble, which will usually scale like N�1=2 if theensemble has N samples, but may central limit moreslowly if the posterior contains many modes and/orthe modes have eccentric shapes (like pinchouts,which are ‘half-Gaussians’). The example above,with only 100 realisations, can be expected to havesubstantial sampling noise (in practice, morerealisations would be generated to reduce this).

2.0

2.1

2.2

tim

e

50 1000

trace number

sand layer of about 70% NG. Fault-block segments (based on

ded. This cornerpoint grid is based on a 100� 100m grid, but

grid blocks, which is a common situation.

ARTICLE IN PRESS

0 20 40 60 80 100

2000

2050

2100

2150

0 10 20 30 40

2000

2050

2100

2150

1.95

2.00

2.05

2.10

tim

e

depth

depth

a b c

Fig. 5. Issues in forming a cornerpoint model from undersampled inversion with no smoothing. (a) Layer depth p10, p50, p90 surfaces on

seismic grid. (b) Eclipse grid interpolated from seismic with very weak smoothing. (c) Inversion realisations on time scale, with obvious

increase in uncertainty in pinchout region. Notice how depth uncertainties increase where amplitudes disappear, since both event times and

reflection coefficients (and therefore velocities) cannot be inverted for.

0 5 10 15 200

50

100

150

200 2.00

2.05

2.10

10 20

frequency

tim

e (

s)

trace number (tracl)thickness

tracl=25

tracl=16

tracl=13

tracl=

12

medians

1213 16 25

Fig. 4. Smoothed histograms of reservoir (layer 2) thickness at four traces tracl ¼ 12; 13; 16 and 25 (shown at right). This thickness

distribution gradually evolves from a pure spike at thickness ¼ 0, through a mixed spike and minor mode ðtracl ¼ 13Þ, to a nearly

Gaussian single mode when amplitudes improve. Median (50% quantile) statistics are used in analysis to define most-likely value at each

trace, as highlighted on thickness axis.

J. Gunning et al. / Computers & Geosciences 33 (2007) 630–648640

Fig. 5 shows what the median model extracted fromthese samples will look like in both time and depth.

If we impose smoothing with an isotropicGaussian variogram of range 600m, and form amost-likely model and several realisations, thecornerpoint grids look like those depicted inFig. 6. The XML property attribute smooth_across_faults controlling continuity acrossfaults has been altered to produce the rather non-geological realisations of Fig. 6(d), for demonstra-tive purposes.

7.2. Example 2: a field case example—Stybarrow

The Stybarrow field off Western Australia hasbeen subjected to the full gamut of Delivery styleworkflow. A more comprehensive overview is given

in Glinsky et al. (2005). The field is an earlyCretaceous turbidite sandstone, whose structurecomprises a narrow, wedge-like NE-to-SW tiltedfault block, with normal faults providing closure tothe SW. Cross section and elevation views are inFig. 7.

Four wells were used for simultaneous waveletextraction, using the software of Gunning andGlinsky (2006). The coarse layer-based modelconstructed for Delivery inversion comprised of sixlayers in the sequence shale/thin-sand/thin-shale/main-sand/hard-shale/shale. The seismic inversionwas run only on traces within the fault block/hydrocarbon trap region. The asset geological teambuilt an ECLIPSE model of the reservoir using thesame layering, identifying about a dozen internalfaults and associated segments.

ARTICLE IN PRESS

0 10 20 30 40

2000

2050

2100

21500 10 20 30 40

0

10

20

30

40

50

60

de

pth

thic

kn

ess

mean

std. deviationwell observation

Layer 2 thickness

a b

c d

Fig. 6. (a) Cross section of most likely smoothed corner point model, with segments grayscale-coded. (b) p50 thickness and thickness

uncertainty of middle layer, showing effect of single well observation in the 10th gridblock. (c) Four typical model realisations, with NG

grayscale scale between dark (shale) and sand (light). Thickness and net-sand are continuous across faults. (d) Same as (c), but with

continuity of layer thicknesses etc not enforced across faults.

Fig. 7. (a) Plan and (b) elevation views of the Stybarrow Field, with elevation corresponding to down-dip direction along line passing

through four wells.

J. Gunning et al. / Computers & Geosciences 33 (2007) 630–648 641

Since one of the wells (Stybarrow 4) penetratedthe lower fluid contact, the uncertainty of chiefinterest was that of the net-sand volume within

closure above the known contact. Fig. 8 showsgrayscale maps of the p50 net-sand of the mainsand, with obvious short-scale transverse noise

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648642

caused by sampling error and various other sourcesof noise. The asset geologist suggested transversecorrelation lengths in the km range for the mainbodies in this field, and the smoothing effect of thison the p50 ‘massaged’ map is evident in Fig. 8(b).

The uncertainties in the main sand net-sandvolume are strongly influenced by the correlationlengths of the allowable body fluctuations, as the

%deliveryMassagerStybarrowMassager:xml � v4� a�N200� �stats.

extent to which the stochastic volumes will central-limit (within the fault-block integration area) to a

35

26.25

17.5

8.75

0

net-

sand (

m)

Stybarrow-2

Stybarrow-1

Stybarrow-4

Stybarrow-3

a

Fig. 8. Median maps of net-sand for Stybarrow main sand, (a) direc

smoothing variograms. These maps smooth across segments since post

Fig. 9. Realisations of the main sand net-sand map conditional on we

elevation. (b) The volumetric CDF is shown inset, with arbitrary units.

leading to much greater volumetric uncertainty than that obtained wit

sharply defined average is strongly controlled bythese lengths. The distribution of this volume wasestimated by drawing an ensemble of realisations ofnet-sand, conditioned on well data net-sand mea-surements, and integrating over the maps above thecontact level. The code produces ascii files withsummary statistics of 200 realisations by using thetypical runtime command

Fig. 9 shows typical realisations of the reservoirmain sand body generated in this way. The inset of

Stybarrow-3

Stybarrow-4

Stybarrow-1

Stybarrow-2

b

tly from Delivery inversion, (b) after massaging with long-scale

-depositional faulting is treated as normal.

ll data and seismic inversion constraints, (a) in plan view, (c) in

Correlation lengths used in the actual model were on a km scale,

h short correlation scales.

ARTICLE IN PRESS

NG realisation

a b

c d

Fig. 10. Downscaled, or ‘decorated’ realisations of main sand net-sand, for a particular NG realisation, shown in elevation along same

transect shown in Fig. 9(c).

J. Gunning et al. / Computers & Geosciences 33 (2007) 630–648 643

Fig.9(b) shows the CDF of the net-sand volumecomputed from these realisations, where the effectof shortening the transverse correlation lengths isdemonstrated with a second curve. With shorterfluctuation lengths, the overall integrated volume isnaturally less uncertain, with a sharper rise in theCDF. The variogram structures do not affect themedian volumetric statistics, as expected, since thisis only a function of the smoothing algorithm.

As an example of the ‘decoration’ algorithm,Fig. 10 shows typical ‘decorated’ layer imagesgenerated using the algorithms of Section 4, alonga particular cross section where the net-to-gross isquite high. The code produces a user-specifiednumber of decorations for each NG realisation ofthe coarser layer. In this case, the subgridding usesproportional gridding, with variogram distancesmeasured in the proportional sense within the layer.

8. Conclusions

The deliveryMassager program we have intro-duced in this paper is an essential tool for coercing

the stochastic seismic outputs from the Delivery

seismic inversion tool to formats suitable for flowsimulation or further 3D modelling and analysis. Itperforms a merging of expert-prescribed lateralcorrelations with the vertical correlations inferredin the inversion, which is essential for the generationof both realistic most-likely-case models and foruncertainty studies using stochastic realisations.Hard observations, faulting information, and seg-mentation requirements are honoured. The massa-ging process generates industry-standardcornerpoint grid formats usable directly by common3D modelling tools and flow simulators.

Acknowledgements

James Gunning and Chris White gratefullyacknowledge generous funding from the BHPBilliton technology program. Discussions withDidier Renard from the Ecole des Mines de Pariswere greatly appreciated.

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648644

Appendix A. Input files

When running the deliveryMassager code, veryfrequently changed runtime options are reserved forthe commandline: the executable deliveryMassager

self-documents if no arguments are supplied, forthose wishing to peruse these options. Otherwise, allinput parameters are specified in an XML file (seeA.1), but this will in turn reference other files thatmay be required:

%d

A mandatory summary file of the inversionstatistics, which contains trace locations andmedian and covariance statistics for each of theinversion quantities of interest in all the salientlayers. Once the inversion is run, with the rea-lisations in the file (say) realisations.su,this summary statistics file is generated using

eliveryAnalyser� irealisations:su�massage� analysenheaderwordslayer� numberspropertiesoutputfile.

Here, each of headerwords/layer-num-bers/properties is a comma separated list,as per the examples.

� If (optional) output grids in ECLIPSE stylecorner point grids are required, a ‘receptacle’corner point grid must be supplied, which hasthe same layering as the inversion model. Thecritical information gleaned from this file is thegeometry and fault blocking, so the fieldsPINCH, MAPAXES, GRIDUNIT, SPEC-GRID, COORDSYS, COORD, ZCORN,ACTNUM, and SEGMENTS will be required(SEGMENTS may be skipped, with the con-sequence that all blocks are assumed to be inthe same segment). These fields are routinelysupplied in the ECLIPSE files exportedfrom commercial modelling packages likePETREL. Readers are referred to ECLIPSEdocumentation for further detail on these fileformats.

If no corner point grid is supplied, the massagingcode can produce most-likely maps and realisationfiles on the same grid as the seismic inversion(‘duplicate’ mode), which is often very useful. Nofault block information is available when using thismode.

A.1. XML formats and schema

The XML format used to control the massagingprocess has a meta-description in the associatedMassager.xsd XML schema file, which can beused in the XML editor supplied with the Delivery

distribution to produce strictly legal XML files. Theformat of the XML is largely self-explanatory, but afew explanations may be helpful.

hdelivery_massage_analysis_filenamei tagsthe median and covariance statistics file formedfrom the inversion analysis step (Section Ap-pendix A). � hx-coordinate_header_wordi and hy-coordi

nate_header_wordi define the seismic headerwords, passed through in the deliveryAnalyser–

massage-analyse process, which set the trans-verse coordinates in local UTM coordinates.

They must correspond to the UTM coordinatesused in the input ECLIPSE files. If these seismicheader words are not available, local x, y

coordinates can be computed from inline/cross-line header words (always available) using thehutm-conversionsi block available through theschema. The x, y values read from the namedheader fields hx-coordinate_header_wordi andhy-coordinate_header_wordi are then takento be inline and crossline.

� If the hutm-conversionsi block is supplied, thiswill force the code to compute x, y’s from thelinear mapping from inline/crossline to x, y

implied by the three non-collinear {x,y,inline,crossline} 4-tuples supplied in this section.

� hproperty_name normalised=‘‘false’’

smooth_ across_faults ¼ ‘‘true’’i is a ty-pical property specification; normalisedforces truncation to ½0; 1, and smooth_across_faults will allow kriging/simulationneighbours to come from different segments.

� Variograms: hazimuthi specifications on allvariograms are GSLIB 2D convention: degreesclockwise, with x as Easting, y Northing.Lengths are in UTM units. � Eclipse input grids. Currently, a common inputgrid hECLIPSE_grid_filenamei is expected for

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648 645

all layers. hECLIPSE_segments_keywordi is ablock centred integer property that labels thefault blocks. Positive numbers are expected.hECLIPSE_reference_depth_layer_numberi isthe number of the layer in the Eclipse model thatcorresponds to the depth surface from whichthe model will be hung (see also Appendix C). Itshould correspond to the same physical layertagged by hmaster_depth_layer_numberi inthe XML file controlling the Delivery inversion.The actual reference layer number might differ ifthe Eclipse model contains extra layers abovethe inversion model. hECLIPSE_layer_numberiidentifies the hinversion_layer_numberi with-in the hlayeri block with the correct layer of theEclipse model. The hECLIPSE_layer_numberientries will form a simple unit-ascending se-quence in the XML file.

� Eclipse output grids. The runtime option - -ecl

will write massaged properties (most-likely,realisations) into an output Eclipse grid whosefile name(s) are prefixed by the content ofhECLIPSE_output_grid_filenamei.

� hwell_observationi entries in each layer areoptional. Positions are in UTMs again. Entriesfor properties that are not ‘massaged’ will beignored. � hstatsi blocks within a layer define a depthwindow within which contributions to thevolumetric statistics can be made. For example,if a fluid contact depth is known, suitable entrieshere will permit the distribution of net-sandabove a contact depth to be formed.

Appendix B. Output files

The code produces a variety of output files, withnames constructed from relevant entries in themaster XML file. The simpler files are in naivegeoEAS ascii format used by GSLIB (Deutsch andJournal, 1998) for ease of parsing. Stochasticoutputs (‘realisations’) are generated if the -Nnumber flag is supplied.

If ascii-mode is used (runtime flag -a)

post_massaged_properties_layer_ :txt

is a geoEAS file containing columns for thegridpoint locations, segments, and most-likelyvalues and standard deviations for all the proper-ties in the layer implied by the filename.

� post_massaged_realisations_layer_ :txt

is geoEAS, with columns for the gridpoint

locations, segments, and stochastic samples foreach property and realisation in the layer impliedby the filename.

If files are being written to the cornerpoint grids(-ecl), we get

A most-likely cornerpoint grid (taggedhECLIPSE_output_grid_filenamei) with thegeometry altered in accordance with the mas-saged layer thicknesses from the inversion, andhung on the nominated reference depth layer.Other properties are written into this file as blockcentred, with entries for both the most-likely andstandard deviations of each massaged property. � A separate realisation cornerpoint grid file foreach realisation, with block-centred values forthe properties. Filenames are suffixed versions ofthe most likely grid.

If volumetric statistics of certain properties arerequested (runtime flag –stats), simple ascii files(Realisation_Summary_Stats*) with the cu-mulative distribution of a requested orderingproperty (e.g. net-sand) are generated.

Appendix C. Treatment of reference depths

A variety of processes control the reference depthused to ‘hang’ the ECLIPSE models. The delivery

inversion xml file requires an entry taggedhmaster_depth_layer_numberi which is a layerwhose top depth is used to hang all other depthsin the inversion model, via effective-velocity(vp_eff) � time conversions. If the quantityhsigma_depthi for this layer is set at non-zero,the reference depth and other layers willacquire a normally distributed stochastic compo-nent of the specified standard deviation inhsigma_depthi. The deliveryAnalyser– massage-ana-

lyse–step will detect and model this uncertainty andthe cross correlations with other layer-depths itinduces. The mean and p50 reference layer depthfrom the massage-analyse step will be the referencedepth supplied to the inversion, within samplingerror.

In the massaging code, three possibilities arise.

Massaging of depth d is specified, typically byhproperty_name normalised=‘‘false’’

smooth_across_faults ¼ ‘‘false’’di. Here,the reference depth surface will be smoothed(respecting faults if specified), and the reference

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648646

depth residual uncertainty will be a Gaussianrandom field of the same standard deviation asthat of the smoothed reference-depth massage-analyse’d standard deviations, but transverselycorrelated according to the supplied layervariogram. All ECLIPSE gridblock tops andbottoms will be set relative to this depth andthe massaged thicknesses, if the latter if avail-able. Thicknesses of ECLIPSE layers that arenot massaged are preserved. The taghECLIPSE_reference_depth_layer_numberiidentifies the ECLIPSE grid layer correspondingto the hmaster_depth_layer_numberi in thedelivery inversion model. If thicknesses are notmassaged, all the in-situ ECLIPSE gridblockthicknesses are preserved even though the modelis re-hung according to the massaged referencedepth.

� Massaging of depth d is not specified. In thiscase, the in-situ ECLIPSE reference depth ispreserved. ECLIPSE layer thicknesses will be setby the massaged thicknesses if thickness massa-ging is specified. � Massaging of depth d is specified, but the

original inversion did not include a stochasticcomponent corresponding to the reference depthuncertainty, so the reference depth standarddeviation is zero. A global reference depthuncertainty can be re-introduced at the massa-ging step here by supplying the flag- -systematic-

depth-uncert standard-deviation to the com-mandline of deliveryMassager.

Appendix D. Downscaling

A variety of categorical simulation techniques arein common use in petroleum geostatistics. Perhapsthe best understood algorithms for binary simula-tion are truncated Gaussian fields (LeLoc’h andGalli, 1996), and we have chosen to adapt thismethod to the ‘decoration’ problem on account ofthe efficiency of simulation of the underlyingcontinuous field. Adaptation of this technique tonon-local constraints is difficult; indeed, rigoroussampling of high dimensional categorical spatialdistributions with tight likelihoods is notoriouslyhard in general (Winkler, 2003). A formulation interms of discrete Markov random fields (MRFs)would have been more satisfactory in terms ofincorporating the net-to-gross likelihood constraint,but explicit control of correlation length scales is

much more difficult with MRFs. We have alsoresisted the temptation to try and provide a ‘most-likely’ categorical map, since this object is highly(combinatorially) non-unique, and any of the most-likely models is very non-representative. An analogywith the celebrated Ising model of statisticalmechanics is helpful (Winkler, 2003), since thisrepresents by far the best understood MRF modelin the literature. If we map Ising �1 spin states torock categories, the temperature of the Ising modeldetermines the correlation length of the realisations,but at any temperature, the ‘most-likely’ model is allone category or spin in an unconstrained model.For the case of smooth NG constraints, the mostlikely model(s) will be a layered two-zone partition-ing, with the zone boundary of minimal length: thiswill clearly violate the homogenisation assumptionsused in the inversion.

Appendix E. The thin-layer detection problem

The strong nonlinearity of the forward model inthe regime of thin-layers makes the correct intro-duction of trace correlations difficult. Thin layersare always difficult to detect (or reject) with strongprobability in single traces, as a layer introducedbetween identical bounding layers will introduceequal and opposite reflectivities, which will nearlycancel each other in the convolution, and thusproduce very weak (i.e. within-noise level) ampli-tudes. But the inversion at each trace can stillprovide an (perhaps weakly) updated estimate of theprobability p that the layer is present. The case p � 1

2

is most interesting.There is a simple mapping of this problem to a

Bayesian MRF model (Winkler, 2003; Besag, 1986)which offers considerable insight. If we think of anarray of traces i characterised by an integer xi ¼ �1denoting ‘layer present/absent’ at each trace, thenthe product of (independent) updated likelihoods pi

over all traces in the set can be written in the form

pðfxigÞ ¼ expX

i

Biðxi � aiÞ

!, (19)

where Bi ¼ ð1=2Þ logðpi=ð1� piÞÞ and ai ¼

ð1� ð1=BiÞ log piÞ are constants that come fromsetting the odds ratio

pi=ð1� piÞ � expðBiðþ1� aiÞÞ= expðBið�1� aiÞÞ.

We may think of the exponent in Eq. (19) as a (�ve)‘likelihood’ Hamiltonian for the problem, which

ARTICLE IN PRESS

0.55 0.6 0.65 0.7

p

0.6

0.7

0.8

0.9

1m

ean layer-

pre

sent pro

babili

ty

trace-local layer-present likelihood

λc = 10

λc = 3

λc = 1

Fig. 11. Mean ‘layer present’ probability for Ising system with

various correlation lengths l, versus trace-update probability p.

0 20 40 60 80 100

Probability

β=0.1

β=0.2

β=0.3

β=0.5

Fig. 12. One dimensional ‘layer-present’ probability sequence

(on grayscale 0 ¼ black, 1 ¼ white) for i ¼ 1 . . . 100 traces, with

updated MAP layer model for various values of correlation/

smoothing parameter b. Higher b values generate more aggressive

smoothing/segmentation.

J. Gunning et al. / Computers & Geosciences 33 (2007) 630–648 647

needs to be added to a Hamiltonian expressing theprior mean and correlations between the states xi, asthey might plausibly be related in a model prior toany observations (i.e. inversion results). If we writethe prior for the model fxig as a MRF with couplingover nearest neighbours given by the Hamiltonian

H ¼ �bXj�i

xixj ,

then the prior model corresponds to an Ising modelwith inverse temperature b, mean state hxii ¼ 0 (i.e.agnostic view of layer presence/absence), and, in1D, an exactly derivable correlation function (in thelarge system limit):

ri;j � hxixji�ðtanh bÞji�jj.

Clearly the correlation decays geometrically/expo-nentially between traces, so we define a correlationlength lc by

ri;j�ðtanh bÞji�jj� expð�ji � jj=lcÞ.

Clearly, longer correlations (large lc) correspond to‘colder’ temperatures (large b).

When we add the likelihood Hamiltonian to theprior Hamiltonian, the overall system is

H ¼ �bXj�i

xixj �X

i

Biðxi � aiÞ,

which corresponds exactly to the Bayesian imagemodels discussed by Winkler (2003), in the binarycase. Exact MAP estimated of the most probablestate can be computed by annealing or theFord–Fulkerson algorithm (Greig and Porteous,1989).

Some insight into the effect of the correlationscan gleaned by considering the 1D case with acommon update probability p ¼ pi. This thencorresponds to the Ising model in an externalmagnetic field B. The question of interest is then,given a set of (identical) likelihood updates at eachtrace corresponding to B ¼ ð1=2Þ logðp=ð1� pÞÞ,what is the expected state of the system. Thiscorresponds precisely to the mean Ising magnetisa-tion, which is known (Thompson, 1972) for the 1Dcase to be

hxi ¼sinhBffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

e�4b þ sinh2Bp ð20Þ

¼ð1=2Þð

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffip=ð1� pÞ

p�

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffið1� pÞ=p

pÞffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

tanh2ð1=2lcÞ þ ðffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffip=ð1� pÞ

p�

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffið1� pÞ=p

pÞ2=4

q .

ð21Þ

Graphs of this curve show that the correlation in theprior strongly ‘corroborates’ any weak inclinationsin the likelihood p. E.g. for a correlation length lc ¼

10 and p ¼ 0:6, the expected state is almost certainly

‘layer present’ (Fig. 11).This behaviour is reasonable: we expect a

particular observation to be repeated many timesif the correlation lengths are long, and if theobservations are truly independent, the multiplica-tion of probabilities forces the ‘suspected’ state to bevery much more likely. In the inversion context, wewould have to be very careful with asserting trueindependence of observations, since the imagedamplitudes may well have systematic effects fromthe processing or other geological effects in theoverburden.

ARTICLE IN PRESSJ. Gunning et al. / Computers & Geosciences 33 (2007) 630–648648

For the case where the trace likelihoods pi vary, atypical example of the effect of the correlations (viab) on the MAP estimate is shown in Fig. 12, ascalculated by dynamic programming methods.

References

Besag, J., 1986. On the statistical analysis of dirty pictures.

Journal of the Royal Statistical Society, Series B 48 (3),

259–302.

DeMartini, D.C., Glinsky, M., 2006. A model for variation of

velocity versus density trends in porous sedimentary rocks.

Journal of Applied Physics 100 (1), 014910-1–014910-7.

Deutsch, C.V., 2002. Geostatistical Reservoir Modelling. Oxford

University Press, Oxford, 376pp.

Deutsch, C.V., Journal, A., 1998. GSLIB Geostatistical Software

Library and User’s Guide, second ed. Oxford University

Press, Oxford, 369pp.

Glinsky, M.E., Asher, B., Hill, R., Flynn, M., Stanley, M.,

Gunning, J., Thompson, T., Kalifa, J., Mallat, S., White, C.,

Renard, D., 2005. Integration of uncertain subsurface

information into multiple reservoir simulation models. The

Leading Edge 24, 990–999.

Greig, D., Porteous, B., Seheult, A., 1989. Exact maximum a

posteriori estimation for binary images. Journal of the Royal

Statistical Society, Series B 51 (2), 271–279.

Gunning, J., Glinsky, M., 2004. Delivery: an open-source model-

based Bayesian seismic inversion program. Computers &

Geosciences 30 (6), 619–636.

Gunning, J., Glinsky, M., 2006. WaveletExtractor: A Bayesian

well-tie and wavelet extraction program. Computers &

Geosciences 32, 681–695.

LeLoc’h, G., Galli, A., 1996. Truncated PluriGaussian method:

theoretical and practical points of view. In: Baafi, E.,

Schofield, N. (Eds.), Geostatistics Wollongong ’96, vol. 1.

Kluwer, Dordrecht, pp. 211–222.

Peaceman, D.W., 1996. Calculation of transmissibilities of

gridblocks defined by arbitrary corner point geometry.

Society of Petroleum Engineers eLibrary, unsolicited paper

37306. Available from hhttp://www.spe.orgi.

Ponting, D.K., 1989. Corner point geometry in reservoir

simulation. In: Joint Institute of Mathematics and its

Applications/Society of Petroleum Engineers European Con-

ference on the Mathematics of Oil Recovery, Cambridge.

pp. 45–65.

Schnabel, R.B., Eskow, E., 1999. A revised modified Cholesky

factorization algorithm. Society for Industrial and Applied

Mathematics Journal on Optimization 9 (4), 1135–1148.

Skiena, S., 1997. The Algorithm Design Manual. Springer, New

York, 486 pp. Online software at hhttp://www.cs.sunysb.edu/

algorithi.

Thompson, C., 1972. Mathematical Statistical Mechanics.

Princeton University Press, Englewood Cliffs, NJ, 278pp.

Whaley, R.C., Petitet, A., Dongarra, J.J., 2001. Automated

empirical optimizations of software and the ATLAS project.

Parallel Computing 27 (1–2), 3–35 See the netlib repository:

hwww.netlib.org/atlasi.

Winkler, G., 2003. Image Analysis, Random Fields and Markov

Chain Monte Carlo Methods: A Mathematical Introduction.

Springer, Berlin, 389pp.