Skip to content

Commit 2201a72

Browse files
committed
Fix ruff issue
1 parent f569f25 commit 2201a72

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plasticparcels/kernels.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,8 @@ def checkErrorThroughSurface(particle, fieldset, time):
629629
This kernel should be performed after all other movement kernels, as it is an error kernel.
630630
"""
631631
if particle.state == StatusCode.ErrorThroughSurface:
632-
particle_ddepth = fieldset.z_start - particle.depth # Set ddepth so that final depth is the ocean surface
632+
particle_ddepth = 0. # Set the summed displacement to 0.
633+
particle_ddepth += fieldset.z_start - particle.depth # Set ddepth so that final depth is the ocean surface
633634
particle.state = StatusCode.Success
634635

635636

0 commit comments

Comments
 (0)