Skip to content

Add a benchmark of the update schemes on MiniRes twin experiments - #184

Merged
patnr merged 6 commits into
Python-Ensemble-Toolbox:mainfrom
patnr:minires-benchmark
Oct 27, 2026
Merged

patnr merged 6 commits into
Python-Ensemble-Toolbox:mainfrom
patnr:minires-benchmark

Conversation

@patnr

@patnr patnr commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

A script that scores PET's update schemes on many twin experiments of a two-phase waterflood, and keeps the results as committed Markdown tables, so that they are easy to refer to and to update as methods are added or changed. It starts with ES-MDA, without and with adaptive localization (autoadaloc) at two thresholds.

What it does

benchmarks/minires/run.py runs each method on many twin experiments of a waterflood: a 1000 x 1000 x 20 m reservoir with an injector on rate and four producers on bottom-hole pressure, over 40 report steps of which the first 16 are history and the remaining 24 the forecast. It does so at two resolutions, coarse (25 x 25, 20 truths) and fine (50 x 50, 8 truths). The unknowns are the log-permeability field and two fluid scalars, sor and vo (#182), and each truth is drawn from the same prior as the ensemble.

Each method is scored on the history misfit, the forecast water cut on the unseen steps, the field (RMSE, correlation, spread) and each scalar (error, spread). The scores are kept as JSON, from which RESULTS.md is generated: one table per case, its header stating the conditions, each cell the mean over the truths with its standard error. Rows are not ranked.

Both cases together take ~4 min on 8 cores.

Results (coarse case, means over 20 truths)

misfit RMSE forecast WWCT logK RMSE logK corr logK spread sor error sor spread vo error vo spread simulations
prior 91.7 0.221 0.783 0.0201 0.8 0.0314 0.0383 0.676 1.02
ES-MDA (4 steps, α = 4) 1.68 0.0847 0.829 0.205 0.526 0.0349 0.0221 0.602 0.469 250
ES-MDA (4 steps, α = 4), adaptive localization (universal threshold) 29.6 0.146 0.779 0.122 0.773 0.0302 0.0339 0.531 0.894 250
ES-MDA (4 steps, α = 4), adaptive localization (3σ threshold) 17.7 0.123 0.777 0.167 0.752 0.0253 0.0329 0.43 0.773 250

The localization thresholds are the universal one (√(2 ln N) σ) and 3σ, chosen from a comparison of four settings on 3 truths, not from a systematic sweep.

Also

  • tests/test_benchmark_minires.py: a slow smoke test, one tiny experiment per method (~5 s), so that the script cannot rot unnoticed. It runs in CI now that CI: install the minires extra, so that the MiniRes tests run #183 installs the minires extra.
  • Localization is configured per method; its grid (field) is filled in from the case.
  • pyproject.toml: run.py pins the BLAS threads before importing numpy, hence an E402 ignore for that file.

Full suite passes (626 with the minires extra). ruff clean.

🤖 Generated with Claude Code

patnr and others added 3 commits October 27, 2026 15:22
benchmarks/minires/run.py runs each method on many twin experiments of a
waterflood (that of ert's test-data/ert/waterflood: 1000 m five-spot,
producers on BHP, 40 steps of which 16 are history), at 25 x 25 and 50 x 50
cells, with the log-permeability field and two fluid scalars (sor, vo) as
unknowns. Each truth is drawn from the prior; each method is scored on the
history misfit, the forecast of the unseen steps, and the field and scalars
against the truth, separately. The scores are kept in results/<case>.json
and RESULTS.md is generated from them.

One method to begin with (ES-MDA); more follow. A slow smoke test runs one
tiny experiment per method.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patnr
patnr force-pushed the minires-benchmark branch from ccbc5d7 to 279e1a5 Compare October 27, 2026 14:22
patnr and others added 3 commits October 27, 2026 15:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The localization's grid is filled in from the case, since the methods are
shared between cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patnr
patnr merged commit 52c5109 into Python-Ensemble-Toolbox:main Oct 27, 2026
4 checks passed
@patnr
patnr deleted the minires-benchmark branch October 29, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant