res2df 1.3.2__py2.py3-none-any.whl → 1.3.3__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
res2df/fipreports.py CHANGED
@@ -135,9 +135,6 @@ def df(prtfile: Union[str, ResdataFiles], fipname: str = "FIPNUM") -> pd.DataFra
135
135
  ".+" + fipname + r"\s+REPORT\s+REGION\s+(\d+)", re.IGNORECASE
136
136
  )
137
137
 
138
- # Flag for whether we are supposedly parsing a PRT file made by OPM Flow:
139
- opm = False
140
-
141
138
  with open(prtfile, encoding="utf-8") as prt_fh:
142
139
  logger.info(
143
140
  "Parsing file %s for blocks starting with %s REPORT REGION",
@@ -148,8 +145,6 @@ def df(prtfile: Union[str, ResdataFiles], fipname: str = "FIPNUM") -> pd.DataFra
148
145
  matcheddate = re.match(ecl_datematcher, line)
149
146
  if matcheddate is None:
150
147
  matcheddate = re.match(opm_datematcher, line)
151
- if matcheddate is not None:
152
- opm = True
153
148
  if matcheddate is not None:
154
149
  newdate = datetime.date(
155
150
  year=int(matcheddate.group(3)),
@@ -176,15 +171,19 @@ def df(prtfile: Union[str, ResdataFiles], fipname: str = "FIPNUM") -> pd.DataFra
176
171
  # Skip if we are not on an interesting line.
177
172
  continue
178
173
 
179
- if opm is False:
180
- # The colons in the report block are not reliably included
181
- # (differs by Eclipse version), even in the same PRT file. We
182
- # insert them in fixed positions and hope for the best (if the
183
- # ASCII table is actually dynamic with respect to content, this
184
- # will fail)
174
+ # The colons in the report block are not reliably included
175
+ # (differs by Eclipse version), even in the same PRT file. We
176
+ # insert them in fixed positions and hope for the best (if the
177
+ # ASCII table is actually dynamic with respect to content, this
178
+ # will fail)
179
+ line = line.strip()
180
+ if line[0] != ":":
181
+ line = ":" + line
182
+ # There should another colon somewhere between 25 - 27
183
+ # (depend on OPM/Eclipse version)
184
+ if ":" not in line[25:27] and len(line) > 26:
185
185
  linechars = list(line)
186
- linechars[1] = ":"
187
- linechars[27] = ":"
186
+ linechars[26] = ":"
188
187
  line = "".join(linechars)
189
188
 
190
189
  records.append(
res2df/version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.3.2'
21
- __version_tuple__ = version_tuple = (1, 3, 2)
20
+ __version__ = version = '1.3.3'
21
+ __version_tuple__ = version_tuple = (1, 3, 3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: res2df
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Convert reservoir simulator input and output to DataFrames
5
5
  Home-page: http://github.com/equinor/res2df
6
6
  Author: Håvard Berland
@@ -6,7 +6,7 @@ res2df/constants.py,sha256=0W-ZYlm3Bbe9MONrRhA0c4yLXfJlqGX5apFN64i8RU0,258
6
6
  res2df/csv2res.py,sha256=2LegGNGjEQ4lzRPjmS5MYTDsq8yWcRSd2OY6rpearEI,3283
7
7
  res2df/equil.py,sha256=NIJwAgbpjJg0pxsqfxPB86d2rdAVMNJBKsJsoG6ExxU,17175
8
8
  res2df/faults.py,sha256=5v4cWcEmIQwG8TXBBsiteT_3kCNO0noNiAiOZ6JC-80,3163
9
- res2df/fipreports.py,sha256=PwFUyNDngUi03cTJB8aPIQliPob82N5_IpkjOSbZPUg,7666
9
+ res2df/fipreports.py,sha256=jgwSDOMjtsoluRqhA03TzrnjvbI7nClCIYoDHQmsiY0,7696
10
10
  res2df/grid.py,sha256=4V9nPtZQpk4DejBZANVdA-1DBJ0sVK6odPLe3XSoFCA,27680
11
11
  res2df/gruptree.py,sha256=4XO-jUaxZHr26iZOkyKByxCYQ1TU2fyW8a76jzphlZM,16929
12
12
  res2df/inferdims.py,sha256=ur0GE1ASzfzoXPgUjaow46NWBlBCgiX6qfAmn8HJatg,7329
@@ -22,7 +22,7 @@ res2df/satfunc.py,sha256=sxoqXsORI5xijD0RSybr6unm-sQNpUckXFNwHEtVdv8,13808
22
22
  res2df/summary.py,sha256=cHRL78XaypLCCdrIcW9gnlLmoCW6U6Nqpy5yO7FxaTQ,31833
23
23
  res2df/svg_color_keyword_names.txt,sha256=yiI2Ohv3NxxEAJC5OjVERZi7MLi2-bk7okyI5-xFDr8,1456
24
24
  res2df/trans.py,sha256=fWlelN74QPnxm5krWYXIGxhRZKVJA2r1lHXE-Ac1DuI,10880
25
- res2df/version.py,sha256=2MIKMHG_bp3KmQVZwa0rSvoTHIRfxwkSxFOUhMK4eQc,511
25
+ res2df/version.py,sha256=izB7sUD9NjNwuyxtrmSVzoVd_rq6pE3mbNEjvepKk_g,511
26
26
  res2df/wcon.py,sha256=67A2qtqokaefLyI5mdTaGkTlkSkDIRhVNVYA-8TE9oE,3376
27
27
  res2df/wellcompletiondata.py,sha256=s4PvMNYBcgSJzPE6_so6suxgeI_fzHbDzA8kHxen-AA,10990
28
28
  res2df/wellconnstatus.py,sha256=KPteMgwomDpp11rAkmN5GTLMEdS79Ah0QEFdG0VSu-E,4055
@@ -79,9 +79,9 @@ res2df/vfp/_vfpcommon.py,sha256=0no9r1jwGaABXexZ6WoKrOl2fFq87RMmcRZLE640cnk,7053
79
79
  res2df/vfp/_vfpdefs.py,sha256=yvi5nCkJ2UZxVx0LuVbBHLNjn0e0UCSZudmzvTk689A,7028
80
80
  res2df/vfp/_vfpinj.py,sha256=HZddHIarLUD4BlMsch8kUBTjxyOctpN56X2qPJiSzLo,23676
81
81
  res2df/vfp/_vfpprod.py,sha256=gmPKYDxphIutdhH-cn4qr5sIOGSDtxNNNAbk5Krc5Dk,36825
82
- res2df-1.3.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
83
- res2df-1.3.2.dist-info/METADATA,sha256=HSjJKB8l7GQIUqc54aBQF11IQ2KTy3f4WyUZE36x5JM,3361
84
- res2df-1.3.2.dist-info/WHEEL,sha256=AeO2BvogYWm3eGaHCvhzmUYt8ia7KfURiHzO_1atlys,109
85
- res2df-1.3.2.dist-info/entry_points.txt,sha256=ctl-_CwayyUVqFMUrwTT3Z3gZdnW6WCaiaLUJ4f_HnY,180
86
- res2df-1.3.2.dist-info/top_level.txt,sha256=U8AZBqrFHm9PMXg0toCfHJ817VfFtdKQpc8JuS5qToM,7
87
- res2df-1.3.2.dist-info/RECORD,,
82
+ res2df-1.3.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
83
+ res2df-1.3.3.dist-info/METADATA,sha256=g8fVXqZjlSmTUw-Rkrux6PU_0tBrHOFvEF0sWfZZ2Wc,3361
84
+ res2df-1.3.3.dist-info/WHEEL,sha256=oSJJyWjO7Z2XSScFQUpXG1HL-N0sFMqqeKVVbZTPkWc,109
85
+ res2df-1.3.3.dist-info/entry_points.txt,sha256=ctl-_CwayyUVqFMUrwTT3Z3gZdnW6WCaiaLUJ4f_HnY,180
86
+ res2df-1.3.3.dist-info/top_level.txt,sha256=U8AZBqrFHm9PMXg0toCfHJ817VfFtdKQpc8JuS5qToM,7
87
+ res2df-1.3.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.1)
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any