Skip to content

Commit

Permalink
need to look up var in ds
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hennen committed Sep 13, 2024
1 parent d17517a commit 338a1f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xarray_subset_grid/grids/sgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ def compute_polygon_subset_selector(
lon: xr.DataArray | None = None
lat: xr.DataArray | None = None
for c in coords:
if 'lon' in c.standard_name.lower():
if 'lon' in ds[c].standard_name.lower():
lon = ds[c]
elif 'lat' in c.standard_name.lower():
elif 'lat' in ds[c].standard_name.lower():
lat = ds[c]
if lon is None or lat is None:
raise ValueError(f"Could not find lon and lat for dimension {dims}")
Expand Down

0 comments on commit 338a1f7

Please sign in to comment.