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

Improve warnings when resampling or cube slices leads to (near) empty surfaces #1157

Open jcrivenaes opened 5 months ago

jcrivenaes commented 5 months ago

While working with #1156, I see that situations where map nodes get very few are not handled with sufficient warnings.

E.g. resampling which would result in an empty map will not produce any error messages or warnings. https://github.com/equinor/xtgeo/blob/09dadec7f852852426444d853837e96ddbf21e66/src/xtgeo/surface/_regsurf_oper.py#L117

In addition, the routines that slices a cube with a surface returns an istat/ier, but it appears that this is not robust for unknown reasons https://github.com/equinor/xtgeo/blob/09dadec7f852852426444d853837e96ddbf21e66/src/xtgeo/surface/_regsurf_cube.py#L126