Skip to content

Commit

Permalink
Drop edge/face variables in UGRID properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mx-moth committed Jan 10, 2023
1 parent d495573 commit 5de9f75
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/emsarray/conventions/ugrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,13 +1318,13 @@ def drop_geometry(self) -> xr.Dataset:
if topology.has_valid_edge_face_connectivity:
geometry_variables.append(topology.edge_face_connectivity.name)
if topology.edge_x is not None:
geometry_variables.append(topology.edge_x)
geometry_variables.append(topology.edge_x.name)
if topology.edge_y is not None:
geometry_variables.append(topology.edge_y)
geometry_variables.append(topology.edge_y.name)
if topology.face_x is not None:
geometry_variables.append(topology.face_x)
geometry_variables.append(topology.face_x.name)
if topology.face_y is not None:
geometry_variables.append(topology.face_y)
geometry_variables.append(topology.face_y.name)

dataset = dataset.drop_vars(geometry_variables)
dataset.attrs.pop('Conventions', None)
Expand Down

0 comments on commit 5de9f75

Please sign in to comment.