API Reference#

This is a reference API class listing, and modules.

Top-level functions#

open_thredds_cat

alias of ThreddsCatalog

open_thredds_merged

alias of THREDDSMergedSource

Catalog & Source Objects#

class intake_thredds.cat.ThreddsCatalog(*args, **kwargs)[source]#

Intake catalog interface to a thredds catalog.

Parameters:
  • url (str) – Location of thredds catalog.

  • driver (str) – Select driver to access data. Choose from ‘netcdf’ and ‘opendap’.

  • intake_xarray_kwargs (dict) – Keyword arguments to pass to intake_xarray DataSource.

  • **kwargs – Additional keyword arguments are passed through to the Catalog base class.

Examples

>>> import intake
>>> cat_url = 'https://psl.noaa.gov/thredds/catalog/Datasets/noaa.ersst/catalog.xml'
>>> cat = intake.open_thredds_cat(cat_url)
class intake_thredds.source.THREDDSMergedSource(*args, **kwargs)[source]#

Merges multiple datasets into a single datasets.

This source takes a THREDDS URL and a path to descend down, and calls the combine function on all of the datasets found.

Parameters:
  • url (str) – Location of server

  • path (str, list of str) – Subcats to follow; include glob characters (*, ?) in here for matching.

  • driver (str) – Select driver to access data. Choose from ‘netcdf’ and ‘opendap’.

  • xarray_kwargs (dict) – kwargs to be passed to xr.open_dataset

  • concat_kwargs (dict) – kwargs to be passed to xr.concat() filled by files opened by xr.open_dataset previously

  • metadata (dict or None) – To associate with this source.

Examples

>>> import intake
>>> cat_url = 'https://psl.noaa.gov/thredds/catalog.xml'
>>> paths = ['Datasets', 'ncep.reanalysis.dailyavgs', 'surface', 'air.sig995.194*.nc']
>>> src = intake.open_thredds_merged(cat_url, paths)
>>> src
sources:
thredds_merged:
    args:
    path:
    - Datasets
    - ncep.reanalysis.dailyavgs
    - surface
    - air*sig995*194*.nc
    url: https://psl.noaa.gov/thredds/catalog.xml
    description: ''
    driver: intake_thredds.source.THREDDSMergedSource
    metadata: {}