Skip to content

Commit 8101504

Browse files
authored
Merge pull request #1689 from knutfrode/dev
Correcting sign of vertical advection for backwards simulations in ve…
2 parents cd89af5 + d678593 commit 8101504

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

opendrift/models/oceandrift.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ def vertical_mixing(self, store_depths=False):
412412
self.timer_start('main loop:updating elements:vertical mixing')
413413

414414
dt_mix = self.get_config('vertical_mixing:timestep')
415+
dt_mix = dt_mix * np.sign(self.time_step.total_seconds()) # negative for backward simulations
415416

416417
# minimum height/maximum depth for each particle accouting also for
417418
# the sea surface height

0 commit comments

Comments
 (0)