src.dycore.discretisation.grid#

Functions

grid_init(ud)

Helper function to initialise the elem and node grids, corresponding to the cell and node grids, from a given user iniital data file.

Classes

ElemSpaceDiscr(g, ud)

Inherits the class discretization.kgrid.SpaceDiscr.

Grid(inx, iny, inz, x0, x1, y0, y1, z0, z1)

Base grid class, defines the extent of grid and the grid spacing.

NodeSpaceDiscr(g, ud)

Inherits the class discretization.kgrid.SpaceDiscr.

SpaceDiscr(g)

For a given grid extent and number of grid-points, this class returns an equidistant discretised grid.

src.dycore.discretisation.grid.grid_init(ud)#

Helper function to initialise the elem and node grids, corresponding to the cell and node grids, from a given user iniital data file.

Parameters#

udinputs.user_data.UserDataInit

Data container for the initial conditions.

Returns#

elemdiscretization.kgrid.ElemSpaceDiscr

Cells grid.

nodediscretization.kgrid.NodeSpaceDiscr

Nodes grid.

class src.dycore.discretisation.grid.Grid(inx, iny, inz, x0, x1, y0, y1, z0, z1)#

Base grid class, defines the extent of grid and the grid spacing.

__init__(inx, iny, inz, x0, x1, y0, y1, z0, z1)#

Parameters#

inxint

Number of grid points in the x direction

inyint

Number of grid points in the y direction

inzint

Number of grid points in the z direction

x0float

Minimum extent in the x direction

x1float

Maximum extent in the x direction

y0float

Minimum extent in the y direction

y1float

Maximum extent in the y direction

z0float

Minimum extent in the z direction

z1float

Maximum extent in the z direction

class src.dycore.discretisation.grid.SpaceDiscr(g)#

For a given grid extent and number of grid-points, this class returns an equidistant discretised grid.

ig = array([0., 0., 0.])#
ic = array([0., 0., 0.])#
stride = array([0., 0., 0.])#
dxyz = array([0., 0., 0.])#
__init__(g)#

Parameters#

gdiscretization.kgrid.Grid

A grid class defining the grid extent and number of grid-points in each direction.

class src.dycore.discretisation.grid.ElemSpaceDiscr(g, ud)#

Inherits the class discretization.kgrid.SpaceDiscr. For a given grid extent and number of grid-points, this class returns an equidistant discretised cell-based grid.

__init__(g, ud)#

Parameters#

gdiscretization.kgrid.Grid

A grid class defining the grid extent and number of grid-points in each direction.

flip()#
get_p_indim(ud)#
class src.dycore.discretisation.grid.NodeSpaceDiscr(g, ud)#

Inherits the class discretization.kgrid.SpaceDiscr. For a given grid extent and number of grid-points, this class returns an equidistant discretised node-based grid.

__init__(g, ud)#

Parameters#

gdiscretization.kgrid.Grid

A grid class defining the grid extent and number of grid-points in each direction.

flip()#
get_p_indim(ud)#