MixedLayerThermoclineDynamics
MixedLayerThermoclineDynamics.AbstractField — TypeAbstract supertype for fields.
MixedLayerThermoclineDynamics.AbstractGrid — TypeAbstract supertype for grids.
MixedLayerThermoclineDynamics.AbstractLocation — TypeAbstract supertype for location of variables.
MixedLayerThermoclineDynamics.AbstractTopology — TypeAbstract supertype for topology of grids.
MixedLayerThermoclineDynamics.Bounded — TypeType for location at the cell centres.
MixedLayerThermoclineDynamics.Centre — TypeType for location at the cell centres.
MixedLayerThermoclineDynamics.Face — TypeType for location at the cell faces.
MixedLayerThermoclineDynamics.Field1D — Typestruct Field1D{LX<:AbstractLocation, G, D} <: AbstractFieldA field datatype for 1D objects containing data of type D.
data::AnyArray with the values of the field.
grid::AnyThe grid on which the field lives.
MixedLayerThermoclineDynamics.Field2D — Typestruct Field2D{LX<:AbstractLocation, LY<:AbstractLocation, G, D} <: AbstractFieldA field datatype for 2D objects containing data of type D.
data::AnyArray with the values of the field.
grid::AnyThe grid on which the field lives.
MixedLayerThermoclineDynamics.Grid1D — Typestruct Grid1D{Tx<:AbstractTopology} <: AbstractGridReturns a one-dimensional staggered grid with topology Tx.
nx::Int64Number of points in x-direction
hx::Int64Number of halo points in x-direction
dx::Float64Grid spacing in x-direction
Lx::Float64Domain extent in x-direction
xF::AbstractArrayCell faces in x-direction
xC::AbstractArrayCell centres in x-direction
MixedLayerThermoclineDynamics.Grid1D — MethodGrid1D(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: 1MixedLayerThermoclineDynamics.Grid2D — Typestruct Grid2D{Tx<:AbstractTopology, Ty<:AbstractTopology} <: AbstractGridReturns a two-dimensional staggered grid with topologies {Tx, Ty}.
nx::Int64Number of points in x-direction
ny::Int64Number of points in y-direction
hx::Int64Number of halo points in x-direction
hy::Int64Number of halo points in y-direction
dx::Float64Grid spacing in x-direction
dy::Float64Grid spacing in y-direction
Lx::Float64Domain extent in x-direction
Ly::Float64Domain extent in y-direction
xF::AbstractArrayCell faces in x-direction
xC::AbstractArrayCell centres in x-direction
yF::AbstractArrayCell faces in y-direction
yC::AbstractArrayCell centres in y-direction
MixedLayerThermoclineDynamics.Grid2D — MethodGrid2D(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: 1MixedLayerThermoclineDynamics.Periodic — TypeType for location at the cell centres.
MixedLayerThermoclineDynamics.Field — MethodField(LX, LY, data, grid::Grid2D)Constructs a 2D field of data at location (LX, LY) on grid.
MixedLayerThermoclineDynamics.Field — MethodField(LX, data, grid::Grid1D)Constructs a 1D field of data at location LX on grid.
MixedLayerThermoclineDynamics.construct_centres — Methodconstruct_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.
MixedLayerThermoclineDynamics.construct_faces — Methodconstruct_faces(T::AbstractTopology, n, h, d, L)Returns the face locations for a dimension with topology T, number of grid points n and h halo points, grid spacing d, and extent L.
MixedLayerThermoclineDynamics.fill_halos! — Methodfill_halos!(field::Field1D{<:Any, Grid1D{Periodic}})Fill halos for a 1D field that lives on a grid with periodic boundary conditions.
MixedLayerThermoclineDynamics.fill_halos! — Methodfill_halos!(field::Field2D{<:Any, <:Any, Grid2D{Periodic, Periodic}})Fill halos for a 2D field that lives on a grid with periodic boundary conditions in both directions.
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.
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.
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.
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.
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.
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.