equinor/xtgeo

Review use of pure python and possibly remove `engine` arguments in surface import/export

jcrivenaes opened this issue · 0 comments

The import and export of surfaces has in many cases two option w.r.t. "engine", e.g.

surf1 = xtgeo.surface_from_file("myfile.gri", engine="cxtgeo")   # default is currently cxtgeo
surf1 = xtgeo.surface_from_file("myfile.gri", engine="python")   # default only when using memstreams

The result should be identical. The default option cxtgeo (using C compiled bindings) is default to
a) historical reasons
b) it is tested to be faster.

However, offline tests I have done shows that optimizing the python code can give speed as fast as the C code.

It may also be that some observed instability in tests, in particular when doing forks (see #1229) could
be related to the cxtgeo C bindings.

Propose therefore to simplify code, and run only with only python code if possible. The engine option should not produce
different outcome, so it can be removed/inactivated possibly without any side-effects.