seagrid.sources#
seagrid’s data sources: one interface for every product.
Every source is a DataSource with the same methods, whatever the
provider: filename, local_path, remote_url, download,
download_range, check_remote, downloaded, open_dataset,
open_dataarray, open_mfdataset, grid, time_range,
dtm_vec and describe.
Examples
>>> import seagrid
>>> seagrid.list_sources()
['acspo', 'modis_a', 'oc_cci', 'ostia']
>>> sst = seagrid.get_source("ostia")
>>> ds = sst.open_dataset("2010-06-01")
>>> monthly = sst.open_dataset("2010-06-01", timetype="monthly")
- seagrid.sources.get_source(name, variant=None, **overrides)[source]#
Return a data source object.
- Parameters:
- Returns:
DataSource- Return type:
Examples
>>> import seagrid >>> ostia = seagrid.get_source("ostia") >>> ostia.name, ostia.timetypes ('ostia', ('daily', '8day', 'monthly'))
- seagrid.sources.list_sources()[source]#
Return the names of all available data sources (without aliases).
- seagrid.sources.register(cls)[source]#
Add a source class to the registry under its name and aliases.
Called automatically for every
DataSourcesubclass that setsname(passregister=Falsein the class statement to opt out).- Parameters:
cls (
type) – The source class.- Returns:
type– cls, so this can be used as a decorator.- Raises:
ValueError – If another class is already registered under one of the names.
- Return type:
- seagrid.sources.source_class(name)[source]#
Return the class of a source.
Modules
The |
|
Intermediate source classes for each kind of data provider. |
|
Sources that read files from a local or mounted disk. |
|
Ocean-model and reanalysis data sources. |
|
Module-level access to a data source: |
|
Ocean-colour data sources. |
|
Primary-production data sources. |
|
The registry of seagrid data sources. |
|
Sea-surface-temperature data sources. |
|
Static (time-invariant) data sources: bathymetry, regions. |