improver.cli.construct_reliability_tables module

CLI to construct reliability tables for use in reliability calibration.

process(*cubes, truth_attribute, n_probability_bins=5, single_value_lower_limit=False, single_value_upper_limit=False, aggregate_coordinates=None)[source]

Populate reliability tables for use in reliability calibration.

Loads historical forecasts and gridded truths that are compared to build reliability tables. Reliability tables are returned as a cube with a leading threshold dimension that matches that of the forecast probability cubes and the thresholded truth.

Parameters:
  • cubes (list of iris.cube.Cube) – A list of cubes containing the historical probability forecasts and corresponding truths used for calibration. These cubes must include the same diagnostic name in their names, and must both have equivalent threshold coordinates. The cubes will be distinguished using the user provided truth attribute.

  • truth_attribute (str) – An attribute and its value in the format of “attribute=value”, which must be present on truth cubes.

  • n_probability_bins (int) – The total number of probability bins required in the reliability tables. If single value limits are turned on, these are included in this total. If using single_value_limits this value must be at least 3.

  • single_value_lower_limit (bool) – Mandates that the lowest bin should be single valued, with a small precision tolerance, defined as 1.0E-6. The bin is thus 0 to 1.0E-6.

  • single_value_upper_limit (bool) – Mandates that the highest bin should be single valued, with a small precision tolerance, defined as 1.0E-6. The bin is thus (1 - 1.0E-6) to 1.

  • aggregate_coordinates (List[str]) – An optional list of coordinates over which to aggregate the reliability calibration table using summation. This is equivalent to constructing then using aggregate-reliability-tables but with reduced memory usage due to avoiding large intermediate data.

Returns:

Reliability tables for the forecast diagnostic with a leading threshold coordinate.

Return type:

iris.cube.Cube