CommonSpaces

ClimaCore.CommonSpacesModule
CommonSpaces

Keyword constructors for the spaces on the grids of CommonGrids: ExtrudedCubedSphereSpace, CubedSphereSpace, ColumnSpace, Box3DSpace, SliceXZSpace, RectangleXYSpace, and MultiColumnSpace. Each forwards its keyword arguments to the CommonGrids constructor of the same name and wraps the grid in a space. Constructors of spaces with a vertical direction take the additional keyword argument staggering, either CellCenter() or CellFace(); face_space and center_space convert between the two.

source
ClimaCore.CommonSpaces.ExtrudedCubedSphereSpaceFunction
ExtrudedCubedSphereSpace([FT = Float64]; staggering, kwargs...)

Construct a Spaces.ExtrudedFiniteDifferenceSpace with the vertical staggering, either CellCenter() or CellFace(), on the grid ExtrudedCubedSphereGrid(FT; kwargs...). See CommonGrids.ExtrudedCubedSphereGrid for FT and the keyword arguments.

Examples

using ClimaCore.CommonSpaces
space = ExtrudedCubedSphereSpace(;
    z_elem = 10,
    z_min = 0,
    z_max = 1,
    radius = 10,
    h_elem = 10,
    n_quad_points = 4,
    staggering = CellCenter(),
)

The corresponding face-centered space is face_space(space), or the same call with staggering = CellFace().

source
ClimaCore.CommonSpaces.Box3DSpaceFunction
Box3DSpace([FT = Float64]; staggering, kwargs...)

Construct a Spaces.ExtrudedFiniteDifferenceSpace with the vertical staggering, either CellCenter() or CellFace(), on the grid Box3DGrid(FT; kwargs...). See CommonGrids.Box3DGrid for FT and the keyword arguments.

Examples

using ClimaCore.CommonSpaces
space = Box3DSpace(;
    z_elem = 10,
    x_min = 0,
    x_max = 1,
    y_min = 0,
    y_max = 1,
    z_min = 0,
    z_max = 10,
    periodic_x = false,
    periodic_y = false,
    n_quad_points = 4,
    x_elem = 3,
    y_elem = 4,
    staggering = CellCenter(),
)
source
ClimaCore.CommonSpaces.SliceXZSpaceFunction
SliceXZSpace([FT = Float64]; staggering, kwargs...)

Construct a Spaces.ExtrudedFiniteDifferenceSpace with the vertical staggering, either CellCenter() or CellFace(), on the grid SliceXZGrid(FT; kwargs...). See CommonGrids.SliceXZGrid for FT and the keyword arguments.

Examples

using ClimaCore.CommonSpaces
space = SliceXZSpace(;
    z_elem = 10,
    x_min = 0,
    x_max = 1,
    z_min = 0,
    z_max = 1,
    periodic_x = false,
    n_quad_points = 4,
    x_elem = 4,
    staggering = CellCenter(),
)
source
ClimaCore.CommonSpaces.MultiColumnSpaceFunction
MultiColumnSpace([FT = Float64]; staggering, kwargs...)

Construct a Spaces.MultiColumnFiniteDifferenceSpace of independent vertical columns, with the vertical staggering either CellCenter() or CellFace(), on the grid MultiColumnGrid(FT; kwargs...). See CommonGrids.MultiColumnGrid for FT and the keyword arguments.

Examples

using ClimaCore.CommonSpaces, ClimaCore.Geometry
points = [LatLongPoint(0.0, 0.0), LatLongPoint(10.0, 20.0), LatLongPoint(-5.0, 90.0)]
space = MultiColumnSpace(;
    points = points,
    z_elem = 10,
    z_min = 0,
    z_max = 10_000,
    staggering = CellCenter(),
)
source