read_asciigrid: Read grid properties exported in ascii format

Description Usage Arguments Details Value Note Examples

Description

This function read 3D grid properties exported in ascii format and returns a data frame with the resepctive properties value, and optionallythe I, J and K indexes.

Usage

1
read_asciigrid(filename, dims, index = TRUE, order = "IJK", along = "I")

Arguments

filename

A character string giving the name or path of the file to be read.

dims

An array of length = 3,telling the IJK dimension of the cube. Has no default.

index

A logic flag telling if IJK index should be returned or not. If set to FALSE following parameters are ignored. Default TRUE.

order

A character string defining in which order Petrel exported the grid. Petrel Export Options: Cell Origin at (I=0, J=0, K) Cell Origin at (I=0, J=max(J), K) Cell Origin at (I=max(I), J=max(J), K) Cell Origin at (I=max(I), J=0, K) Should be one of: "IJK","IJmaxK","ImaxJmaxK" or "ImaxJK". Default "IJK".

along

A character string defining in which order traverse the indexes. Traverse first along I, then along J Traverse first along J, then along I Should be either: "I" or "J" Default "I".

Details

If the filename you provide does not existe, the function stops and returns an error message.

Value

This function returns a dataframe with the grid properties and for each cell, and if index = TRUE the I, J and K indexes of the cells.

Note

Basically what this function do is to convert the ascci format into a easier to operate gslib-like format.

At the moment the function only read 1 porperty per file. Upgrade to read several properties in the same file is under development.

Examples

1
2
3
4
5
## Not run: 
  read_asciigrid("filename.las", dims = c(12, 12, 25))
  read_asciigrid("filename.las", index = FALSE)

## End(Not run)

ravenroadresources/petroreadr documentation built on May 23, 2019, 3:03 p.m.