meteos class#
- class pycif.utils.classes.meteos.Meteo(plg_orig=None, orig_name='', **kwargs)[source]#
Bases:
PluginPlugin type for meteorological data streams.
A DataStream sub-type for reading and writing meteorological fields (wind, temperature, humidity, …) required by the transport model.
Concrete implementations live in
pycif/plugins/datastreams/meteos/.- initiate_template()[source]#
Initialise the Meteo plugin template.
Loads the registered meteo module and attaches
writeandreadas bound methods, andfetchas a static function on this instance.
- classmethod register_plugin(name, version, module, subtype='', **kwargs)[source]#
Register a module for a plugin and version with possibly options
- Parameters:
name (str) – name of the plugin
version (str) – version of the plugin
module (types.ModuleType) – module defining the interface between pyCIF and the plugin
plugin_type (str) – type of plugin
**kwargs (dictionary) – default options for module
- read(name, metdir, metfile, dates)[source]#
Read pre-computed meteorological fields into pyCIF variables.
Must be overridden by each concrete meteo plugin.
- Parameters:
name (str) – Name of the meteo component.
metdir (str) – Directory where the meteo files are stored.
metfile (str) – File name pattern for the meteo files.
dates (list[datetime]) – List of dates to extract.
- Raises:
PluginError – Always, in this default implementation.