Variogram on 3D wells

D. Renard

8 July 2017

## Loading required package: Rcpp
## Loading RGeostats - Version:12.0.2

This file demonstrates the calculation of variograms for a data set composed of several samples organized as 3-D wells.

Loading Data

The file is stored as a demonstration file included in the RGeostats distribution.

rg.load("Exdemo_3D_wells","data")

The data set contains several variables:

print(data,flag.extend=TRUE)
## 
## Data Base Characteristics
## =========================
## 
## Data Base Summary
## -----------------
## File is organized as a set of isolated points
## Space dimension              = 3
## Number of fields             = 8
## Maximum Number of attributes = 8
## Total number of samples      = 1852
## Number of active samples     = 793
## 
## Data Base Extension
## -------------------
## Coor #1 : - Min =     35.000 - Max =    775.000 - Ext =    740.000
## Coor #2 : - Min =    185.000 - Max =   1265.000 - Ext =   1080.000
## Coor #3 : - Min =  -1058.250 - Max =   -990.250 - Ext =     68.000
## 
## Variables
## ---------
## Field =   1 - Name = rank - Locator = NA
## Field =   2 - Name = LName - Locator = code
## Field =   3 - Name = X - Locator = x1
## Field =   4 - Name = Y - Locator = x2
## Field =   5 - Name = Z - Locator = x3
## Field =   6 - Name = facies - Locator = f1
## Field =   7 - Name = Porosity - Locator = z1
## Field =   8 - Name = sel - Locator = sel

We can see that the field covers an area with an extension of 740m along X, 1080 along Y and 68 along Z.

The well information can be displayed in a XoY viewpoint:

plot(data,title="Horizontal View",asp=1)

plot(data,title="Vertical Section",pos.y=3)

Variograms

Horizontal variogram

We first calculate a variogram along four directions in the horizontal plane, for 10 lags of 100m each. The directions are regularly sampled in the plane (trigonometric angles 0, 45, 90 and 135 degrees). In order to avoid mixing values from different levels (along the vertical axis), a bench distance is defined which avoids comparing two samples as soon as the distance along the third distance is too large (>10m).

dirhor = c(0,45,90,135)
vario  = vario.calc(data,dirvect=dirhor,lag=100,nlag=10,bench=10)
plot(vario,title="Horizontal variogram",pos.legend=7)

Vertical variogram

If we want to fit a 3-D model, we also need to have a variogram calculated along the third dimension. Note that auxiliary variograms calculated on vertically inclined directions could also be possible, although not relevant here due to the presence of vertical wells only. This vertical variogram must be added to the horizontal ones before one fits a 3-D model.

How to calculate the vertical variogram and how to add it to the previous one?

Let us define a vertical variogram individually. This can be done by defining a vertical direction and a narrow angular tolerance (in order to avoid mixing samples belonging to different wells).

dirvert = get.directions(matrix(c(0,0,1),ncol=1))
varvert = vario.calc(data,dirvect=dirvert,nlag=10,lag=5,tolang=1)
plot(varvert,title="Vertical Variogram by Angle",pos.legend=1)

Another possibility is to calculate the variogram only comparing samples which belong to the same line (having the same value for the code)

varcode = vario.calc(data,nlag=10,lag=5,opt.code=1)
plot(varcode,title="Vertical Variogram by code",pos.legend=1)

Now that we understand the way to calculate the vertical variogram, we simply need to compute it again and add it to the horizontal variogram previously calculated (referenced in the vario.add argument.

vario = vario.calc(data,dirvect=dirvert,nlag=10,lag=5,tolang=1,
                   vario.add=vario)
plot(vario,title="3-D Variogram",pos.legend=7)

We can also check its contents and verify that the five directions are stored in the same vario object:

print(vario)
## 
## Variogram characteristics
## =========================
## Number of variable(s)    = 1
## Number of direction(s)   = 5
## Space dimension          = 3
## Number of Date Intervals = 1
## Matrix of Bounds for Data Intervals -1000000001000000000
## 
## Direction 1
## -----------
## Number of lags              = 10 
## Direction coefficients      = (     1.000     0.000     0.000)
## Direction angles (degrees)  = (     0.000     0.000)
## Tolerance on direction      = 22.500000 (deg)
## Slice bench                 = 10.000000
## Calculation lag             = 100
## Tolerance on distance       = 50.000000% (of the Lag value)
## Date difference must lie within [-1000000000000000019884624838656.000000; 1000000000000000019884624838656.000000[
## 
## Direction 2
## -----------
## Number of lags              = 10 
## Direction coefficients      = (     0.707     0.707     0.000)
## Direction angles (degrees)  = (    45.000     0.000)
## Tolerance on direction      = 22.500000 (deg)
## Slice bench                 = 10.000000
## Calculation lag             = 100
## Tolerance on distance       = 50.000000% (of the Lag value)
## Date difference must lie within [-1000000000000000019884624838656.000000; 1000000000000000019884624838656.000000[
## 
## Direction 3
## -----------
## Number of lags              = 10 
## Direction coefficients      = (     0.000     1.000     0.000)
## Direction angles (degrees)  = (    90.000     0.000)
## Tolerance on direction      = 22.500000 (deg)
## Slice bench                 = 10.000000
## Calculation lag             = 100
## Tolerance on distance       = 50.000000% (of the Lag value)
## Date difference must lie within [-1000000000000000019884624838656.000000; 1000000000000000019884624838656.000000[
## 
## Direction 4
## -----------
## Number of lags              = 10 
## Direction coefficients      = (    -0.707     0.707     0.000)
## Direction angles (degrees)  = (   135.000     0.000)
## Tolerance on direction      = 22.500000 (deg)
## Slice bench                 = 10.000000
## Calculation lag             = 100
## Tolerance on distance       = 50.000000% (of the Lag value)
## Date difference must lie within [-1000000000000000019884624838656.000000; 1000000000000000019884624838656.000000[
## 
## Direction 5
## -----------
## Number of lags              = 10 
## Direction coefficients      = (     0.000     0.000     1.000)
## Direction angles (degrees)  = (     0.000     0.000)
## Tolerance on direction      = 1.000000 (deg)
## Calculation lag             = 5
## Tolerance on distance       = 50.000000% (of the Lag value)
## Date difference must lie within [-1000000000000000019884624838656.000000; 1000000000000000019884624838656.000000[