Popularity
59 Stars
Updated Last
11 Months Ago
Started In
April 2021

ClimaCore.jl

Docs Build docs build
Documentation dev
GHA CI gha ci
Buildkite CI buildkite ci
Code Coverage codecov
Bors enabled bors
DOI zenodo

The Climate Modelling Alliance (CliMA) is developing a new Earth System Model (ESM), entirely written in the Julia language. The main goal of the project is to build an ESM that automatically learns from diverse data sources to produce accurate climate predictions with quantified uncertainties. The CliMA model targets both CPU and GPU architectures, using a common codebase. ClimaCore.jl constitutes the dynamical core (dycore) of the atmosphere and land models, providing discretization tools to solve the governing equations of the ESM component models. ClimaCore.jl's high-level application programming interface (API) facilitates modularity and composition of differential operators and the definition of flexible discretizations. This, in turn, is coupled with low-level APIs that support different data layouts, specialized implementations, and flexible models for threading, to better face high-performance optimization, data storage, and scalability challenges on modern HPC architectures.

Technical aims and current support

  • Support both large-eddy simulation (LES) and general circulation model (GCM) configurations for the atmosphere.
  • A suite of tools for constructing space discretizations.
  • Horizontal spectral elements:
    • Supports both continuous Galerkin (CG) and discontinuous Galerkin (DG) spectral element discretizations.
  • Flexible choice of vertical discretization (currently staggered finite differences)
  • Support for different geometries (Cartesian, spherical), with governing equations discretized in terms of covariant vectors for curvilinear, non-orthogonal systems and Cartesian vectors for Euclidean spaces.
  • Field abstraction:
    • Scalar, vector or struct-valued
    • Stores values, geometry, and mesh information
    • Flexible memory layouts: Array-of-Structs (AoS), Struct-of-Arrays (SoA),Array-of-Struct-of-Arrays (AoSoA)
    • Useful overloads: sum (integral), norm, etc.
    • Compatible with DifferentialEquations.jl time steppers.
  • Composable operators via broadcasting: apply a function element-wise to an array; scalar values are broadcast over arrays
  • Fusion of multiple operations; can be specialized for custom functions or argument types (e.g. CuArray compiles and applies a custom CUDA kernel).
  • Operators (grad, div, interpolate) are “pseudo-functions”: Act like functions when broadcasted over a Field; fuse operators and function calls.
  • Add element node size dimensions to type domain
    • i.e., specialize on polynomial degree
    • important for GPU kernel performance.
  • Flexible memory layouts allow for flexible threading models (upcoming):
    • CPU thread over elements
    • GPU thread over nodes.