floris.wind_data#

Classes

TimeSeries(wind_directions, wind_speeds, ...)

The TimeSeries class is used to drive FLORIS and optimization operations in which the inflow is by a sequence of wind direction, wind speed and turbulence intensity values.

WindDataBase()

Super class that WindRose and TimeSeries inherit from, enforcing the implementation of unpack() on the child classes and providing the general functions unpack_for_reinitialize() and unpack_freq().

WindRose(wind_directions, wind_speeds, ti_table)

The WindRose class is used to drive FLORIS and optimization operations in which the inflow is characterized by the frequency of binned wind speed and wind direction values.

WindTIRose(wind_directions, wind_speeds, ...)

WindTIRose is similar to the WindRose class, but contains turbulence intensity as an additional wind rose dimension instead of being defined as a function of wind direction and wind speed.

class floris.wind_data.WindDataBase[source]#

Super class that WindRose and TimeSeries inherit from, enforcing the implementation of unpack() on the child classes and providing the general functions unpack_for_reinitialize() and unpack_freq().

abstract unpack()[source]#

Placeholder for child classes of WindDataBase, which each need to implement the unpack() method.

unpack_for_reinitialize()[source]#

Return only the variables need for FlorisModel.reinitialize

unpack_freq()[source]#

Unpack frequency weighting

unpack_value()[source]#

Unpack values of power generated

check_heterogeneous_inflow_config_by_wd(heterogeneous_inflow_config_by_wd)[source]#

Check that the heterogeneous_inflow_config_by_wd dictionary is properly formatted

Args:
heterogeneous_inflow_config_by_wd (dict): A dictionary containing the following keys:
  • 'speed_multipliers': A 2D NumPy array (size num_wd x num_points)

    of speed multipliers.

  • 'wind_directions': A 1D NumPy array (size num_wd) of wind directions (degrees).

  • 'x': A 1D NumPy array (size num_points) of x-coordinates (meters).

  • 'y': A 1D NumPy array (size num_points) of y-coordinates (meters).

check_heterogeneous_inflow_config(heterogeneous_inflow_config)[source]#

Check that the heterogeneous_inflow_config dictionary is properly formatted

Args:
heterogeneous_inflow_config (dict): A dictionary containing the following keys:
  • 'speed_multipliers': A 2D NumPy array (size n_findex x num_points)

    of speed multipliers.

  • 'x': A 1D NumPy array (size num_points) of x-coordinates (meters).

  • 'y': A 1D NumPy array (size num_points) of y-coordinates (meters).

get_speed_multipliers_by_wd(heterogeneous_inflow_config_by_wd, wind_directions)[source]#

Processes heterogeneous inflow configuration data to generate a speed multiplier array aligned with the wind directions. Accounts for the cyclical nature of wind directions. Args:

heterogeneous_inflow_config_by_wd (dict): A dictionary containing the following keys:
  • 'speed_multipliers': A 2D NumPy array (size num_wd x num_points)

    of speed multipliers.

  • 'wind_directions': A 1D NumPy array (size num_wd) of wind directions (degrees).

  • 'x': A 1D NumPy array (size num_points) of x-coordinates (meters).

  • 'y': A 1D NumPy array (size num_points) of y-coordinates (meters).

wind_directions (np.array): Wind directions to map onto

Returns:
numpy.ndarray: A 2D NumPy array (size n_findex x n) of speed multipliers

Each row corresponds to a wind direction, with speed multipliers selected based on the closest matching wind direction in 'het_wd'.

get_heterogeneous_inflow_config(heterogeneous_inflow_config_by_wd, wind_directions)[source]#
class floris.wind_data.WindRose(wind_directions, wind_speeds, ti_table, freq_table=None, value_table=None, compute_zero_freq_occurrence=False, heterogeneous_inflow_config_by_wd=None)[source]#

The WindRose class is used to drive FLORIS and optimization operations in which the inflow is characterized by the frequency of binned wind speed and wind direction values. Turbulence intensities are defined as a function of wind direction and wind speed.

Args:

