Skip to content

Commit

Permalink
Merge pull request #20 from jcrivenaes/cleanup
Browse files Browse the repository at this point in the history
Cleanup
  • Loading branch information
jcrivenaes authored Jun 10, 2020
2 parents f4230a7 + c9f5665 commit 24fb713
Show file tree
Hide file tree
Showing 22 changed files with 1,937 additions and 45 deletions.
30 changes: 15 additions & 15 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Examples to learn from
.. Notice that YAML files included are also input to testing
and this secures consistency!
Below is a presentation of Troll config files
Below is a presentation of Ogre config files

--------------------
Troll example config
Ogre example config
--------------------

Troll has a large number of surfaces, and for convenience these lists
are places into separate files.
Ogre has a large number of surfaces, and for convenience these lists
are places into separate files. Note that these data are fake data.


The main global config file
"""""""""""""""""""""""""""

.. literalinclude:: ../tests/data/yaml/troll2/global_master_config.yml
.. literalinclude:: ../tests/data/yml/ogre/global_master_config.yml
:language: yaml

The include files
Expand All @@ -27,27 +27,27 @@ Note that the include files starts on indent level "zero".

rms_horizons.yml

.. literalinclude:: ../tests/data/yaml/troll2/rms_horizons.yml
.. literalinclude:: ../tests/data/yml/ogre/rms_horizons.yml
:language: yaml

rms_zones.yml

.. literalinclude:: ../tests/data/yaml/troll2/rms_zones.yml
.. literalinclude:: ../tests/data/yml/ogre/rms_zones.yml
:language: yaml


------------------------
Sverdrup example config
------------------------
Note that these data are fake data. In this example, a simplified version of the FREE IPL variables
is used, which perhaps should be the preferred form.
----------------------
Vinstre example config
----------------------
Note that these data are fake data. In this example, a simplified version of the
FREE IPL variables is used, which perhaps should be the preferred form.

.. literalinclude:: ../tests/data/yaml/jsverdrup/global_master_config.yml
.. literalinclude:: ../tests/data/yml/vinstre/global_master_config.yml
:language: yaml

The included file:

.. literalinclude:: ../tests/data/yaml/jsverdrup/fwl2.yml
.. literalinclude:: ../tests/data/yml/vinstre/fwl2.yml
:language: yaml


Expand All @@ -57,7 +57,7 @@ Using the config in RMS, IPL and Python

IPL example
"""""""""""
.. code-block:: bash
.. code-block:: text
Include("../input/global_variables/global_variables.ipl")
Expand Down
9 changes: 5 additions & 4 deletions docs/yamlformat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,13 @@ This variant is not allowed::

!include something.yml

However, one can use an anonymous keywords, which is any word that starts with to underscores::
However, one can use an anonymous keywords, which is any word that starts with to
underscores::

__tmpword: !include something.yml


Note here that ``__tmpword`` will not be a part of the configuration. See later Johan Sverdrup
Note here that ``__tmpword`` will not be a part of the configuration. See later Vinstre
example where this technique is applied.


Expand All @@ -162,8 +163,8 @@ Within the ``rms`` section there may be 3 significant subheadings:
* zones
* kwlists

These are reserved for Horizon, Zone or keyword listing, and will usually (always?) never
contain uncertainties; they are just lists to facilitate looping with RMS
These are reserved for Horizon, Zone or keyword listing, and will usually (always?)
never contain uncertainties; they are just lists to facilitate looping with RMS
Python or IPL.

Examples:
Expand Down
Empty file.
Empty file removed tests/data/examples/js/README.md
Empty file.
Empty file.
163 changes: 163 additions & 0 deletions tests/data/yml/ogre/global_master_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
---
# Master global config for Ogre
# Prototype by JRIV

# ------------------------------------------------------------------------------
# Global settings
# ------------------------------------------------------------------------------

global:

DATES: &global_dates
- 1991-07-01
- 2001-07-01
- 2003-07-01
- 2005-07-01
- 2010-07-01
- 2013-06-01
- 2016-07-01

DIFFDATES: &global_diffdates
- [2001-07-01, 1991-07-01]
- [2003-07-01, 2001-07-01]
- [2005-07-01, 2003-07-01]
- [2007-07-01, 2005-07-01]
- [2010-07-01, 2007-07-01]
- [2013-06-01, 2010-07-01]
- [2016-07-01, 2013-06-01]
- [2003-07-01, 1991-07-01]
- [2005-07-01, 1991-07-01]
- [2007-07-01, 1991-07-01]
- [2010-07-01, 1991-07-01]
- [2013-06-01, 1991-07-01]
- [2016-07-01, 1991-07-01]

FWL: &global_fwl
- 3953.0
- 3960.0
- 3957.0
- 3957.5
- 3957.5
- 3957.5
- 3957.5
- 3957.5
- 3957.5
- 3955.5
- 3953.0
- 3952.5
- 3957.5
- 3957.5
- 3957.5
- 3957.5
- 3957.5
- 3968.0
- 3967.5
- 3968.5
- 3967.5

GOC: &global_goc
- 3943.0
- 3945.0
- 3942.0
- 3944.5
- 3944.5
- 3944.5
- 3944.5
- 3946.0
- 3946.0
- 3942.5
- 3945.0
- 3944.5
- 3944.5
- 3944.5
- 3944.5
- 3944.5
- 3944.5
- 3941.0
- 3941.5
- 3942.5
- 3946.0


# ------------------------------------------------------------------------------
# RMS settings
# ------------------------------------------------------------------------------
rms:
horizons: !include rms_horizons.yml
zones: !include rms_zones.yml

# the following entries are called freeform entries:

WELLMODEL:
dtype: bool
value: true ~ <WELLMODEL>

WELLMODEL2: yes ~ <WELLMODEL2>

SOMEXMODEL: false

SOMEBOOL1:
- true ~ <>
- false ~ <>
- true

SOMEBOOL2:
dtype: bool
values:
- true
- false
- true

FWL: *global_fwl

GOC: *global_goc

# here example with dtype and value (not required)
KH_MULT_CSAND:
dtype: float
value: 1.0 ~<KH_MULT_CSAND> # in <...>: template value from ERT

KH_MULT_MTR: 1.0 ~ <KH_MULT_MTR>

KH_MULT_MST: 1.0

# for dates, spesifying dtype can be more safe, but not required. Ad always treat
# dates as "values", not "value" (since dates are complex data types)
# I.e. treat dates always as lists.
TESTSOMEDATE:
dtype: date
values:
- 2017-01-01

# this should also work.
TESTSOMEOTHERDATE:
- 2017-01-02

TESTSOMEDATEPAIR:
dtype: datepair
values: [[2017-01-01, 2018-01-01]]

# Dates wihtout dtype/values
EDATES: *global_dates

4D_DATES:
dtype: date
values: *global_dates

DIFF4D_DATES: *global_diffdates

# -----------------------------------------------------------------------------
# Relperm and PC related (shows use of anchors and aliases)
# -----------------------------------------------------------------------------
A_OIL_CSAND: &aoilcsa 11.978799 ~ <A_OIL_CSAND>

A_OIL_MTR: &aoilmtr 2.7431~<A_OIL_MTR>

A_OIL_MST: &aoilmst 1.4545

BOIL: -20.99 ~ <BOIL>

# A_OIL_MST: bull

# refer to as aliases
AVALUE: [*aoilcsa, *aoilmtr, *aoilmst, *aoilcsa, *aoilmtr, *aoilmst]
Loading

0 comments on commit 24fb713

Please sign in to comment.