Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/examples/tutorial_kernelloop.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -322,16 +322,16 @@
"output_type": "stream",
"text": [
"Success = 0\n",
"Evaluate = 1\n",
"Repeat = 2\n",
"Delete = 3\n",
"StopExecution = 4\n",
"Evaluate = 10\n",
"Repeat = 20\n",
"Delete = 30\n",
"StopExecution = 40\n",
"StopAllExecution = 41\n",
"Error = 5\n",
"Error = 50\n",
"ErrorInterpolation = 51\n",
"ErrorOutOfBounds = 6\n",
"ErrorOutOfBounds = 60\n",
"ErrorThroughSurface = 61\n",
"ErrorTimeExtrapolation = 7\n"
"ErrorTimeExtrapolation = 70\n"
]
}
],
Expand Down Expand Up @@ -363,7 +363,7 @@
"\n",
"\n",
"def CheckError(particle, fieldset, time):\n",
" if particle.state > 4: # This captures all Errors\n",
" if particle.state >= 50: # This captures all Errors\n",
" particle.delete()"
]
},
Expand Down
2 changes: 1 addition & 1 deletion parcels/include/index_search.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ typedef struct

typedef enum
{
SUCCESS=0, EVALUATE=1, REPEAT=2, DELETE=3, STOPEXECUTION=4, STOPALLEXECUTION=41, ERROR=5, ERRORINTERPOLATION=51, ERROROUTOFBOUNDS=6, ERRORTHROUGHSURFACE=61, ERRORTIMEEXTRAPOLATION=7
SUCCESS=0, EVALUATE=10, REPEAT=20, DELETE=30, STOPEXECUTION=40, STOPALLEXECUTION=41, ERROR=50, ERRORINTERPOLATION=51, ERROROUTOFBOUNDS=60, ERRORTHROUGHSURFACE=61, ERRORTIMEEXTRAPOLATION=70
} StatusCode;

typedef enum
Expand Down
14 changes: 7 additions & 7 deletions parcels/tools/statuscodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ class StatusCode:
"""Class defining the status codes for particles.state."""

Success = 0
Evaluate = 1
Repeat = 2
Delete = 3
StopExecution = 4
Evaluate = 10
Repeat = 20
Delete = 30
StopExecution = 40
StopAllExecution = 41
Error = 5
Error = 50
ErrorInterpolation = 51
ErrorOutOfBounds = 6
ErrorOutOfBounds = 60
ErrorThroughSurface = 61
ErrorTimeExtrapolation = 7
ErrorTimeExtrapolation = 70


class DaskChunkingError(RuntimeError):
Expand Down