Skip to content

Commit bc6be1c

Browse files
committed
Update grid parser docstring
1 parent a1a8c44 commit bc6be1c

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

uxarray/io/utils.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,25 +76,26 @@ def _is_fesom2(dataset: xr.Dataset) -> bool:
7676

7777

7878
def _parse_grid_type(dataset):
79-
"""Checks input and contents to determine grid type. Supports detection of
80-
UGrid, SCRIP, Exodus, ESMF, and shape file.
79+
"""Determine the grid type represented by an input dataset.
8180
8281
Parameters
8382
----------
8483
dataset : Xarray dataset
85-
Xarray dataset of the grid
84+
Xarray dataset containing grid topology information.
8685
8786
Returns
8887
-------
89-
mesh_type : str
90-
File type of the file, ug, exo, scrip or shp
88+
tuple[str, str | None, str | None]
89+
A 3-tuple of ``(mesh_type, lon_name, lat_name)``. ``mesh_type`` is one
90+
of ``"Exodus"``, ``"Scrip"``, ``"UGRID"``, ``"MPAS"``, ``"ESMF"``,
91+
``"GEOS-CS"``, ``"ICON"``, ``"FESOM2"``, or ``"Structured"``. The
92+
longitude and latitude coordinate names are only returned for structured
93+
grids and are otherwise ``None``.
9194
9295
Raises
9396
------
9497
RuntimeError
95-
If invalid file type
96-
ValueError
97-
If file is not in UGRID format
98+
If the dataset format cannot be recognized.
9899
"""
99100

100101
_structured, lon_name, lat_name = _is_structured(dataset)

0 commit comments

Comments
 (0)