pywasp.wasp.generalize

pywasp.wasp.generalize(bwc, topo_map, conf=None, gen_roughnesses=array([0., 0.03, 0.1, 0.4, 1.5]), gen_heights=array([10, 25, 50, 100, 250]), nsecs=None, allow_multiple_heights=False, mesoclimate=None, mesoclimate_interp_method='nearest', return_site_factors=False, cfd_volume=None, ngbins=500)[source]

Generalizes the wind climate using either the BZ model or a CFD volume.

Parameters:
  • bwc (xarray.Dataset) – The binned wind climate to be generalized.

  • topo_map (TopographyMap) – The topographic map used to calculate site effects.

  • conf (pw.Config, optional) – The configuration object for the model, by default None.

  • gen_roughnesses (np.array, optional) – The roughness lengths for which the wind climate is generalized, by default [0, 0.03, 0.1, 0.4, 1.5]. Must contain at least two unique items.

  • gen_heights (np.array, optional) – The heights for which the wind climate is generalized, by default [10, 25, 50, 100, 250]. Must contain at least two unique items.

  • nsecs (int, optional) – The number of sectors for the site effects, by default None.

  • allow_multiple_heights (bool, optional) – If True, allows multiple heights for the generalized wind climate, by default False.

  • mesoclimate (xarray.Dataset, optional) – The mesoclimate for the input locations, by default None.

  • mesoclimate_interp_method (str, optional) – The interpolation method for the mesoclimate, by default ‘nearest’.

  • return_site_factors (bool, optional) – If True, returns the site factors along with the wind climate data, by default False.

  • cfd_volume (xarray.Dataset or list of xarray.Datasets, default None) – The CFD volume(s) used to calculate site effects, by default None.

  • ngbins (int, optional) – The number of bins for the calculation of the geostrophic wind speed distribution, by default 500.

Returns:

gwc (xarray.Dataset) – The generalized wind climate.

Notes

The function first calculates the site effects using either the BZ model or a CFD volume. Then, it generalizes the wind climate from the site effects. CFD volume must be read using wk.read_cfdres(). Depending on the value of return_site_factors, it may also return the site factors.