improver.cli.apply_bias_correction module
CLI to apply simple bias correction to ensemble members based on bias from the reference forecast dataset.
- process(forecast_cube, *bias_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 can be set to ensure that corrected values are physically sensible post-bias correction.
- Parameters:
forecast_cube (iris.cube.Cube) – Cube containing the forecast to apply bias correction to.
bias_cubes (iris.cube.Cube or list of iris.cube.Cube) – A cube or list of cubes containing forecast bias data over the 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: