PRTVOL2CSV
Extract in-place volumes per FIPNUM, or any FIP vector specified, from an Eclipse PRT file and dump to CSV file.
If a yaml file is specified through options, it is possible to add columns with region and zone information to each FIPNUM. The YAML file must contain the keys “region2fipnum” and/or “zone2fipnum”. A YAML file can only be used together with FIPNUM, - not with any additional FIP vector.
usage: prtvol2csv [-h] [--outputfilename OUTPUTFILENAME] [--fipname FIPNAME]
[--rename2fipnum] [--yaml YAML] [-v] [--dir DIR] [--debug]
[--version]
DATAfile
Positional Arguments
- DATAfile
Name of Eclipse or OPM Flow DATA file, PRT file or fileroot
Named Arguments
- --outputfilename
CSV filename to write, including path. Directory must exist.
Default: “simulator_volume_fipnum.csv”
- --fipname
Specify FIP-name, for an additional FIP vector.
Default: “FIPNUM”
- --rename2fipnum
Rename the additional FIP vector to FIPNUM.
Default: False
- --yaml, --regions
YAML file containing a fipnum2region and/or fipnum2zone dictionary (or the reverse maps region2fipnum/zone2fipnum).
- -v, --verbose
Be verbose, print the tables
Default: False
- --dir
This option is deprecated and MUST be set to “.” for future compatibility.
- --debug
Debug mode
Default: False
- --version
show program’s version number and exit
Eclipse PRT volumetric data
The script will read numbers from the line with CURRENTLY IN PLACE
in Eclipse PRT files:
=================================
: FIPNUM REPORT REGION 1 :
: PAV = 305.89 BARSA:
: PORV= 78815548. RM3 :
:--------------- OIL SM3 ---------------:-- WAT SM3 -:--------------- GAS SM3 ---------------:
: LIQUID VAPOUR TOTAL : TOTAL : FREE DISSOLVED TOTAL :
:-------------------------:-------------------------------------------:----------------:-------------------------------------------:
:CURRENTLY IN PLACE : 10656981. 10656981.: 59957809. : 0. 1960884420. 1960884420.:
:-------------------------:-------------------------------------------:----------------:-------------------------------------------:
:OUTFLOW TO OTHER REGIONS : 0. 0.: 0. : 0. 0. 0.:
:OUTFLOW THROUGH WELLS : 0.: 0. : 0.:
:MATERIAL BALANCE ERROR. : 0.: 0. : 0.:
:-------------------------:-------------------------------------------:----------------:-------------------------------------------:
:ORIGINALLY IN PLACE : 10656981. 10656981.: 59957809. : 0. 1960884420. 1960884420.:
:-------------------------:-------------------------------------------:----------------:-------------------------------------------:
====================================================================================================================================
Additionally, if the Eclipse DATA file includes
RPTSOL
FIP=2 'FIPRESV' /
the PRT-file will also contain a table with pore volumes per phase and per FIPNUM, which will be added to the exported table. FIPRESV will include reservoir volumes (RM3).
===================================
: RESERVOIR VOLUMES RM3 :
:---------:---------------:---------------:---------------:---------------:---------------:
: REGION : TOTAL PORE : PORE VOLUME : PORE VOLUME : PORE VOLUME : PORE VOLUME :
: : VOLUME : CONTAINING : CONTAINING : CONTAINING : CONTAINING :
: : : OIL : WATER : GAS : HYDRO-CARBON :
:---------:---------------:---------------:---------------:---------------:---------------:
: FIELD : 399202846.: 45224669.: 353978177.: 0.: 45224669.:
: 1 : 78802733.: 17000359.: 61802374.: 0.: 17000359.:
: 2 : 79481140.: 0.: 79481140.: 0.: 0.:
===========================================================================================
If FIP=3 in RPTSOL, the PRT file will also contain report of in-place volumes for any additional
FIP-vectors. Default is to export volumes per FIPNUM, but any FIP-vector can be specified
using the fipname
option. By using the rename2fipnum
option, the column name would be set to FIPNUM
in the csv-file for any FIP-vector, as required by webviz-subsurface
plugin VolumetricAnalysis
.
This renaming is not needed for Webviz-Sumo
. An additional column with the actual FIPNAME is included for information.
Region and zone support
Each row in the exported CSV can be augmented with the corresponding Region and Zone the particular FIPNUM belongs to. This is accomplished by supplying a YAML file which defines the map between regions and/or zones to FIPNUM.
The YAML file for the mapping between FIPNUM and regions can be structured like in this example:
region2fipnum:
RegionA: [1, 2, 3]
RegionB: [4, 5, 6]
zone2fipnum:
Upper: [1, 4]
Mid: [2, 5]
Lower: [3, 6]
It is possible to supply inverse maps instead (they will be inverted if needed):
fipnum2region:
1: RegionA
2: RegionA
3: RegionA
4: RegionB
5: RegionB
6: RegionB
fipnum2zone:
1: Upper
2: Mid
3: Lower
4: Upper
5: Mid
6: Lower
The keys region2fipnum
etc. can be at the root level of the yaml file, or
inside the global
section. It is possible to reuse the fmu-config generated
yaml file.
You may also use the same YAML file as used for the webviz-subsurface
plugin
“ReservoirSimulationTimeSeriesRegional”, the same configuration as above would then look
like
FIPNUM:
groups:
REGION:
RegionA: [1, 2, 3]
RegionB: [4, 5, 6]
ZONE:
Upper: [1, 4]
Mid: [2, 5]
Lower: [3, 6]
Example output
This example table is from a case where pore volumes are included, and a yaml file has been supplied defining the map from zones and regions to FIPNUM:
FIPNUM |
STOIIP_OIL |
ASSOCIATEDOIL_GAS |
STOIIP_TOTAL |
WATER_TOTAL |
GIIP_GAS |
ASSOCIATEDGAS_OIL |
GIIP_TOTAL |
PORV_TOTAL |
HCPV_OIL |
WATPV_TOTAL |
HCPV_GAS |
HCPV_TOTAL |
REGION |
ZONE |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 |
10656981.0 |
0.0 |
10656981.0 |
59957809.0 |
0.0 |
1960884420.0 |
1960884420.0 |
78802733.0 |
17000359.0 |
61802374.0 |
0.0 |
17000359.0 |
Westlands |
Valyzar |
2 |
0.0 |
0.0 |
0.0 |
77110073.0 |
0.0 |
0.0 |
0.0 |
79481140.0 |
0.0 |
79481140.0 |
0.0 |
0.0 |
Eastlands |
Valyzar |
See also
https://equinor.github.io/res2df/usage/fipreports.html can be used to extract more information from the PRT files.