resqpy 4.8.2__py3-none-any.whl → 4.8.4__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.
- resqpy/__init__.py +1 -1
- resqpy/model/_hdf5.py +3 -1
- resqpy/property/_collection_get_attributes.py +3 -1
- resqpy/weights_and_measures/nexus_units.py +22 -11
- {resqpy-4.8.2.dist-info → resqpy-4.8.4.dist-info}/METADATA +1 -1
- {resqpy-4.8.2.dist-info → resqpy-4.8.4.dist-info}/RECORD +8 -8
- {resqpy-4.8.2.dist-info → resqpy-4.8.4.dist-info}/LICENSE +0 -0
- {resqpy-4.8.2.dist-info → resqpy-4.8.4.dist-info}/WHEEL +0 -0
resqpy/__init__.py
CHANGED
resqpy/model/_hdf5.py
CHANGED
@@ -229,10 +229,12 @@ def _h5_array_element(model,
|
|
229
229
|
shape_tuple = tuple(h5_root[h5_key_pair[1]].shape)
|
230
230
|
if required_shape is None:
|
231
231
|
required_shape = shape_tuple
|
232
|
+
else:
|
233
|
+
required_shape = tuple(required_shape)
|
232
234
|
object.__dict__[array_attribute] = np.zeros(required_shape, dtype = dtype)
|
233
235
|
if shape_tuple == required_shape:
|
234
236
|
object.__dict__[array_attribute][:] = h5_root[h5_key_pair[1]]
|
235
|
-
elif (len(shape_tuple) == len(required_shape) and ('bool' in str_dtype or '
|
237
|
+
elif (len(shape_tuple) == len(required_shape) and ('bool' in str_dtype or 'uint8' in str_dtype) and
|
236
238
|
8 * (shape_tuple[-1] - 1) < required_shape[-1] <= 8 * shape_tuple[-1]):
|
237
239
|
a = np.unpackbits(h5_root[h5_key_pair[1]], axis = -1).astype(bool)
|
238
240
|
object.__dict__[array_attribute][:] = a[..., :required_shape[-1]]
|
@@ -427,6 +427,8 @@ def _supporting_shape_grid(support, indexable_element, direction):
|
|
427
427
|
shape_list = [support.nk, support.ni]
|
428
428
|
elif indexable_element == 'I0':
|
429
429
|
shape_list = [support.nk, support.nj]
|
430
|
+
else:
|
431
|
+
raise ValueError(f'unsupported grid indexable element: {indexable_element}')
|
430
432
|
return shape_list
|
431
433
|
|
432
434
|
|
@@ -549,7 +551,7 @@ def _cached_part_array_ref_const_none(collection, part, dtype, model, cached_arr
|
|
549
551
|
# the required shape is required if a bool array may need to be unpacked from bits
|
550
552
|
required_shape = None
|
551
553
|
str_dtype = str(dtype)
|
552
|
-
if use_pack and ('bool' in str_dtype or '
|
554
|
+
if use_pack and ('bool' in str_dtype or 'uint8' in str_dtype):
|
553
555
|
required_shape = collection.supporting_shape(indexable_element = collection.indexable_for_part(part),
|
554
556
|
direction = _part_direction(collection, part))
|
555
557
|
|
@@ -10,10 +10,12 @@ def nexus_uom_for_quantity(nexus_unit_system, quantity, english_volume_flavour =
|
|
10
10
|
nexus_unit_system (str): one of 'METRIC', 'METKG/CM2', 'METBAR', 'LAB', or 'ENGLISH'
|
11
11
|
quantity (str): the RESQML quantity class of interest; currently suppported:
|
12
12
|
'length', 'area', 'volume', 'volume per volume', 'permeability rock',
|
13
|
-
'time', 'thermodynamic temperature', 'mass per volume', 'pressure'
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
'time', 'thermodynamic temperature', 'mass per volume', 'pressure',
|
14
|
+
'volume per time'
|
15
|
+
english_volume_flavour (str, optional): only needed for ENGLISH unit system and volume,
|
16
|
+
volume per volume, or volume per time quantity; one of 'PV', 'OVER PV', 'FVF', 'GOR',
|
17
|
+
'surface gas rate', or 'saturation'; see notes regarding FVF, also regarding flow
|
18
|
+
rates
|
17
19
|
|
18
20
|
returns:
|
19
21
|
str: the RESQML uom string for the units required by Nexus
|
@@ -27,7 +29,8 @@ def nexus_uom_for_quantity(nexus_unit_system, quantity, english_volume_flavour =
|
|
27
29
|
in the ENHLISH unit system, Nexus expacts gas formation volume factors in bbl / 1000 ft3
|
28
30
|
but that is not a valid RESQML uom – this function will return bbl/bbl for ENGLISH FVF;
|
29
31
|
also be wary of pore volume units when using the medieval ENGLISH unit system: the OVER
|
30
|
-
keyword expects different units than GRID or recurrent override input
|
32
|
+
keyword expects different units than GRID or recurrent override input; ENGLISH fluid flow
|
33
|
+
rates will be returned as bbl/d unless the flavour is specified as 'surface gas rate'
|
31
34
|
"""
|
32
35
|
|
33
36
|
nexus_unit_system = nexus_unit_system.upper()
|
@@ -35,7 +38,7 @@ def nexus_uom_for_quantity(nexus_unit_system, quantity, english_volume_flavour =
|
|
35
38
|
# todo: add other quantities as needed
|
36
39
|
assert quantity in [
|
37
40
|
'length', 'area', 'volume', 'volume per volume', 'permeability rock', 'rock permeability', 'time',
|
38
|
-
'thermodynamic temperature', 'mass per volume', 'pressure'
|
41
|
+
'thermodynamic temperature', 'mass per volume', 'pressure', 'volume per time'
|
39
42
|
]
|
40
43
|
if quantity == 'rock permeability':
|
41
44
|
quantity = 'permeability rock'
|
@@ -48,6 +51,9 @@ def nexus_uom_for_quantity(nexus_unit_system, quantity, english_volume_flavour =
|
|
48
51
|
elif english_volume_flavour == 'over pv':
|
49
52
|
assert quantity == 'volume'
|
50
53
|
return 'bbl' # for static override of pv (Nexus OVER)
|
54
|
+
elif english_volume_flavour == 'surface gas rate':
|
55
|
+
assert quantity == 'volume per time'
|
56
|
+
return '1000 ft3/d'
|
51
57
|
assert quantity == 'volume per volume'
|
52
58
|
if english_volume_flavour == 'fvf':
|
53
59
|
return 'bbl/bbl'
|
@@ -66,7 +72,8 @@ def nexus_uom_for_quantity(nexus_unit_system, quantity, english_volume_flavour =
|
|
66
72
|
'time': 'd',
|
67
73
|
'thermodynamic temperature': 'degC',
|
68
74
|
'mass per volume': 'kg/m3',
|
69
|
-
'pressure': 'kPa'
|
75
|
+
'pressure': 'kPa',
|
76
|
+
'volume per time': 'm3/d'
|
70
77
|
},
|
71
78
|
'METKG/CM2': {
|
72
79
|
'length': 'm',
|
@@ -77,7 +84,8 @@ def nexus_uom_for_quantity(nexus_unit_system, quantity, english_volume_flavour =
|
|
77
84
|
'time': 'd',
|
78
85
|
'thermodynamic temperature': 'degC',
|
79
86
|
'mass per volume': 'kg/m3',
|
80
|
-
'pressure': 'kgf/cm2'
|
87
|
+
'pressure': 'kgf/cm2',
|
88
|
+
'volume per time': 'm3/d'
|
81
89
|
},
|
82
90
|
'METBAR': {
|
83
91
|
'length': 'm',
|
@@ -88,7 +96,8 @@ def nexus_uom_for_quantity(nexus_unit_system, quantity, english_volume_flavour =
|
|
88
96
|
'time': 'd',
|
89
97
|
'thermodynamic temperature': 'degC',
|
90
98
|
'mass per volume': 'kg/m3',
|
91
|
-
'pressure': 'bar'
|
99
|
+
'pressure': 'bar',
|
100
|
+
'volume per time': 'm3/d'
|
92
101
|
},
|
93
102
|
'LAB': {
|
94
103
|
'length': 'cm',
|
@@ -99,7 +108,8 @@ def nexus_uom_for_quantity(nexus_unit_system, quantity, english_volume_flavour =
|
|
99
108
|
'time': 'h',
|
100
109
|
'thermodynamic temperature': 'degC',
|
101
110
|
'mass per volume': 'g/cm3',
|
102
|
-
'pressure': 'psi'
|
111
|
+
'pressure': 'psi',
|
112
|
+
'volume per time': 'cm3/h'
|
103
113
|
},
|
104
114
|
'ENGLISH': {
|
105
115
|
'length': 'ft',
|
@@ -110,7 +120,8 @@ def nexus_uom_for_quantity(nexus_unit_system, quantity, english_volume_flavour =
|
|
110
120
|
'time': 'd',
|
111
121
|
'thermodynamic temperature': 'degF',
|
112
122
|
'mass per volume': 'lbm/ft3',
|
113
|
-
'pressure': 'psi'
|
123
|
+
'pressure': 'psi',
|
124
|
+
'volume per time': 'bbl/d' # surface gas is special case handled above
|
114
125
|
}
|
115
126
|
}
|
116
127
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
resqpy/__init__.py,sha256=
|
1
|
+
resqpy/__init__.py,sha256=yQv1gAOYtvOtkQA1zkolH_qP8vynreXYsCVWIGqkglo,555
|
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
|
@@ -62,7 +62,7 @@ resqpy/model/_catalogue.py,sha256=CvR7rdlY7_z9v05FawCzcmicA8jgnilPyuQf4GNnDlU,30
|
|
62
62
|
resqpy/model/_context.py,sha256=0tLBVMcuuIj3i87Ig8lhFMLHE5GHgEA2PEl1NjKaohc,2840
|
63
63
|
resqpy/model/_forestry.py,sha256=qfpDnaWQFOoQ9nZEpllTbFvB0wGfUl0X4UXmcp5A9Is,34159
|
64
64
|
resqpy/model/_grids.py,sha256=d7hRQRmni5pJrm1CY31D2icJV1XDar7xTmUexq_eVGY,3371
|
65
|
-
resqpy/model/_hdf5.py,sha256=
|
65
|
+
resqpy/model/_hdf5.py,sha256=2iQdyUp5eNLfWhmvl_XuFO8j7dCdtTBjtrr6-9mq3Qg,14238
|
66
66
|
resqpy/model/_model.py,sha256=8CTqYCxSoiA8ONrxEQ_vq20qTJfHkhhF-tiJUTwfEEk,103055
|
67
67
|
resqpy/model/_xml.py,sha256=n042AUhJU8AV1S4GdeeAdXikSqu2UGoSYT6AMXS2_bA,23589
|
68
68
|
resqpy/multi_processing/__init__.py,sha256=ZRudHfN9aaZjxvat7t8BZr6mwMi9baiCNjczwwT0WjI,909
|
@@ -130,7 +130,7 @@ resqpy/organize/wellbore_interpretation.py,sha256=jRAHq90tR2dCQSXsZicujXhSVHOEPo
|
|
130
130
|
resqpy/property/__init__.py,sha256=3dNW6fYT8nrNFA3Ja7Tz5AsoT-SX6VPnXYhnkHKl-VQ,2155
|
131
131
|
resqpy/property/_collection_add_part.py,sha256=wzF40k5RMdbNOyDN_JxPOYR0G7l48Cu0MySQ6ZiF9Bo,16697
|
132
132
|
resqpy/property/_collection_create_xml.py,sha256=GgreApUncPvzQSICYq5cHm0z8yBWHFrriM6eR9Q1pYI,13021
|
133
|
-
resqpy/property/_collection_get_attributes.py,sha256=
|
133
|
+
resqpy/property/_collection_get_attributes.py,sha256=DOZfNmamIbJglHKkMBgukOvvG-3TbdZxsXbtH0aDD2o,30121
|
134
134
|
resqpy/property/_collection_support.py,sha256=Frcc2XRF5fODbkKf9qrWfz_N5khQrguSyWbQ5jXot7E,5368
|
135
135
|
resqpy/property/_property.py,sha256=JcG7h6k4cJ4l3WC_VCsvoqHM3FBxrnUuxbIK2Ono1M0,24426
|
136
136
|
resqpy/property/grid_property_collection.py,sha256=gmRlalqukdVT5PomgLOoPf42z__zqEgNqwx_31aLqow,66946
|
@@ -179,7 +179,7 @@ resqpy/unstructured/_pyramid_grid.py,sha256=qDn7FlhLfDuqJYS88tomwuv5CH7RJd7avl-q
|
|
179
179
|
resqpy/unstructured/_tetra_grid.py,sha256=LVj5iOSDQVTEPmDZorzMRYZVZyUoLLk6GcYD6J32Q5k,10208
|
180
180
|
resqpy/unstructured/_unstructured_grid.py,sha256=OTYOSGrKoE51KpRhn4818tdvmZ-q9nmahk_7wC56mvc,51550
|
181
181
|
resqpy/weights_and_measures/__init__.py,sha256=Kp1pPZFH4rS5_PkCERZBEzGoat6n_dSS0y_KLhuIVBM,1135
|
182
|
-
resqpy/weights_and_measures/nexus_units.py,sha256=
|
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
185
|
resqpy/well/_blocked_well.py,sha256=3a59Z-lNE-XzpxSwomf80N4VK0BjOmi1hoBX509Pymk,187787
|
@@ -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=LdktgZ1X-ABQ2R-DArRxGK_Pf2OjrMr-bvH3dbXBFas,24743
|
194
194
|
resqpy/well/well_utils.py,sha256=zwpYjT85nXAwWBhYB1Pygu2SgouZ-44k6hEOnpoMfBI,5969
|
195
|
-
resqpy-4.8.
|
196
|
-
resqpy-4.8.
|
197
|
-
resqpy-4.8.
|
198
|
-
resqpy-4.8.
|
195
|
+
resqpy-4.8.4.dist-info/LICENSE,sha256=2duHPIkKQyESMdQ4hKjL8CYEsYRHXaYxt0YQkzsUYE4,1059
|
196
|
+
resqpy-4.8.4.dist-info/METADATA,sha256=b0KNBhMHycJY13hlJaqgJH35xe6eaSITmOATFOBu-jc,4156
|
197
|
+
resqpy-4.8.4.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
198
|
+
resqpy-4.8.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|