windkit.create_v50_lut#

windkit.create_v50_lut(output_locs, gen_wspd=(10.0, 25.0, 40.0), n_sectors=12, seed=9876538, speedup_range=(0.85, 1.35), veer_range=(-8.0, 8.0))[source]#

Create a synthetic LINCOM extreme wind lookup table.

A lookup table answers “if the generalized wind is this fast, from this sector, what is the local wind here?”. This builds one directly from a per-point, per-sector speedup and direction veer rather than by running LINCOM over terrain, so it is fast and every entry is distinct.

The speedup does not depend on the generalized speed, which is what a linearised flow model gives; the local speed is therefore proportional to the generalized one at each anchor.

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

  • gen_wspd (array_like) – Generalized wind speeds to tabulate [m s-1], strictly increasing. A scalar is treated as a single anchor. Defaults to (10.0, 25.0, 40.0), the three forcing levels GASP runs LINCOM at. All anchors must be finite and strictly positive.

  • n_sectors (int) – Number of direction sectors, defaults to 12. At least seven are required to cover every direction within PyWAsP’s strict 30-degree lookup radius.

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

  • speedup_range (tuple of float) – Bounds of the per-point, per-sector speedup factor. Defaults to (0.85, 1.35), spanning sheltered to hilltop.

  • veer_range (tuple of float) – Bounds of the per-point, per-sector direction change [degrees]. Defaults to (-8.0, 8.0).

Returns:

ds – Lookup table with WS and WD over (gen_wspd, sector, <space>).

Return type:

xarray.Dataset

Raises:

ValueError – If gen_wspd is not a non-empty, one-dimensional sequence of finite, strictly positive, strictly increasing anchors, or if n_sectors is not an integer of at least seven, or if speedup_range does not contain two finite, strictly positive bounds in nondecreasing order.