Skip to content

Heatmaps of constant or very small fields fail #1422

@juliasloan25

Description

@juliasloan25

We have been seeing errors in generating our debugging heatmaps, e.g. as in this build. The error comes up either when a field is spatially constant, or when the extrema of the fields are too small for isapprox to be computed correctly due to floating point precision. Note that these are essentially the same case, since the floating point issue causes isapprox to return false when it should be true.

ERROR: Can't interpolate in a range where cmin == cmax. This can happen, for example, if a colorrange is set automatically but there's only one unique value present.

As of #1417, our debug plots no longer produce plots for spatially constant or very small ClimaCore fields. This is a workaround, and we may want to revert it in the future if we find that viewing these constant fields is helpful. Note that the axis is still constructed with the extrema in the header, so we can still see the value of the field, and this contains the same information as plotting a constant field in the figure.

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