[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #JBO-988533]: Access to NCSS in THREDDS



Greetings Greg!

You're not doing anything wrong, but you have found a bug :-)
thredds-jumbo is actually pointing to thredds-test, which is our
public facing test thredds server. The bug has been fix at this point,
and I plan on updating the TDS with the issue later today (just waiting
on one pull request to go through).

That said, the fix is running on thredds-dev, so if you just use url2 for
now, then you should be good to go - let me know if not.

Cheers!

Sean

> Guys,
> 
> I am having trouble accessing the netcdf subset service on the THREDDS
> site. Here is an example of the code I am running and the error I get:
> 
> cat = None
> url1 = '
> http://thredds-jumbo.unidata.ucar.edu/thredds/catalog/grib/NCEP/HRRR/CONUS_2p5km/latest.xml
> '
> url2 = '
> http://thredds-dev.unidata.ucar.edu/thredds/catalog/grib/NCEP/HRRR/CONUS_2p5km/latest.xml
> '
> for url in [url1, url2]:
> if cat is None:
> print 'trying {}'.format(url)
> try:
> cat = TDSCatalog(url)
> except:
> continue
> 
> ncss = cat.datasets[0].subset()
> 
> Traceback (most recent call last):
> File "/home/greg_garrett/PycharmProjects/Satellite/mixing2.py", line 274,
> in <module>
> main()
> File "/home/greg_garrett/PycharmProjects/Satellite/mixing2.py", line 142,
> in main
> data = netCDF4.Dataset(open_thredds_dataset())
> File "/home/greg_garrett/PycharmProjects/Satellite/mixing2.py", line 112,
> in open_thredds_dataset
> ncss = cat.datasets[0].subset()
> File
> "/home/greg_garrett/python/miniconda2/lib/python2.7/site-packages/siphon/catalog.py",
> line 652, in subset
> return self.access_with_service(service)
> File
> "/home/greg_garrett/python/miniconda2/lib/python2.7/site-packages/siphon/catalog.py",
> line 705, in access_with_service
> return provider(self.access_urls[service])
> File
> "/home/greg_garrett/python/miniconda2/lib/python2.7/site-packages/siphon/http_util.py",
> line 379, in __init__
> self._get_metadata()
> File
> "/home/greg_garrett/python/miniconda2/lib/python2.7/site-packages/siphon/ncss.py",
> line 57, in _get_metadata
> meta_xml = self.get_path('dataset.xml').content
> File
> "/home/greg_garrett/python/miniconda2/lib/python2.7/site-packages/siphon/http_util.py",
> line 449, in get_path
> return self.get(self.url_path(path), query)
> File
> "/home/greg_garrett/python/miniconda2/lib/python2.7/site-packages/siphon/http_util.py",
> line 487, in get
> text))
> requests.exceptions.HTTPError: Error accessing
> http://thredds-jumbo.unidata.ucar.edu/thredds/ncss/grib/NCEP/HRRR/CONUS_2p5km/HRRR_CONUS_2p5km_20180910_0300.grib2/dataset.xml
> Server Error (404: 404)
> 
> 
> Any ideas what I am doing wrong?
> 
> Greg

Ticket Details
===================
Ticket ID: JBO-988533
Department: Support Python
Priority: Low
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.