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} <: 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.
MixedLayerThermoclineDynamics.Field2D
— Typestruct 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.
MixedLayerThermoclineDynamics.Grid1D
— Typestruct 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
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: 1
MixedLayerThermoclineDynamics.Grid2D
— Typestruct 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
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: 1
MixedLayerThermoclineDynamics.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.