Markus Blatt
b007ef345c
[python] Prevent "ResourceWarning: unclosed file <_io.TextIOWrapper
2023-01-13 18:14:28 +01:00
Markus Blatt
dd0ac8a669
[python] Use assertEqual instead of deprecated assertEquals-
...
Prevents warnings like
```
1: test_faults (tests.test_state.TestState2.test_faults) ... /<<PKGBUILDDIR>>/obj-arm-linux-gnueabihf/python/tests/test_state.py:124: DeprecationWarning: Please use assertEqual instead.
1: self.assertEquals([], self.state.faultNames())
```
On Debian unstable.
2023-01-13 18:14:28 +01:00
Bård Skaflestad
4333a69cd4
Require ENDSCALE When JFUNC Entered
...
We effectively ignore JFUNC data unless end-point scaling is
activated through the ENDSCALE keyword in the RUNSPEC section.
Alert the user to this fact by terminating the simulation run if the
case uses JFUNC without ENDSCALE present in RUNSPEC. In this case,
issue a diagnostic message of the form
Error: Unrecoverable errors while loading input: Problem with keyword JFUNC
In CASE.DATA line 125
Incompatible keyword combination: JFUNC declared, but ENDSCALE is missing.
2022-05-31 16:56:27 +02:00
Håkon Hægland
fa740678e0
Adds a method get_injection_properties()
...
Adds a method get_injection_properties() to the Python interface to
Opm::Schedule. This method can be used to get information about
Well::WellInjectionProperties for a given report step.
In order to avoid code duplication between opm-simulators and opm-common,
logic in CMakeLists.txt was refactored out into
cmake/Modules/PyInstallPrefix.cmake
2022-05-20 06:27:29 +02:00
Håkon Hægland
dd19213998
Adds get_production_properties()
...
Adds get_production_properties() to the python interface to Schedule.
This method can be used to get information about
Well::WellProductionProperties for a given report step
2022-05-05 13:04:03 +02:00
Joakim Hove
42e36100a8
Export RawString as std::string to Python
2022-02-23 11:01:00 +01:00
Torbjørn Skille
5bf2087d0a
DeckItem - API change
2022-02-14 15:48:52 +01:00
Joakim Hove
0fc2448369
Expose UDAValue to Python
2021-11-11 15:53:21 +01:00
Joakim Hove
55eeabba42
Use only python3 syntax for import from test directory
2021-11-11 15:53:21 +01:00
Håkon Hægland
4e5f7ef48e
Add some more UDA value tests.
...
Adds some more tests for UDA value items when constructing DeckKeyword
from Python.
2021-11-10 15:56:36 +01:00
Håkon Hægland
25ccb17917
Test UDA value DeckKeyword
...
Test that the DeckKeyword() Python constructor can handle UDA value
keywords.
2021-11-09 11:47:58 +01:00
Torbjørn Skille
c900462edb
fixing bug in Opm::EclIO::ESmry constructor
...
- changed behaviour when opening summary file from restart run
- will now work with loadBaseRunData=false and original base run folder
not found.
2021-09-07 22:49:48 +02:00
Torbjørn Skille
514e3a4a35
Adding python bindings for c++ class ExtESmry
...
- Used for loading data from summary file ESMRY
- python class ESmry supporting both SMSPEC/UNSMRY and ESMRY summary files.
2021-08-23 22:15:58 +02:00
Torbjørn Skille
eded5fdb0c
add functionality to the parser for parsing selected sections of a data deck
...
- made available in python bindings
- added unit tests both for c++ and python
2021-06-22 18:45:24 +02:00
Vegard Kippe
fe5004685c
Adding support for time (HH:MM:SS.MICROSEC) in time_vector. Updating tests accordingly.
2021-05-12 12:16:34 +02:00
Joakim Hove
a6bdda7b27
Merge pull request #2420 from tskille/fix_erst
...
fixing bug for python bindings ERst
2021-04-14 10:05:59 +02:00
Torbjørn Skille
94e541ad60
new python bindings class EModel
2021-04-13 10:42:43 +02:00
Torbjørn Skille
6003736221
fixing bug for python bindings ERst
...
> bug related to occurence parameter in function get_erst_vector(..)
> additional python unittest related to this function
2021-04-11 08:48:23 +02:00
Joakim Hove
84d5dbde0e
Make the Builtin class available from Python
2021-03-09 12:22:39 +01:00
Joakim Hove
b5183b1d76
Hide RestartConfig as private member of Schedule class
2021-03-07 11:27:09 +01:00
Joakim Hove
7b896359f6
Part 2: Use Opm::time_point
2021-03-03 15:13:34 +01:00
Joakim Hove
0c74e9ac7a
Expose ParseContext::ignore_keyword() in Python
2021-03-02 10:24:18 +01:00
Joakim Hove
bcffaefa7a
Use ScheduleState for wells++
...
Use SchedueleState for wells, in addition to the members UDQConfig, GasLiftOpt
and GuideRateConfig.
2021-02-10 07:22:46 +01:00
Joakim Hove
e016d357d8
Use ScheduleState to manage groups
2021-02-02 07:25:16 +01:00
Joakim Hove
d15a3a918c
Replace windows path separators in GDFILE keyword
2021-01-27 16:15:28 +01:00
Joakim Hove
5a8cb5f562
Add very basic Python wrapping for ScheduleState
2021-01-19 09:51:22 +01:00
Bård Skaflestad
5816d2dbd2
Push Compatibility Check To Parser Level
...
Leverage the 'prohibits'/'requires' support to enforce earlier
keyword compatibility checks. This plays better with parallel runs.
2020-12-17 21:33:11 +01:00
Torbjørn Skille
9fa90b2687
Update of EclIO classes.
...
- Enables reading of output files generated by simulator IX
- Adding support for EclFile data type C0nn (string with length > 8 characters)
- Update of program summary, now supporting well names with more that 8 characters
- Updates of program convertECL, possible to write output files with IX "format"
- updates of python bindings (EclOutput and EclFile)
2020-11-10 22:02:38 +01:00
Joakim Hove
8e247ca6e8
Use new ParseCOntext signature
2020-09-29 15:37:14 +02:00
Joakim Hove
ab821b90a5
Add python wrapper for Schedule::wellNames( const std::string& )
2020-07-01 11:01:12 +02:00
Torbjørn Skille
e5583b738f
Updates of ESmry
...
- new overload function for keywordList, list keys based on pattern (string argument)
- summary program wild card elements (keys including * or ?)
- python bindings to new member function
2020-04-10 10:10:58 +02:00
Torbjørn Skille
c33372b8b4
Adding python bindings for C++ class EclOutput
2020-03-23 10:57:49 +01:00
Torbjørn Skille
1a39c07981
Adding python bindings for C++ class ERft
2020-03-23 10:57:49 +01:00
Torbjørn Skille
b992ff0e1c
Adding python bindings for C++ class EGrid
2020-03-23 10:57:49 +01:00
Torbjørn Skille
f97dfda92e
Adding python bindings for C++ class ESmry
2020-03-23 10:57:49 +01:00
Torbjørn Skille
c1caf4738e
Adding python bindings for C++ class ERst
...
-> one additional C++ member function ERst::numberOfReportSteps()
2020-03-23 10:57:44 +01:00
Torbjørn Skille
059f2fba57
Update of python bindings for EclFile
...
-> two extra overloads for getting (array name + array name, occurrence)
-> extra member function count(std::string), count occurrences of arrays with a specific name.
2020-03-19 15:57:39 +01:00
Torbjørn Skille
07a8c5b015
python bindings, adding support for UDA type
2020-03-02 13:50:57 +01:00
Joakim Hove
aed8c78af5
Move RestartConfig from EclipseState to Schedule
2020-02-19 12:35:07 +01:00
Joakim Hove
ecb5fce19b
Only active cells ( #1298 )
...
Use FieldProps implementation for 3D properties
2020-01-13 15:46:06 +01:00
Joakim Hove
b9c3df5f42
Add has_xxx and __contains__ to Python SummaryState
2020-01-13 11:43:58 +01:00
Joakim Hove
67f95e8548
Add Schedule::xxx_well() for well status manipulations from Python
2020-01-11 06:54:25 +01:00
Torbjørn Skille
4136868592
additional python bindings for eclipse_grid
2020-01-06 17:43:32 +01:00
Joakim Hove
b7fcded7ef
Merge pull request #1378 from joakim-hove/wrap-summarystate
...
python wrapper for summarystate
2020-01-02 20:54:48 +01:00
Joakim Hove
20c5a2b50e
python wrapper for summarystate
2019-12-27 10:08:46 +01:00
Steinar Foss
dc8acb494c
python FieldProperties can return numpy int arrays.
2019-12-23 11:58:05 +01:00
Steinar Foss
d3a4b536d2
python FieldProperties can return numpy double arrays.
2019-12-23 11:35:52 +01:00
Steinar Foss
d6c1d64ba0
Python: added class FieldProperties.
...
test_props.py: added check for 3d_properties/field_props extraction.
cxx/eclipse_state.cpp: adding function field_props.
added python class FieldProperties.
python FieldProps: added __contains__.
python FieldProps: added __getitem__.
python field_props: images all 3dprops tests.
2019-12-22 15:25:16 +01:00
Joakim Hove
19c5475715
Add PORO to testdata
2019-12-02 12:06:09 +01:00
Joakim Hove
bb032c6182
Add PORO to testdata
2019-11-30 08:35:39 +01:00