Closed willirath closed 1 month ago
Further hints: The output times appear to match the time steps of the fieldset.
Thanks for reporting @willirath, I'll take a look asap. This could be the same issue that @sruehs previously encountered (personal communication); this minimal example is super-useful!
Git bisect points to ed11e43173fd246c2d1043df9afc8be45e742d12
Ah, this was the change
- next_callback = starttime + callbackdt if dt > 0 else starttime - callbackdt
+ next_callback = starttime * np.sign(dt)
but we need
diff --git a/parcels/particleset.py b/parcels/particleset.py
index d7179cf3..72696eb6 100644
--- a/parcels/particleset.py
+++ b/parcels/particleset.py
@@ -1137,7 +1137,7 @@ class ParticleSet:
next_output = starttime + dt
else:
next_output = np.inf * np.sign(dt)
- next_callback = starttime * np.sign(dt)
+ next_callback = starttime + callbackdt * np.sign(dt)
tol = 1e-12
time = starttime
Parcels version
3.0.5
Description
Looks like a regression from 3.0.4 to 3.0.5.
Code sample
With
v3.0.5
:With
v3.0.4
it works.