wind_directions: NumPy array of wind directions (NDArrayFloat). wind_speeds: NumPy array of wind speeds (NDArrayFloat). ti_table: Turbulence intensity table for binned wind direction, wind

speed values (float, NDArrayFloat). Can be an array with dimensions (n_wind_directions, n_wind_speeds) or a single float value. If a single float value is provided, the turbulence intensity is assumed to be constant across all wind directions and wind speeds.

freq_table: Frequency table for binned wind direction, wind speed

values (NDArrayFloat, optional). Must have dimension (n_wind_directions, n_wind_speeds). Defaults to None in which case uniform frequency of all bins is assumed.

value_table: Value table for binned wind direction, wind

speed values (NDArrayFloat, optional). Must have dimension (n_wind_directions, n_wind_speeds). Defaults to None in which case uniform values are assumed. Value can be used to weight power in each bin to compute the total value of the energy produced

compute_zero_freq_occurrence: Flag indicating whether to compute zero

frequency occurrences (bool, optional). Defaults to False.

heterogeneous_inflow_config_by_wd (dict, optional): A dictionary containing the following

keys. Defaults to None. * 'speed_multipliers': A 2D NumPy array (size num_wd x num_points)

of speed multipliers.

  • 'wind_directions': A 1D NumPy array (size num_wd) of wind directions (degrees).

  • 'x': A 1D NumPy array (size num_points) of x-coordinates (meters).

  • 'y': A 1D NumPy array (size num_points) of y-coordinates (meters).

Parameters:
  • wind_directions (NDArrayFloat) --

  • wind_speeds (NDArrayFloat) --

  • ti_table (float | NDArrayFloat) --

  • freq_table (NDArrayFloat | None) --

  • value_table (NDArrayFloat | None) --

  • compute_zero_freq_occurrence (bool) --

  • heterogeneous_inflow_config_by_wd (dict | None) --

unpack()[source]#

Unpack the flattened versions of the matrices and return the values accounting for the non_zero_freq_mask

resample_wind_rose(wd_step=None, ws_step=None)[source]#

Resamples the wind rose by by wd_step and/or ws_step

Args:

wd_step: Step size for wind direction resampling (float, optional). ws_step: Step size for wind speed resampling (float, optional).

Returns:

WindRose: Resampled wind rose based on the provided or default step sizes.

Notes:
  • Returns a resampled version of the wind rose using new ws_step and wd_step.

  • Uses the bin weights feature in TimeSeries to resample the wind rose.

  • If ws_step or wd_step is not specified, it uses the current values.

plot_wind_rose(ax=None, color_map='viridis_r', wd_step=15.0, ws_step=5.0, legend_kwargs={})[source]#

This method creates a wind rose plot showing the frequency of occurrence of the specified wind direction and wind speed bins. If no axis is provided, a new one is created.

Note: Based on code provided by Patrick Murphy from the University of Colorado Boulder.

Args:
ax (matplotlib.pyplot.axes, optional): The figure axes

on which the wind rose is plotted. Defaults to None.

color_map (str, optional): Colormap to use. Defaults to 'viridis_r'. wd_step: Step size for wind direction (float, optional). ws_step: Step size for wind speed (float, optional). legend_kwargs (dict, optional): Keyword arguments to be passed to

ax.legend().

Returns:

matplotlib.pyplot.axes: A figure axes object containing the plotted wind rose.

assign_ti_using_wd_ws_function(func)[source]#

Use the passed in function to assign new values to turbulence_intensities

Args:
func (function): Function which accepts wind_directions as its

first argument and wind_speeds as second argument and returns turbulence_intensities

assign_ti_using_IEC_method(Iref=0.07, offset=3.8)[source]#

Define TI as a function of wind speed by specifying an Iref and offset value as in the normal turbulence model in the IEC 61400-1 standard

Args:
Iref (float): Reference turbulence level, defined as the expected

value of TI at 15 m/s. Default = 0.07. Note this value is lower than the values of Iref for turbulence classes A, B, and C in the IEC standard (0.16, 0.14, and 0.12, respectively), but produces TI values more in line with those typically used in FLORIS. When the default Iref and offset are used, the TI at 8 m/s is 8.6%.

