apply_enhancers

apply_enhancer(ds, variable, enhancer)

Apple a function to a (variable in a) dataset.

Parameters
  • ds (xr.Dataset) – Dataset to enhance.

  • variable (str) – Variable name to enhance.

  • enhancer (function) – Function to be applied to variable inside ds. Should take ds as first argument and variable as second.

Returns

The enhanced dataset and the label to log when calculating the dataset.

Return type

tuple