h2integrate.resource.wind.wind_resource_base#

Classes

class h2integrate.resource.wind.wind_resource_base.WindResourceBaseAPIModel(**kwargs)#
setup()#

Declare inputs and outputs.

Available attributes:

name pathname comm options

compare_units_and_correct(data, data_units)#

Convert data to standard units defined in output_vars_to_units.

Note

The keys for data and data_units are expected to be formatted as <var>_<height>m where var is a key in the attribute output_vars_to_units and height is the height of the data in meters.

Note

the values for data_units must be formatted to be compatible with OpenMDAO units.

Parameters:
  • data (dict) -- dictionary of data, keys are data names and values may be a scalar or array of numerical values in units of data_units[data_key].

  • data_units (dict) -- dictionary of units corresponding to the data. Has the same keys as data with values as a str of OpenMDAO compatible units.

Raises:
  • Warning -- if a key in data does not contain any key in the attribute output_vars_to_units.

  • Warning -- if a key in data contains multiple keys in the attribute output_vars_to_units.

Returns:

2-element tuple containing

  • data (dict): data converted to standard units found in the attribute

    output_vars_to_units.

  • data_units (dict): updated units of data in data.