equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
109 stars 56 forks source link

Support for EarthVision text format for RegularSurface #534

Open jcrivenaes opened 3 years ago

jcrivenaes commented 3 years ago

The EarthVision text format is read and written by OW, and may be important for FMU til OW transfer. The format seems to have several variants; the proposal here is to support the variant(s) tha RMS supports. Example:

# Type: scattered data
# Version: 7
# Description: Exported from RMS - Reservoir Modeling System, version 12.1
# Format: free
# Field: 1 x
# Field: 2 y
# Field: 3 z meters
# Field: 4 column integer
# Field: 5 row integer
# Projection: Local Rectangular
# Units: meters
# End:
# Information from grid:
# Grid_size: 281 x 441
# Grid_space: 461500.000000,5926500.000000,7000.000000,11000.000000,-30.000000
# Z_field: z
# History: No history
# Z_units: meters
464112.4826484 5932425.0472075 -1599.9902344 210 154
464099.9826481 5932446.6978425 -1598.1525879 210 155
464121.6332830 5932459.1978428 -1598.6997070 211 155
464143.2839180 5932471.6978431 -1599.9620361 212 155
464065.8320129 5932455.8484770 -1598.2084961 209 156
...

Undefined data seems to be just ignored, and for correct parsing it appears the Grid_size and Grid_space in the header (info?) actually are applied. This gives possible "too much" specification as it will mainly be the Z values in the table above that are applied, and the risk for inconsistency is large (e.g. that spaces in XY data are not matching Grid_space)

jcrivenaes commented 3 years ago

In the RMS user manual, also this variant is described::

# Type: scattered data
# Version: 1
# Description: No description
# Format: free # Field: 1 x
# Field: 2 y
# Field: 3 z meters
# Field: 4 column
# Field: 5 row
# Projection: Local Rectangular
# Units: meters
# End:
# Information from grid:
# Grid_size: 139 x 181
# Grid_X_range: 4.906000e+05 to 4.975000e+05
# Grid_Y_range: 6.686000e+06 to 6.695000e+06
# Scattered_data: Not_available
# Z_field: z
# Vertical_faults: Not_available
# History: No history
# Z_units: meters
490600.000000 6686000.000000 -2609.907715 1 1
490650.000000 6686000.000000 -2606.614014 2 1
490700.000000 6686000.000000 -2604.649414 3 1
490750.000000 6686000.000000 -2602.259277 4 1