Skip to content

FieldOutOfBoundError does not exit simulation#348

Merged
j-atkins merged 6 commits into
mainfrom
outofbounds
Jun 2, 2026
Merged

FieldOutOfBoundError does not exit simulation#348
j-atkins merged 6 commits into
mainfrom
outofbounds

Conversation

@j-atkins
Copy link
Copy Markdown
Collaborator

@j-atkins j-atkins commented May 29, 2026

Following on from #154 and discussion therein, this PR addresses FieldOutOfBoundErrors for Argo Floats.

Previously errors were captured via the _check_error() kernel but this silently deleted particles (see #33 (comment)). Now, the kernel will print a warning so users at least know to expect incomplete data and can consider fixes.

  • New test added which checks simulation has continued despite out of bounds error (also refactored/reduced duplication in test_argo_float.py)

Closes #154

@j-atkins j-atkins marked this pull request as ready for review June 1, 2026 13:52
@j-atkins j-atkins requested a review from erikvansebille June 1, 2026 13:52
Copy link
Copy Markdown
Member

@erikvansebille erikvansebille left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In v4 you may indeed want to do this more pythonic with dictionaries ({50: "Error", 51: "ErroInterpolation", ...})?

@j-atkins j-atkins merged commit 5e0ab6a into main Jun 2, 2026
11 checks passed
@j-atkins j-atkins deleted the outofbounds branch June 2, 2026 08: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.

Capture FieldOutOfBound errors on drifters and Argo floats

2 participants