UXARRAY / uxarray

Xarray extension for unstructured climate and global weather data analysis and visualization.
https://uxarray.readthedocs.io/
Apache License 2.0
148 stars 31 forks source link

Fails to rename edge_coordinates and face_coordinates names due to missing attrs #846

Closed kjnam closed 1 month ago

kjnam commented 1 month ago

Version

v2024.06.0

How did you install UXarray?

Conda

What happened?

When a UGRID file uses a custom grid_topology name, the code in _read_ugrid does not rename edge_coordinates and face_coordinates. There are two bugs: https://github.com/UXARRAY/uxarray/blob/8f787e0778917a3adb8a746d0d273079240c83ca/uxarray/io/_ugrid.py#L27 and https://github.com/UXARRAY/uxarray/blob/8f787e0778917a3adb8a746d0d273079240c83ca/uxarray/io/_ugrid.py#L33 are missing attrs. https://github.com/UXARRAY/uxarray/blob/8f787e0778917a3adb8a746d0d273079240c83ca/uxarray/io/_ugrid.py#L35 has a typo.

What did you expect to happen?

Expect to rename custom topology names to edge_lat, edge_lon, face_lat, and face_lon.

Can you provide a MCVE to repoduce the bug?

No response