Skip to content

Commit

Permalink
FIX: change error to warning for ZCORN splits/overlaps
Browse files Browse the repository at this point in the history
This is triggered by cases where OPM-Flow seems to output
EGRID with splits in inactive cells.
  • Loading branch information
jcrivenaes committed Nov 24, 2022
1 parent 09291e0 commit 0529a22
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/xtgeo/grid3d/_ecl_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,15 @@ def xtgeo_zcorn(self, relative_to=GridRelative.MAP):
zcorn[:, :, :, :, 1, : nz - 1], zcorn[:, :, :, :, 0, 1:], atol=1e-2
):

raise ValueError("xtgeo does not support grids with horizontal split.")
warnings.warn(
"An Eclipse style grid with vertical ZCORN splits "
"or overlaps between vertical neighbouring cells is detected. XTGeo "
"will import the grid as if the cell layers are connected, "
"hence check result carefully. "
"(Note also that this check both active and inactive cells!)",
UserWarning,
)

result = np.zeros((nx + 1, ny + 1, nz + 1, 4), dtype=np.float32)

# xtgeo uses 4 z values per i,j,k to mean the 4 z values of
Expand Down

0 comments on commit 0529a22

Please sign in to comment.