datasources package

Submodules

datasources.available module

datasources.data_source module

class datasources.data_source.DataSource(config)[source]

Bases: object

getArchiveLens(outlet_num=None)[source]
getAvailableAtTime(dt, outlet_num=None)[source]
getAvailableTimes(filename=None, outlet_num=None, max_cycles=100, dt=None)[source]
getDailyCycles(outlet_num=None, flatten=True)[source]
getDecoder(stn, cycle_dt, outlet_num=0)[source]
getDecoderAndURL(stn, cycle_dt, outlet_num=0)[source]
getDelays(outlet_num=None)[source]
getForecastHours(outlet_num=None, flatten=True)[source]
getMostRecentCycle(outlet_num=None)[source]
getName()[source]
getPoint(stn)[source]
getURL(stn, cycle_dt, outlet_num=0, outlet=None)[source]
getURLList(outlet_num=None)[source]
isEnsemble()[source]
isObserved()[source]
updateTimeSpan()[source]
exception datasources.data_source.DataSourceError[source]

Bases: Exception

class datasources.data_source.Outlet(ds_name, config)[source]

Bases: object

An Outlet object contains all the information for a data outlet (for example, the observed sounding feed from SPC, which is distinct from the observed sounding feed from, say, Europe).

getArchiveLen()[source]
getArchivedCycles(**kwargs)[source]
getAvailableAtTime(**kwargs)[source]
getAvailableTimes(max_cycles=100, **kwargs)[source]
getCycles()[source]

Return a list of data cycles that this outlet serves.

getDecoder()[source]
getDelay()[source]
getFields()[source]
getForecastHours()[source]

Return a list of forecast hours that this outlet serves. If the ‘delta’ attribute is set to 0, then the data source only has the 0-hour.

getMostRecentCycle(dt=None)[source]
getPoints()[source]
getTimeSpan()[source]

Read in the XML data to determine the dates/times this outlet spans across

getURL()[source]
hasProfile(point, cycle)[source]
isAvailable()[source]
datasources.data_source.loadDataSources(ds_dir='/Users/travis/.sharppy/datasources')[source]

Load the data source information from the XML files. Returns a dictionary associating data source names to DataSource objects.

datasources.data_source.pingURLs(ds_dict)[source]

Try to ping all the URLs in any XML file. Takes a dictionary associating data source names to DataSource objects. Returns a dictionary associating URLs with a boolean specifying whether or not they were reachable.

Module contents