Replies: 1 comment 1 reply
-
I'm not sure what you mean, that isn't valid Python code. Feel free to edit your question to clarify. The |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Trying to run a 3D tracking.
The rest is following the given example:
https://nbviewer.org/github/OceanParcels/parcels/blob/master/parcels/examples/tutorial_nemo_3D.ipynb
Struggling on this line:
pset = ParticleSet.from_line(fieldset=fieldset, pclass=JITParticle,
size=Npart, start=(15, -26.5), finish=(13, -26.5), depth=10.0
, time=np.linspace(0.0, dT, Npart))
#, time=np.ones(100)*3600*25)
when I set
time=np.ones(100)*3600*25
, it passes, and gives resultHowever, if I use ` time=np.linspace(0.0, dT, Npart)', it will report the error:
IndexError: boolean index did not match indexed array along dimension 0; dimension is 100 but corresponding boolean dimension is 3
I double checked the Npart is set to be 10... There is clearly a mismatch of arrays, but what could have been happening ? Thanks!
It seemed to me that there is a glitch if you send the starting time to be sequential e.g.
np.linspace(0.0, dT, Npart)
, versus the time to be the same among all particlestime=np.ones(100)*3600*25)
.Beta Was this translation helpful? Give feedback.
All reactions