Skip to content

Safely load mesh grids with missing labels - #131

Merged
JoelLucaAdams merged 4 commits into
mainfrom
fix/safely-load-missing-variable-labels-and-units
Nov 3, 2026
Merged

JoelLucaAdams merged 4 commits into
mainfrom
fix/safely-load-missing-variable-labels-and-units

Conversation

@JoelLucaAdams

Copy link
Copy Markdown
Collaborator

On occasion EPOCH may save SDF files with missing labels when the grid=always isn't defined in the output block. An example of this can be seen when loading the output SDF files from input.deck.txt wherein the output block doesn't contain the grid=always flag. See #130 (comment) for more details.

Here we remedy the issue by setting the empty labels and dimensions to '' and warn the user of this mesh. Since this only seems to effect CPU meshes, which we drop anyways this should be fine.

if "cpu" in key.lower():

The real bug here needs fixing in the SDF.C library which I will try to fix.

Fixes #130

On occasion EPOCH may save SDF files with missing labels when the `grid=always` isn't defined in the `output` block.
@JoelLucaAdams JoelLucaAdams changed the title Safely load mesh grids with missing labels. Safely load mesh grids with missing labels Nov 2, 2026

@LiamPattinson LiamPattinson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good, but it could do with a test to prove it's working.

@JoelLucaAdams
JoelLucaAdams merged commit 8d4256e into main Nov 3, 2026
16 checks passed
@JoelLucaAdams
JoelLucaAdams deleted the fix/safely-load-missing-variable-labels-and-units branch November 3, 2026 11:58
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.

Potential bug with open_dateset when trying to read 1d distribution function

2 participants