Note
Click here to download the full example code
THREDDS Catalog¶
Read a catalog from THREDDS Data Server.
This example grabs a remote catalog and prints out the catalog references contained within.
# This is currently a placeholder for a better example
from __future__ import print_function
from siphon.catalog import TDSCatalog
from siphon.http_util import session_manager
cat = TDSCatalog('http://thredds.ucar.edu/thredds/catalog.xml')
print(list(cat.catalog_refs))
Out:
['Forecast Model Data', 'Forecast Products and Analyses', 'Observation Data', 'Radar Data', 'Satellite Data', 'Unidata case studies']
Basic HTTP authentication can also be used by using the HTTP session manager and setting some default options for HTTP sessions
session_manager.set_session_options(auth=('username', 'password'))
cat = TDSCatalog('https://rda.ucar.edu/thredds/catalog.xml')
Total running time of the script: ( 0 minutes 0.603 seconds)