Skip to main content

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

Project description

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.

History

Version 2

2.6.0

  • New features:
    • A Grid() instance can now be "numpified" so that pickling can be done, method numpify_carrays()
    • An existing GridProperty() instance should now accept scalar input which will be broadcasted to the full array
    • Added a method so one can create a GridProperty instance directly for a Grid() instance #291
    • Added several alternatives to instantate Points(), e.g. from a list of tuples
    • A general method that finds the IJK indices in a 3D grid from from Points() is made get_ijk_from_points #287
    • For RegularSurface(), the fill() methid will now accept an optional fill_value (constant) #294
  • Bug fixes:
    • Making surface write to BytesIO stream threading safe (Irap binary format)
    • Assigning a GridProperty() inside/outside a polygon is now more robust.
    • Many internal build fixes and improves, including requirements.txt
    • For surfaces, some operator overload function changed unintentionally the other instance #295
    • For surfaces, operator overload on instances with same topology will not unintentionally trigger resampling

2.5.0

  • New features:
    • Be able to write surfaces to BytesIO (memory streams), Linux only
    • Add the ability for 3D grids to detect and swap handedness of a 3D grid.
    • Available on Python 3.8 on all platforms
  • Fixes for developers
    • Now backward compatible to cmake 2.8.12
    • Many internal build fixes and improves, including requirements.txt

2.4.3

  • Fix of bugs when exporting points/polygons to Roxar API
  • Fix (for developers) various setup in cmake/swig etc so that cmake can be downgraded to 3.13.3 and hence a manylinux1 image is available in PYPI for Linux (Python versions < 3.7)

2.4.2

  • Fix a bug that occurs when reading Eclipse properties from E300 runs

2.4.1

  • Push to trigger travis build and deploy

2.4.0

  • New features:
    • Added a general kwargs to savefig() in plot module, so e.g. dpi keyword can be passed to matplotlib
  • Bug fixes:
    • More robust on reading saturations from UNRST files from Eclipse 300 and IX, where "IPHS" metadata (describing phases present) is unreliable.
  • Fixes for developers:
    • Setup can now be ran in "develop mode"

2.3.1

  • Preliminary support for Python 3.8 (Linux only)
  • Several bug fixes:
    • User warning when requested colour map is not found
    • Printing of a Points of Polygons instance shall now work
    • UNDEF values in property grdecl or bgrdecl export shall now be 0.0, not a large number
    • Name in GridProperty to_file(name=...) is fixed
    • If fformat in GridProperty import is mispelled, an exception will be raised

2.3.0

  • Added support for MacOS on PYPI (Python 3.6, 3.7)
  • Added functionality on grid slices as method ()
  • More flexible reading on phases present in Eclipse/IX UNRST files
  • Several minor bugfixes and improvements

2.2.2

  • Several smaller bug fixes
  • Use of realisation in gridproperty_from_roxar() was not working

2.2.1

  • Full C code and compile restructuring, now using scikit-build!
  • Use of realisation in gridproperty_from_roxar() was not working

2.2.0

Several fixes and new features, most important:

  • Well() class
    • Added tvd interval for rescaling of well logs.
    • When sampling a discrete property to well, it will now be a discrete log
    • Added a isdiscrete() method
  • RegularSurface() class
    • Support for read from bytestrings (memory) in addition to files (Irap binary format supported)
    • Fast load of surfaces (will only read metadata) if requested
    • Support for threading/multiprocessing (concurrent.futures) when importing surfaces from Irap binary.
  • Grid() class
    • Improvements and fixes for dual porosity and/or dual permeability models from Eclipse

2.1.0

