waves.utilities.floris_runners#

Provides the FLORIS-based methods for pre-processing data and post-processing results.

Functions

calculate_monthly_wind_rose_results(...)

Calculate the turbine AEP contribution for each month of a year, in MWh.

check_monthly_wind_rose(project_wind_rose, ...)

Checks the monthly wind rose parameterizations to ensure the DataFrames are the correct shape, so that when the frequency column is extracted, the compared data is the same.

create_monthly_wind_rose(weather_df)

Create a dictionary of month and a long-term WindRose object based on all the wind condition data for that month.

create_single_month_wind_rose(weather_df, month)

Creates the FLORIS WindRose object for a given month based on the weather_df's DatetimeIndex.

waves.utilities.floris_runners.create_single_month_wind_rose(weather_df, month)[source]#

Creates the FLORIS WindRose object for a given month based on the weather_df's DatetimeIndex.

Return type:

tuple[int, WindRose]

Parameters:
  • weather_df (pd.DataFrame) -- The weather profile used to create long-term, month-based WindRose objects

  • month (int) -- The month of the year to create a WindRose object.

Returns:

WindRose -- Month-specific WindRose object.

waves.utilities.floris_runners.create_monthly_wind_rose(weather_df)[source]#

Create a dictionary of month and a long-term WindRose object based on all the wind condition data for that month.

Return type:

dict[int, WindRose]

Parameters:

weather_df (pd.DataFrame) -- The weather profile used to create long-term, month-based WindRose objects

Returns:

dict[int, WindRose] -- A dictionary of the integer month and the long-term WindRose object associated with all the wind conditions during that month.

waves.utilities.floris_runners.check_monthly_wind_rose(project_wind_rose, monthly_wind_rose)[source]#

Checks the monthly wind rose parameterizations to ensure the DataFrames are the correct shape, so that when the frequency column is extracted, the compared data is the same.

Return type:

dict[int, WindRose]

Parameters:
  • project_wind_rose (WindRose) -- The WindRose created using the long term reanalysis weather profile.

  • monthly_wind_rose (dict[int, WindRose]) -- A dictionary of the month as an int and WindRose created from the long term project reanalysis weather profile that was filtered on weather data for the focal month.

Returns:

dict[int, WindRose] -- The monthly_wind_rose but with an missing wind conditions added into the WindRose with 0 frequency.

waves.utilities.floris_runners.calculate_monthly_wind_rose_results(turbine_power, wind_rose_monthly)[source]#

Calculate the turbine AEP contribution for each month of a year, in MWh.

Return type:

DataFrame

Parameters:
  • turbine_power (np.ndarray) -- The array of turbine powers, with shape (num wd x num ws x num turbines), calculated from the possible wind conditions at the site given the turbine layout.

  • wind_rose_monthly (dict[int, WindRose]) -- The dictionary of integer months (i.e., 1 for January) and array of frequences, with WindRose objects created by the long term wind conditions filtered on the month.

Returns:

pd.DataFrame, pd.DataFrame -- A DataFrame of each month's contribution to the AEP for each turbine in the wind farm, with shape (12 x num turbines).