Skip to content

Determining which ROMS grid particles are in when using nested fields #1578

Answered by erikvansebille
jwongala asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jwongala,

Looking at the error message (Error: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''), I think the issue is with your use of & in your custom kernels.

Try replacing statements such as

if particle.salt >=26 & particle.fieldID == 1.:

with

if particle.salt >=26 and particle.fieldID == 1.:

or possibly

if particle.salt >=26 && particle.fieldID == 1.:

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@erikvansebille
Comment options

Answer selected by jwongala
@jwongala
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants