Skip to content

IO for fesom not converting n2 to two during open_grid #1717

Closed

Description

@dylannelson

Version

2026.7.1

How did you install UXarray?

Source

What happened?

When making a fix for #1444 in PR #1667, we noticed there were far more outliers than expected, in an attempt to clean grid files. One example was this file:

Image

In a bit less detail it looks like this:

Image

We didn't expect this many non-grid dimensions on the grid, and we assume that n2 is likely supposed to be converted to "two" which is a dimension we expect. We would need to resolve this before proceeding, as we don't want to delete it in our planned cleaning process, if it actually needs to be converted to "two"

What did you expect to happen?

To see "two" as a dimension, not "n2"

Can you provide a MCVE to repoduce the bug?

import warnings
from pathlib import Path

warnings.filterwarnings("ignore")
import uxarray as ux

MESHFILES = "../../uxarray/test/meshfiles/"

# FESOM2 mesh.diag — nz, nz1, n2, N, n4
mesh_diag = ux.open_grid(MESHFILES + "ugrid/fesom/fesom.mesh.diag.nc")
mesh_diag

# --- separate cell ---

GRID_DIMS = set(ux.conventions.ugrid.DIM_NAMES)
print("  dims          :", dict(mesh_diag._ds.sizes))
print("  non-grid dims :", [d for d in mesh_diag._ds.sizes if d not in GRID_DIMS])
print("  coords        :", list(mesh_diag._ds.coords))

Activity

  1. added theissue type on Aug 27, 2026
  2. added
    bugSomething isn't working
    extra dimsHandling of non-grid dimensions, such as time or altitude
    on Aug 27, 2026
  3. moved this from 📚 Backlog to 📝 To-Do in UXarray Developmenton Aug 31, 2026
  4. moved this from 📝 To-Do to 👀 In review in UXarray Developmenton Sep 14, 2026
  5. moved this from 👀 In review to ✅ Done in UXarray Developmenton Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingextra dimsHandling of non-grid dimensions, such as time or altitude

Type

Fields

Priority

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions