Skip to content

Commit

Permalink
fix to enable switching off logging of courant number
Browse files Browse the repository at this point in the history
  • Loading branch information
jshipton committed Apr 2, 2024
1 parent f8b8050 commit 6f18b58
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions gusto/timeloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ def setup_scheme(self):
apply_bcs = True
self.scheme.setup(self.equation, apply_bcs, dynamics)
self.setup_transporting_velocity(self.scheme)
self.scheme.courant_max = self.io.courant_max
if self.io.output.log_courant:
self.scheme.courant_max = self.io.courant_max

def timestep(self):

Expand Down Expand Up @@ -452,7 +453,8 @@ def setup_scheme(self):
apply_bcs = True
self.scheme.setup(self.equation, apply_bcs, dynamics)
self.setup_transporting_velocity(self.scheme)
self.scheme.courant_max = self.io.courant_max
if self.io.output.log_courant:
self.scheme.courant_max = self.io.courant_max

def timestep(self):

Expand Down Expand Up @@ -669,7 +671,8 @@ def setup_scheme(self):
for _, scheme in self.active_transport:
scheme.setup(self.equation, apply_bcs, transport)
self.setup_transporting_velocity(scheme)
scheme.courant_max = self.io.courant_max
if self.io.output.log_courant:
scheme.courant_max = self.io.courant_max

apply_bcs = True
for _, scheme in self.diffusion_schemes:
Expand Down

0 comments on commit 6f18b58

Please sign in to comment.