windkit.create_pewc#

windkit.create_pewc(output_locs, years=None, seed=9876538, location_range=(28.0, 32.0), scale_range=(2.5, 4.5), prevailing_direction=270.0, direction_spread=40.0, max_interval=1.0)[source]#

Create a synthetic predicted extreme wind climate.

One annual maximum per year per point, drawn from a per-point Gumbel distribution. This is the input a return-wind fit consumes, so fitting the result recovers approximately location_range and scale_range. A real PEWC is the maximum over the sectors of a downscaled GEWC, which is only approximately Gumbel; drawing directly is what keeps that property exact.

Parameters:
  • output_locs (xarray.Dataset) – Output geospatial information.

  • years (array_like or None) – Years to generate. If None, 1979 through 2010 is used, the CFSR period the defaults follow.

  • seed (int) – Seed for the random data, defaults to 9876538.

  • location_range (tuple of float) – Bounds of the per-point Gumbel location parameter [m s-1]. Defaults to (28.0, 32.0).

  • scale_range (tuple of float) – Bounds of the per-point Gumbel scale parameter [m s-1]. Defaults to (2.5, 4.5), which together with the location gives a 50-year return wind of 37.8-49.6 m s-1.

  • prevailing_direction (float) – Mean direction of the annual maxima [degrees]. Defaults to 270.

  • direction_spread (float) – Standard deviation of the direction of the annual maxima [degrees]. Defaults to 40.

  • max_interval (float) – Length of the interval each maximum is taken over [years], recorded as the max_interval attribute. Defaults to 1.0.

Returns:

ds – Predicted extreme wind climate with max_wspd and max_wdir over (year, <space>).

Return type:

xarray.Dataset

Raises:

ValueError – If years is not a one-dimensional sequence containing at least two entries, or if max_interval is not finite and strictly positive.