Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if setting a time_range for a query on a dataset with a single time slot #532

Closed
anikfal opened this issue Aug 21, 2024 · 2 comments · Fixed by Unidata/netcdf-java#1383

Comments

@anikfal
Copy link

anikfal commented Aug 21, 2024

Trying to extract some data from a dataset that has only one single time slot:

>>> ncss.metadata.time_span
{'begin': '2001-01-01T00:00:00Z', 'end': '2001-01-01T00:00:00Z'}

If I set a time_range (e.g. time_start=2000-12-18T12%3A00%3A00&time_end=2001-02-14T12%3A00%3A00) including the time slot (2001-01-01T00:00:00), the query cannot run successfully:

>>> data = ncss.get_data(query)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/anikfal/miniconda3/envs/mysat/lib/python3.10/site-packages/siphon/ncss.py", line 114, in get_data
    resp = self.get_query(query)
  File "/home/anikfal/miniconda3/envs/mysat/lib/python3.10/site-packages/siphon/http_util.py", line 410, in get_query
    return self.get(url, query)
  File "/home/anikfal/miniconda3/envs/mysat/lib/python3.10/site-packages/siphon/http_util.py", line 492, in get
    raise requests.HTTPError('Error accessing {0}\n'
requests.exceptions.HTTPError: Error accessing http://my_web_service/cas2001010100.ncz?var=T_SKIN&time_start=2000-12-18T12%3A00%3A00&time_end=2001-02-14T12%3A00%3A00&longitude=0.1&latitude=47.8
Server Error (400: IllegalArgumentException: No coverage data found for parameters  latlonPoint == 47.8000N 0.1000E, var == [T_SKIN], timeRange == 2000-12-18T12:00:00Z - 2001-02-14T12:00:00Z,)

However, if I redefine the query with no time_range, it can run successfully.

@tdrwenski tdrwenski transferred this issue from Unidata/siphon Aug 28, 2024
@tdrwenski
Copy link
Contributor

I transferred this to the TDS as it looks like it is an issue there and not with Siphon itself. I think I see the problem and a fix for it.

@tdrwenski
Copy link
Contributor

Hi @anikfal, the newest TDS 5.6-SNAPSHOT has the fix for this issue if you want to test it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants