Skip to content

Commit

Permalink
Add missing .dims (#907)
Browse files Browse the repository at this point in the history
`_encode_ugrid` should check if `n_edge` exists in dimensions, not in
variables.

Fixes #906
  • Loading branch information
kjnam authored Aug 27, 2024
1 parent 68a6fa5 commit 855e88c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uxarray/io/_ugrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _encode_ugrid(ds):

grid_topology = ugrid.BASE_GRID_TOPOLOGY_ATTRS

if "n_edge" in ds:
if "n_edge" in ds.dims:
grid_topology["edge_dimension"] = "n_edge"

if "face_lon" in ds:
Expand Down

0 comments on commit 855e88c

Please sign in to comment.