Skip to content

Latest commit

 

History

History
1338 lines (1101 loc) · 75.7 KB

NEWS.md

File metadata and controls

1338 lines (1101 loc) · 75.7 KB

ClimaCore.jl Release Notes

main

  • The PlaceholderSpace infrastructure is replaced by a simpler PlaceholderGrid, which only stands in for grids in the arguments of GPU kernels launched from the host and is swapped out at the start of each kernel, so CPU and device-side broadcasts no longer pay for it. This fixes GPU compilation of some finite difference broadcasts (e.g., lazy FCTZalesak stencils), and spectral element operators now accept broadcasts that combine extruded fields with level fields (e.g., @. gradh(field * level_field)).

  • Remapping.PressureInterpolator accepts method = Remapping.LogLinearInPressure() to interpolate linearly in log pressure. The default Remapping.LinearInPressure() interpolates linearly in pressure.

v1.0.3

  • Broadcasts over fields with different spaces now recursively traverse the entire expression tree to find the largest shared space. All input fields are checked against the shared space, with strict compatibility rules defined through Grids.issubgrid and Spaces.issubspace. Broadcast destinations can have different spaces from the inputs, as long as their sizes are consistent.

v1.0.2

  • New spectral element operator Operators.LumpedRestriction(quadrature_style): within each element, it restricts a field onto the nodal basis of a lower-degree quadrature with a lumped mass matrix and interpolates the result back to the element's own quadrature points, so the output lives on the input's space and composes in one broadcast with other spectral operators (e.g. @. lumped(norm_sqr(grad(f)))). The default GLL{2} gives the bilinear corner basis; GL{1} gives the element mean. It reproduces constants and conserves every element's WJ-weighted integral exactly, and it removes the systematic excess of positive-definite gradient invariants like norm_sqr(grad(f)) at element edges and corners that comes from the end-of-interval error of polynomial differentiation and that DSS cannot remove.

  • Reduced compilation latency (TTFX) across grid/space construction, DataLayout and Field broadcasts, spectral and finite-difference operators, and FieldVector broadcasts by eliminating internal Core.kwcall forwarding layers and duplicate ThisThreadPool loop specializations in DataLayouts, making is_cpu_linear_compatible a compile-time check in FieldVector copyto!, avoiding union-splitting in ExtrudedFiniteDifferenceGrid, removing unused LocalGeometry constructions in MatrixFields.multiply_matrix_at_index, and precompiling single-threaded CPU contexts in precompile_workload.jl. The package image also shrinks by roughly 20% (322 MB to 257 MB).

  • The copyto! methods for Fields and DataLayouts, including those for spectral and column-stencil operator broadcasts, take the optional DataMask as a third positional argument, copyto!(dest, bc, mask), in place of the mask keyword argument. A multi-element tuple broadcast into a DataLayout writes only the points that the mask marks as active.

  • Broadcasting a single-element tuple into a FieldVector, as in Y .= (x,), no longer throws a DimensionMismatch. This is the form Base.broadcastable produces for custom scalar types, so it now behaves the same as Y .= Ref(x). The FieldVector's own BlockedOneTo axes were previously passed down to each leaf array unchanged.

v1.0.1

  • Restored the device-side grid types Grids.DeviceFiniteDifferenceGrid, Grids.DeviceExtrudedFiniteDifferenceGrid, Grids.DeviceSpectralElementGrid1D, Grids.DeviceSpectralElementGrid2D and Topologies.DeviceIntervalTopology, which v1.0.0 removed in favour of adapting the host grids into GPU kernels. Host grids are mutable again, so a grid sits behind one pointer in a space rather than inline: an extruded cubed sphere space goes from 176 bytes back to 8, and every Field and Broadcasted node holding one shrinks with it. Downstream code that builds operator and FieldVector broadcasts compiles roughly twice as fast, back to its v0.16.1 speed (perf/grid_compile_repro.jl). Run time and ClimaCore's own precompile time are unaffected.

v1.0.0

ClimaCore's first stable release. Names that are neither exported nor documented remain internal and may change in any release. Apart from the removals listed below, v1.0.0 is API-identical to v0.16.2.

  • Removed the ClimaCoreMakie and ClimaCorePlots packages under lib/. Both had been deprecated shims since v0.16.0: the Makie recipes live in ClimaCore's ClimaCoreMakieExt extension and the Plots recipes in its ClimaCoreRecipesBaseExt extension, and both extensions load automatically once ClimaCore and the corresponding plotting package are loaded. Drop the dependency and call ClimaCore.Visualize.fieldheatmap (and friends) or Plots.plot(field) directly. ClimaCoreTempestRemap and ClimaCoreSpectra are unaffected and remain in lib/.

  • Removed the backwards-compatibility shims and deprecated aliases that the rewrites of the last few releases left behind. Every one of them had a direct replacement, listed below; nothing else about the API changes.

    • Geometry: AxisTensor{T, N, B, S} → Tensor{N, T, B, S} (the T and N parameters are swapped), AxisVector{T, A, S} → Tensor{1, T, Tuple{A}, S}, Axis2Tensor{T, B, S} → Tensor{2, T, B, S}, AxisTensor(bases, components) → Tensor(components, bases), and Geometry.components(x) → parent(x) for tensors (the AbstractPoint method of components is unchanged). The generic axis aliases CovariantAxis{I}, ContravariantAxis{I}, LocalAxis{I} and CartesianAxis{I} are gone; use the concrete Components{...} aliases that name their indices, e.g. Contravariant12Axis for ContravariantAxis{(1, 2)}.
    • DataLayouts: AbstractData{T} → DataLayout{T}; the IJFH{T, Nij} and IJHF{T, Nij} aliases for Nv = 1 layouts → VIJFH{T, 1, Nij, Nij, nothing} and VIJHF{T, 1, Nij, Nij, nothing}; and the "universal index" methods that accepted a 5-dimensional CartesianIndex → the 4-dimensional CartesianIndex(v, i, j, h). AbstractData, IJFH and IJHF are no longer exported by DataLayouts.
    • Operators: WeakDivergence/WeakGradient/WeakCurl → Divergence{WeakForm}/Gradient{WeakForm}/Curl{WeakForm}; LeftBiasedC2F/LeftBiasedF2C/RightBiasedC2F/RightBiasedF2C → BottomBiasedC2F/BottomBiasedF2C/TopBiasedC2F/TopBiasedF2C; and FirstOrderOneSided/ThirdOrderOneSided → Extrapolate{0}/Extrapolate{1} (which are not numerically identical to the boundary conditions the old names originally named — see the v0.16.0 entry).
    • Fields: ColumnField → FiniteDifferenceField, and the no-index level(field) fallback → level(field, v).
    • The "point cloud" names deprecated in v0.16.0: Grids.PointCloudGrid → Grids.MultiPointGrid, Grids.ExtrudedPointCloudGrid → Grids.ExtrudedMultiPointGrid, Spaces.PointCloudSpace → Spaces.MultiPointSpace, CommonGrids.PointColumnEnsembleGrid → CommonGrids.MultiColumnGrid, and CommonSpaces.PointColumnEnsembleSpace → CommonSpaces.MultiColumnSpace.
    • MatrixFields: the ⋅ alias for MultiplyColumnwiseBandMatrixField() → *, which has denoted matrix multiplication since v0.14.27. ⋅ is no longer exported by MatrixFields.
    • The mesh-only constructors deprecated in v0.14.10: Topologies.IntervalTopology(mesh), Spaces.FaceFiniteDifferenceSpace(mesh), Spaces.CenterFiniteDifferenceSpace(mesh) and Grids.FiniteDifferenceGrid(mesh) → the two-argument forms that take a ClimaComms.AbstractDevice first.
    • The RecursiveApply module (⊞, ⊟, ⊠, radd, rsub, rmul, rdiv, rzero, rmin, rmax, rpromote_type), a compatibility layer over the AutoBroadcaster wrappers since v0.14.52. Wrap the arguments with Utilities.add_auto_broadcasters, apply the ordinary function, and unwrap the result with Utilities.drop_auto_broadcasters; e.g. x ⊞ y becomes drop_auto_broadcasters(add_auto_broadcasters(x) + add_auto_broadcasters(y)), and rzero(T) becomes drop_auto_broadcasters(zero(add_auto_broadcasters(T))).

    Operators.get_node, which lived at the end of src/Operators/deprecated.jl but was never deprecated, is also removed. Its only callers were the Remapping interpolation kernels, which now read the field directly with field[v, i, j, h] through the internal helper Remapping.node_value.

  • #2642 Ensured that all names used in downstream packages are documented.

  • Geometry.mul_return_type promotes the storage type of a Number * Tensor (and Tensor * Number) product along with its element type, so that the return type is the one * produces. Previously a Float tensor times a Dual scalar reported Dual elements with Float storage, and a broadcast that had to be materialized into an intermediate field — for example WVector(∇ᵥ(I(θ))).components.data.:1 over a Dual-valued θ, where the composed stencil becomes a band-matrix product with Float coefficients — allocated that intermediate with the Float element type and then failed to write the Dual values into it.

  • The device-side grid types Grids.DeviceFiniteDifferenceGrid, Grids.DeviceExtrudedFiniteDifferenceGrid, Grids.DeviceSpectralElementGrid1D, Grids.DeviceSpectralElementGrid2D and Topologies.DeviceIntervalTopology are removed.

  • Spaces.MultiPointSpace implements Spaces.quadrature_style, Spaces.node_horizontal_length_scale, Spaces.all_nodes, MatrixFields.all_columns, and MatrixFields.field2arrays.

  • Grids.MultiPointGrid uses an identity horizontal metric (∂x∂ξ = I, J = WJ = 1) instead of the sphere metric, and no longer rejects points at the poles.

