improver.cli.apply_night_mask module

Script to set night values to zero for UV index.

process(cube)[source]

Sets night values to zero for UV index.

Parameters:

cube (iris.cube.Cube) – Cube that will have night values set to zero. This should contain either diagnostic values or probabilities of UV index above threshold.

Returns:

Input cube with all night values set to zero.

Return type:

iris.cube.Cube

Raises:

ValueError – If input cube is suspicious, within reason. Note that this is a general check: the CLI expects a cube of UV index or probability of UV index above thresold, and will raise an error if given a probability below threshold, but will not recognise a completely inappropriate cube (eg temperature in Kelvin). Therefore this CLI should be used with care.