offset (float): Offset value to equation. Default = 3.8, as defined

in the IEC standard to give the expected value of TI for each wind speed.

plot_ti_over_ws(ax=None, marker='.', ls='None', color='k')[source]#

Scatter plot the turbulence_intensities against wind_speeds

Args:
ax (matplotlib.pyplot.axes, optional): The figure axes

on which the turbulence intensity is plotted. Defaults to None.

marker (str, optional): Scatter plot marker style. Defaults to ".". ls (str, optional): Scatter plot line style. Defaults to "None". color (str, optional): Scatter plot color. Defaults to "k".

Returns:

matplotlib.pyplot.axes: A figure axes object containing the plotted turbulence intensities as a function of wind speed.

assign_value_using_wd_ws_function(func, normalize=False)[source]#

Use the passed in function to assign new values to the value table.

Args:
func (function): Function which accepts wind_directions as its

first argument and wind_speeds as second argument and returns values.

normalize (bool, optional): If True, the value array will be

normalized by the mean value. Defaults to False.

assign_value_piecewise_linear(value_zero_ws=1.425, ws_knee=4.5, slope_1=0.0, slope_2=-0.135, limit_to_zero=False, normalize=False)[source]#

Define value as a continuous piecewise linear function of wind speed with two line segments. The default parameters yield a value function that approximates the normalized mean electricity price vs. wind speed curve for the SPP market in the U.S. for years 2018-2020 from figure 7 in Simley et al. "The value of wake steering wind farm flow control in US energy markets," Wind Energy Science, 2024. https://doi.org/10.5194/wes-9-219-2024. This default value function is constant at low wind speeds, then linearly decreases above 4.5 m/s.

Args:
value_zero_ws (float, optional): The value when wind speed is zero.

Defaults to 1.425.

ws_knee (float, optional): The wind speed separating line segments

1 and 2. Default = 4.5 m/s.

slope_1 (float, optional): The slope of the first line segment

(unit of value per m/s). Defaults to zero.

slope_2 (float, optional): The slope of the second line segment (unit of value per m/s). Defaults to -0.135. limit_to_zero (bool, optional): If True, negative values will be

set to zero. Defaults to False.

normalize (bool, optional): If True, the value array will be

normalized by the mean value. Defaults to False.

plot_value_over_ws(ax=None, marker='.', ls='None', color='k')[source]#

Scatter plot the value of the energy generated against wind speed.

Args:
ax (matplotlib.pyplot.axes, optional): The figure axes

on which the value is plotted. Defaults to None.

marker (str, optional): Scatter plot marker style. Defaults to ".". ls (str, optional): Scatter plot line style. Defaults to "None". color (str, optional): Scatter plot color. Defaults to "k".

Returns:

matplotlib.pyplot.axes: A figure axes object containing the plotted value as a function of wind speed.

static read_csv_long(file_path, ws_col='wind_speeds', wd_col='wind_directions', ti_col_or_value='turbulence_intensities', freq_col=None, sep=',')[source]#

Read a long-formatted CSV file into the wind rose object. By long, what is meant is that the wind speed, wind direction combination is given for each row in the CSV file. The wind speed, wind direction, are given in separate columns, and the frequency of occurrence of each combination is given in a separate column. The frequency column is optional, and if not provided, uniform frequency of all bins is assumed.

The value of ti_col_or_value can be either a string or a float. If it is a string, it is assumed to be the name of the column in the CSV file that contains the turbulence intensity values. If it is a float, it is assumed to be a constant turbulence intensity value for all wind speed and direction combinations.

Return type:

WindRose

Parameters:
  • file_path (str) --

  • ws_col (str) --

  • wd_col (str) --

  • ti_col_or_value (str | float) --

  • freq_col (str | None) --

  • sep (str) --

Args:

file_path (str): Path to the CSV file. ws_col (str): Name of the column in the CSV file that contains the wind speed

values. Defaults to 'wind_speeds'.

wd_col (str): Name of the column in the CSV file that contains the wind direction

