Skip to content

Commit

Permalink
Clarify gen data docs
Browse files Browse the repository at this point in the history
* Clarify GEN_DATA docs
  • Loading branch information
yngve-sk authored Jan 24, 2024
1 parent 626631b commit 05f26d7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
29 changes: 17 additions & 12 deletions docs/reference/configuration/keywords.rst
Original file line number Diff line number Diff line change
Expand Up @@ -790,16 +790,24 @@ 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 key is used to declare a response which corresponds to a
:ref:`GENERAL_OBSERVATION <general_observation>`. It expects to read a
text file produced by the forward model, which will be loaded by ert when
loading general observations. These text files are expected to follow the
same naming scheme for all realizations (ex: ``gd_%d`` which may resolve to
``gd_0``, ``gd_1`` where `%d` is the report step).
The contents of these result are always of this format:
**exactly one floating point number per line**.
Indexing ``GEN_DATA``refers to row number in the forward model's output file,
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 +820,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 +838,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 ``<runpath>/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 @@ -128,7 +128,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 @@ -158,7 +158,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 05f26d7

Please sign in to comment.