Several fixes and new features, most important:

  • Cube() class

    • A general get_randomline() methods
  • Grid() class

    • Make a rectular shoebox grid
    • Get a randomline (sampling) along a 3D grid with property
    • More robust support for binary GRDECL format
    • Possible to input dual porosity models from Eclipse (EGRID, INIT, UNRST)
  • Surfaces

    • Added a class for Surfaces(), a collection of RegularSurface instances
    • Generate surface from 3D grid
    • Lazy load of RegularSurfaces (if ROFF/RMS binary) for fast scan of metadata
    • Clipboard support in from_roxar() and to_roxar() methods
    • fill(), fast infill of undefined values
    • smooth(), median smoothing
    • get_randomline() method (more general and flexible)
  • Points/polygons

    • Added copy() method
    • Added snap to surface method (snap_surface)
    • Several other methods related to xsections from polygons
  • Well() class

    • Get polygon and and improved fence from well trajectory
    • Look up IJK indices in 3D grid from well path

2.0.8

  • Fixed a backward compatibility issue with filter vs pfilter for points/polygons to_file

2.0.7

  • (merged into 2.0.8)

2.0.6

  • Corrected issues with matplotlib when loading xtgeo in RMS

2.0.5

  • Fixed a bug when reading grids in ROXAR API, the subgrids were missing
  • Improved logo and documentation runs
  • Allow for xtgeo.ClassName() as well as xtgeo.submodule.ClassName()
  • A number of smaller Fixes
  • More badges

2.0.4

  • Technical fixes regarding numpy versions vs py version, swig setup and setup.py

2.0.3

  • Deploy to python 3.4 and 3.5 also. Numpy versions tuned to match roxar library.

2.0.2

  • Adding services for code improvements (codacy, bandit)

2.0.1

  • Minor improvements in setup and documentation
  • Travis automatic deploy works now

2.0.0

  • First version after Open Sourcing to LGPL v3+

Version 0 and 1

See github for commit and tag history:

https://github.com/equinor/xtgeo

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

xtgeo-2.7.0a1-cp38-cp38-win_amd64.whl (502.0 kB view details)

Uploaded CPython 3.8Windows x86-64

