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
103 stars 107 forks source link

Performance improvements using FIELDS. Suggestions #1913

Closed oddvarlia closed 3 months ago

oddvarlia commented 3 years ago

Drogon and the RMS plugin for APS now utilize an ERTBOX grid for FIELDS. This ERTBOX grid is created in RMS. It is a 'shoebox' grid with NX, NY equal to the modelling or simulation grid while NZ for this grid is user defined and must be at least as large as the maximum possible number of layers in the zone in the modelling grid with most grid layers. So if the structural uncertainty creates variable number of grid layers, the ERTBOX grids number of layers must be maximum number of layers any structural realization may give. The geomodelling/simulation grid may be created with different types of conformity for each zone:

The main purpose of using the ERTBOX grid instead of the geomodelling grid/ simulation grid is to avoid the practical problems with sampling effects and large grids for fields covering the whole modelling grid instead of individual zones.

The current workflow is as follows when using RMS APS GUI plugin together with FMU/ERT:

About the performance issue:

  1. Since the ERTBOX grid is used, only the GRF's relevant for each modelling grid zone is created. This is an advantage. If e.g. the modelling grid as 3 zones, A, B,C but only zone A and B are modelled with APS, it is only necessary to create the N GRF fields for A and the M GRF fields for B, in total N+M GRF fields, all with size NX x NY x NZ where NZ is the ERTBOX number of layers. It is not necessary to have GRF values covering zone C or equal number of GRF fields for all zones.
  2. The disadvantage using one ERTBOX size for all zones is that NZ may be much larger than necessary for thin zones and therefore allocate space for many GRF cell values that are unphysical (not belonging to any physical grid cell in the geomodel/simulation grid. In the example above the number of model parameters introduced for ERT using FIELD will be (N+M) x NX x NY x NZ. If the maximum number of grid layers necessary for zone A is 5, and for B is 50, the number of values using the current solution with ERTBOX will be (M+N) x NX x NY x 50 while the necessary maximum could have been N x NX x NY x 5 +M x NX x NY x 50
  3. A solution to this may be:
    • Introduce not one common ERTBOX that is re-used for all zones, but a stack of one ERTBOX grid per zone with the ERTBOX size NX x NY x NZ_zone_specific. In practice this can be done by introducing one ERTBOX grid with multiple zones stacked on top of each other. This is very analogous to what RMS can visualize when visualizing a grid in simbox view. The most important difference is that the number of layers for each simbox (each zone) may be larger than what RMS uses in its simbox for the zone since the ERTBOX zone must be able to save enough space for any realisation of the structural model.
    • Introduce a table defining which zones have which GRF field and how many layers the zone needs.
    • Modify the FIELD keyword in ERT to understand that the specified field input is only for a specified zone, not the whole stack of ERTBOX grids.

This proposal may need to be discussed to see if it is can be prioritized or not and how much work it will involve modifying the ERT code for the FIELD command and the consequence of the internal representation of the field data in ERT.

dafeda commented 2 years ago

ERTBOX is not a concept defined in ERT's code as far as I can tell. Do you have some more information on this @oddvarlia ?

oyvindeide commented 3 months ago

Thanks for the suggestion! I think having one GRID per FIELD is the most actionable at the moment, so I split that into a separate issue: #8418, and will close this issue.