Skip to content

fieldheatmap doesn't work with GL quadrature #2402

@juliasloan25

Description

@juliasloan25

Describe the bug

fieldheatmap can be used with a space that uses a GLL quadrature, but with a GL quadrature it brings up an empty figure that never gets fiiled.

To Reproduce

using ClimaCore: Quadratures, CommonSpaces, Fields
using ClimaCoreMakie
using GLMakie

# Create a space with 1 quadrature point (npolynomial = 0)
radius = 6.371e6
h_elem = 6
n_quad_points = 1
quad = Quadratures.GL{n_quad_points}()
space1 = CommonSpaces.CubedSphereSpace(; radius, n_quad_points, h_elem, quad)

# Try to plot the latitude field (makes an empty plot)
lat1 = Fields.coordinate_field(space1).lat
fieldheatmap(lat1)

# Create a space with 2 quadrature points (npolynomial = 1)
n_quad_points = 2
quad = Quadratures.GLL{n_quad_points}()
space2 = CommonSpaces.CubedSphereSpace(; radius, n_quad_points, h_elem, quad)

# Try to plot the latitude field (works)
lat2 = Fields.coordinate_field(space2).lat
fieldheatmap(lat2)

Project summary

(ClimaCore) pkg> st
Project ClimaCore v0.14.43
Status `~/clima/ClimaCore.jl/Project.toml`
  [79e6a3ab] Adapt v4.4.0
  [aae01518] BandedMatrices v1.10.2
  [8e7c35d0] BlockArrays v1.9.3
  [3a4d1b5c] ClimaComms v0.6.10
  [908f55d8] ClimaCoreMakie v0.4.6
  [7445602f] CubedSphere v0.3.4
  [864edb3b] DataStructures v0.19.3
  [f6369f11] ForwardDiff v1.3.0
⌅ [e9467ef8] GLMakie v0.10.18
  [d54b0c1a] GaussQuadrature v0.5.8
  [88fa7841] GilbertCurves v0.1.0
  [f67ccb44] HDF5 v0.17.2
  [8197267c] IntervalSets v0.7.13
⌅ [0b1a1467] KrylovKit v0.8.3
  [9dccce8e] LazyBroadcast v1.0.0
  [c3c07f87] MultiBroadcastFusion v0.3.3
  [5da4648a] NVTX v1.0.1
  [eebad327] PkgVersion v0.3.3
⌃ [731186ca] RecursiveArrayTools v3.36.0
  [7181ea78] RootSolvers v1.0.0
  [90137ffa] StaticArrays v1.9.15
  [10745b16] Statistics v1.11.1
  [0fe1646c] UnrolledUtilities v0.1.9
  [b77e0a4c] InteractiveUtils v1.11.0
  [37e2e46d] LinearAlgebra v1.11.0
  [2f01184e] SparseArrays v1.11.0

System details

julia> versioninfo()
Julia Version 1.11.6
Commit 9615af0f269 (2025-07-09 12:58 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Environment:
  JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions