Skip to content

Commit

Permalink
Merge pull request #1251 from climberlenny/correction_BUG
Browse files Browse the repository at this point in the history
state_to_buffer save
  • Loading branch information
knutfrode authored Mar 13, 2024
2 parents 303c8ec + fc9e8d5 commit 6cd7288
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opendrift/models/basemodel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1971,12 +1971,12 @@ def run(self,

if self.num_elements_active(
) == 0 and self.num_elements_scheduled() > 0:
self.steps_calculation += 1
logger.info(
'No active but %s scheduled elements, skipping timestep %s (%s)'
% (self.num_elements_scheduled(),
self.steps_calculation, self.time))
self.steps_calculation + 1 , self.time)) # LH correction : +1 to be consistent with the line 2048
self.state_to_buffer() # Append status to history array
self.steps_calculation += 1 # LH correction : Move from line 2020 to 2030 to propagate the step calculation after the state_to_buffer and to be consistent with the line 2106
if self.time is not None:
self.time = self.time + self.time_step
continue
Expand Down

0 comments on commit 6cd7288

Please sign in to comment.