pywasp.wind_farm_flow_map
- pywasp.wind_farm_flow_map(wwc, wtg, wind_turbines, output_locs, air_density_correction='infer', air_density=None, wind_farm_model='PARK2_onshore', turbulence_intensity=None, shear=None, ws_stepsize=1.0, ws_upper_limit=None, ws_lower_limit=0.0, n_subsector=5, site_interp_method='nearest', site_interp_bounds='ignore', n_cpu_pywake=1)
Generate a flow map around a wind farm using py_wake for wake and blockage effects. The map is calculated at the same points as the weibull wind climate(s) are provided.
Warning
This function is experimental and its signature may change.
- Parameters:
wwc (
Dataset
) – Weibull Wind Climate Cuboid Dataset containing wind climates for locations in output_locs.wtg (
Dataset
) – xr.Dataset passed should be a WTG formatted dataset. WTG is the same for all turbines.wind_turbines (
Dataset
) – Wind Turbine locations, hub heights, group_id’s, and wtg_keys.output_locs (
Dataset
) – Locations to calculate the flow map at. Must be a “cuboid” xr.Dataset with 3 spatial dimensions: ‘west_east’, ‘south_north’, ‘height’. The coordinates of the output locations must be covered by the cuboid spanned by the weibull wind climate(s).air_density_correction (
string
, optional) – “infer” –> to apply power curve interpolation/extrapolation to site-specific air density. “none” –> to not apply power curve interpolation/extrapolation.air_density (
float
, optional) – The air density to use for the AEP calculation. If not passed, the average air density from the WWC will be used.wind_farm_model (
str
,function
, optional) – Wind farm model to use for deficit calculations. Can Either be a name of a predefined wind farm model: “PARK1”, “PARK2_onshore”, “PARK2_offshore”, or a predefined py_wake wind_farm_model object. By default “PARK2_onshore” is used.turbulence_intensity (
float
, optional) – Turbulence intensity to use for the AEP calculation. If not passed, the turbulence intensity from the WWC will be used. If turbulence intensity is passed, it will be used, and overwrite the turbulence intensity in the WWC, if present.shear (
float
, optional) – shear to use for the AEP calculation. If not passed, the shear from the WWC will be used. If shear is passed, it will be used, and overwrite the shear in the WWC, if present.ws_stepsize (
float
, optional) – Wind speed bins stepsize, by default 1.0ws_upper_limit (
float
, optional) – Upper limit of wind speed range, by default None Which means the upper limit of the wind speed range will be the maximumws_lower_limit (
float
, optional) – Lower limit of wind speed range, by default 0.0n_subsector (
int
, optional) – Number of subsectors to use per sector, by default 5site_interp_method (
str
, optional) – The interpolation method to use in py_wake XRSite, by default “nearest”site_interp_bounds (
str
, optional) – The extrapolation method to use in py_wake XRSite, by default “ignore”n_cpu_pywake (
int
, optional) – Number of CPUs to use in py_wake, by default 1
- Returns:
Dataset
– Wind farm flow map for the output_locs containing the variables:- potential_aep_sector:
Potential AEP in GWh for each sector
- gross_aep_sector:
Gross AEP in GWh for each sector
- potential_aep_deficit_sector:
AEP deficit in units of fraction for each sector
- wspd_sector:
Average wind speed in m/s for each sector
- wspd_eff_sector:
Average effective wind speed in m/s for each sector
- wspd_deficit_sector:
Average wind speed deficit in units of fraction for each sector
- turbulence_intensity_eff_sector:
Average effective turbulence intensity for each sector
- wdfreq:
Wind direction frequency in units of fraction for each sector
- potential_aep:
Potential AEP in GWh for each location
- gross_aep:
Gross AEP in GWh for each location
- potential_aep_deficit:
AEP deficit in units of fraction for each location
- wspd:
Average wind speed in m/s for each location
- wspd_eff:
Average effective wind speed in m/s for each location
- wspd_deficit:
Average wind speed deficit in units of fraction for each location
- turbulence_intensity_eff:
Average effective turbulence intensity for each location
- Raises:
TypeError – If output_locs is not a xr.Dataset
ValueError – If output_locs is not a “cuboid” xr.Dataset
ValueError – If wwc is not a “cuboid” xr.Dataset
ValueError – If output_locs is not covered by the cuboid spanned by the weibull wind climate(s)
ValueError – If the wind turbine locations are not covered by the cuboid spanned by the weibull wind climate(s)