uxarray icon indicating copy to clipboard operation
uxarray copied to clipboard

HEALPix (maybe even others) connectivities and split visualizations have issues around the pole

Open erogluorhan opened this issue 6 months ago • 1 comments
trafficstars

Version

v2025.04.0

How did you install UXarray?

Conda

What happened?

Using UXarray to visualize some coarse resolution HEALPix grids, I notice some issues as follows:

  1. Face edges do not seem like great circle arc in ours but the do in the easy.gems visualizations.

UXarray
Image

easy.gems Image

  1. There should be some issues around the Poles, which might be due to connectivity generation and/or periodic elements handling (Western faces being split but the Eastern ones, no splitting seems needed from easy.gems), but there does not seem to be issues with the actual corner nodes and face centers:

Image

Image

Image

Image

Image

What did you expect to happen?

Already clarified above I believe

Can you provide a MCVE to repoduce the bug?

# Let us open a pretty coarse HEALPix grid because we will visualize it later
uxgrid = ux.Grid.from_healpix(zoom=0, pixels_only=False)

uxgrid.plot(
    periodic_elements="split",         
    projection=ccrs.Mollweide(),
    width=800,
    title="HEALPix, zoom=0")

# Other plotting code in the figures above can also be inspected here

erogluorhan avatar Apr 29 '25 19:04 erogluorhan

This appears to be due to how we represent the boundaries. We connect the corners of the boundaries and treat it as a GCA, which differs from how the true boundaries are computed.

The issue here seems to be more with our visualization. Using a Geodetic source projection produces a more representative example.

Image

philipc2 avatar May 05 '25 03:05 philipc2

Geodetic visulaizations seem to be working for the time being. Regarding the HEALPIx edge geometry definition in UXarray's representation, we can revisit them in the future if need be.

erogluorhan avatar Jun 11 '25 17:06 erogluorhan