values. Defaults to 'wind_directions'.

ti_col_or_value (str or float): Name of the column in the CSV file that contains

the turbulence intensity values, or a constant turbulence intensity value.

freq_col (str): Name of the column in the CSV file that contains the frequency

values. Defaults to None in which case constant frequency assumed.

sep (str): Delimiter to use. Defaults to ','.

Returns:

WindRose: Wind rose object created from the CSV file.

class floris.wind_data.WindTIRose(wind_directions, wind_speeds, turbulence_intensities, freq_table=None, value_table=None, compute_zero_freq_occurrence=False, heterogeneous_inflow_config_by_wd=None)[source]#

WindTIRose is similar to the WindRose class, but contains turbulence intensity as an additional wind rose dimension instead of being defined as a function of wind direction and wind speed. The class is used to drive FLORIS and optimization operations in which the inflow is characterized by the frequency of binned wind speed, wind direction, and turbulence intensity values.

Args:

wind_directions: NumPy array of wind directions (NDArrayFloat). wind_speeds: NumPy array of wind speeds (NDArrayFloat). turbulence_intensities: NumPy array of turbulence intensities (NDArrayFloat). freq_table: Frequency table for binned wind direction, wind speed, and

turbulence intensity values (NDArrayFloat, optional). Must have dimension (n_wind_directions, n_wind_speeds, n_turbulence_intensities). Defaults to None in which case uniform frequency of all bins is assumed.

value_table: Value table for binned wind direction, wind

speed, and turbulence intensity values (NDArrayFloat, optional). Must have dimension (n_wind_directions, n_wind_speeds, n_turbulence_intensities). Defaults to None in which case uniform values are assumed. Value can be used to weight power in each bin to compute the total value of the energy produced.

compute_zero_freq_occurrence: Flag indicating whether to compute zero

frequency occurrences (bool, optional). Defaults to False.

heterogeneous_inflow_config_by_wd (dict, optional): A dictionary containing the following

keys. Defaults to None. * 'speed_multipliers': A 2D NumPy array (size num_wd x num_points)

of speed multipliers.

  • 'wind_directions': A 1D NumPy array (size num_wd) of wind directions (degrees).

  • 'x': A 1D NumPy array (size num_points) of x-coordinates (meters).

  • 'y': A 1D NumPy array (size num_points) of y-coordinates (meters).

Parameters:
  • wind_directions (NDArrayFloat) --

  • wind_speeds (NDArrayFloat) --

  • turbulence_intensities (NDArrayFloat) --

  • freq_table (NDArrayFloat | None) --

  • value_table (NDArrayFloat | None) --

  • compute_zero_freq_occurrence (bool) --

  • heterogeneous_inflow_config_by_wd (dict | None) --

unpack()[source]#

Unpack the flattened versions of the matrices and return the values accounting for the non_zero_freq_mask

resample_wind_rose(wd_step=None, ws_step=None, ti_step=None)[source]#

Resamples the wind rose by by wd_step, ws_step, and/or ti_step

Args:

wd_step: Step size for wind direction resampling (float, optional). ws_step: Step size for wind speed resampling (float, optional). ti_step: Step size for turbulence intensity resampling (float, optional).

Returns:

WindRose: Resampled wind rose based on the provided or default step sizes.

Notes:
  • Returns a resampled version of the wind rose using new ws_step,

    wd_step, and ti_step.

  • Uses the bin weights feature in TimeSeries to resample the wind rose.

  • If ws_step, wd_step, or ti_step are not specified, it uses

    the current values.

plot_wind_rose(ax=None, wind_rose_var='ws', color_map='viridis_r', wd_step=15.0, wind_rose_var_step=None, legend_kwargs={})[source]#

This method creates a wind rose plot showing the frequency of occurrence of either the specified wind direction and wind speed bins or wind direction and turbulence intensity bins. If no axis is provided, a new one is created.

Note: Based on code provided by Patrick Murphy from the University of Colorado Boulder.

Args:
ax (matplotlib.pyplot.axes, optional): The figure axes

