Skip to content

Commit 3f4fa66

Browse files
authored
Merge branch 'main' into feature/mesh-timeseries-output
2 parents 6046070 + 8d60825 commit 3f4fa66

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/rashdf/plan.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,16 @@ def _mesh_summary_output_min_max(
337337
]:
338338
geom_id_col = "face_id"
339339
else:
340-
# For whatever reason there seem to be more values reported in the
341-
# summary output data than actual cells in the geometry.
340+
geom_id_col = "cell_id"
341+
# The 2D mesh output data contains values for more cells than are actually
342+
# in the mesh. The the true number of cells for a mesh is found in the table:
343+
# "/Geometry/2D Flow Areas/Attributes". The number of cells in the 2D output
344+
# data instead matches the number of cells in the "Cells Center Coordinate"
345+
# array, which contains extra points along the perimeter of the mesh. These
346+
# extra points are appended to the end of the mesh data and contain bogus
347+
# output values (e.g., 0.0, NaN). We need to filter out these bogus values.
342348
values = values[:cell_count]
343349
times = times[:cell_count]
344-
geom_id_col = "cell_id"
345350
df = DataFrame(
346351
{
347352
"mesh_name": [mesh_name] * len(values),

0 commit comments

Comments
 (0)