Skip to content

Commit

Permalink
more linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ta440 committed Nov 2, 2023
1 parent 3608f70 commit c4345b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gusto/physics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ def __init__(self, equation, k1=1, k2=1,
equation.residual -= self.label(subject(prognostic(source1_expr, 'X'), Xq), self.evaluate)
equation.residual -= self.label(subject(prognostic(source2_expr, 'X2'), Xq), self.evaluate)

def evaluate(self, x_in, dt):
def evaluate(self, x_in, dt):
"""
Evaluates the source/sink for the coalescence process.
Expand Down
11 changes: 5 additions & 6 deletions gusto/timeloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ def setup_scheme(self):

def timestep(self):


super().timestep()

with timed_stage("Physics"):
Expand All @@ -382,7 +381,7 @@ class SplitPrescribedTransport(Timestepper):
"""
Implements a timeloop where the physics terms are solved separately from
the dynamics, like with SplitPhysicsTimestepper, but here we define
a prescribed transporting velocity, as opposed to having the
a prescribed transporting velocity, as opposed to having the
velocity as a prognostic variable.
"""

Expand All @@ -405,8 +404,8 @@ def __init__(self, equation, scheme, io, spatial_methods=None,
pairing physics parametrisations and timestepping schemes to use
for each. Timestepping schemes for physics can be explicit
or implicit. Defaults to None.
prescribed_transporting_velocity: (field, optional): A known
velocity field that is used for the transport of tracers.
prescribed_transporting_velocity: (field, optional): A known
velocity field that is used for the transport of tracers.
Defaults to None.
"""

Expand All @@ -427,7 +426,7 @@ def __init__(self, equation, scheme, io, spatial_methods=None,
+ f"physics scheme {parametrisation.label.label}")
apply_bcs = False
phys_scheme.setup(equation, apply_bcs, parametrisation.label)

if prescribed_transporting_velocity is not None:
self.velocity_projection = Projector(
prescribed_transporting_velocity(self.t),
Expand All @@ -450,7 +449,7 @@ def setup_scheme(self):
self.scheme.courant_max = self.io.courant_max

def timestep(self):

if self.velocity_projection is not None:
self.velocity_projection.project()

Expand Down

0 comments on commit c4345b0

Please sign in to comment.