How to run multiple particles simultaneously from the same location #1411
-
Dear Parcels community Maybe this question very simple, but I did't find the answer in the documentation. This is the standard Parcels code
In such case only one particle will release. How to multiply it by 1000 times? Thanks for the answer in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
HI @RomanIMMSP, A simple way to do this would be to multiply your constants by
Let me know how you go! Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hi Michael Thanks for your hint. It works. Best wishes, |
Beta Was this translation helpful? Give feedback.
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