reV.hybrids.hybrids.Hybridization

class Hybridization(solar_fpath, wind_fpath, allow_solar_only=False, allow_wind_only=False, fillna=None, limits=None, ratio_bounds=None, ratio='solar_capacity/wind_capacity')[source]

Bases: object

Framework to handle hybridization of SC and corresponding profiles.

reV hybrids computes a “hybrid” wind and solar supply curve, where each supply curve point contains some wind and some solar capacity. Various ratio limits on wind-to-solar farm properties (e.g. wind-to-solar capacity) can be applied during the hybridization process. Hybrid generation profiles are also computed during this process.

Parameters:
  • solar_fpath (str) – Filepath to rep profile output file to extract solar profiles and summaries from.

  • wind_fpath (str) – Filepath to rep profile output file to extract wind profiles and summaries from.

  • allow_solar_only (bool, optional) – Option to allow SC points with only solar capacity (no wind). By default, False.

  • allow_wind_only (bool, optional) – Option to allow SC points with only wind capacity (no solar). By default, False.

  • fillna (dict, optional) – Dictionary containing column_name, fill_value pairs representing any fill values that should be applied after merging the wind and solar meta. Note that column names will likely have to be prefixed with solar or wind. By default None.

  • limits (dict, optional) – Option to specify mapping (in the form of a dictionary) of {colum_name: max_value} representing the upper limit (maximum value) for the values of a column in the merged meta. For example, limits={'solar_capacity': 100} would limit all the values of the solar capacity in the merged meta to a maximum value of 100. This limit is applied BEFORE ratio calculations. The names of the columns should match the column names in the merged meta, so they are likely prefixed with solar or wind. By default, None (no limits applied).

  • ratio_bounds (tuple, optional) – Option to set ratio bounds (in two-tuple form) on the columns of the ratio input. For example, ratio_bounds=(0.5, 1.5) would adjust the values of both of the ratio columns such that their ratio is always between half and double (e.g., no value would be more than double the other). To specify a single ratio value, use the same value as the upper and lower bound. For example, ratio_bounds=(1, 1) would adjust the values of both of the ratio columns such that their ratio is always equal. By default, None (no limit on the ratio).

  • ratio (str, optional) – Option to specify the columns used to calculate the ratio that is limited by the ratio_bounds input. This input is a string in the form “{numerator_column}/{denominator_column}”. For example, ratio='solar_capacity/wind_capacity' would limit the ratio of the solar to wind capacities as specified by the ratio_bounds input. If ratio_bounds is None, this input does nothing. The names of the columns should be prefixed with one of the prefixes defined as class variables. By default 'solar_capacity/wind_capacity'.

Methods

run([fout, save_hybrid_meta])

Run hybridization of profiles and save to disc.

run_meta()

Compute the hybridized profiles.

run_profiles()

Compute all hybridized profiles.

save_profiles(fout[, save_hybrid_meta])

Initialize fout and save profiles.

Attributes

hybrid_meta

Hybridized summary for the representative profiles.

hybrid_time_index

Get the time index for the hybrid rep profiles.

profiles

Get the arrays of the hybridized representative profiles.

solar_meta

Summary for the solar representative profiles.

solar_time_index

Get the time index for the solar rep profiles.

wind_meta

Summary for the wind representative profiles.

wind_time_index

Get the time index for the wind rep profiles.

property solar_meta

Summary for the solar representative profiles.

Returns:

solar_meta (pd.DataFrame) – Summary for the solar representative profiles.

property wind_meta

Summary for the wind representative profiles.

Returns:

wind_meta (pd.DataFrame) – Summary for the wind representative profiles.

property hybrid_meta

Hybridized summary for the representative profiles.

Returns:

hybrid_meta (pd.DataFrame) – Summary for the hybridized representative profiles. At the very least, this has a column that the data was merged on.

property solar_time_index

Get the time index for the solar rep profiles.

Returns:

solar_time_index (pd.Datetimeindex) – Time index sourced from the solar rep profile file.

property wind_time_index

Get the time index for the wind rep profiles.

Returns:

wind_time_index (pd.Datetimeindex) – Time index sourced from the wind rep profile file.

property hybrid_time_index

Get the time index for the hybrid rep profiles.

Returns:

hybrid_time_index (pd.Datetimeindex) – Time index for the hybrid rep profiles.

property profiles

Get the arrays of the hybridized representative profiles.

Returns:

profiles (dict) – Dict of hybridized representative profiles.

run(fout=None, save_hybrid_meta=True)[source]

Run hybridization of profiles and save to disc.

Parameters:
  • fout (str, optional) – Filepath to output HDF5 file. If None, output data are not written to a file. By default, None.

  • save_hybrid_meta (bool, optional) – Flag to save hybrid SC table to hybrid rep profile output. By default, True.

Returns:

str – Filepath to output h5 file.

run_meta()[source]

Compute the hybridized profiles.

Returns:

Hybridization – Instance of Hybridization object (itself) containing the hybridized meta as an attribute.

run_profiles()[source]

Compute all hybridized profiles.

Returns:

Hybridization – Instance of Hybridization object (itself) containing the hybridized profiles as attributes.

save_profiles(fout, save_hybrid_meta=True)[source]

Initialize fout and save profiles.

Parameters:
  • fout (str) – Filepath to output h5 file.

  • save_hybrid_meta (bool) – Flag to save hybrid SC table to hybrid rep profile output.