v0.16.2

  • #2622 Rewrote the documentation as a Diátaxis suite (tutorials, how-to guides, explanation pages, and curated reference pages), revised the docstrings and code comments across the code base, and rewrote the README.
  • Remapping.PressureInterpolator supports MultiColumnFiniteDifferenceSpace, so fields on multiple independent columns can be interpolated to pressure coordinates like fields on extruded or single-column spaces.

v0.16.1

  • Bugfixes for compatibilty with CUDA.jl v6 2628

v0.16.0

  • The CommonGrids and CommonSpaces constructors that build a horizontal spectral-element grid (ExtrudedCubedSphereGrid, CubedSphereGrid, Box3DGrid, SliceXZGrid, RectangleXYGrid and the matching *Space constructors) accept a discretization keyword and forward it to the grid, so a discontinuous space is built with discretization = Grids.DG(); when omitted, the discretization follows the quadrature as for the grid constructors. The Spaces.SpectralElementSpace1D / SpectralElementSpace2D docstrings name the keywords they forward, and examples/plane/bickleyjet.jl builds both of its spaces with CommonSpaces.RectangleXYSpace instead of assembling the domain, mesh and topology by hand. PR 2621

  • The two Bickley-jet examples examples/plane/ bickleyjet_cg.jl and examples/plane/bickleyjet_dg.jl are replaced by the single driver examples/plane/bickleyjet.jl, which takes the discretization as its first argument (cg or dg, then the numerical-flux name and an optional noslip). The prognostic equations, physical flux, initial condition and diagnostics are shared; the only structural difference is the space's discretization and the Operators.tendency_completion built from it, so the tendency function is written once.

  • The DG scalar Laplacian (Operators.scalar_laplacian on Grids.DG() spaces, and Operators.sipg_laplacian_tendency) is now the symmetric interior-penalty (SIPG) discretization. It previously omitted the adjoint-consistency term −∫_f {{κ∇v}}·n̂[[q]], which made it the incomplete (IIPG) form - with symmetry enforced, the methods are now labelled SIPG.

  • Operators.sipg_penalty_parameter(κ, space) returns a Field rather than a scalar, takes a weight keyword argument, and is joined by the in-place Operators.sipg_penalty_parameter!(τ, κ; weight).

  • The Galerkin discretization of a spectral-element grid is represented by the singleton types Grids.CG() (the default) and Grids.DG(): construct SpectralElementGrid1D/SpectralElementGrid2D (and the corresponding Spaces constructors) with discretization = Grids.DG(), and read it back with Grids.discretization(grid) / Spaces.discretization(space), which discretization-dependent code can dispatch on. This replaces the Boolean discontinuous = true grid keyword. The discretization is a type parameter of these grids rather than a field, so it is inferrable and the methods dispatching on it resolve statically; code that spells out their type parameters positionally needs one more parameter. Omitting the keyword follows the quadrature: CG() when its nodes are shared across element boundaries (Quadratures.requires_dss, e.g. GLL) and DG() otherwise, so a single-node horizontal space stays discontinuous. Passing CG() explicitly with a quadrature that cannot represent a continuous space raises an ArgumentError rather than being silently downgraded. On a DG() grid Spaces.weighted_dss! (and its start!/internal!/ghost! split) is a no-op, Spaces.create_dss_buffer returns nothing, and no DSS weights are computed; Grids.is_continuous / Spaces.is_continuous report the discretization, so models can gate DSS on the space itself rather than on the quadrature type. The discretization is part of the grid cache key, forwards through Grids.LevelGrid, and is serialized by InputOutput (grids in files without the attribute read back as continuous). PR 2599

  • Added horizontal discontinuous-Galerkin (DG) operator support. The discretization-generic machinery lives in src/Operators/numericalflux.jl: interior- and boundary-face numerical fluxes (Operators.add_numerical_flux_interior! and add_numerical_flux_boundary!) and symmetric face liftings (add_lifting_flux_interior!) on pure-2D and extruded (1D and 2D horizontal) spectral-element spaces, the flux-differencing (split-form / FDDG) volume divergence of Souza et al. (2023), and the device-resident DGConnectivity face buffer. A generic flux library lives in src/Operators/dg_fluxes.jl: CentralNumericalFlux, RusanovNumericalFlux, central-lifting and jump-penalty face functions, and an SIPG Laplacian for optional scale-selective dissipation. Equation-set-specific fluxes (compressible Euler with Cartesian momentum components) are example code. The face operators run on CPU and CUDA (with kernels in the ClimaCoreCUDAExt extension) and on distributed (MPI) Topology2D spaces, where each rank completes its rank-boundary (Topologies.ghost_faces) side through a face-strip halo exchange (Topologies.GhostFaceExchange) that ships only the Nq face-node values per face. Several operators in one tendency evaluation can share a single exchange by passing the handle returned by Operators.start_dg_ghost_exchange(args...) as a leading argument. Covered by 2- and 3-rank CPU and CUDA tests. PRs 2602, 2603

  • Added the model-level CG↔DG switch Operators.tendency_completion / Operators.complete_tendency!: a tendency written as an element-local weak form plus one completion call runs on both discretizations, with the completion object built once from the space — Spaces.weighted_dss! on continuous spaces, the mass-weighted DG interface (and optional boundary) numerical fluxes on Grids.DG() spaces. The tendency may be a Field on either discretization, or a FieldVector on a continuous one, where the completion is a single batched Spaces.weighted_dss! over all components (which must agree on their discretization). On a discontinuous space it must be one Field with a composite (e.g. NamedTuple) eltype, since the interface numerical flux is evaluated on the whole state at a face node. The CG↔DG Bickley-jet integration test runs one shallow-water tendency on both discretizations through this switch.

  • Added Operators.Outflow(; order = 0), a physically named convenience constructor for advection-operator outflow boundary conditions: it returns Operators.Extrapolate{order}(), an order-order extrapolation from the interior whose order-0 case is the zero-normal-gradient closure, so Outflow() === Extrapolate{0}() and Outflow(; order = 2) === Extrapolate{2}(). Additive only; Extrapolate remains the numerical primitive and nothing changes for existing code.

  • Operators.AbstractBoundaryCondition is specialized into Operators.VerticalBoundaryCondition (the boundary conditions of the vertical finite-difference operators, e.g. SetValue, Extrapolate) and Operators.HorizontalBoundaryCondition (those of the horizontal DG numerical-flux operators, e.g. ReflectingWallBC), so the two families are distinct at the type level. Passing a boundary condition to an operator of the other family now fails at dispatch with an error naming the mismatch. Custom boundary conditions must subtype the family they implement: the finite-difference stencil defaults now dispatch on VerticalBoundaryCondition, so a pre-existing direct subtype of AbstractBoundaryCondition fails with a MethodError (in left_interior_idx/right_interior_idx) or, when boundary_width is undefined, the generic invalid-boundary-condition error.

  • Added the horizontal Laplacian atoms Operators.scalar_laplacian, Operators.scalar_laplacian! and Operators.vector_laplacian, the building blocks of ∇⁴ hyperdiffusion. On continuous (CG) spaces the returning forms give lazy, element-local operator expressions that fuse into consuming broadcasts; materialized intermediates must be made continuous with Spaces.weighted_dss! between passes (batch several intermediates into one call to share the ghost exchange). On discontinuous (DG) spaces scalar_laplacian includes the interior-penalty face corrections itself and weighted_dss! is a no-op, so one calling sequence serves both discretizations (vector_laplacian is not yet implemented for DG). Operators.scalar_laplacian!(out, χ; weight) writes the result into a caller-owned field and is allocation-free on both discretizations, so it is the form to use in a tendency; out may alias χ. Each call to the returning scalar_laplacian owns its result — freshly allocated on DG — so any number of results may be live at once. On DG the gradient and a materialized lazy argument live in scratch fields keyed on the space's grid (released by the zero-argument Utilities.Cache.clean_cache!()), and the in-place Operators.sipg_laplacian_tendency! writes the tendency into a caller-owned field. The hybrid example's hyperdiffusion is rewritten on top of these atoms. PR 2606

  • FieldVector broadcasts on GPU flatten to linear indexing when the destination and every array in the broadcast have the same shape and are IndexLinear (dense arrays and contiguous views), bypassing CUDA.jl's N-dimensional Cartesian index computation (measured 3× faster vector updates in a baroclinic-wave benchmark); in-place updates like x .-= dx preserve destination identity through the flattening, so they no longer allocate a defensive aliasing copy (previously 7.85 GB of device allocations per step on a 63-level sphere, now zero). CPU broadcasts keep the standard path, which guarantees zero allocations. Spectral-element slab loops reserve half the shared memory per block (MAX_SUBBLOCK_LAUNCH_THREADS 256 → 128), and the eager finite-difference kernel packs 128 threads per block and queries the SM count from the device. The environment variables CLIMA_CUDA_MAX_WAVES, CLIMA_FD_MAX_THREADS, and CLIMA_DSS_MAX_THREADS (read once at module load) override launch-tuning defaults for experiments (see perf/sweep_kernel_configs.jl). CLIMA_COLLECT_KERNEL_STATS toggles the development-only per-launch statistics; it is a compile-time constant (read when the CUDA extension precompiles) so that the statistics block folds away and does not enter the kernel-launch type-stability contract. PR 2606

  • Spectral element operators are now evaluated through the slice-loop primitives (foreach_slab and the other DataLayouts.foreach_* loops), so they can appear inside fused loop bodies alongside pointwise broadcasts: one loop on CPUs and one kernel launch on GPUs per fused body, replacing the hand-written CUDA spectral kernels. Statements in a fused body may read the results of the statements before them, both pointwise and through operators, and temporaries materialized inside a body are stored in per-thread registers. Restrict cannot read a register-resident argument on GPUs and now throws an error asking for the argument to be materialized outside the fused loop.

  • Fused spectral element broadcasts compile with lower memory and run faster than the replaced implementation on CPUs, and slightly faster on GPUs.

  • The advection operators' boundary treatment has been reworked around a generalized Extrapolate{N} boundary condition (also written Extrapolate(N), with Extrapolate() == Extrapolate{0}()), which selects how the ghost points reached by the interior stencil are padded: every ghost point of a stencil takes the value extrapolated (with an order-N polynomial, 0 <= N <= 2) from the N + 1 interior points closest to the boundary, and the order is reduced where the stencil has fewer interior points in range (at a boundary face itself only 2 are in range, so the order there is at most 1; UpwindBiasedProductC2F's 2-point stencil only ever has 1 in range, so every order reduces to closest-value padding for it). Extrapolate is now the only boundary condition the advection operators (UpwindBiasedProductC2F, Upwind3rdOrderBiasedProductC2F, LinVanLeerC2F, FCTBorisBook, FCTZalesak, and TVDLimitedFluxC2F) accept, and Extrapolate{0} is added to an operator's bcs when it is constructed with no boundary conditions. It replaces the one-sided conditions, which remain as deprecated aliases (FirstOrderOneSided == Extrapolate{0} and ThirdOrderOneSided == Extrapolate{1}). The aliases are not numerically identical to the old conditions: the old conditions replaced the whole stencil with fixed one-sided reconstructions at the two faces nearest each boundary, while Extrapolate keeps the interior stencil's upwinding and only pads its ghost points. At the face one in from a boundary, the results coincide exactly when the velocity at that face points toward the boundary (the old downwind-biased reconstruction is then also the upwind choice), and differ when it points into the domain: with inflow v³ at the second-lowest face and centers x₁, x₂, x₃ counted up from the boundary, Upwind3rdOrderBiasedProductC2F with ThirdOrderOneSided gave v³ (4x₁ + 10x₂ - 2x₃) / 12 and now gives v³ (x₁ + x₂) / 2 with Extrapolate{1}, while with FirstOrderOneSided it gave the first-order v³ x₁ and now gives v³ (2x₁ + x₂) / 3 with Extrapolate{0}. At the boundary face itself the old reconstructions reached one center beyond the boundary, so they were only meaningful under an enclosing operator that overrides the boundary face (e.g. DivergenceF2C with SetValue); Extrapolate's ghost-point padding is well-defined there. User-supplied callable ghost-point reconstructions are no longer accepted. A boundary condition whose keyword name matches neither of the space's vertical boundary names is now an error at broadcast time (previously it was silently ignored), except for the default (bottom, top) pair of Extrapolate{0}s, which applies at any boundary names. An advection operator is rewritten as an operator-matrix multiply exactly when its interior stencil is linear in the advected argument (Operators.has_linear_stencil), with the ghost-point extrapolations folded into its matrix's boundary rows by multiplying the interior row with the matrix of extrapolation weights; all others are evaluated pointwise. Note that Extrapolate on UpwindBiasedProductC2F also changes meaning: it used to replicate the operator's output at the closest interior face (U(v, x)[1/2] = U(v, x)[3/2]), while it now pads the ghost input, so the boundary face evaluates to v³[1/2] x[1]. As before, the flux through the boundary itself should be imposed by the enclosing operator, e.g. DivergenceF2C with a SetValue boundary.

    On non-periodic domains, this changes results at the two faces nearest each boundary (with the default Extrapolate{0} padding):

    • LinVanLeerC2F previously used one-sided first-order upwind reconstructions there; it now uses the ghost-point-padded limited stencil.
    • FCTBorisBook previously returned a zero antidiffusive flux there, and it still does, since the padded ghost points make the one-sided difference on the boundary side vanish, and that difference bounds the corrected flux; its results are unchanged everywhere.
    • FCTZalesak and TVDLimitedFluxC2F previously forced their corrected or limited fluxes to zero there; they now compute the ghost-point-padded stencil instead.

    Two operators also change their calling convention. Since an advection operator advects a single center-valued argument, FCTZalesak now takes its two advected quantities as a single field with 2-tuple elements: FCTZalesak.(A, Φ, Φᵗᵈ) becomes FCTZalesak.(A, tuple.(Φ, Φᵗᵈ)) (or FCTZalesak(A, tuple(Φ, Φᵗᵈ)) inside @.). Broadcast arguments beyond the velocity and advected field are evaluated at the current face and passed through as is, so TVDLimitedFluxC2F now requires its upwinding velocity 𝓊 to be supplied as contravariant data: either a Contravariant3Vector field, or a scalar field holding the contravariant3 component, e.g. Geometry.contravariant3.(u, Fields.local_geometry_field(face_space)).

    TVDLimitedFluxC2F's slope ratio r is now zero whenever the upwind slope is zero, even if the denominator ϕ₊₁₂ - ϕ₋₁₂ + eps is also zero (which happens when ϕ₊₁₂ - ϕ₋₁₂ is exactly -eps, e.g. in regions where ϕ is flat up to roundoff, and previously produced NaN limited fluxes from 0 / 0). MatrixFields.operator_matrix now reports every advection operator with a nonlinear stencil or boundary reconstruction (including TVDLimitedFluxC2F, which previously threw a MethodError) as a nonlinear operator that cannot be represented by a matrix. 2544

  • Broadcasts over the linear one-argument finite difference operators are now evaluated as operator-matrix multiplies: @. op(arg) is rewritten to multiply arg by op's operator matrix (MatrixFields.operator_matrix), with value-fixing boundary conditions reapplied around the multiply by a SetBoundaryOperator. Two user-visible consequences:

    • A center-input operator (InterpolateC2F, GradientC2F, DivergenceC2F, CurlC2F, ...) constructed without a boundary condition produces a NaN matrix row at each boundary face, so the result there is NaN, just as it was on the pointwise stencil path; a forgotten boundary condition is still flagged at run time. This also applies to the explicit MatrixFields.operator_matrix API, whose boundary rows for a missing boundary condition were previously zero: they are now NaN rows.
    • CurlC2F results are now Contravariant12Vectors rather than Contravariant123Vectors with a structurally zero third component, since its operator matrix's rows produce the two nonzero components of the vertical curl contribution; SetCurl boundary values are projected onto the Contravariant12 axis accordingly. Code that read the u³ component of a CurlC2F result must drop it (it was always zero).

    Columns too short for a stencil's interior (e.g. a center-to-face operator on a single-level column, or a 4-point advection stencil on a 2-level column) are now supported: Operators.window_bounds clamps the overlapping boundary windows instead of rejecting them with an AssertionError, and every face is computed with the appropriate boundary row (the ghost-point extrapolations reduce their order to the interior points actually in range). When the two boundary windows overlap on such a column, the bottom (left) boundary condition always takes precedence: e.g. a two-sided SetDivergence on a single-level column, which prescribes two values for the one output point, applies the bottom value there. On GPUs, finite difference broadcasts over MultiColumnFiniteDifferenceSpace now use the eager one-thread-per-level kernel like the extruded and single-column families, instead of falling back to the one-thread-per-value kernel. 2544

  • Removed the Extrapolate boundary condition from GradientF2C, where it replicated the operator's output at the closest interior point (G(x)[1] = G(x)[2]); it remains available on DivergenceF2C, where it keeps that replicate-output meaning (D(v)[1] = D(v)[2]), and on the interpolation operators InterpolateC2F and WeightedInterpolateC2F, where it copies the closest interior input. GradientF2C now accepts SetGradient(v₀), which prescribes the gradient at the center closest to the boundary (with v₀ projected onto the covariant 3 axis, as for GradientC2F). The finite-difference biased interpolation operators are named for the vertical direction they lean toward: BottomBiasedC2F and BottomBiasedF2C take the value below a node, TopBiasedC2F and TopBiasedF2C the value above. LeftBiasedC2F, LeftBiasedF2C, RightBiasedC2F, and RightBiasedF2C remain available as compatibility aliases. 2544, 2608

  • Removed unused finite difference operators and boundary conditions 2521

    • Removed SetValue from GradientC2F, DivergenceC2F, CurlC2F and UpwindBiasedProductC2F
    • Removed SetGradient from InterpolateC2F and WeightedInterpolateC2F
    • Removed the AdvectionC2C, AdvectionF2F, FluxCorrectionC2C and FluxCorrectionF2F operators
    • Removed the UpwindBiasedGradient operator, which had no downstream users
    • Removed the LeftBiased3rdOrderC2F, LeftBiased3rdOrderF2C, RightBiased3rdOrderC2F and RightBiased3rdOrderF2C operators, which had no downstream users (the C2F reconstructions survive as the interior stencil of Upwind3rdOrderBiasedProductC2F, which applies the left- or right-biased variant according to the sign of its velocity argument)

    Each of these can be written in terms of the remaining operators and boundary conditions; test/Operators/finitedifference/unit_column.jl contains a testset ("Boundary values and advection built from the primitive operators") that pins the replacement expressions for SetValue on GradientC2F, DivergenceC2F and UpwindBiasedProductC2F, and for the AdvectionC2C, AdvectionF2F and FluxCorrectionC2C stencils, against the stencil each reproduces (the remaining removals follow the same patterns). For example, a SetValue(x₀) boundary on GradientC2F is the same as SetGradient(Covariant3Vector(2 * (x[1] - x₀))), and AdvectionC2C(v, θ) is InterpolateF2C()(dot(Contravariant3Vector(v), GradientC2F()(θ))). The helper functions Operators.gradient_c2f_dirichlet, Operators.divergence_c2f_dirichlet, Operators.curl_c2f_dirichlet and Operators.upwind_biased_product_c2f_dirichlet build the removed SetValue replacements automatically (materializing their results, so they are migration aids rather than performance-sensitive building blocks), pass boundary values that are already boundary conditions through unchanged (so a Dirichlet value on one boundary can be combined with an explicit condition on the other), and requesting a SetValue from one of the four operators' constructors automatically returns an Operators.DirichletOperator that applies the matching helper when broadcast, so existing GradientC2F(bottom = SetValue(x₀)).(x)-style code keeps working. The replacement stencil is built lazily, so it fuses into an enclosing broadcast like a true operator application, but each application still materializes any lazy argument (the boundary rows need the argument's boundary levels) along with small level fields holding the boundary rows' values. MatrixFields.operator_matrix now reports LinVanLeerC2F as a nonlinear operator instead of failing with a MethodError.

  • The "point cloud" types have been renamed to use the Multi prefix:

    • Grids.PointCloudGrid is now Grids.MultiPointGrid,
    • Grids.ExtrudedPointCloudGrid is Grids.ExtrudedMultiPointGrid,
    • Spaces.PointCloudSpace is now Spaces.MultiPointSpace,
    • CommonGrids.PointColumnEnsembleGrid is now CommonGrids.MultiColumnGrid,
    • CommonSpaces.PointColumnEnsembleSpace is now CommonSpaces.MultiColumnSpace.
    • The old names are available, but deprecated. 2611
  • Support remapping and HDF5 reading/writing for MultiColumnFiniteDifferenceSpace 2596

  • The plotting companion packages have been folded into package extensions, and the ClimaCoreVTK companion package has been deleted. Makie plotting has moved from ClimaCoreMakie into the ClimaCoreMakieExt extension, which loads automatically when one of the Makie backends is loaded, and the Plots recipes have moved from ClimaCorePlots into the ClimaCoreRecipesBaseExt extension, which loads automatically when both ClimaCore and Plots are loaded. ClimaCoreVTK was unmaintained and unused, and has been removed with no replacement. 2595

