Skip to content

fix: steps columns as in the FDS User Guide; GeomSlice array hint - #141

Merged
m-fehr merged 2 commits into
masterfrom
fix/steps-and-geomslice-hint
Oct 15, 2026
Merged

m-fehr merged 2 commits into
masterfrom
fix/steps-and-geomslice-hint

Conversation

@m-fehr

@m-fehr m-fehr commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

sim.steps

The FDS User Guide (section "Time Step Data") documents CHID_steps.csv as:

Time Step,Wall Time,Step Size,Simulation Time,CPU Time
1,2020-04-29T10:23:13.631-04:00, 0.100E+00, 0.10000, 0.23438

where Time Step is the current time step (iteration number) and Wall Time the date and time. fdsreader stored the wall-clock time under "Time Step" and never read the iteration number.

Key Before Now
"Step" – iteration number (int)
"Wall Time" – date and time, datetime64[ms], UTC
"Time Step" wall-clock time wall-clock time, warns once (FutureWarning) that it will become the iteration number
"Step Size", "Simulation Time", "CPU Time" unchanged unchanged

steps is now a StepData (a dict subclass) so that only reading "Time Step" warns; existing code keeps working. The simulation cache format is bumped so cached simulations get the new keys.

GeomSlice array hint

np.asarray(geomslice) raised a TypeError recommending to_global, which GeomSlice does not have. The hint is now a class attribute; GeomSlice names its data, vertices and faces properties, which combine all meshes.

Tests

tests/test_steps_and_array_hints.py: the steps columns, the one-time warning (also through .get) and both array hints. The timezone test from #139 now reads "Wall Time".

🤖 Generated with Claude Code

m-fehr and others added 2 commits October 15, 2026 08:57
… hint

sim.steps stored the wall-clock time of CHID_steps.csv under "Time Step",
which the FDS User Guide (section "Time Step Data") defines as the
iteration number, and did not read the iteration number at all. It now
has "Step" (iteration number) and "Wall Time" (UTC). "Time Step" keeps the
wall-clock time for compatibility and warns once (FutureWarning) that it
will become the iteration number.

The TypeError for converting a GeomSlice to a numpy array recommended
to_global, which GeomSlice does not have; it now names the data,
vertices and faces properties.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@m-fehr
m-fehr merged commit 7784b9a into master Oct 15, 2026
10 checks passed
@m-fehr
m-fehr deleted the fix/steps-and-geomslice-hint branch October 15, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant