-
Notifications
You must be signed in to change notification settings - Fork 32
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
21 changed files
with
406 additions
and
29 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
ecl2df.egg-info | ||
.tox | ||
*.swp | ||
*.csv | ||
*.pyc | ||
*~ | ||
docs/modules.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
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ data format. | |
:maxdepth: 2 | ||
|
||
introduction | ||
usage | ||
scripts | ||
modules | ||
installation | ||
|
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
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,13 @@ | ||
Usage and examples | ||
================== | ||
|
||
This section will go through each module in more detail, with examples. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
usage/nnc | ||
usage/equil | ||
usage/fipreports | ||
usage/pillars | ||
usage/pvt |
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 @@ | ||
EQLNUM,KEYWORD,Z,PRESSURE,OWC,GOC,RS | ||
1,EQUIL,2469.0,382.4,1700.0,0.0, | ||
2,EQUIL,2469.0,382.4,1000.0,0.0, | ||
1,RSVD,1500.0,,,,184.0 | ||
1,RSVD,4000.0,,,,184.0 | ||
2,RSVD,1500.0,,,,184.0 | ||
2,RSVD,4000.0,,,,184.0 |
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,69 @@ | ||
equil | ||
----- | ||
|
||
This is the ecl2df module for processing the ``SOLUTION`` section of | ||
the Eclipse input deck. | ||
|
||
Supported keywords are ``EQUIL``, ``RSVD`` and ``RVVD``. Typical usage | ||
is | ||
|
||
.. code-block:: python | ||
from ecl2df import equil, EclFiles | ||
dframe = equil.df(EclFiles('MYECLDECK.DATA')) | ||
Which will provide a dataframe similar to the example below. Note that the column | ||
`Z` is used both for datum depth and the depth values in ``RSVD`` tables. The | ||
amount of columns obtained depends on the input dataset, and should be possible | ||
to link up with the Eclipse documentation. API doc: :func:`ecl2df.equil.df` | ||
|
||
.. | ||
dframe = equil.df(EclFiles('tests/data/reek/eclipse/model/2_R001_REEK-0.DATA')) | ||
dframe[['EQLNUM', 'KEYWORD', 'Z', 'PRESSURE', 'OWC', 'GOC', 'RS']]\ | ||
.to_csv(index=False)) | ||
.. csv-table:: Equil dataframe example | ||
:file: equil-example.csv | ||
:header-rows: 1 | ||
|
||
The dataframe obtained can be exported to CSV using ``.to_csv()`` for further | ||
processing or visualization, or it can be transformed using Python (Pandas) | ||
operations. | ||
|
||
Transforming data | ||
^^^^^^^^^^^^^^^^^ | ||
|
||
Shifting all oil-water contacts down by one meter could for example | ||
be accomplished by the operation | ||
|
||
.. code-block:: python | ||
dframe["OWC"] = dframe["OWC"] + 1 | ||
This statement will not interfere with the ``RSVD`` lines, as they are NaN for | ||
this column. But still, you might want to push your `Rs` initialization down | ||
one meter for compatibility, which you could do by the statements: | ||
|
||
.. code-block:: python | ||
rsvd_rows = dframe["KEYWORD"] == "RSVD" | ||
dframe.loc[rsvd_rows, "Z"] = dframe.loc[rsvd_rows, "Z"] + 1 | ||
Re-exporting tables to Eclipse include files | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
When you are done with the table, you can generate new include files for | ||
Eclipse from your modified data by issuing | ||
|
||
.. code-block:: python | ||
inc_string = equil.df2ecl(dframe) | ||
# Write inc_string to a file | ||
with open("solution.inc", "w") as file_handle: | ||
file_handle.write(inc_string) | ||
The last step can also be done using the ``csv2ecl`` command line utility | ||
if you dump to CSV from your Python code 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,9 @@ | ||
DATE,FIPNAME,REGION,DATATYPE,TO_REGION,STOIIP_OIL,ASSOCIATEDOIL_GAS,STOIIP_TOTAL,WATER_TOTAL,GIIP_GAS,ASSOCIATEDGAS_OIL,GIIP_TOTAL | ||
2000-01-01,FIPZON,2,CURRENTLY IN PLACE,,21091398.0,,21091398.0,4590182.0,-0.0,483594842.0,483594842.0 | ||
2000-01-01,FIPZON,2,OUTFLOW TO OTHER REGIONS,,76266.0,,76266.0,75906.0,0.0,1818879.0,1818879.0 | ||
2000-01-01,FIPZON,2,OUTFLOW THROUGH WELLS,,,,0.0,0.0,,,0.0 | ||
2000-01-01,FIPZON,2,MATERIAL BALANCE ERROR.,,,,0.0,0.0,,,0.0 | ||
2000-01-01,FIPZON,2,ORIGINALLY IN PLACE,,21136892.0,,21136892.0,4641214.0,0.0,484657561.0,484657561.0 | ||
2000-01-01,FIPZON,2,OUTFLOW TO REGION,1.0,143128.0,,143128.0,-161400.0,0.0,3017075.0,3017075.0 | ||
2000-01-01,FIPZON,2,OUTFLOW TO REGION,3.0,-66862.0,,-66862.0,198900.0,-0.0,-1198195.0,-1198195.0 | ||
2000-01-01,FIPZON,2,OUTFLOW TO REGION,8.0,0.0,,0.0,38405.0,0.0,0.0,0.0 |
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,20 @@ | ||
REPORT 0 1 JAN 2000 | ||
================================= | ||
: FIPZON REPORT REGION 2 : | ||
: PAV = 139.76 BARSA: | ||
: PORV= 27777509. RM3 : | ||
:--------------- OIL SM3 ---------------:-- WAT SM3 -:--------------- GAS SM3 ---------------: | ||
: LIQUID VAPOUR TOTAL : TOTAL : FREE DISSOLVED TOTAL : | ||
:-------------------------:-------------------------------------------:----------------:-------------------------------------------: | ||
:CURRENTLY IN PLACE : 21091398. 21091398.: 4590182. : -0. 483594842. 483594842. | ||
:-------------------------:-------------------------------------------:----------------:-------------------------------------------: | ||
:OUTFLOW TO OTHER REGIONS : 76266. 76266.: 75906. : 0. 1818879. 1818879. | ||
:OUTFLOW THROUGH WELLS : 0.: 0. : 0. | ||
:MATERIAL BALANCE ERROR. : 0.: 0. : 0. | ||
:-------------------------:-------------------------------------------:----------------:-------------------------------------------: | ||
:ORIGINALLY IN PLACE : 21136892. 21136892.: 4641214. : 0. 484657561. 484657561. | ||
:-------------------------:-------------------------------------------:----------------:-------------------------------------------: | ||
:OUTFLOW TO REGION 1 : 143128. 143128.: -161400. : 0. 3017075. 3017075. | ||
:OUTFLOW TO REGION 3 : -66862. -66862.: 198900. : -0. -1198195. -1198195. | ||
:OUTFLOW TO REGION 8 : 0. 0.: 38405. : 0. 0. 0. | ||
==================================================================================================================================== |
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,27 @@ | ||
fipreports | ||
---------- | ||
|
||
fipreports is a parser for the Eclipse PRT output file, extracting data | ||
from these tables: | ||
|
||
.. literalinclude:: fipreports-example.txt | ||
|
||
This table found in a PRT file will be parsed to the following dataframe: | ||
|
||
.. | ||
Generated with ecl2csv fipreports -v --fipname FIPZON fipreports-example.PRT -o fipreports-example.csv | ||
Date added manually | ||
.. csv-table:: FIPZON table from PRT file | ||
:file: fipreports-example.csv | ||
:header-rows: 1 | ||
|
||
In this particular example, ``FIPZON`` was selected explicitly, either using the command line client or the Python API | ||
through an option to the :func:`ecl2df.fipreports.df` function. | ||
|
||
Using this module is easiest through ``ecl2csv fipreports``. | ||
|
||
|
||
|
||
|
||
|
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,16 @@ | ||
I1,J1,K1,I2,J2,K2,TRAN | ||
30,4,2,31,4,1,0.021288443 | ||
30,4,3,31,4,1,0.009700679 | ||
30,4,3,31,4,2,0.007962288 | ||
30,4,4,31,4,1,0.015650248 | ||
30,4,4,31,4,2,0.011269862 | ||
30,4,4,31,4,3,0.011947993 | ||
30,4,5,31,4,1,0.01754331 | ||
30,4,5,31,4,2,0.012022105 | ||
30,4,5,31,4,3,0.012787791 | ||
30,4,5,31,4,4,0.010922459 | ||
30,4,6,31,4,1,0.01070403 | ||
30,4,6,31,4,2,0.008370555 | ||
30,4,6,31,4,3,0.0087851025 | ||
30,4,6,31,4,4,0.007625016 | ||
30,4,6,31,4,5,0.005188691 |
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,35 @@ | ||
nnc | ||
--- | ||
|
||
nnc will extract Non-Neighbour-Connections from your Eclipse grid as pairs | ||
of *ijk* indices together with their associated transmissibilities. | ||
|
||
.. | ||
nnc.df(EclFiles('tests/data/reek/eclipse/model/2_R001_REEK-0.DATA')).head(15).to_csv('docs/usage/nnc.csv', index=False) | ||
.. code-block:: python | ||
from ecl2df import nnc, EclFiles | ||
eclfiles = EclFiles('MYDATADECK.DATA') | ||
dframe = nnc.df(eclfiles) | ||
.. csv-table:: Example nnc table | ||
:file: nnc.csv | ||
:header-rows: 1 | ||
|
||
|
||
Alternatively, the same data can be produced as a CSV file using the command line | ||
|
||
.. code-block:: console | ||
ecl2csv nnc MYDATADECK.DATA --verbose --output nnc.csv | ||
It is possible to add *xyz* coordinates for each connection (as the | ||
average of the xyz for each of the cells involved in a connection pair) as | ||
extra columns. | ||
|
||
If you only want vertical connections, add the option ``--pillars`` or ``-vertical``, | ||
or set ``pillars=True`` if using the Python API. | ||
|
||
|
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 @@ | ||
DATE,FIPNAME,REGION,DATATYPE,TO_REGION,STOIIP_OIL,ASSOCIATEDOIL_GAS,STOIIP_TOTAL,WATER_TOTAL,GIIP_GAS,ASSOCIATEDGAS_OIL,GIIP_TOTAL | ||
2000-01-01,FIPZON,2,CURRENTLY IN PLACE,,21091398.0,,21091398.0,4590182.0,-0.0,483594842.0,483594842.0 | ||
2000-01-01,FIPZON,2,OUTFLOW TO OTHER REGIONS,,76266.0,,76266.0,75906.0,0.0,1818879.0,1818879.0 | ||
2000-01-01,FIPZON,2,OUTFLOW THROUGH WELLS,,,,0.0,0.0,,,0.0 | ||
2000-01-01,FIPZON,2,MATERIAL BALANCE ERROR.,,,,0.0,0.0,,,0.0 | ||
2000-01-01,FIPZON,2,ORIGINALLY IN PLACE,,21136892.0,,21136892.0,4641214.0,0.0,484657561.0,484657561.0 | ||
2000-01-01,FIPZON,2,OUTFLOW TO REGION,1.0,143128.0,,143128.0,-161400.0,0.0,3017075.0,3017075.0 | ||
2000-01-01,FIPZON,2,OUTFLOW TO REGION,3.0,-66862.0,,-66862.0,198900.0,-0.0,-1198195.0,-1198195.0 | ||
2000-01-01,FIPZON,2,OUTFLOW TO REGION,8.0,0.0,,0.0,38405.0,0.0,0.0,0.0 |
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 @@ | ||
DATE,GASVOL,OILVOL,OWC,PERMX,PERMY,PERMZ,PILLAR,PORO,PORV,VOLUME,WATVOL,X,Y,Z | ||
2000-01-01,0.0,9762.7,1698.4,397.2,405.1,142.9,14-26,0.1,99680.2,843873.2,89917.5,460480.6,5933271.1,1716.3 | ||
2000-07-01,0.0,9846.4,1698.4,397.2,405.1,142.9,14-26,0.1,99680.2,843873.2,89833.8,460480.6,5933271.1,1716.3 | ||
2001-02-01,0.0,9892.4,1698.4,397.2,405.1,142.9,14-26,0.1,99680.2,843873.2,89787.8,460480.6,5933271.1,1716.3 | ||
2001-08-01,0.0,9874.8,1698.4,397.2,405.1,142.9,14-26,0.1,99680.2,843873.2,89805.4,460480.6,5933271.1,1716.3 | ||
2000-01-01,0.0,1918.3,1699.9,1737.7,1740.5,385.7,14-31,0.2,128119.9,735191.0,126201.6,460840.8,5932584.7,1712.6 |
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 @@ | ||
DATE,GASVOL,OILVOL,OWC,PERMX,PERMY,PERMZ,PILLAR,PORO,PORV,VOLUME,WATVOL,X,Y,Z | ||
2000-01-01,0.0,9762.7,1698.4,397.2,405.1,142.9,14-26,0.1,99680.2,843873.2,89917.5,460480.6,5933271.1,1716.3 | ||
2000-07-01,0.0,9846.4,1698.4,397.2,405.1,142.9,14-26,0.1,99680.2,843873.2,89833.8,460480.6,5933271.1,1716.3 | ||
2001-02-01,0.0,9892.4,1698.4,397.2,405.1,142.9,14-26,0.1,99680.2,843873.2,89787.8,460480.6,5933271.1,1716.3 | ||
2001-08-01,0.0,9874.8,1698.4,397.2,405.1,142.9,14-26,0.1,99680.2,843873.2,89805.4,460480.6,5933271.1,1716.3 | ||
2000-01-01,0.0,1918.3,1699.9,1737.7,1740.5,385.7,14-31,0.2,128119.9,735191.0,126201.6,460840.8,5932584.7,1712.6 |
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 @@ | ||
PILLAR,X,Y,Z,VOLUME,PERMX,PERMY,PERMZ,PORV,PORO | ||
1-1,456620.8,5935659.6,1753.6,1053244.0,1095.9,1140.2,108.6,182502.8,0.2 | ||
1-10,457336.4,5934421.1,1742.2,1078104.1,776.9,758.3,82.8,171530.9,0.2 | ||
1-11,457416.0,5934283.4,1743.0,1035282.9,1332.2,1332.6,301.4,200754.5,0.2 | ||
1-12,457495.9,5934145.8,1745.8,1084271.9,1713.9,1639.4,336.1,218128.4,0.2 | ||
1-13,457575.9,5934008.2,1746.1,1097513.3,1531.9,1451.0,296.1,203463.0,0.2 |
Oops, something went wrong.