improver.cli.apply_bias_correction module

Contents

improver.cli.apply_bias_correction module#

CLI to apply simple bias correction to ensemble members based on bias from the reference forecast dataset.

process(*cubes, lower_bound=None, upper_bound=None, fill_masked_bias_data=False)[source]#

Apply simple bias correction to ensemble members based on the bias from the reference forecast dataset.

Where the bias data is evaluated point-by-point, the bias-correction will also be applied in this way enabling a form of statistical downscaling where coherent biases exist between a coarse forecast dataset and finer truth dataset.

The bias cube can either be passed in as a series of bias values for individual forecasts (from which the mean value is evaluated), or as a single bias value evaluated over a series of reference forecasts.

A lower bound or upper bound can be set to ensure that corrected values are physically sensible post-bias correction.

Parameters:
  • cubes (iris.cube.Cube or list of iris.cube.Cube) – A list of cubes containing: - A Cube containing the forecast to be calibrated. The input format is expected to be realizations. - A cube or cubelist containing forecast bias data over a specified set of forecast reference times. If a list of cubes is passed in, each cube should represent the forecast error for a single forecast reference time; the mean value will then be evaluated over the forecast_reference_time coordinate.

  • lower_bound (float) – Specifies a lower bound below which values will be remapped to.

  • upper_bound (float) – Specifies an upper bound above which values will be remapped to.

  • fill_masked_bias_data (bool) – Flag to specify whether to fill masked areas of the mean bias data with an appropriate fill-value.

Returns:

Forecast cube with bias correction applied on a per member basis.

Return type:

iris.cube.Cube