icclim._core.model.operator#

Module for the Operator class and OperatorRegistry.

Module Contents#

class icclim._core.model.operator.Operator[source]#

Represents an operator used in computations.

Parameters:
  • short_name (str) – The short name of the operator, used when templating the output metadata.

  • long_name (str) – The long name of the operator, used when templating the output metadata.

  • standard_name (str) – The standard name of the operator, used when templating the output metadata.

  • operand (str) – The operand symbol of the operator.

  • compute (Callable[[DataArray, DataArray | int | float], DataArray]) – The computation function of the operator.

  • aliases (list[str]) – The list of aliases for the operator.

class icclim._core.model.operator.OperatorRegistry[source]#

Registry of operators.

Contains the predefined operators used to build Threshold.

static get_item_aliases(op: Operator) list[str][source]#

Get the aliases of an operator.

Parameters:

op (Operator) – The operator.

Returns:

The list of aliases for the operator.

Return type:

list[str]