reV.bespoke.bespoke.BespokeMultiPlantData

class BespokeMultiPlantData(res_fpath, sc_gid_to_hh, sc_gid_to_res_gid)[source]

Bases: object

Multi-plant preloaded data.

This object is intended to facilitate the use of pre-loaded data for running BespokeWindPlants on systems with slow parallel reads to a single HDF5 file.

Initialize BespokeMultiPlantData

Parameters:
  • res_fpath (str) – Path to resource h5 file.

  • sc_gid_to_hh (dict) – Dictionary mapping SC GID values to hub-heights. Data for each SC GID will be pulled for the corresponding hub-height given in this dictionary.

  • sc_gid_to_res_gid (dict) – Dictionary mapping SC GID values to an iterable oif resource GID values. Resource GID values should correspond to GID values in teh HDF5 file, so any GID map must be applied before initializing :class`BespokeMultiPlantData`.

Methods

get_preloaded_data_for_gid(sc_gid)

Get the pre-loaded data for a single SC GID.

get_preloaded_data_for_gid(sc_gid)[source]

Get the pre-loaded data for a single SC GID.

Parameters:

sc_gid (int) – SC GID to load resource data for.

Returns:

BespokeSinglePlantData – A loaded BespokeSinglePlantData object that can act as an HDF5 handler stand-in for this SC GID only.