improver.wind_calculations.wind_gust_diagnostic module

Module containing plugin for WindGustDiagnostic.

class WindGustDiagnostic(percentile_gust, percentile_windspeed)[source]

Bases: PostProcessingPlugin

Plugin for calculating wind-gust diagnostic.

In the model a shear-driven turbulence parameterization is used to estimate wind gusts but in convective situations this can over-estimate the convective gust. This diagnostic takes the Maximum of the values at each grid point of * a chosen percentile of the wind-gust forecast and * a chosen percentile of the wind-speed forecast to produce a better estimate of wind-gust. For example a typical wind-gust could be MAX(gust(50%),windspeed(95%)) an extreme wind-gust forecast could be MAX(gust(95%), windspeed(100%))

Scientific Reference: Roberts N., Mylne K. Poster - European Meteorological Society Conference 2017.

See https://github.com/metoppv/improver/files/1244828/WindGustChallenge_v2.pdf for a discussion of the problem and proposed solutions.

__init__(percentile_gust, percentile_windspeed)[source]

Create a WindGustDiagnostic plugin for a given set of percentiles.

Parameters:
  • percentile_gust (float) – Percentile value required from wind-gust cube.

  • percentile_windspeed (float) – Percentile value required from wind-speed cube.

_abc_impl = <_abc_data object>
add_metadata(cube)[source]

Add metadata to cube for windgust diagnostic.

Parameters:

cube (Cube) – Cube containing the wind-gust diagnostic data.

Return type:

Cube

Returns:

Cube containing the wind-gust diagnostic data with corrected Metadata.

static extract_percentile_data(cube, req_percentile, standard_name)[source]

Extract percentile data from cube.

Parameters:
  • cube (Cube) – Cube contain one or more percentiles.

  • req_percentile (float) – Required percentile value

  • standard_name (str) – Standard name of the data.

Return type:

Tuple[Cube, Coord]

Returns:

  • Cube containing the required percentile data

  • Percentile coordinate.

process(cube_gust, cube_ws)[source]

Create a cube containing the wind_gust diagnostic.

Parameters:
  • cube_gust (Cube) – Cube contain one or more percentiles of wind_gust data.

  • cube_ws (Cube) – Cube contain one or more percentiles of wind_speed data.

Return type:

Cube

Returns:

Cube containing the wind-gust diagnostic data.