Repository navigation
Ways to reduce computing time for a long, multi-batch 3D run with OFES (Parcels v3.1.4)? #3055
Replies: 1 comment
|
Thanks for reaching out @imariaguiar, and for the very extensive and detailed write-up. My short answer would be: I don't think there are any easy ways to significantly speed up your simulation, except to use If the number of particles per node is less than a few thousands, it could be much fast in Parcels v4, because chunking works better there. Use the |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Question
Hi,
I'm a PhD student studying the AABW downstream of the Vema Channel, using Parcels v3.1.4 with OFES (0.1°, daily U, V, W, T, S). Before I start the production run, I'd like to ask if there is anything I'm not doing that could reduce the computing time.
I want to follow the AABW pathways across the South Atlantic and quantify its transport and transformation. For that, particles have to be integrated for a very long time: 40 years per particle, while the OFES data cover 28 years (1996-2023), so I use
time_periodicto loop the fields.Current setup (without diffusion)
AdvectionRK4_3D, a custom kernel that pushes particles away from the seafloor (it samples a bathymetry field and the UV at the 4 cardinal and 4 diagonal neighbours when the next step would hit the bottom), thenSampleUV,SampleTS,CheckDomainBounds,CheckSurfaceExit.dt= 3 h,outputdt= 1 day, float32 positions.ProcessPoolExecutor(4 workers). Each worker builds its ownFieldSet.from_netcdfonce (U, V, W, T, S, daily files, default chunking) and reuses it for its batches.Timing
From my tests, building the FieldSet takes about 20-25 min per worker, and a batch takes roughly 1h40 for 2 years of tracking. Extrapolating to 100 batches x 40 years gives about a month of computing.
My suspicion (not tested yet) is that the time is dominated by reading the daily fields, not by the number of particles.
What comes next
I'm preparing a version with diffusion: constant Kh plus a vertical diffusivity Kz taken from the OFES output, read every day instead of a time mean. I know this will make it slower. I'm also testing whether I can use the model fields every 3 days instead of every day, by checking how much variance is lost with a linear interpolation.
Questions
field_chunksize/deferred_load.time_periodicwith 28 years of daily fields add overhead, or is there a better way to run 40 years on 28 years of data?dtbe larger than 3 h with daily fields?I can share the full script if useful. Thank you very much for any suggestion!
All reactions