on which the wind rose is plotted. Defaults to None.

wind_rose_var (str, optional): The variable to display in the wind

rose plot in addition to wind direction. If wind_rose_var = "ws", wind speed frequencies will be plotted. If wind_rose_var = "ti", turbulence intensity frequencies will be plotted. Defaults to "ws".

color_map (str, optional): Colormap to use. Defaults to 'viridis_r'. wd_step (float, optional): Step size for wind direction. Defaults

to 15 degrees.

wind_rose_var_step (float, optional): Step size for other wind rose

variable. Defaults to None. If unspecified, a value of 5 m/s will beused if wind_rose_var = "ws", and a value of 4% will be used if wind_rose_var = "ti".

legend_kwargs (dict, optional): Keyword arguments to be passed to

ax.legend().

Returns:

matplotlib.pyplot.axes: A figure axes object containing the plotted wind rose.

plot_ti_over_ws(ax=None, marker='.', ls='-', color='k')[source]#

Plot the mean turbulence intensity against wind speed.

Args:
ax (matplotlib.pyplot.axes, optional): The figure axes

on which the mean turbulence intensity is plotted. Defaults to None.

marker (str, optional): Scatter plot marker style. Defaults to ".". ls (str, optional): Scatter plot line style. Defaults to "None". color (str, optional): Scatter plot color. Defaults to "k".

Returns:

matplotlib.pyplot.axes: A figure axes object containing the plotted mean turbulence intensities as a function of wind speed.

assign_value_using_wd_ws_ti_function(func, normalize=False)[source]#

Use the passed in function to assign new values to the value table.

Args:
func (function): Function which accepts wind_directions as its

first argument, wind_speeds as its second argument, and turbulence_intensities as its third argument and returns values.

normalize (bool, optional): If True, the value array will be

normalized by the mean value. Defaults to False.

assign_value_piecewise_linear(value_zero_ws=1.425, ws_knee=4.5, slope_1=0.0, slope_2=-0.135, limit_to_zero=False, normalize=False)[source]#

Define value as a continuous piecewise linear function of wind speed with two line segments. The default parameters yield a value function that approximates the normalized mean electricity price vs. wind speed curve for the SPP market in the U.S. for years 2018-2020 from figure 7 in Simley et al. "The value of wake steering wind farm flow control in US energy markets," Wind Energy Science, 2024. https://doi.org/10.5194/wes-9-219-2024. This default value function is constant at low wind speeds, then linearly decreases above 4.5 m/s.

Args:
value_zero_ws (float, optional): The value when wind speed is zero.

Defaults to 1.425.

ws_knee (float, optional): The wind speed separating line segments

1 and 2. Default = 4.5 m/s.

slope_1 (float, optional): The slope of the first line segment

(unit of value per m/s). Defaults to zero.

slope_2 (float, optional): The slope of the second line segment (unit of value per m/s). Defaults to -0.135. limit_to_zero (bool, optional): If True, negative values will be

set to zero. Defaults to False.

normalize (bool, optional): If True, the value array will be

normalized by the mean value. Defaults to False.

plot_value_over_ws(ax=None, marker='.', ls='None', color='k')[source]#

Scatter plot the value of the energy generated against wind speed.

Args:
ax (matplotlib.pyplot.axes, optional): The figure axes

on which the value is plotted. Defaults to None.

marker (str, optional): Scatter plot marker style. Defaults to ".". ls (str, optional): Scatter plot line style. Defaults to "None". color (str, optional): Scatter plot color. Defaults to "k".

Returns:

matplotlib.pyplot.axes: A figure axes object containing the plotted value as a function of wind speed.

static read_csv_long(file_path, ws_col='wind_speeds', wd_col='wind_directions', ti_col='turbulence_intensities', freq_col=None, sep=',')[source]#

Read a long-formatted CSV file into the WindTIRose object. By long, what is meant is that the wind speed, wind direction and turbulence intensities combination is given for each row in the CSV file. The wind speed, wind direction, and turbulence intensity are given in separate columns, and the frequency of occurrence of each combination is given in a separate column. The frequency column is optional, and if not provided, uniform frequency of all bins is assumed.

Return type:

WindTIRose

Parameters:
  • file_path (str) --

  • ws_col (str) --

  • wd_col (str) --

  • ti_col (str) --

  • freq_col (str | None) --

  • sep (str) --

Args:

file_path (str): Path to the CSV file. ws_col (str): Name of the column in the CSV file that contains the wind speed

values. Defaults to 'wind_speeds'.

wd_col (str): Name of the column in the CSV file that contains the wind direction

values. Defaults to 'wind_directions'.

ti_col (str): Name of the column in the CSV file that contains

the turbulence intensity values.

freq_col (str): Name of the column in the CSV file that contains the frequency

values. Defaults to None in which case constant frequency assumed.

sep (str): Delimiter to use. Defaults to ','.

Returns:

WindRose: Wind rose object created from the CSV file.

class floris.wind_data.TimeSeries(wind_directions, wind_speeds, turbulence_intensities, values=None, heterogeneous_inflow_config_by_wd=None, heterogeneous_inflow_config=None)[source]#

The TimeSeries class is used to drive FLORIS and optimization operations in which the inflow is by a sequence of wind direction, wind speed and turbulence intensity values. Each input of wind direction, wind speed, and turbulence intensity can be assigned as an array of values or a single value. At least one of wind_directions, wind_speeds, or turbulence_intensities must be an array. If arrays are provided, they must be the same length as the other arrays or the single values. If single values are provided, then an array of the same length as the other arrays will be created with the single value.

Args:
wind_directions (float, NDArrayFloat): Wind direction. Can be a single

value or an array of values.

wind_speeds (float, NDArrayFloat): Wind speed. Can be a single value or

an array of values.

turbulence_intensities (float, NDArrayFloat): Turbulence intensity. Can be

a single value or an array of values.

values (NDArrayFloat, optional): Values associated with each wind

direction, wind speed, and turbulence intensity. Defaults to None.

heterogeneous_inflow_config_by_wd (dict, optional): A dictionary containing the following

keys. Defaults to None. * 'speed_multipliers': A 2D NumPy array (size num_wd x num_points)

of speed multipliers.

  • 'wind_directions': A 1D NumPy array (size num_wd) of wind directions (degrees).

  • 'x': A 1D NumPy array (size num_points) of x-coordinates (meters).

  • 'y': A 1D NumPy array (size num_points) of y-coordinates (meters).

heterogeneous_inflow_config (dict, optional): A dictionary containing the following keys.

Defaults to None. * 'speed_multipliers': A 2D NumPy array (size n_findex x num_points)

of speed multipliers.

  • 'x': A 1D NumPy array (size num_points) of x-coordinates (meters).

  • 'y': A 1D NumPy array (size num_points) of y-coordinates (meters).

Parameters:
  • wind_directions (float | NDArrayFloat) --

  • wind_speeds (float | NDArrayFloat) --

  • turbulence_intensities (float | NDArrayFloat) --

  • values (NDArrayFloat | None) --

  • heterogeneous_inflow_config_by_wd (dict | None) --

  • heterogeneous_inflow_config (dict | None) --

unpack()[source]#

Unpack the time series data in a manner consistent with wind rose unpack

assign_ti_using_wd_ws_function(func)[source]#

Use the passed in function to new assign values to turbulence_intensities

Args:
func (function): Function which accepts wind_directions as its

first argument and wind_speeds as second argument and returns turbulence_intensities

assign_ti_using_IEC_method(Iref=0.07, offset=3.8)[source]#

Define TI as a function of wind speed by specifying an Iref and offset value as in the normal turbulence model in the IEC 61400-1 standard

Args:
Iref (float): Reference turbulence level, defined as the expected

value of TI at 15 m/s. Default = 0.07. Note this value is lower than the values of Iref for turbulence classes A, B, and C in the IEC standard (0.16, 0.14, and 0.12, respectively), but produces TI values more in line with those typically used in FLORIS. When the default Iref and offset are used, the TI at 8 m/s is 8.6%.

