pvlib.modelchain.ModelChain.prepare_inputs#
- ModelChain.prepare_inputs(weather)[source]#
- Prepare the solar position, irradiance, and weather inputs to the model, starting with GHI, DNI and DHI. - Parameters:
- weather (DataFrame, or tuple or list of DataFrames) – - Required column names include - 'dni',- 'ghi',- 'dhi'. Optional column names are- 'wind_speed',- 'temp_air',- 'albedo'.- If optional columns - 'wind_speed',- 'temp_air'are not provided, air temperature of 20 C and wind speed of 0 m/s will be added to the- weatherDataFrame.- If optional column - 'albedo'is provided, albedo values in the ModelChain’s PVSystem.arrays are ignored.- If weather is a tuple or list, it must be of the same length and order as the Arrays of the ModelChain’s PVSystem. 
- Raises:
- ValueError – If any weather DataFrame(s) is missing an irradiance component. 
- ValueError – If weather is a tuple or list and the DataFrames it contains have different indices. 
- ValueError – If weather is a tuple or list with a different length than the number of Arrays in the system. 
 
 - Notes - Assigns attributes to - results:- times,- weather,- solar_position,- airmass,- total_irrad,- aoi,- albedo.- See also 
