You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromsiphon.catalogimportTDSCatalogfromsiphon.radarserverimportRadarServerfromsiphon.cdmrimportDatasetfromdatetimeimportdatetime, timedeltacat=TDSCatalog("http://thredds.ucar.edu/thredds/radarServer/catalog.xml")
url=cat.catalog_refs['NEXRAD Level III Radar from IDD'].hrefrs=RadarServer(url)
query_latest=rs.query()
now=datetime.utcnow()
query_latest.lonlat_box(292.9375, 235.0625, 25.0625, 52.9375).time(now).variables('NST')
query_latest_cat=rs.get_catalog(query_latest)
data_available=list(query_latest_cat.datasets.values())
data_from_thredds=Dataset(data_available[0].access_urls['CdmRemote'])
data_from_thredds.variables['textStruct_code8gg'][:]
results in:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-33-5a7eeac0ffd5> in <module>
13 data_from_thredds = Dataset(data_available[0].access_urls['CdmRemote'])
14
---> 15 data_from_thredds.variables['textStruct_code8gg'][:]
~/repos/siphon/siphon/cdmr/dataset.py in __getitem__(self, ind)
207pass208else:
--> 209 arr.dtype = dt
210211# Need to handle removing dimensions that have had an index
~/miniconda3/envs/py38/lib/python3.8/site-packages/numpy/core/_internal.py in _view_is_safe(oldtype, newtype)
457458if newtype.hasobject or oldtype.hasobject:
--> 459 raise TypeError("Cannot change data-type for object array.")
460return461TypeError: Cannot change data-type for object array.
The text was updated successfully, but these errors were encountered:
This code downloading a NIDS NST product:
results in:
The text was updated successfully, but these errors were encountered: