pywasp.wasp.predict_wwc_from_site_effects#
- pywasp.wasp.predict_wwc_from_site_effects(bwc, input_site_effects, output_site_effects, conf=None, generalization_method='idealized', interp_method='nearest', input_mesoclimate=None, output_mesoclimate=None, mesoclimate_interp_method='nearest', return_site_effects=False, add_met=True, adapt_gwc=True, n_gbins=500, align_direction_crs=True)[source]#
Predict a weibull wind climate from a binned wind climate using precalculated site effects
Warning
This function is experimental and its signature may change.
- Parameters:
bwc (
xarray.Dataset) – PyWAsP xr.Dataset containing wind climate to be generalizedinput_site_effects (
xarray.Dataset) – Site effects for the input locationsoutput_site_effects (
xarray.Dataset) – Site effects for the output locationsconf (
Config, optional) – PyWAsP configuration objectgeneralization_method (
{"geostrophic", "idealized"}) – By default “idealized”, i.e use a generalized wind climate (gwc) as intermediate format, if “idealized” use a generalized wind climate (gwc) as intermediate, i.e. the geostrophic wind climate is transformed using the classic method described in the European wind atlas.interp_method (
{"given", "nearest"}) – Interpolation method for site effects, by default ‘given’.input_mesoclimate (
xarray.Dataset, optional) – Mesoclimate at the input (binned wind climate) locations, e.g. frompywasp.wasp.get_climate(). If None, it is looked up from the sources selected byconf, usingmesoclimate_interp_method. A supplied mesoclimate is matched by position, not by location or CRS: it needs one point per horizontal location, in the order in which the locations first appear, or one point per location and height, in the order of the points.get_climateon those locations gives exactly that.output_mesoclimate (
xarray.Dataset, optional) – Mesoclimate at the output locations, e.g. frompywasp.wasp.get_climate(). If None, it is looked up from the sources selected byconf, usingmesoclimate_interp_method. A supplied mesoclimate is matched by position, not by location or CRS: it needs one point per horizontal location, in the order in which the locations first appear, or one point per location and height, in the order of the points.get_climateon those locations gives exactly that.mesoclimate_interp_method (
str, optional) – Interpolation method for the mesoclimate lookup, by default ‘nearest’. Not applied to a supplied mesoclimate.return_site_effects (
bool, optional) – If True, return site factors along with the wind climate dataadd_met (
bool, optional) – If True, add meteorological fields to the wind climate dataadapt_gwc (
bool,True) – Adapt the standard heights and roughnesses in the gwc to match those of the input and output site_effects. Only active when generalization_method is “idealized”. If False, the core’s classic heights [10, 25, 50, 100, 250] and roughnesses [0, 0.03, 0.1, 0.4, 1.5] are used, not the defaults ofgeneralize.n_gbins (
int, optional) – Number of bins for the wind speed distribution, by default 500align_direction_crs (
bool, optional) – Whether to apply the grid-convergence direction correction. WhenTrue(default, recommended), the effective convergence between input and output projections is computed automatically, minimising sector-resampling losses. PassFalseto skip any direction rotation.
- Returns:
wwc (
xarray.Dataset) – PyWAsP weibull wind climate for the locations provided in output_site_effects- Raises:
PywaspError – If an input or output mesoclimate contains more than one independent height. Select one height or use point-specific
height(point).
Notes
This function takes binned wind climates and predicts weibull wind climates at other locations by first generalizing the input binned wind climate from local site effects (
input_site_effects) using the WAsP methodology and then dowscaling at other locations with provided local site effects (output_site_effects).The resulting wind climate will have the same number of sectors as the input binned wind climate, except when n_sectors is specified with a different number of sectors than in the bwc. The number of wind speed bins in the output wind climate is determined automatically and the number is increased automatically if the wind speeds in the histogram exceed that maximum number of bins. The bin width in the output histogram is constant and control by the bin_width argument.