ioos / ioos/xarray-subset-grid

Can't subset RTOFS - doesn't recognize grid

Open
#144 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9
Forks
11
Avg merge
3d 7h
Merged PRs (30d)
4

Description

What went wrong?

It throws this warning
UserWarning: no grid type found in this dataset
warnings.warn("no grid type found in this dataset")

And returns None

Also of note -- you only get the warning if you open a multifile dataset -- but it returns None regardless (i.e., it doesn't work in either case)

Operating System

Windows

Version

0.1.1.dev8+g97ec48035

Python Version

3.10

Code to Reproduce
ds = xr.open_mfdataset(['http://edsdata.oceansmap.com/thredds/dodsC/EDS/HYCOM_GLOBAL/hycomglobal_20260619.nc','http://edsdata.oceansmap.com/thredds/dodsC/EDS/HYCOM_GLOBAL/hycomglobal_20260620.nc'])
bbox = (-126.0, 47.5, -124.0, 48.5)
ds.xsg.subset_bbox(bbox)
Errors, Traceback, and Logs
In [106]: ds.xsg.subset_bbox(bbox)
C:\Users\amy.macfadyen\PyProjects\xarray-subset-grid\xarray_subset_grid\accessor.py:47: UserWarning: no grid type found in this dataset
  warnings.warn("no grid type found in this dataset")

In [107]:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with xarray_subset_grid/accessor.py at the warning on line 47 and trace the xsg.subset_bbox entry point. Reproduce the report with the two URLs using both a multifile dataset and a single dataset, then verify that bbox subsetting returns a dataset and no longer emits the grid warning in either case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.