Skip to content

Commit

Permalink
Clarify GEN_DATA docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yngve S. Kristiansen committed Jan 22, 2024
1 parent 0465891 commit 1b1bf78
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
26 changes: 14 additions & 12 deletions docs/reference/configuration/keywords.rst
Original file line number Diff line number Diff line change
Expand Up @@ -790,16 +790,21 @@ and/or history matching project.
.. _gen_data:
.. topic:: GEN_DATA

The ``GEN_DATA`` keyword is used to load text files which have been generated
by the forward model.
The ``GEN_DATA`` keyword is used to declare text files that are referred to by
:ref:`GENERAL_OBSERVATIONs <_general_observation>`. It declares
text files which have been generated by the forward model, which will be
loaded by ert when loading general observations.
These text files naming scheme may be arbitrary. The contents of these result files are always:
**exactly one number per line**. If we speak about "indexing" into a ``GEN_DATA`` file,
the "index" always refers to the row number, where the index 0 refers to the first row.
``GEN_DATA`` will only affect the simulation if it is referred to by a
:ref:`GENERAL_OBSERVATION <_general_observation>`.

The GEN_DATA keyword has several options, each of them required:

* RESULT_FILE - This is the name of the file generated by the forward
model and read by ERT. This filename _must_ have a %d as part of the
name, that %d will be replaced by report step when loading.
* INPUT_FORMAT - The format of the file written by the forward model
(i.e. RESULT_FILE) and read by ERT, the only valid value is ASCII.
* REPORT_STEPS - A list of the report step(s) where you expect the
forward model to create a result file. I.e. if the forward model
should create a result file for report steps 50 and 100 this setting
Expand All @@ -812,13 +817,12 @@ and/or history matching project.

::

GEN_DATA 4DWOC INPUT_FORMAT:ASCII RESULT_FILE:SimulatedWOC%d.txt REPORT_STEPS:10,100
GEN_DATA 4DWOC RESULT_FILE:SimulatedWOC%d.txt REPORT_STEPS:10,100

Here we introduce a GEN_DATA instance with name 4DWOC. When the forward
model has run it should create two files with name SimulatedWOC10.txt
and SimulatedWOC100.txt. The result files are in ASCII format, ERT will
look for these files and load the content. The files should be pure
numbers - without any header.
and SimulatedWOC100.txt. For every realization, ERT will look within its storage
for these result files and load the content. **The files must always contain one number per line.**

ERT does not have any awareness of the type of data
encoded in a ``GEN_DATA`` keyword; it could be the result of gravimetric
Expand All @@ -831,12 +835,10 @@ and/or history matching project.

::

GEN_DATA 4DWOC RESULT_FILE:SimulatedWOC_%d.txt INPUT_FORMAT:ASCII REPORT_STEPS:0
GEN_DATA 4DWOC RESULT_FILE:SimulatedWOC_%d.txt REPORT_STEPS:0

The ``4DWOC`` is an arbitrary unique key, ``RESULT_FILE:SimulatedWOC%d.txt``
means that ERT will look for results in the file ``SimulatedWOC_0.txt``. The
``INPUT_FORMAT:ASCII`` means that ERT will expect the result file to be
formatted as an ASCII file.
means that ERT will look for results in the file ``ensembles/<ensemble>/<realization>/SimulatedWOC_0.txt``.

The ``REPORT_STEPS:0`` is tightly bound to the ``%d`` integer format specifier
in the result file - at load time the ``%d`` is replaced with the integer values
Expand Down
6 changes: 4 additions & 2 deletions docs/reference/configuration/observations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The GENERAL_OBSERVATION keyword is used together with the GEN_DATA
type. This pair of observation and data types are typically
used when you want to update something special which does not fit into
any of the predefined types. The ERT application just treats
GENERAL_OBSERVATION (and also GEN_DATA) as a range of numbers with no
GENERAL_OBSERVATION (and also GEN_DATA) as a list of numbers with no
particular structure, this is very flexible, but of course also a bit
more complex to use:

Expand Down Expand Up @@ -154,7 +154,9 @@ This OBS_FILE has three observations: 1.46 +/- 0.26, 25.0 +/- 5.0 and
instance we are observing (i.e. comparing with) has the same number of
elements as the observation, i.e. three in this case. By using the
keyword INDEX_LIST you can select the elements of the
GEN_DATA instance you are interested in. Consider for example:
GEN_DATA instance you are interested in. Each index in INDEX_LIST
points to a line number in the GEN_DATA result file (which has one number per line).
Consider for example:

.. code-block:: none
Expand Down

0 comments on commit 1b1bf78

Please sign in to comment.