v0.15.3

  • Removed the SciML compatibility layer (src/Fields/compat_diffeq.jl) and the RecursiveArrayTools dependency. Nothing in ClimaCore, ClimaAtmos, ClimaLand, or ClimaCoupler uses it: all of them time-step with ClimaTimeSteppers, which dropped SciMLBase in 0.10. Passing a Field or FieldVector to an OrdinaryDiffEq integrator is no longer supported: the layer's eight RecursiveArrayTools methods are removed, and recursive_bottom_eltype, the only one ClimaCore itself used, is now ClimaCore.Utilities.recursive_bottom_eltype. Of the four Base methods the layer also carried, any, similar(::F, ::Type{F}) and vec on Field are kept and are used beyond OrdinaryDiffEq; vec returns a vector over the field's values now, so its eltype is the field's rather than the backing array's. muladd(x, ::Field) is removed: it broadcast a two-argument muladd over scalars, which does not exist, so it has thrown a MethodError on every call since it was added. 2576

  • Bugfix for indexing of reduced-dimension fields in GPU finite difference kernels 2584

  • Bugfix for mapreduce with Tensor valued Field(s) on GPUs 2591

v0.15.1

  • Extend kernel fusion interface (foreach_slice/reduce_points) to Field arguments. 2571
  • Add PointCloudSpace and MultiColumnFiniteDifferenceSpace for running independent points/columns in parallel. 2525

