skillfed

xtgeo

XTGeo is a Python library for 3D grids, surfaces, wells, etc

xtgeo v4.25.1 129.7K downloads/30d#11,662 on PyPI122
Copyleft license LGPL-3.0 Active released

What it is and what it does

XTGeo is a Python library for reading, manipulating, and writing subsurface reservoir modelling data used in oil and gas exploration and production. It provides high-performance handling of 3D corner-point grids, 2D regular surfaces, seismic cubes (via segyio), and well data, with a C backend and NumPy/Pandas integration for speed. The library is built by Equinor and targets geoscientists and reservoir engineers working with reservoir simulation software like RMS.

The package supports multiple industry-standard formats (RMS, Eclipse, SEGY, Irap binary) and allows cross-data operations—for example, slicing a surface with a seismic cube. It ships pre-built wheels for Python 3.11–3.14 on Linux, macOS (64-bit), and Windows, reducing installation friction. Well data, lines, and polygons are supported but noted as less mature than grid and surface handling.

Use it for:

  • Load and modify 3D corner-point grids from RMS or Eclipse simulations, then export to a different format.
  • Read seismic cubes in SEGY format and perform spatial operations (e.g., extract values at well locations).
  • Manipulate regular 2D surfaces (maps) with rotation and resampling for reservoir analysis.
  • Batch process well trajectory and log data alongside grid and surface data in a single workflow.
  • Integrate subsurface data manipulation into a larger geoscience or reservoir engineering pipeline.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

XTGeo manipulates subsurface reservoir modelling data—3D grids, surfaces, seismic cubes, and wells—using NumPy and C backends for performance, with support for industry formats like RMS and Eclipse.

Yes, if you work with subsurface reservoir data in industry-standard formats. The package is actively maintained, has no known vulnerabilities, supports current Python versions, and offers wheels for all major platforms. The LGPL-3.0 license is permissive for most use cases but requires attention if you plan to modify and redistribute the library. Install friction is moderate due to C compilation, but pre-built wheels mitigate this for standard platforms.

Install

xtgeo on PyPI

pip

pip install xtgeo

uv

uv add xtgeo

poetry

poetry add xtgeo

Installing xtgeo

Before you install

Medium install friction due to C backend compilation requirements. The package is actively maintained (released 2 days ago) with wheels for Python 3.11–3.14 across Linux, macOS, and Windows, reducing friction for most users. Supports current Python versions.

License in practice

Licensed under LGPL-3.0 (copyleft). Any derivative work or modification must be distributed under the same license; static linking or bundling may trigger copyleft obligations depending on your deployment model.

Quickstart

pip install xtgeo

import xtgeo

mysurf = xtgeo.surface_from_file("myfile.gri")
mysurf.values[mysurf.values < 2000] = 2000
mysurf.to_file("newfile.gri")

Requires Python 3.11 or later; C backend compilation may be needed on platforms without pre-built wheels.

Verify before relying

  • Maturity level of well data, line, and polygon support (described as 'somewhat immature' in the excerpt).
  • Performance characteristics and scalability limits for very large grids or seismic cubes.
  • Scope and cost of optional ROXAR API integration for RMS workflows.

Package facts

License LGPL-3.0 (copyleft)
Python support supports the current Python release (>=3.11)
Install friction medium — platform-specific wheel
Runtime dependencies 16 — deprecation, gstools, h5py, hdf5plugin, joblib, matplotlib, numpy, pandas, pyarrow, resfo, roffio, scipy, segyio, shapely, typing_extensions, xtgeoviz
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 129,681/month — #11,662 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: xtgeo-4.25.1-cp311-cp311-macosx_11_0_arm64.whl; xtgeo-4.25.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; xtgeo-4.25.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; xtgeo-4.25.1-cp311-cp311-win_amd64.whl; xtgeo-4.25.1-cp312-cp312-macosx_11_0_arm64.whl; xtgeo-4.25.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; xtgeo-4.25.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; xtgeo-4.25.1-cp312-cp312-win_amd64.whl; xtgeo-4.25.1-cp313-cp313-macosx_11_0_arm64.whl; xtgeo-4.25.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; xtgeo-4.25.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; xtgeo-4.25.1-cp313-cp313-win_amd64.whl; xtgeo-4.25.1-cp314-cp314-macosx_11_0_arm64.whl; xtgeo-4.25.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; xtgeo-4.25.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; xtgeo-4.25.1-cp314-cp314-win_amd64.whl

Keywords: grids, surfaces, wells, cubes

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Natural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: PhysicsTopic :: Software Development :: LibrariesTopic :: Utilities

Tags

3D grid manipulationseismic cube processingreservoir surface modellingwell data handlingsubsurface data formatscorner-point grid librarygeoscience data tools
geosciencereservoir-modellingsubsurface-data

More Libraries packages