modes class#

class pycif.utils.classes.modes.Mode(plg_orig=None, orig_name='', **kwargs)[source]#

Bases: Plugin

Plugin type for execution modes.

Defines what pyCIF does with the loaded plugins: e.g. a forward run, a 4D-Var inversion, an ensemble, or a diagnostic. The execute() method is the entry point called by Setup.

Concrete implementations live in pycif/plugins/modes/.

initiate_template()[source]#

Initialise the Mode plugin template.

Loads the registered mode module and attaches execute as a bound method on this instance.

execute(*args, **kwargs)[source]#

Default empty execute method

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