SimulationResult
- class py_wake.wind_farm_models.wind_farm_model.SimulationResult(windFarmModel, localWind, type_i, yaw_ilk, tilt_ilk, WS_eff_ilk, TI_eff_ilk, power_ilk, ct_ilk, wt_inputs)[source]
Simulation result returned when calling a WindFarmModel object
aep_ilk
([normalize_probabilities, ...])Anual Energy Production of all turbines (i), wind directions (l) and wind speeds (k) in in GWh
aep
([normalize_probabilities, ...])Anual Energy Production (sum of all wind turbines, directions and speeds) in GWh.
flow_map
([grid, wd, ws])Return a FlowMap object with WS_eff and TI_eff of all grid points
- aep(normalize_probabilities=False, with_wake_loss=True, hours_pr_year=8760, linear_power_segments=False)[source]
Anual Energy Production (sum of all wind turbines, directions and speeds) in GWh.
See aep_ilk
- aep_ilk(normalize_probabilities=False, with_wake_loss=True)[source]
Anual Energy Production of all turbines (i), wind directions (l) and wind speeds (k) in in GWh
- Parameters
normalize_propabilities (Optional bool, defaults to False) –
In case only a subset of all wind speeds and/or wind directions is simulated, this parameter determines whether the returned AEP represents the energy produced in the fraction of a year where these flow cases occur or a whole year of only these cases. If for example, wd=[0], then - False means that the AEP only includes energy from the faction of year
with northern wind (359.5-0.5deg), i.e. no power is produced the rest of the year. - True means that the AEP represents a whole year of northen wind.
with_wake_loss (Optional bool, defaults to True) –
If True, wake loss is included, i.e. power is calculated using local effective wind speed
If False, wake loss is neglected, i.e. power is calculated using local free flow wind speed
- all(dim=None, **kwargs)
Reduce this SimulationResult’s data by applying all along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply all. By default all is applied over all dimensions.
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating all on this object’s data.
- Returns
reduced – New SimulationResult object with all applied to its data and the indicated dimension(s) removed.
- Return type
- any(dim=None, **kwargs)
Reduce this SimulationResult’s data by applying any along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply any. By default any is applied over all dimensions.
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating any on this object’s data.
- Returns
reduced – New SimulationResult object with any applied to its data and the indicated dimension(s) removed.
- Return type
- count(dim=None, **kwargs)
Reduce this SimulationResult’s data by applying count along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply count. By default count is applied over all dimensions.
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating count on this object’s data.
- Returns
reduced – New SimulationResult object with count applied to its data and the indicated dimension(s) removed.
- Return type
- cumprod(dim=None, skipna=None, **kwargs)
Apply cumprod along some dimension of SimulationResult.
- Parameters
dim (str or sequence of str, optional) – Dimension over which to apply cumprod.
axis (int or sequence of int, optional) – Axis over which to apply cumprod. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to cumprod.
- Returns
cumvalue – New SimulationResult object with cumprod applied to its data along the indicated dimension.
- Return type
- cumsum(dim=None, skipna=None, **kwargs)
Apply cumsum along some dimension of SimulationResult.
- Parameters
dim (str or sequence of str, optional) – Dimension over which to apply cumsum.
axis (int or sequence of int, optional) – Axis over which to apply cumsum. Only one of the ‘dim’ and ‘axis’ arguments can be supplied.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to cumsum.
- Returns
cumvalue – New SimulationResult object with cumsum applied to its data along the indicated dimension.
- Return type
- flow_map(grid=None, wd=None, ws=None)[source]
Return a FlowMap object with WS_eff and TI_eff of all grid points
- Parameters
grid (Grid or tuple(X, Y, x, y, h)) –
Grid, e.g. HorizontalGrid or
tuple(X, Y, x, y, h) where X, Y is the meshgrid for visualizing data
and x, y, h are the flattened grid points
See also
pywake.wind_farm_models.flow_map.FlowMap
- static load(filename, wfm)[source]
Manually trigger loading and/or computation of this dataset’s data from disk or a remote source into memory and return this dataset. Unlike compute, the original dataset is modified and returned.
Normally, it should not be necessary to call this method in user code, because all xarray functions should either work on deferred data or load data automatically. However, this method can be necessary when working with many file objects on disk.
- Parameters
**kwargs (dict) – Additional keyword arguments passed on to
dask.compute
.
See also
dask.compute
- max(dim=None, skipna=None, **kwargs)
Reduce this SimulationResult’s data by applying max along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply max. By default max is applied over all dimensions.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating max on this object’s data.
- Returns
reduced – New SimulationResult object with max applied to its data and the indicated dimension(s) removed.
- Return type
- mean(dim=None, skipna=None, **kwargs)
Reduce this SimulationResult’s data by applying mean along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply mean. By default mean is applied over all dimensions.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating mean on this object’s data.
- Returns
reduced – New SimulationResult object with mean applied to its data and the indicated dimension(s) removed.
- Return type
- median(dim=None, skipna=None, **kwargs)
Reduce this SimulationResult’s data by applying median along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply median. By default median is applied over all dimensions.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating median on this object’s data.
- Returns
reduced – New SimulationResult object with median applied to its data and the indicated dimension(s) removed.
- Return type
- min(dim=None, skipna=None, **kwargs)
Reduce this SimulationResult’s data by applying min along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply min. By default min is applied over all dimensions.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating min on this object’s data.
- Returns
reduced – New SimulationResult object with min applied to its data and the indicated dimension(s) removed.
- Return type
- prod(dim=None, skipna=None, **kwargs)
Reduce this SimulationResult’s data by applying prod along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply prod. By default prod is applied over all dimensions.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating prod on this object’s data.
- Returns
reduced – New SimulationResult object with prod applied to its data and the indicated dimension(s) removed.
- Return type
- std(dim=None, skipna=None, **kwargs)
Reduce this SimulationResult’s data by applying std along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply std. By default std is applied over all dimensions.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating std on this object’s data.
- Returns
reduced – New SimulationResult object with std applied to its data and the indicated dimension(s) removed.
- Return type
- sum(dim=None, skipna=None, **kwargs)
Reduce this SimulationResult’s data by applying sum along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply sum. By default sum is applied over all dimensions.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
min_count (int, default: None) – The required number of valid values to perform the operation. If fewer than min_count non-NA values are present the result will be NA. Only used if skipna is set to True or defaults to True for the array’s dtype. New in version 0.10.8: Added with the default being None. Changed in version 0.17.0: if specified on an integer array and skipna=True, the result will be a float array.
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating sum on this object’s data.
- Returns
reduced – New SimulationResult object with sum applied to its data and the indicated dimension(s) removed.
- Return type
- var(dim=None, skipna=None, **kwargs)
Reduce this SimulationResult’s data by applying var along some dimension(s).
- Parameters
dim (str or sequence of str, optional) – Dimension(s) over which to apply var. By default var is applied over all dimensions.
skipna (bool, optional) – If True, skip missing values (as marked by NaN). By default, only skips missing values for float dtypes; other dtypes either do not have a sentinel missing value (int) or skipna=True has not been implemented (object, datetime64 or timedelta64).
keep_attrs (bool, optional) – If True, the attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.
**kwargs (dict) – Additional keyword arguments passed on to the appropriate array function for calculating var on this object’s data.
- Returns
reduced – New SimulationResult object with var applied to its data and the indicated dimension(s) removed.
- Return type