We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfd5ad2 commit 40e8c15Copy full SHA for 40e8c15
xdggs/index.py
@@ -58,14 +58,17 @@ def from_variables(
58
*,
59
options: Mapping[str, Any],
60
) -> "DGGSIndex":
61
- _, var, _ = _extract_cell_id_variable(variables)
+ name, var, _ = _extract_cell_id_variable(variables)
62
63
grid_name = var.attrs["grid_name"]
64
cls = GRID_REGISTRY.get(grid_name)
65
if cls is None:
66
raise ValueError(f"unknown DGGS grid name: {grid_name}")
67
68
- return cls.from_variables(variables, options=options)
+ index = cls.from_variables(variables, options=options)
69
+ index._pd_index.index.name = name
70
+
71
+ return index
72
73
def create_variables(
74
self, variables: Mapping[Any, xr.Variable] | None = None
0 commit comments