Skip to content

ThroughSurfaceError #1266

Nov 7, 2022 · 3 comments · 4 replies
Discussion options

You must be logged in to vote

I checked your files, and think I know what's going on. You are using the AdvectionRK4_3D kernel, and your vertical velocities are so high that your particles actually move through fieldset.U.grid.depth[0] at 5m. So this is because of the velocity fields themselves, not because of Parcels. If you use AdvectionRK4 (so not the 3D-version) and don't specify a depth in your ParticleSet, then the particles move correctly

What you need to do is 'capture' these particles that go through the surface and e.g. push them back. Something like

from parcels import ErrorCode

def pushback(particle, fieldset, time):
    particle.depth = 10.

pset.execute(kernels, runtime=delta(days=4), dt=delta(hours=1), o…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@ajithacyriac
Comment options

Comment options

You must be logged in to vote
2 replies
@ajithacyriac
Comment options

@erikvansebille
Comment options

Comment options

You must be logged in to vote
1 reply
@ajithacyriac
Comment options

Answer selected by ajithacyriac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants