reskit.wind.workflows.wind_workflow_manager#

Classes#

WindWorkflowManager

Helps managing the logical workflow for simulations relating to wind turbines.

Module Contents#

class reskit.wind.workflows.wind_workflow_manager.WindWorkflowManager(placements, synthetic_power_curve_cut_out=25, synthetic_power_curve_rounding=1)#

Bases: reskit.workflow_manager.WorkflowManager

Helps managing the logical workflow for simulations relating to wind turbines.

Initialization:

Parameters:
  • placements (pandas.DataFrame) –

    A Pandas DataFrame describing the wind turbine placements to be simulated. It must include the following columns:

    ’geom’ or ‘lat’ and ‘lon’ ‘hub_height’ ‘capacity’ ‘rotor_diam’ or ‘powerCurve’

  • synthetic_power_curve_cut_out (int, optional) – cut out wind speed, by default 25

  • synthetic_power_curve_rounding (int, optional) – rounding floor, by default 1

Returns:

A corrected power curve.

Return type:

numpy array

powerCurveLibrary#
project_windspeeds_to_hub_height(height_scaling_method, height_scaling_data, consider_boundary_layer_height=True, allow_extrapolation=True)#

Projects wind speeds to hub heights for a given projection/scaling method.

Parameters:
  • height_scaling_method (tuple) –

    The method to project the windspeeds from the default height (here 100m in ERA-5/GWA3) to hub height (possibly affected by the planetary boundary layer height). First tuple entry (str) describes the general approach (e.g. logarithmic scaling or based on long-run-average windspeeds). No height scaling will be applied when None. Options are: (“lra”, [vertical method]) : Calculation based on the long-run average

    wind speeds (e.g. GWA) of the 2 nearest available height levels. [vertical method] (str) describes the form of interpolation, e.g. “linear”.

    (“log”, [landcover])Logarithmic height scaling based on surface

    roughness defined via a mapping of the land cover category. [landcover] (str) defines the landcover data used for roughness mapping. All landcover types accepted as land_cover_type in logarithmic_profile.roughness_from_land_cover_classification() are allowed, by default “cci” (ESA CCI raster).

  • height_scaling_data (str, dict) –

    The data required for the selected height_scaling_method (see above). The expected data formats are, depending on height_scaling_method: (“log”, [landcover]) : str

    Path to the respective “landcover” raster file.

    (“lra”, [vertical method]){intstr}

    Dict with heights as keys and paths to the LRA-windspeeds at the respective heights as values. Must contain at least one higher and one lower height than the reference height of real_lra_ws_path.

  • consider_boundary_layer_height (bool, optional) – Corrects the given hub heights for locations by planetary boundary layer (PBL) effects if True, see consider_boundary_height() for details. By default True.

  • allow_extrapolation (bool, optional) – Takes effect only in interpolating methods, will then allow to extrapolate beyond the min/max height range, by default True.

Return type:

A reference to the invoking WindWorkflowManager

set_roughness(roughness)#

Sets the ‘roughness’ column in the placements DataFrame.

Parameters:

roughness (numeric, iterable) – If a numeric is given, sets the same roughness values to all placements. If an iterable is given, sets the corresponding roughness value in the iterable to the placements. The length of the iterable must match the number of placements

Return type:

A reference to the invoking WindWorkflowManager

estimate_roughness_from_land_cover(path, source_type)#

Estimates the ‘roughness’ value column in the placements DataFrame from a given land cover classification raster file.

Parameters:
  • path (str) – path to the raster file

  • source_type (str) – string value to get the corresponding key-value pairs. Accepted types ‘clc’, ‘clc-code’, ‘globCover’, ‘modis’, or ‘cci’, by default ‘clc’

Return type:

A reference to the invoking WindWorkflowManager

consider_boundary_height()#

Corrects the given target heights for locations by planetary boundary layer (PBL) effects, by limiting the target height either to the PBL height when elevated (starting) height < PBL < target height or avoiding scaling altogether when PBL <= elevated (startig) height (by setting target height to elevated starting height).

Returns:

The adapted target heights.

Return type:

numpy array

logarithmic_projection_of_wind_speeds_to_hub_height(consider_boundary_layer_height=False)#

Projects the wind speed values to the hub height.

consider_boundary_layer_heightbool, optional

If True, the wind speed will be scaled only to max. the boundary layer height. By default False.

Return type:

A reference to the invoking WindWorkflowManager

wind_shear_projection_of_wind_speeds_to_hub_height(alternative_wind_speed_rasters, consider_boundary_layer_height=False, allow_extrapolation=True)#

Projects the wind speed values to the hub height.

consider_boundary_layer_heightbool, optional

If True, the wind speed will be scaled only to max. the boundary layer height. By default False.

allow_extrapolation . BOOL; OPTIONAL

If False, target heights must be between minimum and maximum height keys provided in alternative_wind_speed_rasters. By default True.

Return type:

A reference to the invoking WindWorkflowManager

apply_air_density_correction_to_wind_speeds()#

Applies air density corrections to the wind speeds at the hub height.

Return type:

A reference to the invoking WindWorkflowManager

apply_wake_correction_of_wind_speeds(wake_curve='dena_mean')#

Applies a wind-speed dependent reduction factor to the wind speeds at elevated height, based on

Parameters:

wake_curve (str, optional) – string value to describe the wake reduction method. None will cause no reduction. Location-sepcific values can also be given in a ‘wake_curve’ column of the placements dataframe, the latter will be overridden by the ‘wake_curve’ argument. By default “dena_mean”. Choose from (see more information here under wind_efficiency_curve_name[1]): * “dena_mean”, * “knorr_mean”, * “dena_extreme1”, * “dena_extreme2”, * “knorr_extreme1”, * “knorr_extreme2”, * “knorr_extreme3”,

Return type:

A reference to the invoking WindWorkflowManager

convolute_power_curves(scaling, base, **kwargs)#

Convolutes a turbine power curve from a normal distribution function with wind-speed-dependent standard deviation.

Parameters:
  • scaling (float, optional) – scaling factor, by default 0.06

  • base (float, optional) – base value, by default 0.1

Return type:

A reference to the invoking WindWorkflowManager

simulate(max_batch_size=None, cf_correction_factor=1.0, tolerance=0.01, max_iterations=10, verbose=True)#

Applies the invoking power curve to the given wind speeds. A max_batch_size can be set, splitting the simulation in batches. If set, cf_correction_factor is applied iteratively to adjust avreage cf output. Capacity factors are calculated in the subfunction _sim(), which is called iteratively.

max_batch_sizeint, optional

The maximum number of locations to be simulated simultaneously. If None, no limits will be applied, by default None.

cf_correction_factorfloat, optional

The average cf output will be adjusted by this ratio via wind speed adaptations (no linear scaling). By default 1.0.

tolerancefloat, optional

The max. deviation of the simulated average cf from the enforced corrected value, by default 0.03, i.e. 3% absolute.

max_iterationsint, optional

The max. No. of simulation iterations allowed for iterative simulation of one batch until the tolerance is met, else a TimeOutError will be raised. By default 10 iterations.

verbosebool, optional

If True, additional status information will be printed, by default True.

Return type:

A reference to the invoking WindWorkflowManager

apply_availability_factor(availability_factor)#

Applies a relative reduction factor to the energy output (capacity factor) time series to statistically account for non-availabilities.

Parameters:

availability_factor (float) – Factor that will be applied to the output time series.

Return type:

A reference to the invoking WindWorkflowManager

interpolate_raster_vals_to_hub_height(name, height_to_raster_dict, **kwargs)#

Given several raster datasets which correspond to a desired value (e.g. average wind speed) at different altitudes, this function will read values for each placement location from each of these datasets, and will then linearly interpolate them to the hub height of each turbine

Parameters:
  • name (str) – The name of the variable to create (will be placed in the self.placements member)

  • height_to_raster_dict (dict) – A dictionary which maps altitude values to raster datasets

Return type:

A reference to the invoking WindWorkflowManager

set_correction_factors(correction_factors, verbose=True)#

Gets the correction factors if necessary and sets them as class attribute.

Parameters:

correction_factors (str, float) – correction factor as float or path to the correction factor raster file

Return type:

A reference to the invoking WindWorkflowManager