Grids
ClimaAtmos.jl provides several grid constructors to set up the domain layout for simulations. These grids handle the creation of the underlying ClimaCore meshes, topologies, and spaces, including optional topography.
Available Grids
SphereGrid
The SphereGrid creates a grid on a cubed-sphere domain, suitable for global atmospheric simulations.
using ClimaAtmos
grid = SphereGrid(
Float64;
z_elem = 10,
radius = 6.371229e6,
h_elem = 6,
)ExtrudedFiniteDifferenceGrid:
horizontal:
context: SingletonCommsContext using CPUSingleThreaded
mesh: 6×6×6-element EquiangularCubedSphere of SphereDomain: radius = 6.371229e6
quadrature: 4-point Gauss-Legendre-Lobatto quadrature
vertical:
mesh: 10-element IntervalMesh of IntervalDomain: z ∈ [0.0,30000.0] (:bottom, :top)BoxGrid
The BoxGrid creates a 3D Cartesian box grid.
grid = BoxGrid(
Float64;
x_elem = 6,
x_max = 300000.0,
y_elem = 6,
y_max = 300000.0,
z_elem = 10,
z_max = 30000.0,
)ExtrudedFiniteDifferenceGrid:
horizontal:
context: SingletonCommsContext using CPUSingleThreaded
mesh: 6×6-element RectilinearMesh of RectangleDomain: x ∈ [0.0,300000.0] (periodic) × y ∈ [0.0,300000.0] (periodic)
quadrature: 4-point Gauss-Legendre-Lobatto quadrature
vertical:
mesh: 10-element IntervalMesh of IntervalDomain: z ∈ [0.0,30000.0] (:bottom, :top)ColumnGrid
The ColumnGrid creates a single column grid, used for Single Column Models (SCM).
grid = ColumnGrid(
Float64;
z_elem = 10,
z_max = 30000.0,
)FiniteDifferenceGrid:
vertical:
mesh: 10-element IntervalMesh of IntervalDomain: z ∈ [0.0,30000.0] (:bottom, :top)PlaneGrid
The PlaneGrid creates a 2D (x-z) plane grid.
grid = PlaneGrid(
Float64;
x_elem = 6,
x_max = 300000.0,
z_elem = 10,
z_max = 30000.0,
)ExtrudedFiniteDifferenceGrid:
horizontal:
context: SingletonCommsContext using CPUSingleThreaded
mesh: 6-element IntervalMesh of IntervalDomain: x ∈ [0.0,300000.0] (periodic)
quadrature: 4-point Gauss-Legendre-Lobatto quadrature
vertical:
mesh: 10-element IntervalMesh of IntervalDomain: z ∈ [0.0,30000.0] (:bottom, :top)Mesh Ordering
When constructing grids, ClimaAtmos uses a space-filling curve to order the elements. This improves memory locality.
Here is an example visualizing the space-filling curve for a small BoxGrid:
