pywasp.wasp.generalize_from_site_effects

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

Creates a generalized wind climate using atlas_nt

Parameters:
  • bwc (xarray.Dataset) – PyWAsP xr.Dataset containing wind climate to be generalized

  • site_effects (xarray.Dataset) – Site effects dataset created from TopographyMap.rose_to_site_effects or TopographyMap.get_site_effects.

  • conf (Config) – PyWAsP configuration object

  • gen_roughnesses (numpy, optional) – 1D array of roughnesses for the generalization, by default [0,0.03,0.1,0.4,1.5]. Must contain at least two unique items.

  • gen_heights (numpy, optional) – 1D array of heights for the generalization, by default [10,25,50,100,250]. Must contain at least two unique items.

  • allow_multiple_heights (bool, optional) – Allowing multiple heights, by default False (single height permitted)

  • mesoclimate (xarray.Dataset, default None) – If None use the CFSR reanalysis to obtain the mesoclimate, otherwise one can create a dataset using the pw.wasp.get_climate() method

  • mesoclimate_interp_method (str, optional) – Interpolation method for mesoclimate, by default ‘linear’

  • return_site_factors (bool) – Include the site_factors in the output?

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

Returns:

gwc (xarray.Dataset) – PyWAsP generalized wind climate from the binned wind climate

Notes

Run WAsP’s atlas_nt function to perform the “up” part of the WAsP framework. This will take the histogram data and convert it to a generalized wind climate at the provided roughnesses and heights above ground.

The resulting GenWindClimate will have the same dimensions as the input bin_wind climate, except when nsecs is specified with a different number of sectors than in the bwc.

If allow_multiple_heights is set to True result will be a separate generalized results from each tabfile height this means that user will need to determine which gwc to use for each height before running downscale