equinor / equinor/ert

Duplicate indecies should potentially be an error rather than silently resolved by taking the mean

Open
#8,955 0 comments 0 reactions 0 assignees View on GitHub
needs-discussion
Dominant language
Python
Stars
161
Forks
140
Avg merge
2d 1h
Merged PRs (30d)
138

Description

Currently the mean is calculated for duplicate indecies in analysis:
https://github.com/equinor/ert/blob/12d2b53e70fdd0341e208e120e3786ca07c2b998/src/ert/analysis/_es_update.py#L168-L175

and in dark_storage:

https://github.com/eivindjahren/ert/blob/892333927177babb9ef3001b51d008f6d82e1400/src/ert/dark_storage/common.py#L124-L126

This can happen if the simulator returns a summary with two different values for the same time. This an inconsistent result, but could also be the result of loss of precision. We should decide what to do in this case as the silent calculation of mean seems too be less than ideal.

Contributor guide

Open the contributing guide

Research direction

Start by reading src/ert/analysis/_es_update.py around lines 168-175 and dark_storage/common.py around lines 124-126 to understand how duplicate indices are currently handled. Investigate whether duplicate simulator summary values represent inconsistent results or precision loss, then establish the intended behavior and tests; done means the policy is agreed and consistently implemented in both locations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.