# Path: gusto/configuration.py
# def set_log_handler(comm):
#     def __init__(self, **kwargs):
#     def __setattr__(self, name, value):
#     def name(self):
# class Configuration(object):
# class TimesteppingParameters(Configuration):
# class OutputParameters(Configuration):
# class CompressibleParameters(Configuration):
# class ShallowWaterParameters(Configuration):
# class EadyParameters(Configuration):
# class CompressibleEadyParameters(CompressibleParameters, EadyParameters):
# class AdvectionOptions(Configuration, metaclass=ABCMeta):
# class EmbeddedDGOptions(AdvectionOptions):
# class RecoveredOptions(AdvectionOptions):
# class SUPGOptions(AdvectionOptions):
#     N = 0.01  # Brunt-Vaisala frequency (1/s)
#     T_0 = 273.15  # ref. temperature
#     H = None  # mean depth
#     H = None
#     L = None
#     N = sqrt(EadyParameters.Nsq)


from abc import ABCMeta, abstractmethod
from firedrake import (Function, split, TrialFunction, TestFunction,
                       FacetNormal, inner, dx, cross, div, jump, avg, dS_v,
                       LinearVariationalProblem, LinearVariationalSolver,
                       dot, dS, Constant, as_vector, SpatialCoordinate)
from gusto.configuration import logger, DEBUG
from gusto import thermodynamics
        if self.extruded:
            L += self.gravity_term()
        if self.coriolis:
            L += self.coriolis_term()
        if self.euler_poincare:
            L += self.euler_poincare_term()
        if self.topography:
            L += self.topography_term()
        if self.extra_terms is not None:
            L += inner(self.test, self.extra_terms)*dx
        # scale L
        L = self.scaling * L
        # sponge term has a separate scaling factor as it is always implicit
        if self.sponge:
            L -= self.impl*self.state.timestepping.dt*self.sponge_term()
        # hydrostatic term has no scaling factor
        if self.hydrostatic:
            L += (2*self.impl-1)*self.hydrostatic_term()
        return L

    def _build_forcing_solvers(self):
        a = self.mass_term()
        L = self.forcing_term()
        bcs = None if len(self.state.bcs) == 0 else self.state.bcs

        u_forcing_problem = LinearVariationalProblem(
            a, L, self.uF, bcs=bcs
        )

        solver_parameters = {}

# Path: gusto/configuration.py
# def set_log_handler(comm):
#     def __init__(self, **kwargs):
#     def __setattr__(self, name, value):
#     def name(self):
# class Configuration(object):
# class TimesteppingParameters(Configuration):
# class OutputParameters(Configuration):
# class CompressibleParameters(Configuration):
# class ShallowWaterParameters(Configuration):
# class EadyParameters(Configuration):
# class CompressibleEadyParameters(CompressibleParameters, EadyParameters):
# class AdvectionOptions(Configuration, metaclass=ABCMeta):
# class EmbeddedDGOptions(AdvectionOptions):
# class RecoveredOptions(AdvectionOptions):
# class SUPGOptions(AdvectionOptions):
#     N = 0.01  # Brunt-Vaisala frequency (1/s)
#     T_0 = 273.15  # ref. temperature
#     H = None  # mean depth
#     H = None
#     L = None
#     N = sqrt(EadyParameters.Nsq)


# Path: gusto/forcing.py
from abc import ABCMeta, abstractmethod
from firedrake import (Function, split, TrialFunction, TestFunction,
                       FacetNormal, inner, dx, cross, div, jump, avg, dS_v,
                       LinearVariationalProblem, LinearVariationalSolver,
                       dot, dS, Constant, as_vector, SpatialCoordinate)
from gusto.configuration import logger, DEBUG
from gusto import thermodynamics

        if self.extruded:
            L += self.gravity_term()
        if self.coriolis:
            L += self.coriolis_term()
        if self.euler_poincare:
            L += self.euler_poincare_term()
        if self.topography:
            L += self.topography_term()
        if self.extra_terms is not None:
            L += inner(self.test, self.extra_terms)*dx
        # scale L
        L = self.scaling * L
        # sponge term has a separate scaling factor as it is always implicit
        if self.sponge:
            L -= self.impl*self.state.timestepping.dt*self.sponge_term()
        # hydrostatic term has no scaling factor
        if self.hydrostatic:
            L += (2*self.impl-1)*self.hydrostatic_term()
        return L

    def _build_forcing_solvers(self):
        a = self.mass_term()
        L = self.forcing_term()
        bcs = None if len(self.state.bcs) == 0 else self.state.bcs

        u_forcing_problem = LinearVariationalProblem(
            a, L, self.uF, bcs=bcs
        )

        solver_parameters = {}

        if logger.isEnabledFor(DEBUG):