ecl⚓︎
Read Schlumberger Eclipse output files.
EclipseCase
⚓︎
Bases: object
Read data for an Eclipse simulation case.
__init__(casename)
⚓︎
Initialize the Eclipse case.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
casename
|
str
|
Path to the case, with or without extension. |
required |
Returns:
Type | Description |
---|---|
None
|
|
at(when)
⚓︎
Recurrent data for a certain timestep.
The result of this method is usually passed to functions that need to calculate something using several properties.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
when
|
datetime or int
|
Date of the property. |
required |
Returns:
Type | Description |
---|---|
EclipseRestart
|
Object containing properties for this timestep. |
atsm(when)
⚓︎
Recurrent data from summary file for a certain timestep.
The result of this method is usually passed to functions that need to calculate something using several properties.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
when
|
datetime or int
|
Date of the property. |
required |
Returns:
Type | Description |
---|---|
EclipseSummary
|
Object containing summary properties for this timestep. |
cell_data(prop, when=None)
⚓︎
Read cell-wise data from case. This can be either static information or recurrent information for a certain date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prop
|
str
|
Name of the property, e.g., 'SWAT'. |
required |
when
|
datetime or int
|
Date of the property, or None if static. |
None
|
Returns:
Type | Description |
---|---|
ndarray
|
Loaded array for the property. |
Examples:
components()
⚓︎
field_data(prop, when=None)
⚓︎
Read field-wise data from case. This can be either static information or recurrent information for a certain date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prop
|
str
|
Name of the property, e.g., 'ZPHASE'. |
required |
when
|
datetime or int
|
Date of the property, or None if static. |
None
|
Returns:
Type | Description |
---|---|
ndarray
|
Loaded array for the property. |
Examples:
grid()
⚓︎
Grid structure for simulation case.
phases()
⚓︎
Phases that exist in the restart file.
case = EclipseCase (filename) phs = case.phases () print ("Number of phases is %d" % (len (phs))) print ("Keyword for first phase is %s" % ("S" + phs [0])) if Phase.oil in phs: print ("Oil is present") else: print ("Oil is not present")
report_dates()
⚓︎
List of all the report dates that are available in this case.
Items from this list can be used as a parameter to at
to get the case for that particular report step.
Returns:
Type | Description |
---|---|
list of datetime.datetime
|
List of available report dates in sequence. |
Examples:
See Also
ecl.EclipseCase.at
shape()
⚓︎
Get shape of returned field data.
Returns:
Type | Description |
---|---|
tuple of int
|
Shape of the field data as (num_k, num_j, num_i). |
start_date()
⚓︎
Starting date of the simulation
summary_data(prop, when)
⚓︎
Read summary data from case. This is typically well data, but can also be, for example, newton iterations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prop
|
str
|
Name of the property, e.g., 'WWPR PRO1'. |
required |
when
|
datetime or int
|
Date of the property. |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Loaded array for the property. |
Examples:
EclipseData
⚓︎
Bases: object
Base class for both static and recurrent data.
cell_data(selector)
⚓︎
Get a field property for every cell at this restart step.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
selector
|
tuple
|
Specification of the property to be loaded. This is a tuple starting with a Prop, and then some context-dependent items. |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Array of the data with inactive cells masked off. |
Examples:
components()
⚓︎
Components that exist in the restart file. Components used in the simulation are stored in all the restart files instead of once in the init file, since it is the restart file that hold component fields.
field_data(propname)
⚓︎
Get a property for the entire field at this restart step.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
propname
|
str
|
Name of the property to be loaded. |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Array of the data. |
summary_data(propname)
⚓︎
Get a property from the summary file at this restart step.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
propname
|
str
|
Name of the property to be loaded. This is in the form 'mnemonic well', e.g., 'WWIR I05'. Alternatively, propname can be either only well or only mnemonic. Then the value for all mnemonics or all wells are given, e.g., propname='WWIR' returns WWIR for all wells. |
required |
Returns:
Type | Description |
---|---|
ndarray
|
Array of the data. |
EclipseFile
⚓︎
Bases: object
Low-level class to read records from binary files.
Access to this object must be within a monitor (with
-statement).
__exit__(typ, val, traceback)
⚓︎
Close the underlaying file object when we go out of scope.
__init__(root, ext)
⚓︎
EclipseGrid
⚓︎
EclipseInit
⚓︎
EclipseRFT
⚓︎
Bases: object
Read data from an Eclipse RFT file.
__init__(casename)
⚓︎
Initialize the Eclipse case.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
casename
|
str
|
Path to the case, with or without extension. |
required |
Returns:
Type | Description |
---|---|
None
|
|
rft_data(well, prop)
⚓︎
EclipseRestart
⚓︎
Bases: EclipseData
Read information from a recurrent data (restart) file.
__init__(grid, seq)
⚓︎
Initialize the restart file reader.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
grid
|
EclipseInit or EclipseGrid
|
Initialization file which contains grid dimensions. |
required |
seq
|
int
|
Run number. |
required |
Returns:
Type | Description |
---|---|
None
|
|
date()
⚓︎
Simulation date the restart file is created for.
EclipseSummary
⚓︎
Bases: EclipseData
Read information from a recurrent data (summary) file.
__init__(grid, seq)
⚓︎
Initialize the restart file reader.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
grid
|
EclipseInit or EclipseGrid
|
Initialization file which contains grid dimensions. |
required |
seq
|
int
|
Run number. |
required |
Returns:
Type | Description |
---|---|
None
|
|
date()
⚓︎
Simulation date the restart file is created for.
main(*args)
⚓︎
Read a data file to see if it parses OK.