Skip to content

Commit

Permalink
Using explicit Euler Forward in Recovery Kernel
Browse files Browse the repository at this point in the history
As calling functions is not possible anymore with new implementation
  • Loading branch information
erikvansebille committed Jul 10, 2023
1 parent 830b3a9 commit caf7418
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_advection.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def DeleteParticle(particle, fieldset, time):

def SubmergeParticle(particle, fieldset, time):
particle.depth = 0
AdvectionRK4(particle, fieldset, time) # perform a 2D advection because vertical flow will always push up in this case
(u1, v1) = fieldset.UV[particle]
particle.lon += u1 * particle.dt # noqa
particle.lat += v1 * particle.dt # noqa
particle.time = time + particle.dt # to not trigger kernels again, otherwise infinite loop
particle.set_state(StateCode.Success)

Expand Down

0 comments on commit caf7418

Please sign in to comment.