xso.component

xso.component(cls=None)[source]

A component decorator that adds everything needed to use the class as a XSO component. It is a wrapper for the xarray-simlab process decorator.

A component represents a logical unit with the model, and usually implements:

  • A set of XSO variables, defined as class attributes, e.g. xso.variable, xso.parameter,

xso.forcing or xso.flux. - One or more methods that can be functions defining a xso.flux or a xso.forcing.

Parameters:

cls (class, optional) – Allows applying this decorator either as @xso.component or @xso.component(*args).

Returns:

cls – The decorated class that is a fully functional xso.component.

Return type:

class