Skip to content

Expose RMS seed value from RMS_SEED_USED file as a realization parameter - #14400

Open
magnesj wants to merge 2 commits into
OPM:devfrom
magnesj:expose-rms-seed-14391
Open

Expose RMS seed value from RMS_SEED_USED file as a realization parameter#14400
magnesj wants to merge 2 commits into
OPM:devfrom
magnesj:expose-rms-seed-14391

Conversation

@magnesj

@magnesj magnesj commented Jul 29, 2026

Copy link
Copy Markdown
Member

Fixes #14391

Expose the RMS seed value from the RMS_SEED_USED file as a realization parameter, making it available for filtering, grouping, coloring, histograms, and correlation plots like any other ensemble parameter.

Changes

  • Add RifRmsSeedFileReader with a locator that searches for rms/model/RMS_SEED_USED in the parent directories of the summary model path (same walk-up pattern as the parameters file locator, using cheap existence checks instead of directory enumeration), and a parser that reads the seed value from the last token of the last non-empty line, supporting content like 25-07-2025 10:33:06 ... 81472369. Missing or malformed files are ignored silently.
  • Inject the seed as a numeric realization parameter named RMS_SEED_USED in addCaseRealizationParametersIfFound(), next to the existing RI:REALIZATION_NUM injection, covering both the sequential and parallel ensemble import paths. The name RMS_SEED_USED is used instead of RMS_SEED to avoid colliding with the RMS_SEED design parameter commonly present in FMU parameters.txt files.
  • Fix a latent null pointer dereference in addCaseRealizationParametersIfFound() when a located parameters file did not produce a reader or parsing threw.
  • Add unit tests for the locator and parser with test data for a realistic realization-1/iter-0 directory layout, multi-line files, and invalid content.
  • Extend RifEnsembleImportConfig with an RMS seed file path pattern so large ensembles avoid per-realization file system searches: the file is located for the first two realizations only, and the path for all other realizations is derived by pattern substitution, matching the existing parameter file mechanism. When the first two realizations have no seed file, seed lookup is skipped entirely for the remaining realizations.

Verified with the Drogon AHM ensemble, where RMS_SEED_USED shows up as an ensemble parameter with the expected per-realization seed values.

@magnesj
magnesj requested a review from kriben July 29, 2026 09:35
@magnesj magnesj self-assigned this Jul 29, 2026
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.

Expose RMS Seed Value from RMS_SEED_USED File as a Realization Attribute

1 participant