XTGeo is a Python library for 3D grids, surfaces, wells, etc
Project description
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.5+ support
- 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
- Optional integration with ROXAR API python for several data types (see note later)
- Linux is main development platform, but Windows and MacOS (64 bit) are supported and PYPI wheels are provided.
Installation
For Linux, Windows and MacOS 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.10.0
- New features:
- Added interpolation option in xsection when plotting 3D grids #401
- Fixes:
- Improvements in Roxar API interface, e.g. behaviour on when projects are saved or not
- Fix on surface values, which data that can be accepted, issue #405
- Some other minor fixes in code and documentation
2.9.0 and 2.9.1
- Full rewrite of surface slice cube methods, they will now be much faster #354
- Added
activeonly
key inmake_ijk_from_grid
for Well() - Improving points in cell detection algorithm (full rewrite)
- Fix bug in cube orientation when importing fro Roxar API #359
- Introducing new faster reading of roff grids (will not be default until later)
- Fix of xinc/yinc for PMD map format #367
- Improvements in various plot routines, in particular xsections
- Changed CI and deploy from travis/appveyor to Github actions using
cibuildwheel
2.8.3
- Fix a bug for renaming points and polygons coordinate columns, ref #349
- Added and "F" in SPECGRID when exporting 3D grid to GRDECL format
2.8.2
- Fix a bug wrt writing bytestream instances on non-Linux, #342
2.8.1
- Fix a clib related issue that made XTGeo import feil on RHEL6 in Python2, #346
2.8.0
- New features:
- Added gridlink option in GridProperty import, #329
- More keyword options in Grid get_ijk_from_points() #327
- Well method report_zone_mismatch() rewritten and improved
- Well: added get_surface_picks()
- Initialise a new GridProperty instance from existing GridProperty
- Grid(): added name as attribute #319
- Bug fixes:
- The gridproperty list in GridProperty() is now unique
- Fixed bug in Well: get_zonation_points
- More fixes on pathlib (general rewrite) #332
- Fixes for developers:
- Replace logging methods in the C part, and relocated clib folder
- Added code coverage in travis CI
2.7.1
- Bugfig:
- Issue with pathlib solved, #332
2.7.0
- New features:
- Support for petromod binary format for RegularSurface()
- Added name attribute for Grid()
- Enhanced plotting for well logs
- The arrays stored Grid() are no longer SWIG C pointers, but numpy arrays. This simplifies pickling.
- Bug fixes:
- File names used in e.g. from_file should now handle pathlib instances
- Improved error messages if issues with e.g. file names used in export/import
- Fix of excessive logger output in
- Fixes for developers:
- General refactorizion of C code, to improve speed and stability. Also change logger method in C (still ongoing)
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
- A Grid() instance can now be "numpified" so that pickling can be done, method
- 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
- Added a general kwargs to
- 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
vspfilter
for points/polygonsto_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:
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
Built Distributions
Hashes for xtgeo-2.10.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7abed9615c1d79437e41568c91cd9ff3d76c45bf26ef968aa09eb14647092e7b |
|
MD5 | 594dd20ecfe448e35c4d30bac12e1227 |
|
BLAKE2b-256 | 6755cbde8fad3e6c745e328bc11363432519e3dbcf02c6c5226ca2e63c5b4ea3 |
Hashes for xtgeo-2.10.0-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f2caf1dbb2e00b732fbf0ad829662a09dd56d61f128e19f191e94cde7358408 |
|
MD5 | f014834eba9c3aa152cf8e601fadf1d8 |
|
BLAKE2b-256 | af65d0d60f94b4da7edbe8e2036b4ab5c73875654810bbaa9c9c3e1dc46819ee |
Hashes for xtgeo-2.10.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67e23abb0212ec784d161cc005ef5b2216dba9e4bc34cdceaa5a1048697e81e3 |
|
MD5 | d1f31eea33e09f1f2bcb481bf1c30e8d |
|
BLAKE2b-256 | 57e3a354c0078f7d05596125c9bbc4f2836d475066ea41ccf110e0165df29d1f |
Hashes for xtgeo-2.10.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d94be86bfb908855392eca5cb5f2b6240ab67efdfa15fb477000ceb87bd72ab |
|
MD5 | 4311d60c36308bd11bcd5425281c397f |
|
BLAKE2b-256 | fae308ef0174fc8377d0eee29621c1b0ff12d3316dca29bacd6d15e0f6651d75 |
Hashes for xtgeo-2.10.0-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b94770b3adca3d664415020ed7390d33686af7ee4a6137e767ff6d6eb954f1e |
|
MD5 | f8b561ec5cd228f54528f8d3e86101bc |
|
BLAKE2b-256 | 9bf99093d5b3efc3ee0bcd4e5320ff87988dd2480276763bb2da71e7b0f39469 |
Hashes for xtgeo-2.10.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a74dab0c8aa9e8c126f60a4a4d770658708566dddd395345df3a9fd68d52536d |
|
MD5 | a67a16a813e0a7b81edad667875595dd |
|
BLAKE2b-256 | 44f79255c59d6b085a8386b2b3b51f6878dabdf321ce460e951b0b81ed508ad3 |
Hashes for xtgeo-2.10.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4831b131f6617cb8d0f8b5185c3636d60b9efbf7dc5529aed16f4a358651f7f4 |
|
MD5 | 2ff75aa8784e3799ec5fd9c29324b9e2 |
|
BLAKE2b-256 | 238391d5f8b3add1a30c26ed4912f4270421dcaa57fa3ab2180c3a493910d31e |
Hashes for xtgeo-2.10.0-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0e34c89e76c59cb78be25ced34d08d7c2c1aaef6fe605df802860989272932a |
|
MD5 | b40292b06b3c41062c29edd3e1b855d2 |
|
BLAKE2b-256 | 35c3349e141dfa573e82a74b2623d78e57383c48b86271991bd66e2736056ef9 |
Hashes for xtgeo-2.10.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 502e56f42c9e4a5717da66014d2d36189bfd72d498d2a980a979c0c145d0db58 |
|
MD5 | 4552be86598419d406392deb1d9477fe |
|
BLAKE2b-256 | 98d12c141c5b6cc5683d5e8e8e5c81f6812ca38de26e6261e771e3b9f907bfd3 |
Hashes for xtgeo-2.10.0-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aebcfa23686ce08ccd343b6bb3b6e9787135d4fcfb263834c2723069f5e0f6ea |
|
MD5 | a71778c29da23b05f77681f9f53f1dc5 |
|
BLAKE2b-256 | 301f67c9b8893ce52e9054a102155f4a72078bda0ce828a84238a5d2675e9860 |
Hashes for xtgeo-2.10.0-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bccb1b6734c5096e6b4ff210ef1487e9b8e7a4dddf6409ab389726a05fda01fd |
|
MD5 | 3820709a83936efc9521ef28c87e641f |
|
BLAKE2b-256 | baa52bc51acb09868ef787155325c2040f487e6264388efe38f1b8d1bbcdcbdf |