opm-common/docs/man1/rst_deck.1
2022-11-01 23:32:24 +01:00

89 lines
4.0 KiB
Groff

.TH RST_DECK: "1" "October 2022" "rst_deck 2022.10" "User Commands"
.SH NAME
rst_deck \- Convert simulation deck to a deck ready for restart
.SH DESCRIPTION
The rst_deck program will load a simulation deck and parameters for a restart
and reformat the deck to become a restart deck. Before the updated deck is
output the program will update the SOLUTION and SCHEDULE sections. All keywords
from the SOLUTION section will be cleared out(1) and a RESTART keyword will be
inserted. In the SCHEDULE section the program can either remove all keywords up
until the restart date, or alternatively insert SKIPREST immediately following
the SCHEDULE keyword.
.PP
When creating the updated restart deck the program can either link to unmodified
include files with INCLUDE statements, create a copy of deck structure in an
alternative location or create one large file with all keywords in the same
file. Apart from the alterations to support restart the output deck will be
equivalent to the input deck, but formatting is not retained and comments have
been stripped away.
.PP
Arguments:
.PP
1. The data file we are starting with.
.PP
2. The restart source; this can either be a basename with an optional path
.IP
prefix and a :N to restart from step N; alternatively you can point to an
existing restart file. If you point to an existing restart file the input
will be validated in several ways:
.IP
a) Unified/multiple files will be checked against the UNIFIN setting of
.IP
the deck.
.IP
b) Formatted/unformatted will be checked against the FMTIn setting of the
.IP
deck.
.IP
c) If a single file like \fI\,/path/to/case/HISTORY.X0067\/\fP is given as argument the
.IP
:N notation to denote report step should not be used.
.IP
If the restart argument is given as the path to an existing file the content
of the RESTART keyword will be updated to contain the correct path from the
location of the restart deck to the location of the restart file. This path
awareness will be fooled if the restart deck is redirected from stdout to a
path different from cwd. If the restart argument is given as an absolute
filename the RESTART keyword will have an absolute path, if the restart
argument is a relative path the RESTART keyword will get a relative path \-
although an absolute path will be used if the restart file and the output
deck have different roots. If the restart argument is given as a string not
pointing to an existing file it will be inserted verbatim in the restart
deck.
.IP
A restart step value of 0 is interpreted as a dry run \- a deck which has not
been set up for restart will be written out.
.PP
3. Basename of the restart deck we create, can optionally contain a path prefix;
.IP
the path will be created if it does not already exist. This argument is
optional, if it is not provided the program will dump a restart deck on
stdout. If the argument corresponds to an existing directory the restart case
will get the same name as the base case.
.SH OPTIONS
\fB\-s\fR: Manipulate the SCHEDULE section by inserting a SKIPREST keyword immediately
.IP
following the SCHEDULE keyword. If the \fB\-s\fR option is not used the SCHEDULE
section will be modified by removing all keywords until we reach the restart
date.
.PP
\fB\-m\fR: [share|inline|copy] The restart deck can reuse the unmodified include files
.IP
from the base case, this is mode 'share' and is the default. With mode
\&'inline' the restart deck will be one long file and with mode 'copy' the
file structure of the base case will be retained. The default if no \fB\-m\fR
option is given is the 'share' mode.
.IP
In the case of 'share' and 'copy' the correct path to include files will be
negotiated based on the path given to the output case in the third argument.
If the restart deck is passed to stdout the include files will be resolved
based on output in cwd.
.PP
Example:
.IP
rst_deck \fI\,/path/to/history/HISTORY.DATA\/\fP rst/HISTORY:30 \fI\,/path/to/rst/RESTART\/\fP \fB\-s\fR
.PP
1: The program has a compiled list of keywords which will be retained in the
.IP
SOLUTION section. The current value of that list is: RPTRST