Skip to content

Commit 09e6c12

Browse files
committed
Remove the sampling of W in the unbeaching kernel
1 parent 5bf0ef8 commit 09e6c12

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plasticparcels/kernels.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def unbeaching(particle, fieldset, time):
584584
unbeaching field using the updated particle position.
585585
"""
586586
# Measure the velocity field at the final particle location
587-
(vel_u, vel_v, vel_w) = fieldset.UVW[time, particle.depth + particle_ddepth, particle.lat + particle_dlat, particle.lon + particle_dlon] # noqa
587+
(vel_u, vel_v) = fieldset.UV[time, particle.depth + particle_ddepth, particle.lat + particle_dlat, particle.lon + particle_dlon] # noqa
588588

589589
if math.fabs(vel_u) < 1e-14 and math.fabs(vel_v) < 1e-14:
590590
U_ub = fieldset.unbeach_U[time, particle.depth + particle_ddepth, particle.lat + particle_dlat, particle.lon + particle_dlon] # noqa
@@ -596,6 +596,7 @@ def unbeaching(particle, fieldset, time):
596596
particle_dlon += dlon # noqa
597597
particle_dlat += dlat # noqa
598598

599+
599600
def unbeachingBySamplingAfterwards(particle, fieldset, time):
600601
"""Alternative unbeaching kernel.
601602

0 commit comments

Comments
 (0)