Functions
Base.Libc.time — Method.Get the current simulation time of the model.
OceanTurb.BoundaryConditions — Function.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.
OceanTurb.DefaultBoundaryConditions — Function.DefaultBoundaryConditions(T=Float64)Returns default oceanic boundary conditions: a zero GradientBoundaryCondition on bottom and a zero FluxBoundaryCondition on top.
OceanTurb.ZeroFluxBoundaryConditions — Function.ZeroFluxBoundaryConditions(T=Float64)Construct FieldBoundaryConditions with a zero FluxBoundaryCondition at top and bottom.
OceanTurb.absolute_error — Function.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)$.
OceanTurb.arraytype — Method.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.
OceanTurb.fill_bottom_ghost_cell! — Method.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.
OceanTurb.fill_top_ghost_cell! — Method.fill_top_ghost_cell!(c, κ, model, bc)Update the top ghost cell of c given boundary condition bc, model, and diffusivity kappa
OceanTurb.iter — Method.Get the current iteration of the model.
OceanTurb.iterate! — Method.iterate!(model; Δt, Nt)Step model forward in time for Nt steps with step size Δt.
OceanTurb.iterate! — Method.Step forward m by Δt with the backward Euler method.
OceanTurb.oncell — Method.oncell(f, i)Return the interpolation of f onto cell point i.
OceanTurb.onface — Method.onface(c, i)Return the interpolation of c onto face point i.
OceanTurb.relative_error — Function.relative_error(c, d, p=2)Compute the relative error between c and d with norm p, defined as
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.
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)) )
OceanTurb.Δc — Method.Return the cell spacing at index i.
OceanTurb.Δf — Method.Return the face spacing at index i.
OceanTurb.∂z! — Method.Calculate c = ∂f/∂z in the grid interior.
OceanTurb.∂z! — Method.Calculate f = ∂c/∂z in the grid interior.
OceanTurb.∂z — Method.∂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.
OceanTurb.∂z — Method.Return the CellField ∂f/∂z, where f is a FaceField.
OceanTurb.∂z — Method.Return ∂c/∂z at face index i.
OceanTurb.∂z — Method.Return the FaceField ∂c/∂z, where c is a CellField.
OceanTurb.∂z — Method.Return ∂c/∂z at face index i.