コード例 #1
0
ファイル: test_zmap_spec.py プロジェクト: esalehim/xtgeo
def test_integration():
    result = xtgeo.surface_from_file(
        Path(xtgeo.XTGeoDialog().testpathobj / "surfaces" / "etc" /
             "zmap_example.zmap"))
    assert result.xmax == 460718.9063
    assert result.ymax == 5925787.0
コード例 #2
0
ファイル: _grid_import_ecl.py プロジェクト: jondequinor/xtgeo
"""Grid import functions for Eclipse, new approach (i.e. version 2)"""

from __future__ import print_function, absolute_import

import re
import os
from tempfile import mkstemp

import xtgeo
import xtgeo.cxtgeo._cxtgeo as _cxtgeo

from xtgeo.grid3d._grid_eclbin_record import eclbin_record

from . import _grid3d_utils as utils

xtg = xtgeo.XTGeoDialog()

logger = xtg.functionlogger(__name__)

XTGDEBUG = 0


# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Import Eclipse result .EGRID
# See notes in grid.py on dual porosity / dual perm scheme.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def import_ecl_egrid(self, gfile):
    """Import, private to this routine."""

    eclfile = xtgeo._XTGeoCFile(gfile)
コード例 #3
0
ファイル: test_zmap_spec.py プロジェクト: esalehim/xtgeo
!     RMS - Reservoir Modeling System VERSION : 12.1
!     GRID FILE NAME   : zmap_example.zmap
!     CREATION DATE    : 2021.05.05
!     CREATION TIME    : 08:20:10
@zmap_example.zmap HEADER                     ,      GRID, 5
      15,    -99999.0000,       ,      4,      1
       5,      4,    459218.9063,    460718.9063,   5924787.0000,   5925787.0000
         0.0000,         0.0000,         0.0000
@
+ Grid data starts after this line
        41.8596        43.1112        44.5115        45.6861        46.5453
        42.3947        42.8493        44.9472        47.2538        49.0361
        40.1785        51.0874        54.6339        55.6271        55.9614
    -99999.0000    -99999.0000    -99999.0000        68.1617        63.9811"""
                 ),
        Path(xtgeo.XTGeoDialog().testpathobj / "surfaces" / "etc" /
             "zmap_example.zmap"),
    ],
)
def test_zmap_input_format(zmap_input):
    header = parse_zmap(zmap_input)
    expected_header = {
        "nan_value": -99999.0,
        "ncol": 4,
        "node_width": 15,
        "nrow": 5,
        "precision": 4,
        "start_column": 1,
        "xmax": 460718.9063,
        "xmin": 459218.9063,
        "ymax": 5925787.0,