OutOfBounds error despite periodic boundaries #1333
-
|
I'm running particle tracking simulations on a flat square grid, with both x and y running from -L/2 to L/2 with L=7e5 m. I've added a halo to my fieldset via and added a kernel that implements periodic boundary conditions: The simulation runs well at first, but at the end I get an OutOfBounds error: Why do I suddenly get this error despite the periodic boundaries? The only thing I can think of is that the particle that gets the error is very close to the southern boundary -L/2 = -350000, and the meridional velocity v is quite strongly negative, so the particle will move out of the southern boundary. But why is that not caught by the periodic BC Kernel? (Small note: my flow fields are 2D, hence why the depth of the particles remains 0.) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Thanks for the question, @MiriamSterl. This could be because you are using |
Beta Was this translation helpful? Give feedback.
Thanks for the question, @MiriamSterl. This could be because you are using
AdvectionRK4(see code below), which requires interpolation of the field at intermediate time stepshttps://github.com/OceanParcels/parcels/blob/54ede99e63f97e14faca12de23b02d713ac0762d/parcels/application_kernels/advection.py#L10-L22
One solution would be to create your own Advection Kernel, based on the kernel above, but where checks are done when e.g.,
lat1,lat2orlat3are outside of the domain. Makes sense?