Preserving particle ID between loops using MPI #2913
Replies: 2 comments
|
Hi @julia-neme, thanks for reaching out - and for using Parcels! I am not using v3 anymore so can't easily check, but I think the 'problem' is that you use MPI. Can you confirm that the particle ID is preserved if you don't use MPI with the code above? An alternative solution may be to simply open the file and create a particles (including pfile = xr.open_zarr(str(filename))
pset = ParticleSet.from_list(
fieldset=fieldset,
pclass=SampleParticle,
time=pfile["time].values[:, -1],
lat=pfile["lat'].values[:, -1],
lon=pfile["lon"].values[:, -1],
depth=pfile["z"].values[:, -1],
id=pfile["trajectory"].values[:],
)See below for the code how the Parcels/parcels/particleset.py Lines 761 to 871 in e6b6c70 |
|
Hi @erikvansebille thank you for the prompt reply! After a bit more testing, you are right the problem was using MPI. MPI stores the output in a separate Sorry about posting, I should have given it a few more days of work. Thank you again!! |
Uh oh!
There was an error while loading. Please reload this page.
Question
Question
Hi! I am new to Parcels, so apologies if this question has been answered elsewhere - I've done a search but couldn't find an answer.
I am using version 3.1.4. to backtrack particles, releasing every 7 days during the first year. I am running this on an HPC using MPI, and due to walltime/efficiency limitations I am running loops of 7 days duration. I have found that particle ID is not preserved across loops. Is there a way to preserve IDs using MPI? My code is below.
Thank you very much in advance!!
Supporting code/error messages
All reactions