This repository has been archived by the owner on Jul 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
share/ert/forward-models/docs/description/CAREFUL_COPY_FILE.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
The :code:`CAREFUL_COPY_FILE` job will copy a file. If the :code:`<TO>` | ||
argument has a directory component, that directory will be created. | ||
This is an extension of the normal :code:`cp` command | ||
which will *not* create directories in this way. | ||
This job superseded an older version called :code:`CAREFULL_COPY` | ||
and should be used instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The job copies the directory :code:`<FROM>` to the target :code:`<TO>`. If | ||
:code:`<TO>` points to a non-existing directory structure, it will be | ||
created first. If the :code:`<TO>` folder already exist it creates a new directory within the existing one. | ||
E.g. :code:`COPY_DIRECTORY (<FROM>=foo, <TO>=bar)` creates :code:`bar/foo` if the directory | ||
:code:`bar` already exists. If :code:`bar` does not exist it becomes a copy of :code:`foo`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
The :code:`COPY_FILE` job will copy a file. If the :code:`<TO>` | ||
argument has a directory component, that directory will be created. | ||
This is an extension of the normal :code:`cp` command | ||
which will *not* create directories in this way. |
6 changes: 6 additions & 0 deletions
6
share/ert/forward-models/docs/description/DELETE_DIRECTORY.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
The :code:`DELETE_DIRECTORY` job will recursively remove a directory | ||
and all the files in the directory. Like the :code:`DELETE_FILE` job | ||
it will *only* delete files and directories which are owned by the | ||
current user. If one delete operation fails the job will continue, but | ||
unless all delete calls succeed (parts of) the directory structure | ||
will remain. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
The :code:`DELETE_FILE` job will *only* remove files which are owned | ||
by the current user, *even if* file system permissions would have | ||
allowed the delete operation to proceed. The :code:`DELETE_FILE` will | ||
*not* delete a directory, and if presented with a symbolic link it | ||
will *only* delete the link, and not the target. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Will create the directory :code:`<DIRECTORY>`, with all sub | ||
directories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Will create a symbolic link with name :code:`<LINKNAME>` which points to | ||
:code:`<TARGET>`. If :code:`<LINKNAME>` already exists, it will be updated. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The :code:`MOVE_FILE` job will move file to target directory. | ||
If file already exists, this job will move file to the target directory | ||
and then replace the existing file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Forward model for running RMS batches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Will create a symbolic link with name :code:`<LINKNAME>` which points to | ||
:code:`<TARGET>`. If :code:`<LINKNAME>` already exists, it will be updated. |
3 changes: 3 additions & 0 deletions
3
share/ert/forward-models/docs/description/TEMPLATE_RENDER.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Loads the data from each file (:code:`some/path/filename.xxx`) in :code:`INPUT_FILES` | ||
and exposes it as the variable :code:`filename`. It then loads the Jinja2 | ||
template :code:`TEMPLATE_FILE` and dumps the rendered result to :code:`OUTPUT`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: bash | ||
FORWARD_MODEL CAREFUL_COPY_FILE(<FROM>=file1, <TO>=path/to/directory/file1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.. code-block:: bash | ||
FORWARD_MODEL COPY_FILE(<FROM>=file1, <TO>=path/to/directory/file1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The version, number of cpu and whether or not to ignore errors can | ||
be configured in the configuration file when adding the job, as such: | ||
|
||
.. code-block:: bash | ||
FORWARD_MODEL ECLIPSE100(<ECLBASE>, <VERSION>=xxxx, <OPTS>="--ignore-errors") | ||
The :code:`OPTS` argument is optional and can be removed, thus running eclipse | ||
without ignoring errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The version, number of cpu and whether or not to ignore errors can | ||
be configured in the configuration file when adding the job, as such: | ||
|
||
.. code-block:: bash | ||
FORWARD_MODEL ECLIPSE300(<ECLBASE>, <VERSION>=xxxx, <OPTS>="--ignore-errors") | ||
The :code:`OPTS` argument is optional and can be removed, thus running eclipse | ||
without ignoring errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
The version, number of cpu and whether or not to ignore errors can | ||
be configured in the configuration file when adding the job, as such: | ||
|
||
.. code-block:: bash | ||
FORWARD_MODEL FLOW(<ECLBASE>, <VERSION>=xxxx, <OPTS>="--ignore-errors") | ||
The :code:`OPTS` argument is optional and can be removed, thus running flow | ||
without ignoring errors. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Running the forward model | ||
######################### | ||
|
||
.. code-block:: bash | ||
FORWARD_MODEL RMS(<IENS> <RMS_PROJECT> <RMS_WORKFLOW>) | ||
RMS script documentation | ||
######################## | ||
|
||
The script must be invoked with minimum three positional arguments: | ||
|
||
Positional arguments: | ||
IENS | ||
Realization number | ||
RMS_PROJECT | ||
The RMS project we are running | ||
RMS_WORKFLOW | ||
The rms workflow we intend to run | ||
|
||
Optional arguments: | ||
-r, --run-path RUN_PATH | ||
The directory which will be used as cwd when running | ||
rms | ||
-t, --target-file TARGET_FILE | ||
name of file which should be created/updated by rms | ||
-i, --import-path IMPORT_PATH | ||
the prefix of all relative paths when rms is importing | ||
-e, --export-path EXPORT_PATH | ||
the prefix of all relative paths when rms is exporting | ||
-v, --version VERSION | ||
the prefix of all relative paths when rms is exporting |
25 changes: 25 additions & 0 deletions
25
share/ert/forward-models/docs/examples/TEMPLATE_RENDER.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Given an input file :code:`my_input.json`: | ||
|
||
.. code-block:: json | ||
{ | ||
"my_variable": "my_value" | ||
} | ||
And a template file :code:`tmpl.jinja`: | ||
|
||
.. code-block:: bash | ||
This is written in my file together with {{my_input.my_variable}} | ||
This job will produce an output file: | ||
|
||
.. code-block:: bash | ||
This is written in my file together with my_value | ||
By invoking the :code:`FORWARD_MODEL` as such: | ||
|
||
.. code-block:: bash | ||
FORWARD_MODEL TEMPLATE_RENDER(<INPUT_FILES>=my_input.json, <TEMPLATE_FILE>=tmpl.jinja, <OUTPUT_FILE>=output_file) |