resqpy 4.12.1__py3-none-any.whl → 4.12.2__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
resqpy/__init__.py CHANGED
@@ -28,6 +28,6 @@
28
28
 
29
29
  import logging
30
30
 
31
- __version__ = "4.12.1" # Set at build time
31
+ __version__ = "4.12.2" # Set at build time
32
32
  log = logging.getLogger(__name__)
33
33
  log.info(f"Imported resqpy version {__version__}")
@@ -1,7 +1,7 @@
1
1
  """BlockedWell class."""
2
2
 
3
3
  # Nexus is a registered trademark of the Halliburton Company
4
- # RMS and ROXAR are registered trademarks of Roxar Software Solutions AS, an Emerson company
4
+ # RMS and ROXAR are registered trademarks of Roxar Software Solutions AS, an AspenTech company
5
5
 
6
6
  import logging
7
7
 
@@ -301,7 +301,20 @@ class BlockedWell(BaseResqpy):
301
301
  gi_node = rqet.find_tag(node, 'GridIndices')
302
302
  assert gi_node is not None, 'blocked well grid indices hdf5 reference not found in xml'
303
303
  rqwu.load_hdf5_array(self, gi_node, 'grid_indices', dtype = 'int')
304
- assert self.grid_indices is not None and self.grid_indices.ndim == 1 and self.grid_indices.size == self.node_count - 1
304
+ # assert self.grid_indices is not None and self.grid_indices.ndim == 1 and self.grid_indices.size == self.node_count - 1
305
+ # temporary code to handle blocked wells with incorrectly shaped grid indices wrt. nodes
306
+ assert self.grid_indices is not None and self.grid_indices.ndim == 1
307
+ if self.grid_indices.size != self.node_count - 1:
308
+ if self.grid_indices.size == self.cell_count and self.node_count == 2 * self.cell_count:
309
+ log.warning(f'handling node duplication or missing unblocked intervals in blocked well: {self.title}')
310
+
311
+ expanded_grid_indices = np.full(self.node_count - 1, -1, dtype = int)
312
+ expanded_grid_indices[::2] = self.grid_indices
313
+ self.grid_indices = expanded_grid_indices
314
+ else:
315
+ raise ValueError(
316
+ f'incorrect grid indices size with respect to node count in blocked well: {self.title}')
317
+ # end of temporary code
305
318
  unique_grid_indices = np.unique(self.grid_indices) # sorted list of unique values
306
319
  self.gridind_null = rqet.find_tag_int(gi_node, 'NullValue')
307
320
  if self.gridind_null is None:
@@ -1477,6 +1490,10 @@ class BlockedWell(BaseResqpy):
1477
1490
 
1478
1491
  grid_crs_list = self.__verify_number_of_grids_and_crs_units(column_list = column_list)
1479
1492
 
1493
+ if doing_kh or doing_xyz or doing_angles or doing_entry_exit:
1494
+ for grid in self.grid_list:
1495
+ grid.cache_all_geometry_arrays()
1496
+
1480
1497
  k_face_check = np.zeros((2, 2), dtype = int)
1481
1498
  k_face_check[1, 1] = 1 # now represents entry, exit of K-, K+
1482
1499
  k_face_check_end = k_face_check.copy()
@@ -3057,7 +3074,7 @@ class BlockedWell(BaseResqpy):
3057
3074
  if BlockedWell.__is_float_column(col_name):
3058
3075
  form = '{0:>' + str(width) + '.3f}'
3059
3076
  value = row[col_name]
3060
- if col_name == 'ANGLA' and (np.isnan(value) or value is None):
3077
+ if col_name == 'ANGLA' and (pd.isna(row[col_name]) or value is None or np.isnan(value)):
3061
3078
  value = 0.0
3062
3079
  fp.write(sep + form.format(float(value)))
3063
3080
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: resqpy
3
- Version: 4.12.1
3
+ Version: 4.12.2
4
4
  Summary: Python API for working with RESQML models
