Functions

Functions

Base.Libc.timeMethod.

Get the current simulation time of the model.

source
BoundaryConditions([T=Float64;] bottom = GradientBoundaryCondition(-zero(T)),
                                   top = FluxBoundaryCondition(-zero(T)))

Returns FieldBoundaryConditions with a bottom and top boundary condition. The type T is only relevant for the default values of bottom and top.

source
DefaultBoundaryConditions(T=Float64)

Returns default oceanic boundary conditions: a zero GradientBoundaryCondition on bottom and a zero FluxBoundaryCondition on top.

source
ZeroFluxBoundaryConditions(T=Float64)

Construct FieldBoundaryConditions with a zero FluxBoundaryCondition at top and bottom.

source
absolute_error(c, d, p=2)

Compute the absolute error between c and d with norm p, defined as

$\mathrm{abs \, error} = \left ( L^{-1} \int_{-L}^0 (c-d)^p \, \mathrm{d} z \right )^(1/p)$.

source
arraytype(grid::Grid)

Return the array type corresponding to data that lives on grid. Defaults to Array. New data types (for example, grids that exist on GPUs) must implement new array types.

source
fill_bottom_ghost_cell!(c, κ, model, bc)

Update the bottom ghost cell of c given the boundary condition bc, model, and diffusivity kappa. kappa is used only if a flux boundary condition is specified.

source
fill_top_ghost_cell!(c, κ, model, bc)

Update the top ghost cell of c given boundary condition bc, model, and diffusivity kappa

source
OceanTurb.iterMethod.

Get the current iteration of the model.

source
OceanTurb.iterate!Method.
iterate!(model; Δt, Nt)

Step model forward in time for Nt steps with step size Δt.

source
OceanTurb.iterate!Method.

Step forward m by Δt with the backward Euler method.

source
OceanTurb.oncellMethod.
oncell(f, i)

Return the interpolation of f onto cell point i.

source
OceanTurb.onfaceMethod.
onface(c, i)

Return the interpolation of c onto face point i.

source
relative_error(c, d, p=2)

Compute the relative error between c and d with norm p, defined as

\[\beq \mathrm{rel \, error} = \frac{\left ( int_{-L}^0 (c-d)^p \, \mathrm{d} z \right )^(1/p)} {\left ( int_{-L}^0 d^p \, \mathrm{d} z \right )^(1/p)} \eeq\]
source
OceanTurb.set!Method.
set!(solution, kwargs...)

Set the fields of a solution. For example, use

T0 = rand(4) S0(z) = exp(-z^2/10) set!(solution, T=T0, S=S0)

To set solution.T and solution.S to T0 and S0.

source
OceanTurb.set_bcs!Method.
set_bcs!(model; bcspecs...)

Set boundary conditions of model solution fields. The keyword argument name must be the name of a model solution and its value is a (bottombc, topbc) tuple.

Example

julia> set_bcs!(model, c=(FluxBoundaryCondition(-1), FluxBoundaryCondition(0)) )

source
OceanTurb.ΔcMethod.

Return the cell spacing at index i.

source
OceanTurb.ΔfMethod.

Return the face spacing at index i.

source
OceanTurb.∂z!Method.

Calculate c = ∂f/∂z in the grid interior.

source
OceanTurb.∂z!Method.

Calculate f = ∂c/∂z in the grid interior.

source
OceanTurb.∂zMethod.
∂z(a, i)

Return the discrete derivative of a at grid point i.

The derivative of a CellField is computed at face points, and the derviative of a FaceField is computed at cell points.

source
OceanTurb.∂zMethod.

Return the CellField ∂f/∂z, where f is a FaceField.

source
OceanTurb.∂zMethod.

Return ∂c/∂z at face index i.

source
OceanTurb.∂zMethod.

Return the FaceField ∂c/∂z, where c is a CellField.

source
OceanTurb.∂zMethod.

Return ∂c/∂z at face index i.

source