Functions
Base.Libc.time — MethodGet the current simulation time of the model.
OceanTurb.BoundaryConditions — FunctionBoundaryConditions([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 — FunctionDefaultBoundaryConditions(T=Float64)Returns default oceanic boundary conditions: a zero GradientBoundaryCondition on bottom and a zero FluxBoundaryCondition on top.
OceanTurb.ZeroFluxBoundaryConditions — FunctionZeroFluxBoundaryConditions(T=Float64)Construct FieldBoundaryConditions with a zero FluxBoundaryCondition at top and bottom.
OceanTurb.absolute_error — Functionabsolute_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)$.
When c and d are on different grids, d is interpolated to the same grid as c.
OceanTurb.arraytype — Methodarraytype(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! — Methodfill_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! — Methodfill_top_ghost_cell!(c, κ, model, bc)Update the top ghost cell of c given boundary condition bc, model, and diffusivity kappa
OceanTurb.iter — MethodGet the current iteration of the model.
OceanTurb.oncell — Methodoncell(f, i)Return the interpolation of f onto cell point i.
OceanTurb.oncell — Methodonface(c, i)Return the interpolation of the function f onto cell point i, where f is assumed to be a function of m::AbstractModel and to return a quantity at cell interfaces.
OceanTurb.onface — Methodonface(c, i)Return the interpolation of c onto face point i.
OceanTurb.onface — Methodonface(c, i)Return the interpolation of the function f onto face point i, where f is assumed to be a function of m::AbstractModel and to return a quantity at cell centers.
OceanTurb.prettytime — Methodprettytime(t)Convert a floating point value t representing an amount of time in seconds to a more human-friendly formatted string with three decimal places. Depending on the value of t the string will be formatted to show t in nanoseconds (ns), microseconds (μs), milliseconds (ms), seconds (s), minutes (min), hours (hr), or days (day).
OceanTurb.relative_error — Functionrelative_error(c, d, p=2)Compute the relative error between c and d with norm p, defined as
OceanTurb.run_until! — Methodrun_until!(model, dt, tfinal)Run model until tfinal with time-step dt.
OceanTurb.set! — Methodset!(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! — Methodset_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.time_step! — Methodtime_step!(model; Δt, Nt)Step model forward in time for Nt steps with step size Δt.
OceanTurb.time_step! — MethodStep forward m by Δt with the backward Euler method.
OceanTurb.Δc — MethodReturn the cell spacing at index i.
OceanTurb.Δf — MethodReturn the face spacing at index i.
OceanTurb.∂z! — MethodCalculate c = ∂f/∂z in the grid interior.
OceanTurb.∂z! — MethodCalculate 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 — MethodReturn the CellField ∂f/∂z, where f is a FaceField.
OceanTurb.∂z — MethodReturn ∂c/∂z at face index i.
OceanTurb.∂z — MethodReturn the FaceField ∂c/∂z, where c is a CellField.
OceanTurb.∂z — MethodReturn ∂c/∂z at face index i.