5
5
  Home-page: https://github.com/bp/resqpy
6
6
  License: MIT
@@ -1,4 +1,4 @@
1
- resqpy/__init__.py,sha256=oXHcLatzsUBwZ9LidydxI5skbSYPHyDbDbqjp0RO0FE,556
1
+ resqpy/__init__.py,sha256=Xqeo9oQvKlNFxrm0jMMGSId0y_cuNRneZohRcEQBgpM,556
2
2
  resqpy/crs.py,sha256=iq0lO3aXzttmJBfuhUjS9IHlv8OV1wuByhFk0b4fvmI,24782
3
3
  resqpy/derived_model/__init__.py,sha256=NFvMSOKI3cxmH7lAbddV43JjoUj-r2G7ExEfOqinD1I,1982
4
4
  resqpy/derived_model/_add_edges_per_column_property_array.py,sha256=cpW3gwp6MSYIrtvFmCjoJXcyUsgGuCDbgmwlJCJebUs,6410
@@ -182,7 +182,7 @@ resqpy/weights_and_measures/__init__.py,sha256=Kp1pPZFH4rS5_PkCERZBEzGoat6n_dSS0
182
182
  resqpy/weights_and_measures/nexus_units.py,sha256=y78sk6zb43LnwzGWQFV3g_Bwg5seUbgE1YROSOgu6UU,5434
183
183
  resqpy/weights_and_measures/weights_and_measures.py,sha256=i3Fv7hZczQmvTtPwzWvQb-XAxCG6Uta_vd4DV7XDwOU,16186
184
184
  resqpy/well/__init__.py,sha256=v5_gd7sSPRM9q2KsLiLWaw3jbnXFZkou38qeB7_HSN4,990
185
- resqpy/well/_blocked_well.py,sha256=8tMhqN53VSoLnf3J7-Xc_wa61yD6tFgvlluW1nWsaPU,189767
185
+ resqpy/well/_blocked_well.py,sha256=VKhgGNN-70CjgFUxa0FX5TyiIbBx0D57K3qqvasfyFU,190811
186
186
  resqpy/well/_deviation_survey.py,sha256=d3u31JbBqMCsaz6MUrtZium90wrC3omtm46A755fvgk,23115
187
187
  resqpy/well/_md_datum.py,sha256=rRrDQckTJwZtIEh28dlgXj32kcBSu-ZvHFYZOiQsyqg,7154
188
188
  resqpy/well/_trajectory.py,sha256=9sCGXZedICZK_O7qL-BTxUWGRClIVSRBRvP9RFNYk9g,50005
@@ -192,7 +192,7 @@ resqpy/well/_wellbore_marker_frame.py,sha256=xvYH2_2Ie3a18LReFymbUrZboOx7Rhv5DOD
192
192
  resqpy/well/blocked_well_frame.py,sha256=Lg7TgynfPv9WkklXTLt9VN6uBXWUqX1LI-Xmv_FBqYk,22555
193
193
  resqpy/well/well_object_funcs.py,sha256=LYTcC07ezlBxClfrug_B4iXXZUkXDPgsVufNzp361Wo,24703
194
194
  resqpy/well/well_utils.py,sha256=zwpYjT85nXAwWBhYB1Pygu2SgouZ-44k6hEOnpoMfBI,5969
195
- resqpy-4.12.1.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
196
- resqpy-4.12.1.dist-info/METADATA,sha256=hwxHELzI3WNfCutF779UHD1IQHbjXbs8pTUpxHiPDPI,4028
197
- resqpy-4.12.1.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
198
- resqpy-4.12.1.dist-info/RECORD,,
195
+ resqpy-4.12.2.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
196
+ resqpy-4.12.2.dist-info/METADATA,sha256=eHS5J4k7O7PR2HPIddfVXs1Gn_Jlg0jFo8AEz5iWgWM,4028
197
+ resqpy-4.12.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
198
+ resqpy-4.12.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.7.0
2
+ Generator: poetry-core 1.8.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any