I've come across a strange issue with Lagrangian particles where if they're near the top of the domain they always jump down by Δz after the first intermediate time step. I have tracked this down to the boundary condition enforcement where there is an off by one error choosing the maximum allowed position. The error would also have occurred in the x and y directions too.
[ Info: Initializing simulation...
[-0.5]
[ Info: ... simulation initialization complete (429.036 ms)
[ Info: Executing initial time step...
[ Info: ... initial time step complete (22.760 seconds).
[ Info: Simulation is stopping. Model time 1 second has hit or exceeded simulation stop time 1 second.
[-1.5]
Results with fix
[ Info: Initializing simulation...
[-0.5]
[ Info: ... simulation initialization complete (10.887 ms)
[ Info: Executing initial time step...
[ Info: ... initial time step complete (1.866 ms).
[ Info: Simulation is stopping. Model time 1 second has hit or exceeded simulation stop time 1 second.
[-0.5]
Hi all,
I've come across a strange issue with Lagrangian particles where if they're near the top of the domain they always jump down by Δz after the first intermediate time step. I have tracked this down to the boundary condition enforcement where there is an off by one error choosing the maximum allowed position. The error would also have occurred in the x and y directions too.
I will pull request this fix: https://github.com/jagoosw/Oceananigans.jl/tree/particle_tracking
I realized @simone-silvestri is working on an overhaul of Lagrangian particle tracking but it seems to not be fixed in that branch either.
Hope this helps!
MWE:
Result:
Results with fix