res2csv
Most of the functionality in res2df is exposed to the command line through
the script res2csv. The first argument to this script is always
the submodule (subcommand) from which you want functionality. Mandatory argument is
always a .DATA file or sometimes individual
include files, and there is usually an --output
option to specify which file to dump the CSV to.
If you want output to your terminal, use -
as the output filename.
res2csv (1.2.1.dev1+g54630b2c) is a command line frontend to res2df. Documentation at https://equinor.github.io/res2df/
usage: res2csv [-h] [--version]
{grid,summary,nnc,faults,trans,pillars,pvt,rft,fipreports,satfunc,compdat,equil,gruptree,wellcompletiondata,vfp,wellconnstatus,wcon}
...
Positional Arguments
- subcommand
Possible choices: grid, summary, nnc, faults, trans, pillars, pvt, rft, fipreports, satfunc, compdat, equil, gruptree, wellcompletiondata, vfp, wellconnstatus, wcon
Named Arguments
- --version
show program’s version number and exit
Sub-commands
grid
Each cell is represented by one row of data. The coordinates are in the X, Y, and Z columns and represent the grid centre. Volume pr. cell is added and all INIT and UNRST data can be added to the rows
res2csv grid [-h] [--vectors VECTORS [VECTORS ...]] [--rstdates RSTDATES]
[-o OUTPUT] [--stackdates] [--dropconstants] [-v] [--arrow]
DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator. There must exist .INIT and .EGRID files with the same path and basename.
Named Arguments
- --vectors
INIT and/or restart wildcards for vectors to include
Default: “*”
- --rstdates
Point in time to grab restart data from, either ‘first’ or ‘last’, ‘all’, or a date in YYYY-MM-DD format
Default: “”
- -o, --output
Name of output csv file. Use ‘-’ for stdout.
Default: “eclgrid.csv”
- --stackdates
If set, the dates from restart data will not be in the column but instead there will be a DATE column with the dates. Note that the static data will be repeated for each DATE.
Default: False
- --dropconstants
Drop constant columns from the dataset
Default: False
- -v, --verbose
Be verbose
Default: False
- --arrow
Write to pyarrow format
Default: False
summary
This is the time-dependent data for field production data, well profiles etc. Each row contains data for one point in time
res2csv summary [-h] [--time_index TIME_INDEX]
[--column_keys COLUMN_KEYS [COLUMN_KEYS ...]]
[--start_date START_DATE] [--end_date END_DATE] [-p]
[--paramfile PARAMFILE] [-o OUTPUT] [--arrow]
[--include_restart] [-v]
DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator. There must exist a UNSMRY file with the same path and basename.
Named Arguments
- --time_index
Time resolution mnemonic; raw, daily, monthly or yearly. Data at a given point in time applies until the next point in time. If not raw, data will be interpolated. Use interpolated rate vectors with care. Default is raw, which will include clock times. first and last are also accepted and will print data for the first or the last date.
Default: “raw”
- --column_keys
Summary column vector wildcards, space-separated. Default is to include all summary vectors available.
- --start_date
Start at a specific date, in ISO format YYYY-MM-DD. Ignored if time_index is first or last
Default: “”
- --end_date
End at a specific date, in ISO format YYYY-MM-DD. Ignored if time_index is first or last
Default: “”
- -p, --params
Merge key-value data from parameter file into each row.
Default: False
- --paramfile
Filename of key-value parameter file to look for if -p is set, relative to simulator input (.DATA) file or an absolute filename. If not supplied, parameters.{json,yml,txt} in {., .. and ../..} will be merged in.
- -o, --output
Name of output file. Use ‘-’ to write to stdout. Default ‘summary.csv’
Default: “summary.csv”
- --arrow
Write to pyarrow format
Default: False
- --include_restart
Attempt to include data from before restart
Default: False
- -v, --verbose
Be verbose
Default: False
nnc
Extract NNC (Non-Neighbour Connection) data from the EGRID file. Each row is one connection, with the columns I1, J1, K1 for the first cell in the cell pair, and I2, J2, K2 for the second. The transmissibility for the cell pair is in the TRAN column. See also the trans subcommand.
res2csv nnc [-h] [-c] [-p] [-o OUTPUT] [-v] DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator. There must exist .INIT and .EGRID files with the same path and basename.
Named Arguments
- -c, --coords
Add xyz coords of connection midpoint
Default: False
- -p, --pillars, --vertical
Only dump vertical (along pillars) connections
Default: False
- -o, --output
Name of output csv file.
Default: “nnc.csv”
- -v, --verbose
Be verbose
Default: False
faults
Each row represents a particular cell and a face and the name of the fault
res2csv faults [-h] [-o OUTPUT] [-v] DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator
Named Arguments
- -o, --output
Name of output csv file.
Default: “faults.csv”
- -v, --verbose
Be verbose
Default: False
trans
Extract transmissibilities (TRANX, TRANY, TRANZ) from simulator binary output files. Each row represent a connection between a cell pair (I1, J1, K1) and (I2, J2, K2). It is possible to add INIT vectors for each of the cell in the cell pair, e.g. FIPNUM can be added as FIPNUM1 and FIPNUM2, and it is possible to filter to connections where f.ex FIPNUM change
res2csv trans [-h] [--vectors VECTORS [VECTORS ...]] [--boundaryfilter]
[--onlyk] [--onlyij] [--coords] [--group] [--nnc] [-v]
[-o OUTPUT]
DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator. There must exist INIT and EGRID files with the same path and basename.
Named Arguments
- --vectors
Extra INIT vectors to be added
- --boundaryfilter
Filter to connections where the INIT vector change value. Only one INIT vector allowed.
Default: False
- --onlyk
Filter to only K direction
Default: False
- --onlyij
Filter to only IJ-plane
Default: False
- --coords
Add coordinates to dataframe
Default: False
- --group
Group transmissibilities over region interfaces. Specify the region name in –vectors
Default: False
- --nnc
Add NNC transmissibilities to the same dataframe
Default: False
- -v, --verbose
Be verbose
Default: False
- -o, --output
Name of output csv file. Use ‘-’ for stdout
Default: “trans.csv”
pillars
Compute statistics pr. pillar in a cornerpoint grid, or alternatively by region parameter. Volumetrics, in-place, and contacts.
res2csv pillars [-h] [--region REGION] [--rstdates RSTDATES] [--stackdates]
[--soilcutoff SOILCUTOFF] [--sgascutoff SGASCUTOFF]
[--swatcutoff SWATCUTOFF] [--group] [-o OUTPUT] [-v]
DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator. There must exist .INIT and .EGRID files with the same path and basename.
Named Arguments
- --region
Name of region parameter for which to separate the computations. Set to empty string to have no grouping (only by pillar).
Default: “”
- --rstdates
Point in time to grab restart data from, either ‘first’ or ‘last’, ‘all’ or a date in YYYY-MM-DD format
Default: “”
- --stackdates
If set, the dates from restart data will not be in the column but instead there will be a DATE column with the dates. Note that the static data will be repeated for each DATE.
Default: False
- --soilcutoff
If supplied as float, an oil-water contact will be estimated pr. pillar, based on the deepest cell with SOIL above the given cutoff. Value is put in column OWC.
Default: 0.5
- --sgascutoff
If supplied, a gas contact will be estimated pr pillar, based on the deepest cell with SGAS above the given cutoff. Value is put in column GOC.
Default: 0.5
- --swatcutoff
For OWC or GWC computations, only pillars with at least one cell with water saturation above this value will be considered.
Default: 0.5
- --group
If set, output will not be pr. pillar, but grouped over all pillars. If –region is set, data will be grouped over that vector. The aggregation operator is sum or mean, depending on datatype.
Default: False
- -o, --output
Name of output csv file.
Default: “pillars.csv”
- -v, --verbose
Be verbose
Default: False
pvt
Extract data for the PVT keywords in a .DATA file and merge all data into a single dataframe. Supported keywords are PVTO, PVDO, PVTG, PVDG, PVTW, ROCK and DENSITY. Gas phase pressure and oil phase pressure are both called PRESSURE in the resulting dataframe, similar for volume factors and viscosity. Deduce meaning for column names from the Eclipse manual. The column KEYWORD denotes which PVT keyword a particular data row stems from.
res2csv pvt [-h] [-o OUTPUT] [-k KEYWORDS [KEYWORDS ...]] [-v] DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator, or file with PVT keywords.
Named Arguments
- -o, --output
Name of output csv file, default pvt.csv. Use ‘-’ for stdout.
Default: “pvt.csv”
- -k, --keywords
List of PVT keywords to include. If not supplied, all supported keywords will be included.
- -v, --verbose
Be verbose
Default: False
rft
Extract RFT data from simulator binary output files to CSV. Each row in the resulting table represents one point in a particular well at a particular time. If multisegment wells are found, associated data to a connection is merged onto the same row as additional columns. You need the keyword WRFTPLT present in your .DATA file to get the data outputted.
res2csv rft [-h] [--wellname WELLNAME] [--date DATE] [-o OUTPUT] [-v]
[--debug]
DATAFILE
Positional Arguments
- DATAFILE
Name of .DATA input file for the reservoir simulator, or RFT file. If .DATA file is provided, it will look for the associated .DATA file
Named Arguments
- --wellname
Restrict data to one named well
- --date
Restrict data to one date, YYYY-MM-DD
- -o, --output
Name of output CSV file.
Default: “rft.csv”
- -v, --verbose
Be verbose
Default: False
- --debug
Debug mode
Default: False
fipreports
Extract FIPxxxxx REPORT REGION data from PRT file. This parses currently in-place, outflows to wells and regions, and material balance errors
res2csv fipreports [-h] [--fipname FIPNAME] [-o OUTPUT] [-v] [--debug] PRTFILE
Positional Arguments
- PRTFILE
PRT file (or .DATA file)
Named Arguments
- --fipname
Region parameter name of interest
Default: “FIPNUM”
- -o, --output
Output CSV filename
Default: “outflow.csv”
- -v, --verbose
Be verbose
Default: False
- --debug
Debug mode for logging
Default: False
satfunc
Data for all saturation functions are merged into one dataframe for all SATNUMs. Each row has data for a saturation point. For SWOF data, all columns related to SGOF are empty and vice versa
res2csv satfunc [-h] [-o OUTPUT] [-k KEYWORDS [KEYWORDS ...]] [-v] DATAFILE
Positional Arguments
- DATAFILE
Name of .DATA input file for the reservoir simulator, or file with saturation functions.
Named Arguments
- -o, --output
Name of output csv file.
Default: “satfuncs.csv”
- -k, --keywords
List of saturation function keywords to fetch data from. If not supplied, all supported keywords will be included.
- -v, --verbose
Be verbose
Default: False
compdat
Each row represents a cell connection to a well. Only COMPDAT data is exposed in CSV output currently.
res2csv compdat [-h] [-o OUTPUT] [--initvectors INITVECTORS [INITVECTORS ...]]
[-v]
DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator
Named Arguments
- -o, --output
Name of output csv file.
Default: “compdat.csv”
- --initvectors
List of INIT vectors to merge into the data
- -v, --verbose
Be verbose
Default: False
equil
Each row contains the equilibriation data for one EQLNUM.
res2csv equil [-h] [-o OUTPUT] [-k KEYWORDS [KEYWORDS ...]] [-v] DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator
Named Arguments
- -o, --output
Name of output csv file. Use ‘-’ for stdout.
Default: “equil.csv”
- -k, --keywords
List of EQUIL/SOLUTION keywords to include. If not supplied, all supported keywords will be included.
- -v, --verbose
Be verbose
Default: False
gruptree
Each row represents an edge in the GRUPTREE at a specific date.
res2csv gruptree [-h] [-o OUTPUT] [-p] [--startdate STARTDATE] [-v] DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator
Named Arguments
- -o, --output
Name of output csv file. No CSV dump if empty
Default: “”
- -p, --prettyprint
Pretty-print the tree structure
Default: False
- --startdate
First schedule date if not defined in input file, YYYY-MM-DD
- -v, --verbose
Be verbose
Default: False
wellcompletiondata
Each row represents a completion, aggregated from layer to zone.
res2csv wellcompletiondata [-h] [--zonemap ZONEMAP] [-o OUTPUT]
[--use_wellconnstatus]
[--excl_well_startswith EXCL_WELL_STARTSWITH]
[--arrow] [-v]
DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator. There must exist a UNSMRY file with the same path and basename
Named Arguments
- --zonemap
Name of lyr file with layer->zone mapping
Default: “rms/output/zone/simgrid_zone_layer_mapping.lyr”
- -o, --output
Name of output csv file. Use ‘-’ to write to stdout. Default ‘well_completion_data.csv’
Default: “well_completion_data”
- --use_wellconnstatus
Use well connection status extracted from CPI* summary data.
Default: False
- --excl_well_startswith
Exludes wells that starts with this string from the export.
- --arrow
Write to pyarrow format
Default: False
- -v, --verbose
Be verbose
Default: False
vfp
Each row represent BHP value for given value of interpolation values
res2csv vfp [-h] [-o OUTPUT] [-k KEYWORD] [-n VFPNUMBERS] [-v] [--arrow]
DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator
Named Arguments
- -o, --output
Name of output csv file. No CSV dump if empty
Default: “”
- -k, --keyword
VFP keywords to include, i.e. VFPPROD or VFPINJ
Default: “”
- -n, --vfpnumbers
List of VFP table numbers to include. Format [1,2,4:10]
Default: “”
- -v, --verbose
Be verbose
Default: False
- --arrow
Write to pyarrow format
Default: False
wellconnstatus
Each row represents an event where a well connection is changing status.
res2csv wellconnstatus [-h] [-o OUTPUT] [-v] DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file for the reservoir simulator. There must exist a UNSMRY file with the same path and basename.
Named Arguments
- -o, --output
Name of output csv file. Use ‘-’ to write to stdout. Default ‘well_connection_status.csv’
Default: “well_connection_status.csv”
- -v, --verbose
Be verbose
Default: False
wcon
Each row represents the control data for a certain well or well wildcard at a specific date
res2csv wcon [-h] [-o OUTPUT] [-v] DATAFILE
Positional Arguments
- DATAFILE
Name of the .DATA input file or include file.
Named Arguments
- -o, --output
Name of output csv file.
Default: “wcon.csv”
- -v, --verbose
Be verbose
Default: False