csv2res

Some of the modules inside res2df is able to write .DATA files from dataframes (in the format dumped by res2df). This makes it possible to produce .DATA files in any application that can write CSV files, and use this tool to convert it into reservoir simulator files, or it can facilitate operations/manipulations of an existing deck using any tool that can work on CSV files, by first running res2csv on an include file, transforming it, and writing back using csv2res.

Mandatory argument for csv2res is always the submodule responsible, a CSV file, and an --output option to specify which include file to write to. If you want output to your terminal, use - as the output filename. Unless you also specify the --keywords argument with a list of wanted keywords, all supported keywords for a submodule which is also found in the CSV file provided, will be dumped to an output file.

csv2res (1.2.1.dev1+g54630b2c) is a command line frontend to res2df. Documentation at https://equinor.github.io/res2df/

usage: csv2res [-h] [--version] {summary,equil,pvt,satfunc,vfp} ...

Positional Arguments

subcommand

Possible choices: summary, equil, pvt, satfunc, vfp

Named Arguments

--version

show program’s version number and exit

Sub-commands

summary

Write UNSMRY files from CSV files.

csv2res summary [-h] [-o OUTPUT] [-v] [--debug] csvfile

Positional Arguments

csvfile

Name of CSV file with summary data.

Named Arguments

-o, --output

Basename for output files

Default: “SYNTSMRY”

-v, --verbose

Be verbose

Default: False

--debug

Be verbose

Default: False

equil

Write SOLUTION keywords (EQUIL, RSVD, RVVD) to include files from CSV in res2df format.

csv2res equil [-h] [-o OUTPUT] [-k KEYWORDS [KEYWORDS ...]] [-v] csvfile

Positional Arguments

csvfile

Name of CSV file with EQUIL, RSVD++ data with res2df format

Named Arguments

-o, --output

Name of output resdata include file file, default solution.inc. Use ‘-’ for stdout.

Default: “solution.inc”

-k, --keywords

List of EQUIL, RSVD++ keywords to include. If not supplied, all supported and found keywords will be included.

-v, --verbose

Be verbose

Default: False

pvt

Write include files from CSV files with res2df format.

csv2res pvt [-h] [-o OUTPUT] [-k KEYWORDS [KEYWORDS ...]] [-v] csvfile

Positional Arguments

csvfile

Name of CSV file with PVT data with res2df format

Named Arguments

-o, --output

Name of output resdata include file file, default pvt.inc. Use ‘-’ for stdout.

Default: “pvt.inc”

-k, --keywords

List of PVT keywords to include. If not supplied, all supported and found keywords will be included.

-v, --verbose

Be verbose

Default: False

satfunc

Write saturation function include files from CSV files with res2df format.

csv2res satfunc [-h] [-o OUTPUT] [-k KEYWORDS [KEYWORDS ...]] [-v] csvfile

Positional Arguments

csvfile

Name of CSV file with SWOF, SGOF++ data with res2df format

Named Arguments

-o, --output

Name of output resdata include file file, default relperm.inc. Use ‘-’ for stdout.

Default: “relperm.inc”

-k, --keywords

List of SWOF, SGOF++ keywords to include. If not supplied, all supported and found keywords will be included.

-v, --verbose

Be verbose

Default: False

vfp

Write VFPPROD/VFPINJ include files from CSV files with res2df format.

csv2res vfp [-h] [-o OUTPUT] [-k KEYWORDS [KEYWORDS ...]] [-v] csvfile

Positional Arguments

csvfile

Name of CSV file with VFPPROD, VFPINJ data with res2df format

Named Arguments

-o, --output

Name of output resdata include file file, default vfp.inc. Use ‘-’ for stdout.

Default: “vfp.inc”

-k, --keywords

List of VFPPROD, VFPINJ keywords to include. If not supplied, all supported and found keywords will be included.

-v, --verbose

Be verbose

Default: False