You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SCRIP encode writes NaN into padded corners, leaving an extra NaN node on read #1911
_encode_scrip fills the padded slots of a ragged mesh with NaN in grid_corner_lat/lon. SCRIP has no fill value for corners, so the NaNs are written to disk as if they were coordinates. On main, the reader no longer uses NaN corners in face_node_connectivity, because the valid_corners mask turns them back into INT_FILL_VALUE. But the node de-duplication still collapses every NaN corner into one node with NaN coordinates that no face uses. A round trip therefore adds a node: 6 nodes become 7, and one of them has node_lon/node_lat = NaN. That NaN node can break anything that reads node coordinates, such as bounds or plotting. Two possible fixes: pad by repeating the last valid corner, which is the usual SCRIP convention, or drop non-finite corners before the de-duplication so they never become a node. Sub-issue of #1658.
changed the title [-]SCRIP encode writes NaN into padded corners, leaving an extra NaN node on read*[/-][+]SCRIP encode writes NaN into padded corners, leaving an extra NaN node on read[/+]on Nov 19, 2026
Activity
[-]SCRIP encode writes NaN into padded corners, leaving an extra NaN node on read*[/-][+]SCRIP encode writes NaN into padded corners, leaving an extra NaN node on read[/+]INT_FILL_VALUEoverflows in downcast, corrupting polygon meshes #1658