CommonSpaces
ClimaCore.CommonSpaces — Module
CommonSpacesKeyword 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.
ClimaCore.CommonSpaces.ExtrudedCubedSphereSpace — Function
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().
ClimaCore.CommonSpaces.CubedSphereSpace — Function
CubedSphereSpace([FT = Float64]; kwargs...)Construct a Spaces.SpectralElementSpace2D on the grid CubedSphereGrid(FT; kwargs...). See CommonGrids.CubedSphereGrid for FT and the keyword arguments.
Examples
using ClimaCore.CommonSpaces
space = CubedSphereSpace(;
radius = 10,
n_quad_points = 4,
h_elem = 10,
)ClimaCore.CommonSpaces.ColumnSpace — Function
ColumnSpace([FT = Float64]; staggering, kwargs...)Construct a Spaces.FiniteDifferenceSpace with the vertical staggering, either CellCenter() or CellFace(), on the grid ColumnGrid(FT; kwargs...). See CommonGrids.ColumnGrid for FT and the keyword arguments.
Examples
using ClimaCore.CommonSpaces
space = ColumnSpace(;
z_elem = 10,
z_min = 0,
z_max = 10,
staggering = CellCenter(),
)ClimaCore.CommonSpaces.Box3DSpace — Function
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(),
)ClimaCore.CommonSpaces.SliceXZSpace — Function
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(),
)ClimaCore.CommonSpaces.RectangleXYSpace — Function
RectangleXYSpace([FT = Float64]; kwargs...)Construct a Spaces.SpectralElementSpace2D on the grid RectangleXYGrid(FT; kwargs...). See CommonGrids.RectangleXYGrid for FT and the keyword arguments.
Examples
using ClimaCore.CommonSpaces
space = RectangleXYSpace(;
x_min = 0,
x_max = 1,
y_min = 0,
y_max = 1,
periodic_x = false,
periodic_y = false,
n_quad_points = 4,
x_elem = 3,
y_elem = 4,
)ClimaCore.CommonSpaces.MultiColumnSpace — Function
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(),
)