Skip to content

Commit b15248f

Browse files
committed
elaborate on need to filter out extra cells from output data
1 parent dc0c6f0 commit b15248f

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
@@ -250,11 +250,16 @@ def _mesh_summary_output_min_max(
250250
]:
251251
geom_id_col = "face_id"
252252
else:
253-
# For whatever reason there seem to be more values reported in the
254-
# summary output data than actual cells in the geometry.
253+
geom_id_col = "cell_id"
254+
# The 2D mesh output data contains values for more cells than are actually
255+
# in the mesh. The the true number of cells for a mesh is found in the table:
256+
# "/Geometry/2D Flow Areas/Attributes". The number of cells in the 2D output
257+
# data instead matches the number of cells in the "Cells Center Coordinate"
258+
# array, which contains extra points along the perimeter of the mesh. These
259+
# extra points are appended to the end of the mesh data and contain bogus
260+
# output values (e.g., 0.0, NaN). We need to filter out these bogus values.
255261
values = values[:cell_count]
256262
times = times[:cell_count]
257-
geom_id_col = "cell_id"
258263
df = DataFrame(
259264
{
260265
"mesh_name": [mesh_name] * len(values),

0 commit comments

Comments
 (0)