Skip to content

Add Python API for importing SUMO ensembles via fmu-sumo package#910

Draft
Copilot wants to merge 3 commits intodevfrom
copilot/design-alternatives-summary-data
Draft

Add Python API for importing SUMO ensembles via fmu-sumo package#910
Copilot wants to merge 3 commits intodevfrom
copilot/design-alternatives-summary-data

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 16, 2026

ResInsight's direct Elastic search queries to SUMO are fragile. This adds a Python-driven integration path using the fmu-sumo package for metadata access, keeping ResInsight's existing parquet-based data loading intact.

Changes

  • RimcProject.h/cpp — New importSummaryEnsembleSumo scriptable PDM method on RimProject. Accepts case_id, case_name, ensemble_name, vector_names, and realization_ids from Python; creates a RimSummarySumoDataSource + RimSummaryEnsembleSumo and registers them in the project. Auto-exposed to Python as project.import_summary_ensemble_sumo(...).

  • RimCloudDataSourceCollection — Added addSumoDataSource() to support programmatic data source creation outside the UI workflow.

  • sumo_ensemble_import.py — Example script demonstrating the pattern: fmu-sumo handles case/ensemble discovery and metadata (the fragile part), ResInsight handles lazy parquet loading.

Usage

from fmu.sumo.explorer import Explorer
import rips

sumo = Explorer(env="prod")
cases = sumo.cases.filter(asset="Drogon")
case = cases[0]
iteration = case.iterations[0]

realization_ids = [str(r) for r in iteration.realizations]
vector_names = [col for col in iteration.tables.filter(tagname="summary")[0].column_names
                if col not in {"DATE", "REAL", "ENSEMBLE"}]

project = rips.Instance.find().project
ensemble = project.import_summary_ensemble_sumo(
    case_id=case.uuid,
    case_name=case.name,
    ensemble_name=iteration.name,
    vector_names=vector_names,
    realization_ids=realization_ids,
)

Copilot AI linked an issue Apr 16, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Suggest designs for ResInsight and SUMO communication Add Python API for importing SUMO ensembles via fmu-sumo package Apr 16, 2026
Copilot AI requested a review from magnesj April 16, 2026 20:24
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.

Design alternatives for summary data from SUMO

2 participants