v0.15.0

  • Fixed a GPU compilation failure (gpu_gc_pool_alloc and jl_f__apply_iterate in InvalidIRError) for kernels over wide or complexly typed broadcast expressions, like the fused EDMFX cloud fraction broadcasts in ClimaAtmos AMIP runs. The broadcast argument traversal functions in DataLayouts and the CUDA extension no longer filter arguments with reductions that push into an accumulator, whose recursively growing type could trigger inference's widening heuristics; they now collect layouts with unrolled_flatmap, whose intermediate types all stay concrete, and f_dim reduces with a fixed nothing-or-integer accumulator. All other kernel-reachable calls to the accumulator-based unrolled_filter, unrolled_unique, and unrolled_allunique (in Geometry basis computations and in Utilities.nested_broadcast) were converted to per-item checks or unrolled_flatmap, and a unit test now forbids these functions in kernel-reachable directories. Errors thrown from kernel-reachable code in DataLayouts, Geometry, and Utilities are now singleton exception types (InvalidSubscopeError, NonOverlappingScopesError, NoMetricError, ScalarBasisError, DuplicateComponentNamesError, UnequalNestedBroadcastLengthsError) whose messages include the relevant types but are only generated by showerror on the host. All kernel-reachable unrolled_reduce calls pass their init values positionally, since kwcalls do not always specialize during GPU compilation of wide broadcast expressions. A unit test materializes wide fused broadcasts that mix 0-dimensional and 3-dimensional layouts of heterogeneous element types, and a 1-GPU Buildkite job compiles them through real CUDA kernels. GPU kernel launch latency improved by roughly 10%, and the latency benchmark baselines were lowered accordingly.

  • Added Fields.fieldvector2array! and Fields.array2fieldvector!, allocation-free, GPU-safe block-wise copies between a FieldVector and a flat vector (plus allocating versions without the !). Together with Krylov.ktypeof(::FieldVector) (defined in KrylovExt), these let iterative Krylov solvers keep their workspace vectors on the GPU while model code continues to operate on FieldVectors.

  • Fixed zero(::FieldVector) to preserve scalar (ScalarWrapper) components instead of turning them into 0-dimensional Arrays, and fixed ClimaComms.array_type(::FieldVector) (and hence Krylov.ktypeof(::FieldVector)) for FieldVectors with plain-array or scalar components, which previously threw a MethodError.

  • Removed the Operators.columnwise! operator, along with its CUDA kernels (ext/cuda/operators_columnwise.jl), its tests, and its CI jobs. It was unused by downstream code. 2548

  • Removed the unused shared-memory finite difference operator code path on GPUs (CUDAWithShmemColumnStencilStyle and the operators_fd_shmem*.jl files in the CUDA extension), along with its tests, benchmarks, CI job, and the shmem_design.md documentation page. This path was already disabled by default (Operators.use_fd_shmem() returns false), so default behavior and performance are unchanged. Downstream code that opted in by defining Operators.use_fd_shmem() = true will no longer see any effect from doing so. 2526

  • Unified strong/weak spectral element operator variants via a FormType parameter. Divergence, Gradient, and Curl now carry a second type parameter (StrongForm or WeakForm), and WeakDivergence, WeakGradient, and WeakCurl are backwards-compatibility aliases for the WeakForm variants (e.g. WeakDivergence{I} = Divergence{I, WeakForm}), collected in src/Operators/deprecated.jl for eventual removal. All operator names and their public constructors are unchanged. Results are bitwise identical to the previous implementations, with one exception: the strong-form Divergence on GPUs in 2D now keeps one accumulator per dimension (matching the other unified operators) instead of summing both dimensions into a single accumulator, which changes results by accumulation roundoff only (verified identical in exact arithmetic; float differences are a few eps of the accumulated terms). Two notes for downstream code: isa checks against the strong operator types now also match the weak variants (e.g. WeakDivergence() isa Divergence is true), so dispatch that must distinguish forms should use the FormType parameter (e.g. Divergence{I, StrongForm}); and the internal Divergence{()}(space)-style constructors used to reset operator axes have been replaced by rebuild_operator(op, space). As a side effect of unifying the CUDA Gradient kernels, WeakGradient now accepts rank-1 tensor fields on GPUs, which previously raised an "Unsupported input type" error even though both forms already supported them on CPUs. 2556

  • Refactor DataLayouts module 2522

    • All data layout types are unified into a single DataLayout type, and all loops over data go through two communication primitives (foreach_slice and reduce_points) that work the same way on CPUs, multi-threaded CPUs, and GPUs. Runtime performance on CPUs and GPUs matches the previous release.
    • Data in a Field is now indexed in the order [v, i, j, h], and every parent array has a 5-dimensional shape, with one axis used to store struct fields. Code that indexes into parent(field) arrays must be updated.
    • Several old names (AbstractData, IJFH, IJHF) are available as aliases, and [i, j, f, v, h] indexing is still allowed for backward compatibility.
  • Fixed multithreaded CPU loops over ThisThreadPool reading Julia's process-global threaded-region flag more than once per loop. A task that concurrently entered a threaded loop could flip the flag in between two of those reads, which either raised a spurious "Nested loops over ThisThreadPool are not supported" error or left num_threads and thread_rank disagreeing about how a loop's indices were divided among threads. Loops now resolve their scope once, up front, with resolve_pool_threads, and a thread's rank comes from task-local storage rather than from global state. 2557

  • Divided the CPU thread pool between multithreaded loops that run at the same time, instead of giving every thread to whichever loop starts first and leaving the rest to run on a single thread each. Broadcasting over Fields from several tasks at once, as ThreadsX.mapreduce does, is about 2.6x faster with two concurrent tasks on 8 threads, and no slower with one. 2557

  • Cached the CUDA device attributes that every GPU launch configuration needs, instead of querying the CUDA driver for each of them on every launch, and reused a per-task device buffer for the intermediate results of GPU reductions instead of allocating one per reduction. 2557

  • Fixed DSS for MPI after DataLayouts refactor. 2572

v0.14.55

  • Add a reverse option to the column integral operators (column_reduce! and column_accumulate!) so vertical reductions and accumulations can proceed from the top of a column downward. 2531

v0.14.54

  • Refactor Geometry module 2457

v0.14.53

  • Bug fix for broadcasting gpu errors 2517. 2518
  • Make specialized shared memory-based tridiagonal solver mask aware 2518. 2518

v0.14.52

  • Add a specialized shared memory-based tridiagonal solver that uses PCR algorithm for CUDA backend. 2486
  • Replace RecursiveApply with AutoBroadcaster wrappers. 2417

v0.14.51

  • Add support for nonuniform data structures 2464
  • Add shared memory stencil support in CUDAExt (for spaces with non-periodic topologies and no masks) 2466

v0.14.50

  • Add support for bilinear interpolation for diagnostics to the Remapper. 2455

v0.14.49

  • Add PressureInterpolator 2422
  • Add Buildkite pipeline to check flagship AMIP performance 2438
  • Fix conservation of split divergence 2432

v0.14.48

  • Add VerticalMassBorrowingLimiter 2383

v0.14.47

  • Use space-filling curve for CubedSphereGrid and ExtrudedCubedSphereGrid 2429

v0.14.46

  • Restrict GPUCompiler to < v1.7.6 to avoid GPU errors 2430

