ERT - Ensemble based Reservoir Tool
raw JSON → 21.1.1 verified Fri May 01 auth: no python
ERT (Ensemble based Reservoir Tool) is an open-source tool for ensemble-based reservoir management, including history matching, uncertainty quantification, and optimization. Current version is 21.1.1, with monthly releases following a versioning scheme based on calendar year and patch number.
pip install ert Common errors
error ImportError: cannot import name 'ErtAnalysisError' from 'ert' ↓
cause The symbol is not exposed at the top-level package; it's in a submodule.
fix
Use 'from ert.analysis import ErtAnalysisError' instead.
error ModuleNotFoundError: No module named 'res' ↓
cause The old 'res' package was removed in ERT 21.0.0.
fix
Replace 'import res' with 'import ert' and update all dependent imports.
error TypeError: __init__() got an unexpected keyword argument 'ens_path' ↓
cause The API changed between versions; 'ens_path' is no longer accepted in the constructor.
fix
Check the ERT API documentation for the correct arguments or use the new configuration-loading approach.
error ert configdump: error: unrecognized arguments: --help ↓
cause The CLI interface changed; use 'ert --help' for top-level help.
fix
Run 'ert --help' or 'ert configdump --help' for subcommand help.
Warnings
breaking The 'res' and 'libres' packages have been removed. All imports must use the 'ert' package instead. ↓
fix Replace 'from res import *' with 'from ert import *' and update all import paths to use the new structure.
breaking Python 3.11 or later is required. Python 3.10 and earlier are not supported. ↓
fix Upgrade to Python 3.11 or newer.
deprecated The synthetic_forward_model keyword is deprecated. Use FORWARD_MODEL with a shell command instead. ↓
fix Replace 'SYNTHETIC_FORWARD_MODEL' with 'FORWARD_MODEL <shell_command>' in your configuration.
gotcha Configuration parsing may fail silently if the config file contains unknown keywords. Always validate with 'ert configdump'. ↓
fix Run 'ert configdump -v <config.ert>' to check for errors.
Imports
- ErtAnalysisError
from ert.analysis import ErtAnalysisError - ert wrong
import libres or import rescorrectimport ert - ErtScript
from ert.script import ErtScript - ert_config
from ert.config import ErtConfig
Quickstart
from ert import ErtConfig
from ert.analysis import ErtAnalysisError
# Load configuration from a file
config = ErtConfig.from_file("config.ert")
print(config)
# Minimal example to run an ensemble experiment
# (requires a valid ERT configuration file with forward model)
# For more details see https://ert.readthedocs.io/en/latest/