SpectralAdvection#

class fridom.shallowwater.modules.advection.spectral_advection.SpectralAdvection(padding: FFTPadding = FFTPadding.TRIM)[source]#

Bases: AdvectionBase

Spectral advection scheme for the shallow water equations.

Parameters#

paddingfr.grid.FFTPadding

Padding to use for the FFT operations.

__init__(padding: FFTPadding = FFTPadding.TRIM) None[source]#

Methods

__init__([padding])

advect_state(z, dz)

Advect the state vector.

advection(velocity, quantity)

Advect a quantity using the given velocity field.

disable()

Disable the module.

enable()

Enable the module.

is_enabled()

Whether the module is enabled or not.

reset()

Stop and start the module.

setup(mset[, setup_mode])

Set the module up.

start()

Start the module.

stop()

Stop the module.

update(mz)

Update the model state.

Attributes

background

The background state.

diff_module

The differentiation module to be used by this module.

disable_nonlinear

Whether to disable advection by the state vector itself.

grid

The grid of the model settings.

info

Return a dictionary with information about the time stepper.

interp_module

The interpolation module to be used by this module.

is_setup

Whether the module is set up.

mset

The model settings.

name

required_halo

The required halo points for this module.

scaling

A scaling factor for the nonlinear terms (default: 1.0).

name = 'Spectral Advection'#
advect_state(z: State, dz: State) State[source]#

Advect the state vector.