-
Notifications
You must be signed in to change notification settings - Fork 128
Description
Description:
Field parameters are imported from files created by some forward model for the initial ensemble. RMS has been the main source for generating prior realizations of the field, and the ERTBOX (a box grid with size large enough to contain the field parameters for a zone from the geomodel) is used. There are two options for defining the grid indexing (the order of the field parameter values as they are saved in the ROFF parameter files. One is a grid indexing where the grid index origin is upper left corner. This is called right-handed since the j-index of the grid cell (i,j,k) increasing downwards when looking at a map view of the grid, see enclosed figures. If the grid index origin is located in lower left corner and j-index is increasing upwards when looking at it in map view of the grid, it is called left-handed, and left-handed is the default in RMS, but it is common in reservoir simulation grids to have it like a right-handed grid.
Global coordinates for wells and maps are often specified in UTM coordinates with the global x -axis in direction EAST and y-axis in direction NORTH. When using that coordinate system and with z -axis pointing downwards to increasing depth, the coordinate system defined is a left-handed coordinate system, this explain the name of the two grid index order naming.
The challenge regarding the coordinate system is that for distance-based localization we need to transform the observation coordinates into a local coordinate system that is defined by the box grid. Therefore we need to know the order the field parameter values are saved in the input files for field parameters. There are no meta-data in the file format that tells us whether the values are saved using left-handed or right-handed order. The file format, however defines whether the values are saved in C-order or F-order.
The possibilities for the flatten grid index order for the field parameter values ( the order the values are saved) are:
- Left-handed using ROFF binary format (C-order):
index = k + (NY - j -1) * NZ + i * NZ * NY - Right-handed using ROFF binary format (C-order):
index = k + j * NZ + i * NZ * NY - Left-handed with grid format using F-order:
index = i + (NY -j -1) * NX + k * NX * NY - Right-handed with grid format using F-order:
index = i + j * NX + k * NX * NY
To avoid confusion for the users, APS has only one allowed possibility: Left-handed using ROFF binary format, but the field parameters may come from other forward models, and other tools than RMS.
Proposal for a more robust solution than requiring that the users always use Left-handed and C-index order
xtgeo has functionality to check whether the grid is defined as Left-handed or Right-handed, and by importing any box grid (EGRID, ROFF format) with xtgeo as is now the case in ERT, it is possible to let xtgeo check the grid index origo (Left or Right handedness). To handle this consistently, in ERT, the order of the field values should be saved in the same grid index order regardless of the handedness and whether it is C or F-order in the input. xtgeo can be used to ensure that e.g. left handedness always is used internally and in C-order by converting the grid index order to that when importing the ROFF or EGRID format files with field parameters. ERT must of course when writing updated field parameters back to files on RUNPATH convert it back to original grid index order such that the forward models do not need to do any grid index re-ordering of the updated field parameters.
From documentation of xtgeo gridproperty class, xtgeo will save the field parameters as C-contiguous and deliver values as C-contiguous. So when using xtgeo to import and export field parameters to EGRID or ROFF format files, ERT could handle the field parameters as C-contiguous. Since xtgeo can check and convert handedness, it should be possible to ensure that field parameters always are in e.g. right-handed and C-order internally in ERT regardless of the handedness or whether it comes from ROFF field parameters belonging to a ROFF file with ERTBOX grid or an EGRID with ERTBOX grid.

Metadata
Metadata
Assignees
Labels
Type
Projects
Status
