Skip to content

Commit

Permalink
WIP, ongoing
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrivenaes committed Sep 27, 2023
1 parent 0c97a5a commit 7f40e2d
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 304 deletions.
2 changes: 1 addition & 1 deletion src/xtgeo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def _xprint(msg):
#
_xprint("Import matplotlib etc...DONE")

from xtgeo.common import XTGeoDialog
from xtgeo.common.constants import UNDEF, UNDEF_INT, UNDEF_INT_LIMIT, UNDEF_LIMIT
from xtgeo.common.exceptions import (
BlockedWellsNotFoundError,
Expand All @@ -89,7 +90,6 @@ def _xprint(msg):
WellNotFoundError,
)
from xtgeo.common.sys import _XTGeoFile
from xtgeo.common.xtgeo_dialog import XTGeoDialog
from xtgeo.cxtgeo._cxtgeo import XTGeoCLibError

_xprint("Import common... done")
Expand Down
2 changes: 1 addition & 1 deletion src/xtgeo/well/_well_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def import_rms_ascii(
xlognames = []

lnum = 1
with open(wfile.file, "r") as fwell:
with open(wfile.file, "r", encoding="UTF-8") as fwell:
for line in fwell:
if lnum == 1:
_ffver = line.strip() # noqa, file version
Expand Down
11 changes: 6 additions & 5 deletions src/xtgeo/well/_well_oper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from xtgeo.common import XTGeoDialog
from xtgeo.common import constants as const

from ._well_aux import get_carray

xtg = XTGeoDialog()

logger = xtg.functionlogger(__name__)
Expand All @@ -24,7 +26,7 @@ def delete_log(self, lname):

lcount = 0
for logn in lname:
if logn not in self._wlognames:
if logn not in self.get_lognames():
logger.info("Log does no exist: %s", logn)
continue

Expand Down Expand Up @@ -196,9 +198,9 @@ def _make_ijk_from_grid_v1(self, grid, grid_id=""):
"""
logger.info("Using algorithm 1 in %s", __name__)

wxarr = self.get_carray("X_UTME")
wyarr = self.get_carray("Y_UTMN")
wzarr = self.get_carray("Z_TVDSS")
wxarr = get_carray(self, "X_UTME")
wyarr = get_carray(self, "Y_UTMN")
wzarr = get_carray(self, "Z_TVDSS")

nlen = self.nrow
wivec = _cxtgeo.new_intarray(nlen)
Expand Down Expand Up @@ -340,7 +342,6 @@ def get_gridproperties(self, gridprops, grid=("ICELL", "JCELL", "KCELL"), prop_i
arr[np.isnan(xind)] = np.nan
pname = prop.name + prop_id
self.dataframe[pname] = arr
self._wlognames.append(pname)
if prop.isdiscrete:
self._wlogtypes[pname] = "DISC"
self._wlogrecords[pname] = copy.deepcopy(prop.codes)
Expand Down
Loading

0 comments on commit 7f40e2d

Please sign in to comment.