xtgeo-2.7.0a1-cp38-cp38-manylinux2010_x86_64.whl (487.4 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

xtgeo-2.7.0a1-cp38-cp38-macosx_10_13_x86_64.whl (483.4 kB view details)

Uploaded CPython 3.8macOS 10.13+ x86-64

xtgeo-2.7.0a1-cp37-cp37m-win_amd64.whl (500.5 kB view details)

Uploaded CPython 3.7mWindows x86-64

xtgeo-2.7.0a1-cp37-cp37m-manylinux2010_x86_64.whl (485.5 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

xtgeo-2.7.0a1-cp37-cp37m-macosx_10_13_x86_64.whl (482.0 kB view details)

Uploaded CPython 3.7mmacOS 10.13+ x86-64

xtgeo-2.7.0a1-cp36-cp36m-win_amd64.whl (500.5 kB view details)

Uploaded CPython 3.6mWindows x86-64

xtgeo-2.7.0a1-cp36-cp36m-manylinux1_x86_64.whl (480.6 kB view details)

Uploaded CPython 3.6m

xtgeo-2.7.0a1-cp36-cp36m-macosx_10_13_x86_64.whl (482.0 kB view details)

Uploaded CPython 3.6mmacOS 10.13+ x86-64

xtgeo-2.7.0a1-cp35-cp35m-manylinux1_x86_64.whl (480.6 kB view details)

Uploaded CPython 3.5m

xtgeo-2.7.0a1-cp27-cp27mu-manylinux1_x86_64.whl (480.3 kB view details)

Uploaded CPython 2.7mu

File details

Details for the file xtgeo-2.7.0a1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 502.0 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

File hashes

Hashes for xtgeo-2.7.0a1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f7bb0bab670151df2284b4e6a83be86203c141318122c4bda19ac8546185299c
MD5 5124baf593d3ec3cf76f26a03501a2c7
BLAKE2b-256 401ecc05569d9d928dfabf3885a3c497e9c6439f29f8d896e2f5394fdc2e52d9

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 487.4 kB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for xtgeo-2.7.0a1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 14ffa7926fbc312d938681c95fe0cd474697cf74a35930692fbc6f1d0f0c1299
MD5 6fca959beed58141710c6e9f686a73fc
BLAKE2b-256 827d101ae4c928f3e6c115317450a67fa0afafdf4bfadec3e051c1b6f212bfc1

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp38-cp38-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp38-cp38-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 483.4 kB
  • Tags: CPython 3.8, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for xtgeo-2.7.0a1-cp38-cp38-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 ef56a046eea335febe1779fa8c68e7e938645564b1c6e0f409fc018415e5b6fd
MD5 7204a54a83c15143d2b7b64800abc739
BLAKE2b-256 dcc9710539495937431e82772f263fc86c90e7f0f80914e7a7d1eda3b3925817

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 500.5 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for xtgeo-2.7.0a1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 cde31e542d4b055d5db8a14707aa35d1938bc694da62a0d55f6eb126c278cf76
MD5 7c3ece119ec1b4938982d407c80c2e00
BLAKE2b-256 8015e6b5fd5106c5cbc9be8e8d8f5575be14999cfdae347b266f1e6946463f8e

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 485.5 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for xtgeo-2.7.0a1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 328b71147b86b817237bca5b39a0663bbb6653456b4dc903de2fd77cf59d77d2
MD5 25f9768d27f2c093b9ffb9cbc27cab14
BLAKE2b-256 fdda5dbc91094e1823b9ac3707e51fa2c8def3ff6022c3932c42bb0a97d4f7ed

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp37-cp37m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp37-cp37m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 482.0 kB
  • Tags: CPython 3.7m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for xtgeo-2.7.0a1-cp37-cp37m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 6a98c3f6b313b610b47f5d8d1f4b27dbc98635179f34e72abbc53c1af661942f
MD5 cf266e5d95a66cd304afe7f79c187b63
BLAKE2b-256 09e11642312d037484b6ae61965f7acf5f4084df4e8afb70e6282548359c9440

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 500.5 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for xtgeo-2.7.0a1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 5c6ae22cc0c9fdb8eb192b0b7bde1435d9c48026af7cb841d12b9bb3b19140f3
MD5 afb8721bddaa4894a295ed4f08aa53a1
BLAKE2b-256 8851c9a962b0185b5f05c9f665a791280bc4b2cb2496cb171efb94071ebc8cfc

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 480.6 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for xtgeo-2.7.0a1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 497c6d60ed2879ec3eb4bba8490a65bdfe3a03171c0a594df22a2fc410602b40
MD5 4bbcf2783e321bbb07f298b592798f46
BLAKE2b-256 c5dbf81164b5bfbc86d11232b63572477b37ed188b6f8b1c6ee9f1eb9d6797fb

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 482.0 kB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for xtgeo-2.7.0a1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 d753b49d8da00209eb9c623528ebcdb48109c62ad67861f56bdac04d0004a1e1
MD5 704c93a72d50f71205a9431947077537
BLAKE2b-256 4ec17be178a7350e6d4ab648f102809f0fb30191bad73832b775e42167b692cc

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 480.6 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for xtgeo-2.7.0a1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f4aa43baadb3932cbc349bf1db421b97fcef86fe827603b9e2e092af80fde97c
MD5 37a9521c7f4f5808115b160d93700fb6
BLAKE2b-256 77955c44c1ba26f21f3621e8fd7cde39df8cc2e126415ef1b882696882a9859d

See more details on using hashes here.

File details

Details for the file xtgeo-2.7.0a1-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: xtgeo-2.7.0a1-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 480.3 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

File hashes

Hashes for xtgeo-2.7.0a1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6f7e7fd84d9f2f729d657f8a02c9ba596831c3cb1714eee1bbc446a325a1a5f6
MD5 05c588bf3c10b70a77a44d22a6dc35a6
BLAKE2b-256 3ce734c6ae1cb45a114a59f7b42f7921a5b6b9cb017901e0758095f18f9e9772

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page