wrap_indicator

earthkit.climate.utils.decorators.wrap_indicator(func: collections.abc.Callable[..., Any] | None = None, extra_decorators: list[collections.abc.Callable[[collections.abc.Callable[..., Any]], collections.abc.Callable[..., Any]]] | None = None, **kwargs: Any) → collections.abc.Callable[..., Any]

Wrap a climate indicator function with standard Earthkit transformations.

Applies input format and type handling to future-proof indicator wrappers, allowing future decorators (such as metadata handling, provenance, or unit transformations) to be composed transparently.

Parameters:
  • func (Callable[..., Any] | None, default None) – The indicator function to decorate. If None, returns a decorator.

  • extra_decorators (list[Callable[[Callable[..., Any]], Callable[..., Any]]] | None, default None) – Optional list of additional decorators to apply to the indicator.

  • **kwargs (Any) – Optional arguments forwarded to the underlying format handler or decorators.

Returns:

The wrapped indicator function or decorator.

Return type:

Callable[..., Any]