Skip to content

How to run multiple particles simultaneously from the same location #1411

Closed Answered by michaeldenes
RomanIMMSP asked this question in Q&A
Discussion options

You must be logged in to vote

HI @RomanIMMSP,

A simple way to do this would be to multiply your constants by np.ones(1000) so that you are passing in arrays, e.g.

lon = XX * np.ones(1000)
lat = YY*np.ones(1000)
dep = DD*np.ones(1000)
pset = ParticleSet.from_list(fieldset=fieldset, pclass=JITParticle, lon=lon, lat=lat, depth=dep)

Let me know how you go! Cheers,
Michael

Replies: 2 comments 3 replies

Comment options

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

@michaeldenes
Comment options

Answer selected by michaeldenes
Comment options

You must be logged in to vote
1 reply
@michaeldenes
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