-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backward in time outputs not written at desired frequency #1722
Labels
Comments
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 ed11e43 |
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
|
erikvansebille
added a commit
that referenced
this issue
Oct 4, 2024
This fixes #1722, by reverting a change in ed11e43 Thanks for the git-bisect hint, @VeckoTheGecko!
github-project-automation
bot
moved this from In progress
to Done
in Parcels development
Oct 7, 2024
19 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.The text was updated successfully, but these errors were encountered: