equinor / ert

ERT - Ensemble based Reservoir Tool - is designed for running ensembles of dynamical models such as reservoir models, in order to do sensitivity analysis and data assimilation. ERT supports data assimilation using the Ensemble Smoother (ES), Ensemble Smoother with Multiple Data Assimilation (ES-MDA) and Iterative Ensemble Smoother (IES).
https://ert.readthedocs.io/en/latest/
GNU General Public License v3.0
99 stars 104 forks source link

Evaluating `AHM_ANALYSIS` - deprecate, fix, or something else? #7019

Open dafeda opened 5 months ago

dafeda commented 5 months ago

The AHM_ANALYSIS is somewhat broken in that it consumes a lot of memory. See the following issues for details:

Old issue discussing memory issues that are still prevalent:

Newer reports of memory issue:

The idea of AHM_ANALYSIS might be good and parts of it can perhaps be of use in the new Analysis report.

Questions:

What does AHM_ANALYSIS do?

The code itself is documented in this docstring: https://github.com/equinor/semeio/blob/aa6107916e0cb1ea09301c093508600ec573bbbc/src/semeio/workflows/ahm_analysis/ahmanalysis.py#L19-L57

There's also this wiki entry: https://wiki.equinor.com/wiki/FMU_drogon/AHM_ensemble_analytics

Is it in use?

I searched the logs and there seems to be a tiny bit of usage:

image

Note that it is required to create input for the AssistedHistoryMatchingAnalysis plugin in webviz-subsurface, but we don't know if this is in use. The original author of both the workflow and webviz plugin has left the company.

Other issues related to AHM_ANALYSIS:

oyvindeide commented 5 months ago

In the documentation there is a pretty good summary of what it does:

 # Perform an update for all parameters for different observations grouping (1 observation type, all observations-1type, all observations).
    * Localization denotes methods for selecting which observations will impact the update of a particular parameter and/or grid point location. note: Running the localization scheme sequentially on each parameter or for all parameters give similar results
    * The update is done through ES analysis (similar to Run Analysis) for the grouped observations defined in the localization.
 # Then the workflow uses the [Kolmogorov Smirnov test](https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test) to calculate how much the parameters distribution has changed from the prior to posterior for each observation grouping. It gives a value between 0-1: the higher the value the more change.
 # The workflow also extracts how many of the observations in each observation groups are active i.e. used for the update of parameters.

looking through the workflow it is a bit to involved for the current milestone, and we should focus on extracting more information from the update step. Think we should cycle back to this when we investigate sensitivity analysis.