offset (float): Offset value to equation. Default = 3.8, as defined

in the IEC standard to give the expected value of TI for each wind speed.

assign_value_using_wd_ws_function(func, normalize=False)[source]#

Use the passed in function to assign new values to the value table.

Args:
func (function): Function which accepts wind_directions as its

first argument and wind_speeds as second argument and returns values.

normalize (bool, optional): If True, the value array will be

normalized by the mean value. Defaults to False.

assign_value_piecewise_linear(value_zero_ws=1.425, ws_knee=4.5, slope_1=0.0, slope_2=-0.135, limit_to_zero=False, normalize=False)[source]#

Define value as a continuous piecewise linear function of wind speed with two line segments. The default parameters yield a value function that approximates the normalized mean electricity price vs. wind speed curve for the SPP market in the U.S. for years 2018-2020 from figure 7 in Simley et al. "The value of wake steering wind farm flow control in US energy markets," Wind Energy Science, 2024. https://doi.org/10.5194/wes-9-219-2024. This default value function is constant at low wind speeds, then linearly decreases above 4.5 m/s.

Args:
value_zero_ws (float, optional): The value when wind speed is zero.

Defaults to 1.425.

ws_knee (float, optional): The wind speed separating line segments

1 and 2. Default = 4.5 m/s.

slope_1 (float, optional): The slope of the first line segment

(unit of value per m/s). Defaults to zero.

slope_2 (float, optional): The slope of the second line segment (unit of value per m/s). Defaults to -0.135. limit_to_zero (bool, optional): If True, negative values will be

set to zero. Defaults to False.

normalize (bool, optional): If True, the value array will be

normalized by the mean value. Defaults to False.

to_WindRose(wd_step=2.0, ws_step=1.0, wd_edges=None, ws_edges=None, bin_weights=None)[source]#

Converts the TimeSeries data to a WindRose.

Args:

wd_step (float, optional): Step size for wind direction (default is 2.0). ws_step (float, optional): Step size for wind speed (default is 1.0). wd_edges (NDArrayFloat, optional): Custom wind direction edges. Defaults to None. ws_edges (NDArrayFloat, optional): Custom wind speed edges. Defaults to None. bin_weights (NDArrayFloat, optional): Bin weights for resampling. Note these

are primarily used by the resample resample_wind_rose function. Defaults to None.

Returns:

WindRose: A WindRose object based on the TimeSeries data.

Notes:
  • If wd_edges is defined, it uses it to produce the bin centers.

  • If wd_edges is not defined, it determines wd_edges from the step and data.

  • If ws_edges is defined, it uses it for wind speed edges.

  • If ws_edges is not defined, it determines ws_edges from the step and data.

to_WindTIRose(wd_step=2.0, ws_step=1.0, ti_step=0.02, wd_edges=None, ws_edges=None, ti_edges=None, bin_weights=None)[source]#

Converts the TimeSeries data to a WindTIRose.

Args:

wd_step (float, optional): Step size for wind direction (default is 2.0). ws_step (float, optional): Step size for wind speed (default is 1.0). ti_step (float, optional): Step size for turbulence intensity (default is 0.02). wd_edges (NDArrayFloat, optional): Custom wind direction edges. Defaults to None. ws_edges (NDArrayFloat, optional): Custom wind speed edges. Defaults to None. ti_edges (NDArrayFloat, optional): Custom turbulence intensity

edges. Defaults to None.

bin_weights (NDArrayFloat, optional): Bin weights for resampling. Note these

are primarily used by the resample resample_wind_rose function. Defaults to None.

Returns:

WindRose: A WindTIRose object based on the TimeSeries data.

Notes:
  • If wd_edges is defined, it uses it to produce the wind direction bin edges.

  • If wd_edges is not defined, it determines wd_edges from the step and data.

  • If ws_edges is defined, it uses it for wind speed edges.

  • If ws_edges is not defined, it determines ws_edges from the step and data.

  • If ti_edges is defined, it uses it for turbulence intensity edges.

  • If ti_edges is not defined, it determines ti_edges from the step and data.