MixedLayerThermoclineDynamics

MixedLayerThermoclineDynamics.Field1DType
struct Field1D{LX<:AbstractLocation, G, D} <: AbstractField

A field datatype for 1D objects containing data of type D.

  • data::Any

    Array with the values of the field.

  • grid::Any

    The grid on which the field lives.

source
MixedLayerThermoclineDynamics.Field2DType
struct Field2D{LX<:AbstractLocation, LY<:AbstractLocation, G, D} <: AbstractField

A field datatype for 2D objects containing data of type D.

  • data::Any

    Array with the values of the field.

  • grid::Any

    The grid on which the field lives.

source
MixedLayerThermoclineDynamics.Grid1DType
struct Grid1D{Tx<:AbstractTopology} <: AbstractGrid

Returns a one-dimensional staggered grid with topology Tx.

  • nx::Int64

    Number of points in x-direction

  • hx::Int64

    Number of halo points in x-direction

  • dx::Float64

    Grid spacing in x-direction

  • Lx::Float64

    Domain extent in x-direction

  • xF::AbstractArray

    Cell faces in x-direction

  • xC::AbstractArray

    Cell centres in x-direction

source
MixedLayerThermoclineDynamics.Grid1DMethod
Grid1D(Tx, nx, x_start, x_end; hx=1)

Construct a one-dimensional staggered grid on domain x ∈ [x_start, x_end] with topology Tx, with nx interior grid points, and hx halo points.

Example

julia> using MixedLayerThermoclineDynamics

julia> grid = Grid1D(Periodic(), 10, 0, 2.0)
1-Dimensional Grid
  ├───────── topology: Periodic
  ├─ domain extent Lx: 2.0
  ├──── resolution nx: 10
  ├── grid spacing dx: 0.2
  └─── halo points nx: 1
source
MixedLayerThermoclineDynamics.Grid2DType
struct Grid2D{Tx<:AbstractTopology, Ty<:AbstractTopology} <: AbstractGrid

Returns a two-dimensional staggered grid with topologies {Tx, Ty}.

  • nx::Int64

    Number of points in x-direction

  • ny::Int64

    Number of points in y-direction

  • hx::Int64

    Number of halo points in x-direction

  • hy::Int64

    Number of halo points in y-direction

  • dx::Float64

    Grid spacing in x-direction

  • dy::Float64

    Grid spacing in y-direction

  • Lx::Float64

    Domain extent in x-direction

  • Ly::Float64

    Domain extent in y-direction

  • xF::AbstractArray

    Cell faces in x-direction

  • xC::AbstractArray

    Cell centres in x-direction

  • yF::AbstractArray

    Cell faces in y-direction

  • yC::AbstractArray

    Cell centres in y-direction

source
MixedLayerThermoclineDynamics.Grid2DMethod
Grid2D(Tx, Ty, nx, ny, x_start, x_end, y_start, y_end; hx=1, hy=1)

Construct a two-dimensional staggered grid on domain (x, y) ∈ [x_start, x_end] x [y_start, y_end] with topologies {Tx, Ty}, with {nx, ny} interior grid points, and {hx, hy} halo points.

Example

julia> using MixedLayerThermoclineDynamics

julia> grid = Grid2D(Periodic(), Periodic(), 10, 15, 0, 2.0, 0, 3.0)
2-Dimensional Grid
  ├──── topology in x: Periodic
  ├─ domain extent Lx: 2.0
  ├──── resolution nx: 10
  ├── grid spacing dx: 0.2
  ├─── halo points nx: 1
  ├──── topology in y: Periodic
  ├─ domain extent Ly: 3.0
  ├──── resolution ny: 15
  ├── grid spacing dy: 0.2
  └─── halo points ny: 1
source
MixedLayerThermoclineDynamics.construct_centresMethod
construct_centres(T::AbstractTopology, n, h, d, L, start_center)

Returns the cell centers locations for a dimension with topology T, number of grid points n and h halo points, grid spacing d, and extent L.

source
MixedLayerThermoclineDynamics.∂x!Method
∂x!(output::Field1D, input::Field1D{<:Any, Grid1D{Periodic}})

Compute the derivative of a 1D input field onto the location where the output field lives for 1D grids with periodic boundary conditions.

source
MixedLayerThermoclineDynamics.∂x!Method
∂x!(output::Field2D, input::Field2D{<:Any, <:Any, Grid2D{Periodic, Periodic}})

Compute the $x$ derivative of a 2D input field onto the location where the output field lives for 2D grids with periodic boundary conditions.

source
MixedLayerThermoclineDynamics.∂y!Method
∂y!(output::Field2D, input::Field2D{<:Any, <:Any, Grid2D{Periodic, Periodic}})

Compute the $y$ derivative of a 2D input field onto the location where the output field lives for 2D grids with periodic boundary conditions.

source
MixedLayerThermoclineDynamics.𝐼x!Method
𝐼x!(output::Field1D, input::Field1D{<:Any, Grid1D{Periodic}})

Interpolates a 1D input field to the location where the output field lives for 1D grids with periodic boundary conditions.

source
MixedLayerThermoclineDynamics.𝐼x!Method
𝐼x!(output::Field2D, input::Field2D{<:Any, <:Any, Grid2D{Periodic, Periodic}})

Interpolates a 2D input field to the location where the output field lives for 2D grids with periodic boundary conditions.

source
MixedLayerThermoclineDynamics.𝐼y!Method
𝐼y!(output::Field2D, input::Field2D{<:Any, <:Any, Grid1D{Periodic, Periodic}})

Interpolates a 2D input field to the location where the output field lives for 2D grids with periodic boundary conditions.

source