Skip to content

Commit 3bc0bbe

Browse files
sbryngelsonclaude
andcommitted
Fix Silo-HDF5 reader to parse Named Datatype structure correctly
The silo_reader was looking for coordinate/variable data as HDF5 Groups and Datasets, but MFC's Silo files store objects as HDF5 Named Datatypes with a compound "silo" attribute containing metadata (mesh name, data paths, dimensions). Actual data arrays live under the .silo/ group. Rewrite the reader to: - Find mesh by silo_type=130 (DB_QUADMESH) on Named Datatypes - Find variables by silo_type=501 (DB_QUADVAR) on Named Datatypes - Resolve coord0/coord1/value0 paths from silo attribute to .silo/ datasets - Fix timestep discovery to match actual file naming (<step>.silo) - Clean up multi-processor assembly logic Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5c979e4 commit 3bc0bbe

2 files changed

Lines changed: 198 additions & 144 deletions

File tree

toolchain/mfc/viz/reader.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ def discover_timesteps(case_dir: str, fmt: str) -> List[int]:
229229
p0_dir = os.path.join(case_dir, 'silo_hdf5', 'p0')
230230
if os.path.isdir(p0_dir):
231231
steps = set()
232-
for dname in os.listdir(p0_dir):
233-
if dname.startswith('t_step='):
232+
for fname in os.listdir(p0_dir):
233+
if fname.endswith('.silo') and not fname.startswith('collection'):
234234
try:
235-
steps.add(int(dname.split('=')[1]))
236-
except (ValueError, IndexError):
235+
steps.add(int(fname[:-5]))
236+
except ValueError:
237237
pass
238238
return sorted(steps)
239239

0 commit comments

Comments
 (0)