Siphon
raw JSON → 0.10.0 verified Mon Apr 27 auth: no python
Siphon is a collection of Python utilities for interacting with the Unidata technology stack, particularly for accessing and downloading remote datasets via THREDDS Data Servers (TDS). Current version 0.10.0 requires Python >=3.10. Releases are periodic, roughly yearly.
pip install siphon Common errors
error ModuleNotFoundError: No module named 'siphon' ↓
cause Siphon is not installed or installed in a different environment.
fix
Run 'pip install siphon' in the correct Python environment.
error AttributeError: module 'siphon' has no attribute 'TDSCatalog' ↓
cause TDSCatalog is not in the top-level siphon module.
fix
Use 'from siphon.catalog import TDSCatalog'.
error requests.exceptions.ConnectionError: HTTPSConnectionPool ↓
cause Network issue or incorrect URL when accessing a THREDDS server.
fix
Verify the catalog URL is correct and reachable. Use 'https://thredds.ucar.edu/thredds/catalog.xml' as a test.
Warnings
breaking Siphon 0.9.0 dropped support for Python 2.7 and older Python 3.x. Python >=3.6 required; from 0.10.0, Python >=3.10 required. ↓
fix Use Python 3.10 or newer for siphon >=0.10.0.
deprecated The 'siphon.cdmr' module is deprecated as of siphon 0.9.0 and may be removed in a future release. ↓
fix Migrate to using 'siphon.ncss' or direct NetCDF4 access via remote_open.
gotcha When using TDSCatalog with a remote server, ensure the URL points to a valid catalog.xml, not a dataset access URL. Otherwise, parsing may fail silently. ↓
fix Append '/catalog.xml' to the base THREDDS server URL if not already present.
Imports
- TDSCatalog wrong
from siphon import TDSCatalogcorrectfrom siphon.catalog import TDSCatalog - NCSS wrong
from siphon import NCSScorrectfrom siphon.ncss import NCSS - remote_open
from siphon.ncss import remote_open
Quickstart
from siphon.catalog import TDSCatalog
# Create a catalog object for the Unidata THREDDS server
cat = TDSCatalog('https://thredds.ucar.edu/thredds/catalog.xml')
# List datasets
print(list(cat.datasets)[:5])