chemistries class#

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

Bases: Plugin

Plugin type for atmospheric chemistry schemes.

Provides the interface to read or programmatically create a chemical scheme used by a transport model. It includes information on species that are transported, emitted, and for which chemical reactions apply.

Concrete implementations live in pycif/plugins/chemistries/.

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_chemicalscheme(*args, **kwargs)[source]#

Read a chemical scheme from an existing file

Parameters:
  • self (Chemistry) – plugin defining the chemistry. Should include

  • files (dirscheme grid to be able to read the chemistry from)

Returns:

Characteristics of the chemical scheme

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

Creates a chemical scheme if needed

Parameters:

chemistry (dictionary) – dictionary defining the chelical scheme

initiate_template()[source]#

Initialise the Chemistry plugin template.

Loads the registered chemistry module and attaches read_chemicalscheme and create_chemicalscheme as bound methods on this instance.