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)[source]
Creates a generalized wind climate using atlas_nt
- Parameters:
bwc (
xarray.DataSet
) – PyWAsP xr.DataSet containing wind climate to be generalizedtopo_map (
TopographyMap
) – Topographical map covering the area represented by the bwcconf (
Config
) – PyWAsP configuration objectgen_roughnesses (
numpy
, optional) – 1D array of roughnesses for the generalization, by default [0, 0.03, 0.1, 0.4, 1.5]gen_heights (
numpy
, optional) – 1D array of heights for the generalization, by default [10, 25, 50, 100, 250]nsecs (
int
) – Number of wind direction sectors in the output, by default the same as the number of sectors in the input bwc.allow_multiple_heights (
bool
, optional) – Allowing multiple heights, by default False (single height permitted)mesoclimate (
xarray.DataSet
, defaultNone
) – If None use the ERA5 reanalysis to obtain the mesoclimate, otherwise one can create a dataset using thepywasp.wasp.get_climate()
methodmesoclimate_interp_method (
str
, optional) – Interpolation method for mesoclimate, by default ‘nearest’cfd_volume (
xarray.DataSet
, defaultNone
) – WAsP CFD volume xarray dataset that is used for obtaining site effects
- 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