improver.cli.clip module

Script to clip the input cube’s data to be between the specified values

process(cube, *, min_value=None, max_value=None)[source]
Clip the data in the input cube such that any data above max_value is set equal to

max_value and any data below min_value is set equal to min_value.

Parameters:
  • cube (iris.cube.Cube) – A Cube whose data will be clipped. This can be a cube of spot or gridded data.

  • max_value (float) – If specified any data in cube that is above max_value will be set equal to max_value.

  • min_value (float) – If specified any data in cube that is below min_value will be set equal to min_value.

Returns:

A cube with the same metadata as the input cube but with the data clipped such that any data above max_value is set equal to max_value and any data below min_value is set equal to min_value.

Return type:

iris.cube.Cube