Skip to content

jondequinor/xtgeo

 
 

Repository files navigation

XTGeo

Build Status Build status Code style: black PyPI version Codacy Badge Documentation Status PyPI - Python Version PyPI - License

Introduction

XTGeo is a LGPL licensed Python library with C backend to support manipulation of (oil industry) subsurface reservoir modelling. Typical users are geoscientist and reservoir engineers working with reservoir modelling, in relation with RMS. XTGeo is developed in Equinor.

Detailed documentation for XTGeo at Read the Docs

Feature summary

  • Python 2.7+ and 3.4+ is supported
  • Focus on high speed, using numpy and pandas with C backend
  • Regular surfaces, i.e. 2D maps with regular sampling and rotation
  • 3D grids (corner-point), supporting several formats such as RMS and Eclipse
  • Support of seismic cubes, using segyio as backend for SEGY format
  • Support of well data, line and polygons (still somewhat immature)
  • Operations between the data types listed above; e.g. slice a surface with a seismic cube
  • Integration with ROXAR API python for several data types is supported (see note later)
  • Linux is main development platform. From version 2.2.0, Windows 64bit is supported.

Installation

For Linux and Windows 64bit, PYPI installation is enabled:

pip install xtgeo

For detailed installation instructions (implies C compiling), see the documentation.

Getting started

from xtgeo.surface import RegularSurface

# create an instance of a surface, read from file
mysurf = RegularSurface('myfile.gri')  # Irap binary as default

print('Mean is {}'.format(mysurf.values.mean()))

# change date so all values less than 2000 becomes 2000
# The values attribute gives the Numpy array

mysurface.values[mysurface.values < 2000] = 2000

# export the modified surface:
mysurface.to_file('newfile.gri')

Note on RMS Roxar API integration

The following applies to the part of the XTGeo API that is connected to Roxar API (RMS):

RMS is neither an open source software nor a free software and any use of it needs a software license agreement in place.

About

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 48.8%
  • C 45.9%
  • C++ 2.5%
  • HTML 1.4%
  • Jupyter Notebook 0.4%
  • CMake 0.3%
  • Other 0.7%