Skip to content

Commit 9fb895c

Browse files
Incorporate sign_dt into next output to accomodate backwards time stepping
1 parent 51b1967 commit 9fb895c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/parcels/_core/particleset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,11 @@ def execute(
422422
pbar.set_description("Integration time: " + str(start_time))
423423

424424
next_output = None
425-
if output_file :
425+
if output_file:
426426
# Write the initial condition
427427
output_file.write(self, start_time)
428-
# Increment the next_output
429-
next_output = start_time + outputdt
428+
# Increment the next_output
429+
next_output = start_time + outputdt * sign_dt
430430

431431
time = start_time
432432
while sign_dt * (time - end_time) < 0:

0 commit comments

Comments
 (0)