ras-commander 0.79.0__py3-none-any.whl → 0.80.1__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.
- ras_commander/HdfXsec.py +24 -17
- ras_commander/RasGeo.py +537 -537
- ras_commander/RasMap.py +466 -466
- ras_commander/RasUnsteady.py +1 -1
- ras_commander/__init__.py +1 -1
- {ras_commander-0.79.0.dist-info → ras_commander-0.80.1.dist-info}/METADATA +6 -4
- {ras_commander-0.79.0.dist-info → ras_commander-0.80.1.dist-info}/RECORD +10 -10
- {ras_commander-0.79.0.dist-info → ras_commander-0.80.1.dist-info}/WHEEL +0 -0
- {ras_commander-0.79.0.dist-info → ras_commander-0.80.1.dist-info}/licenses/LICENSE +0 -0
- {ras_commander-0.79.0.dist-info → ras_commander-0.80.1.dist-info}/top_level.txt +0 -0
ras_commander/HdfXsec.py
CHANGED
@@ -114,9 +114,13 @@ class HdfXsec:
|
|
114
114
|
mann_info = hdf["/Geometry/Cross Sections/Manning's n Info"][:]
|
115
115
|
mann_values = hdf["/Geometry/Cross Sections/Manning's n Values"][:]
|
116
116
|
|
117
|
-
# Get ineffective blocks data
|
118
|
-
|
119
|
-
|
117
|
+
# Get ineffective blocks data if they exist
|
118
|
+
if '/Geometry/Cross Sections/Ineffective Blocks' in hdf:
|
119
|
+
ineff_blocks = hdf['/Geometry/Cross Sections/Ineffective Blocks'][:]
|
120
|
+
ineff_info = hdf['/Geometry/Cross Sections/Ineffective Info'][:]
|
121
|
+
else:
|
122
|
+
ineff_blocks = None
|
123
|
+
ineff_info = None
|
120
124
|
|
121
125
|
# Initialize lists to store data
|
122
126
|
geometries = []
|
@@ -165,20 +169,23 @@ class HdfXsec:
|
|
165
169
|
mannings_n.append(mann_n_dict)
|
166
170
|
|
167
171
|
# Extract ineffective blocks data
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
172
|
+
if ineff_info is not None and ineff_blocks is not None:
|
173
|
+
ineff_start_idx = ineff_info[i][0]
|
174
|
+
ineff_count = ineff_info[i][1]
|
175
|
+
if ineff_count > 0:
|
176
|
+
blocks = ineff_blocks[ineff_start_idx:ineff_start_idx + ineff_count]
|
177
|
+
blocks_list = []
|
178
|
+
for block in blocks:
|
179
|
+
block_dict = {
|
180
|
+
'Left Sta': float(block['Left Sta']),
|
181
|
+
'Right Sta': float(block['Right Sta']),
|
182
|
+
'Elevation': float(block['Elevation']),
|
183
|
+
'Permanent': bool(block['Permanent'])
|
184
|
+
}
|
185
|
+
blocks_list.append(block_dict)
|
186
|
+
ineffective_blocks.append(blocks_list)
|
187
|
+
else:
|
188
|
+
ineffective_blocks.append([])
|
182
189
|
else:
|
183
190
|
ineffective_blocks.append([])
|
184
191
|
|