Grid
A Grid
is a WAVI.jl object that stores information relating to the numerical grid. The key parameters, which are passed via keyword arguments in the OutputParams
constructor, are as follows:
nx
: number of x grid pointsny
: number of y grid pointsnσ
: number of levels in the verticaldx
: grid spacing in xdy
: grid spacing in yx0
: grid origin x co-ordinatey0
: grid origin y co-ordinateh_mask
: Array of sizenx
xny
that defines domain points: ones in theh_mask
indicate loations within ice domain, while zeros in theh_mask
indicate locations outside of the ice domain. Defaults totrues(nx,ny)
, corresponding to every grid point being in the ice domain.u_iszero
: Array of sizenx
xny
that defines locations of zero velocity in the x-direction: ones in theu_iszero
correspond to points where the velocity in the x-direction is forced to be zero, while zeros in theu_iszero
array corresponds to points where the velocity is free. Defaults tofalses(nx,ny)
, corresponding to no restrictions on u velocity anywhere.u_iszero
can also be specified by an array with entries from "North", "South", "East", and "West", which set the corresponding edges of the domain to have zero velocity boundary conditions there.v_iszero
: As inu_iszero
for the velocity in the y-direction.σ
: Dimensionless locations of sigma (vertical) levels. Values must be increasing between 0 and 1.quadrature_weights
: weights associated with sigma (vertical) levels used in quadrature scheme to determine depth averaged quantities (e.g. viscosity).
WAVI.jl has several grids, on which different quantities are defined (see numerical grid). A Grid
object contains explicit definitions of these grids; for example, the x-coordinates of the "h grid" are stored in grid.xxh
(where grid
is the name of the Grid
instance).
WAVI.Grid
— MethodGrid(;
nx = 80,
ny = 10,
dx = 8000.0,
dy = 8000.0,
nσ = 4,
x0 = 0.0,
y0 = -40000.0,
h_mask = nothing,
u_iszero = nothing,
v_iszero = nothing)
Construct a WAVI.jl grid.
Keyword arguments
- 'nx': number of x grid points
- 'ny': number of y grid points
- 'dx': grid spacing in x
- 'dy': grid spacing in y
- 'nσ': number of levels in the vertical
- 'x0': grid origin x co-ordinate
- 'y0': grid origin y co-ordinate
- 'h_mask': Mask defining domain points within grid
- 'u_iszero': Locations of zero u velocity points
- 'v_iszero': Locations of zero v velocity points
- 'quadrature_weights': weights associated with sigma levels used in quadrature scheme