v0.14.45

  • Add split divergence operator 2409

v0.14.44

  • Revert to_device dispatch change from #2375 2403

v0.14.43

  • Add support for horizontal operators on column spaces 2375

v0.14.42

  • Add opt-in CUDA kernel renaming based on stacktrace for broadcasts over ClimaCore Fields 2376

    To enable, set the following environment variable before starting Julia:

    export CLIMA_NAME_CUDA_KERNELS_FROM_STACK_TRACE=true

    With default kernel names, profiling downstream packages results in names like knl_copyto_(VIJFH<Float32, (int)63, (int)4, CuDeviceArray<Float32, (int)5, (int)1>>, Broadcasted<VIJFHStyle<(int)63, (int)4..., which are hard to read and often more than 50,000 characters long. With renaming enabled, profilers show names like set_velocity_quantities__FILE_ClimaAtmos_jl_src_cache_precomputed_quantities_jl_L351, which gives more context about where the kernel was launched from.

v0.14.41

  • Add project for both sides of 2-tensors (previously only left side was supported). Simplify implementation. 2379

v0.14.40

  • Store reverse_mode in the IntervalMesh struct, so that we can access it when writing and reading the mesh for restarts

v0.14.39

v0.14.38

  • Upgrade compatibility with RootSolvers.jl, KrylovKit.jl, DataStructures.jl. Using the following versions of RootSolvers may result in slightly different IntervalMesh(es) and results of column_integral_indefinite!(∂ϕ∂z, ᶠϕ)

    • < v0.45
    • = v0.45
    • > v0.45

v0.14.37

  • Extend level and field_values to work with lazy Fields 2356

v0.14.36

  • Refactor FieldMatrix indexing, add scalar_field_matrix 2346
  • Add UpwindBiasedGradient operator 2345

v0.14.35

  • Fix unrolling over field broadcast arguments 2350
  • minor fixes/Fix field2array error msg, level func bounds check 2347
  • Define FiniteDifferenceSpace for extruded spaces 2344

v0.14.34

  • Implement a columnwise shmem operator 2328
  • Dont reference localgeometry fields unnecessarily 2340
  • Add missing methods for column spaces and FieldVectors 2330
  • Move Δz_metric_component to Geometry module 2336
  • Allow for more flexibly constructed LocalGeometry 2335
  • Latitude and longitudes were flipped in the default target coordinates in the remapper, leading to non-sense values.

Add option to disable check on spaces. PR 2322

ClimaCore.DebugOnly now contains a function allow_mismatched_spaces_unsafe. When this function is overridden to return true, ClimaCore will skip consistency checks on spaces in broadcasted expressions. This is useful when debugging with deepcopy. See documentation for more information.

v0.14.33

  • Expanded compat for Krylov to 0.10. 2318.

v0.14.32

  • Disabled shared memory on finite difference operators. It was found that it has a severe performance penalty for more complex cases. 2317

  • Fixed missing method for Topologies.mesh(Topology2D) 2288.

v0.14.31

  • GPU performance should now be more robust 2296.

  • Remapping is now protected for masked operations 2292.

  • Shmem support for InterpolateC2F was added 2290.

  • Some masked operations were fixed 2285.

  • Internal refactoring should help reduce latency and improve gpu performance 2284.

  • Masks now support restart 2212.

v0.14.30

  • Fixed error messages in our DataLayouts 2275.

  • Bug fix in our finite difference shared memory implementation 2282.

  • Added support for shared memory in GradientC2F 2268.

Improvements to Remapping.interpolate PR 2272

PR 2272 introduces convenience interpolate functions that are optimally suited for plotting.

Assuming field is a 3D Field,

import ClimaCore.Remapping: interpolate

array3D = interpolate(fields)

array3D will be a 3D Array with values along the three dimensions.

By default, no interpolation in the vertical direction is performed. Linear interpolation can be obtained by passing zresolution

array3D_linear_in_z = interpolate(fields; zresolution)

Controlling the specific interpolation points is also possible, as shown in this example:

import ClimaCore.Geometry: LatLongPoint, ZPoint
import ClimaCore.Remapping: interpolate

target_hcoords = [LatLongPoint(45., 23.)]
target_zcoords = ZPoint.([100., 200., 1000.])

array3D_specific = interpolate(fields; target_hcoords, target_zcoords)

v0.14.29

  • Fix empty interpolation with certain versions of CUDA+MPI 2256.

v0.14.28

  • Bugfix in ClimaCore FD stencil code PR 2251.

v0.14.27

  • Added support for map! PR 2248.

  • The standard * symbol now denotes matrix multiplication, and the alias const ⋅ = MultiplyColumnwiseBandMatrixField() is being deprecated PR 2232. Please replace use of ⋅ with *.

  • Fields.Field(Bool, ::AbstractSpace) is now supported. PR 2239.

  • SpectralElementSpace2D constructors now support nodal masks. PR 2201. See its documentation here. Note that it does not yet support restarts.

  • Added support for InputOutput with PointSpaces PR 2162.

  • Reading a Field with HDF5Reader will not call eval ∘ Meta.parse on the raw value_type attribute. Instead, the new read_type function is used, which prevents the execution of arbitrary code. PR 2162.

  • Improved show for spaces, and added show for grids. PR 2202.

  • UnrolledFunctions removed and replaced with UnrolledUtilities PR 1713

  • Unused original implicit solver intereface removed PR 2200

v0.14.26

  • Fixed bug in DSS for level fields. PR 2194. Closed 2193.

v0.14.25

  • Using incorrect boundary conditions will now error PR 2180.

  • Prior to this version, CommonSpaces could not be created with ClimaComms.MPICommsContext. This is now fixed with PR 2176.

  • Fixed bug in distributed remapping with CUDA. Sometimes, ClimaCore would not properly fill the output arrays with the correct values. This is now fixed. PR 2169

  • Fixed adapt for vertical topology. PR 2187. Closed 2186.

  • Added support for 1D extruded spaces. PR 2172. Closed 1989, and 1383.

v0.14.24

  • A new Adapt wrapper was added, to_device, which allows users to adapt datalayouts, spaces, fields, and fieldvectors between the cpu and gpu. PR 2159.
  • Remap interpolation cuda threading was improved. PR 2159.
  • center_space and face_space are now exported from CommonSpaces. PR 2157.
  • Limiter debug printing can now be suppressed, and printed at the end of a simulation, using Limiters.print_convergence_stats(limiter). PR 2152.
  • Fixed getidx for GradientC2F with SetValue bcs. PR 2148.
  • Added support data2array for DataF (i.e., PointFields). PR 2143.
  • HDF5Reader / HDF5Writer now support do-syntax. PR 2147.

v0.14.22

  • Added support for CPU<->GPU conversion of spaces, fields and fieldvectors, via Adapt. PR 2114.

  • Fixed numerics of column integrals for deep atmosphere. PR 2119.

  • Fixed high-resolution gpu space construction. PR 2100.

A new DebugOnly module can help find where NaNs/Inf come from

A new ClimaCore.DebugOnly module was added, which can help users find where NaNs or Infs come from in a simulation, interactively. Documentation, with a simple representative example can be found here.

Various improvements to Remapper 2060

The ClimaCore.Remapping module received two improvements. First, Remapper is now compatible with purely vertical Spaces (performing a linear interpolation), making it compatible with column setups. Second, a new set of simplified interpolation functions are provided.

Now, interpolating a Field field is as easy as

import ClimaCore.Remapping: interpolate
output_array = interpolate(field)

The target coordinates are automatically determined, but can also be customized. Refer to the documentation for more information.

v0.14.22

  • Fixed gpu support (adapt) for van-leer limiters. PR 2112.

v0.14.21

  • Support for new TVD limiters were added, PR [1662] (CliMA#1662).

Bug fixes

  • Fixed writing/reading purely vertical spaces. PR 2102
  • Fixed correctness bug in reductions on GPUs. PR 2106

face_space, center_space functions

ClimaCore.Spaces now comes with two functions, face_space and center_space, to convert a Space from being cell-centered to be face-centered (and viceversa). These functions only work for vertical and extruded spaces.

v0.14.20

  • We've added new convenience constructors for grids PR 1848. Here are links to the new constructors:

  • A strict = true keyword was added to rcompare, which checks that the types match. If strict = false, then rcompare will return true for FieldVectors and NamedTuples with the same properties but permuted order. For example:

    • rcompare((;a=1,b=2), (;b=2,a=1); strict = true) will return false and
    • rcompare((;a=1,b=2), (;b=2,a=1); strict = false) will return true
  • We've added new datalayouts: VIJHF,IJHF,IHF,VIHF, to explore their performance compared to our existing datalayouts: VIJFH,IJFH,IFH,VIFH. PR #2055, PR #2052.

  • We've refactored some modules to use less internals. PR #2053, PR #2052, #2051, #2049.

  • Some work was done in attempt to reduce specializations and compile time. PR #2042, #2041

Fix lower compat bounds

ClimaCore had incorrect lower bounds for certain packages. PR #2078 fixes the lower bounds and adds a GitHub Action workflow to test it. ClimaCore now requires Julia 1.10 or greater.

v0.14.19

Fix undefined behavior in DataLayouts

PR #2034 fixes some undefined behavior in the DataLayout module. This bug was manifesting itself as a world age error in some applications that are using Julia 1.11.

New convenience constructors for DataLayouts

PR #2033 introduces new constructors for DataLayouts. Instead of writing

array = rand(FT, Nv, Nij, Nij, 3, Nh)
data = VIJFH{S, Nv, Nij}(array)

You can now write

data = VIJFH{S}(ArrayType{FT}, rand; Nv, Nij, Nh)

and grab the array with parent(data) (if you need).

Note: These constructors are meant to be used in tests and interactive use, not in performance sensitive modules (due to their lack of inferrability).

v0.14.18

  • Fixed multiple-field solve for land simulations PR #2025.
  • Fixed Julia 1.11 PR #2018.
  • Nh was turned back into a dynamic parameter, in order to alleviate compile times PR #2005.
  • Defined some convenience methods #2012

Fix equality for FieldVectors with different type

Due to a bug, == was not recursively checking FieldVectors with different types, which resulted in false positives. This is now fixed and FieldVectors with different types are always considered different.

Fix restarting simulations from Spaces with deep = true

Prior to this change, the ClimaCore.InputOutput module did not save whether a Space was constructed with deep = true. This meant that restarting a simulation from a HDF5 file led to inconsistent and incorrect spaces and Fields. This affected only extruded 3D spectral spaces.

We now expect Spaces read from a file to be bitwise identical to the original one.

PR #2021.

v0.14.17

  • Fixed some type instabilities PR #2004
  • More fixes to higher resolution column cases for the GPU #1854

v0.14.16

  • Extended create_dss_buffer and weighted_dss! for FieldVectors, rather than just Fields. PR #2000.

  • Fix restarting simulations from Spaces with enable_bubble = true

Prior to this change, the ClimaCore.InputOutput module did not save whether a Space was constructed with enable_bubble = true. This meant that restarting a simulation from a HDF5 file led to inconsistent and incorrect spaces and Fields. This affected only 2D spectral spaces (and extruded ones that have this type of horizontal space).

We now expect Spaces read from a file to be bitwise identical to the original one.

PR #1999.

v0.14.15

  • Added support for mixing extruded and horizontal spaces in GPU kernels. PR #1987.

v0.14.14

  • Inference was fixed for some broadcast expressions involving columns PR #1984.

v0.14.13

  • CUDA kernel launch configurations have been tuned to improve performance, and now allows for high resolution in the vertical direction PR #1969, issue #1854 closed.

  • DSS was refactored, and machine precision changes can be expected. PR #1958.

v0.14.12

  • Added hyperbolic tangent stretching. PR #1930.

v0.14.11

  • Support for matrix fields on spectral and point spaces was added, PR #1884.
  • Support for 3-component DSS transform was added, PR #1693.
  • Support for column-wise "accumulate"/"reduce" operations were added, PR #1903. These abstractions will allow us to group, paralellize and optimize more column-wise work on the GPU.
  • A new macro, Fields.@rprint_diff was added, which recursively print differences between two FieldVectors (of the same type) (PR #1886).
  • Julia 1.11 fixes (PR #1883)
  • Nh has been added to the type parameter space, which allows us to more flexibly write performant backend kernels (PR #1894). This was leveraged in PR #1898, and may result in slightly more performant kernels.

v0.14.10

  • Various performance tweaks (PRs #1840, #1837, #1843, #1839).
  • CPU/GPU kernels are now determined by dispatching, instead of specializing, which should (hopefully) have generally fixed GPU dispatching issues (PR #1863).
  • Matrix multiplication kernels have been improved (PR #1880).
  • Support for the following methods have been deprecated (PR #1821, ):
    • IntervalTopology(::Mesh) in favor of using IntervalTopology(::ClimaComms.AbstractDevice, ::Mesh)
    • FaceFiniteDifferenceSpace(::Mesh) in favor of using FaceFiniteDifferenceSpace(::ClimaComms.AbstractDevice, ::Mesh)
    • CenterFiniteDifferenceSpace(::Mesh) in favor of using CenterFiniteDifferenceSpace(::ClimaComms.AbstractDevice, ::Mesh)
    • FiniteDifferenceGrid(::Mesh) in favor of using FiniteDifferenceGrid(::ClimaComms.AbstractDevice, ::Mesh)

v0.14.9

  • GPU dispatching with copyto! and fill! have been fixed PR #1802.

v0.14.8

  • Added FieldMatrixWithSolver, a wrapper that helps defining implicit Jacobians. PR #1788

v0.14.6

  • Added array2field(::Field) and field2array(::Field) convenience functions, to help facilitate use with RRTMGP. PR #1768

  • Nv is now a type parameter in DataLayouts that have vertical levels. As a result, users can use DataLayouts.nlevels(::AbstractData) to obtain a compile-time constant for the number of vertical levels.

  • Added interpolate(field, target_hcoords, target_zcoord) convenience function so that the Remapper does not have to be explicitely constructed. PR #1764

v0.14.5

  • run_field_matrix_solver! was fixed for column spaces, and tests were added to ensure it doesn't break in the future. PR #1750
  • We're now using local memory (MArrays) in the band_matrix_solve!, which has improved performance. PR #1735.
  • We've specialized some cases in run_field_matrix_solver!, which results in more efficient kernels being launched. PR #1732.
  • We've reduced memory reads in the band_matrix_solve! for tridiagonal systems, improving its performance. PR #1731.
  • We've added NVTX annotations in ClimaCore functions, so that we have a more granular trace of performance. PRs #1726, #1723.

v0.14.0

  • Extend adapt_structure for all operator and boundary condition types. Also use unrolled_map in multiply_matrix_at_index to avoid the recursive inference limit when compiling nested matrix operations. PR #1684
  • Remappers can now process multiple Fields at the same time if created with some buffer_lenght > 1. PR (#1669) Machine-precision differences are expected. This change is breaking because remappers now return the same array type as the input field.
  • We inlined the multiple_field_solve kernels, which should improve performance. PR #1715.
  • We added support for MultiBroadcastFusion, which allows users to fuse similar space point-wise broadcast expressions via Fields.@fused_direct. PR #1641.

v0.13.4

  • We fixed some fieldvector broadcasting on Julia 1.9. PR #1658.
  • We fixed an inference failure with matrix field broadcasting. PR #1683.

v0.13.3

  • We now always inline for all ClimaCore kernels. PR #1647. This can result in more brittle inference (due to compiler heuristics). Technically, this is not a breaking change, but some code changes may be needed in practice.

v0.13.2

  • fixed array allocation for interpolation on CPU. PR #1643.

v0.13.1

  • fixed edge case in interpolation that led to incorrect vertical interpolation. PR #1640.
  • fixed interpolate! for MPI runs. PR #1642.

v0.13.0

  • support for many deprecated methods have been dropped PR #1632.
  • Slight performance improvement by replacing rdiv with rmul. PR (#1496) Machine-precision differences are expected.
  • Rewritten distributed_remapping. New distributed_remapping is non-allocating and up to 1000x faster (on GPUs). New distributed_remapping no longer supports the physical_z argument (this option is still available in Remapping.interpolate_column). New interpolate! function is available for remapping in-place. The new preferred way to define a Rampper is Remapper(space, target_hcoords, target_zcoords) (instead of Remapper(target_hcoords, target_zcoords, space)). PR (#1630)

v0.12.1

  • Started changelog
  • Fixed matrix field iterative solver tests.
  • Specialize on diagonal fieldvector broadcasts to skip uninferred check_broadcast_axes PR #1615, Issue #1465.
  • Fixed inference errors when not debugging PR #1617, Issue #2597.