Skip to content

Fix ESMF encode truncating the fill value into a valid node index #1745

Description

@cmdupuis3

_encode_esmf applies the UGRID→ESMF index offset to the whole face_node_connectivity array, padding included, and then encodes elementConn as int32. INT_FILL_VALUE + 1 is -2**63 + 1, and narrowing that to int32 truncates it to 1, so every padded slot of a ragged mesh is written to disk as node 0.

Nothing raises, and the resulting file is structurally valid, so any reader — including uxarray's own — takes those slots for real vertices. Faces gain spurious extra nodes and produce incorrect polygons.

Sub-issue of #1658

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions