pvlib.modelchain.ModelChain.run_model_from_effective_irradiance#
- ModelChain.run_model_from_effective_irradiance(data)[source]#
Run the model starting with effective irradiance in the plane of array.
Effective irradiance is irradiance in the plane-of-array after any adjustments for soiling, reflections and spectrum.
- Parameters:
data (DataFrame, or list or tuple of DataFrame) –
Required column is
'effective_irradiance'. Optional columns include'cell_temperature','module_temperature'and'poa_global'.If the ModelChain’s PVSystem has multiple arrays, data must be a list or tuple with the same length and order as the PVsystem’s Arrays. Each element of data provides the irradiance and weather for the corresponding array.
- Returns:
self
- Raises:
ValueError – If the number of DataFrames in data is different than the number of Arrays in the PVSystem.
ValueError – If the DataFrames in data have different indexes.
Examples
Single-array system:
>>> import pandas as pd >>> from pvlib.pvsystem import PVSystem, Array, FixedMount >>> from pvlib.location import Location >>> from pvlib.modelchain import ModelChain >>> location = Location(35, -110) >>> mount = FixedMount(surface_tilt=30, surface_azimuth=180) >>> array = Array( ... mount=mount, ... module_parameters={'pdc0': 300, 'gamma_pdc': -0.004}, ... temperature_model_parameters={'u0': 25.0, 'u1': 6.84} ... ) >>> system = PVSystem( ... arrays=[array], ... inverter_parameters={'pdc0': 300} ... ) >>> mc = ModelChain( ... system, location, ... dc_model="pvwatts", ac_model="pvwatts", ... aoi_model="no_loss", spectral_model="no_loss", ... temperature_model="faiman" ... ) >>> eff = pd.DataFrame({ ... 'effective_irradiance': [900, 920], ... 'temp_air': [25, 24], ... 'wind_speed': [2.0, 1.5],}, ... index=pd.date_range("2021-06-01", periods=2, freq="h")) >>> _ = mc.run_model_from_effective_irradiance(eff)
Multi-array system:
>>> mount1 = FixedMount(surface_tilt=30, surface_azimuth=180) >>> mount2 = FixedMount(surface_tilt=10, surface_azimuth=90) >>> array1 = Array( ... mount=mount1, ... module_parameters={'pdc0': 300, 'gamma_pdc': -0.004}, ... temperature_model_parameters={'u0': 25.0, 'u1': 6.84} ... ) >>> array2 = Array( ... mount=mount2, ... module_parameters={'pdc0': 200, 'gamma_pdc': -0.004}, ... temperature_model_parameters={'u0': 25.0, 'u1': 6.84} ... ) >>> system = PVSystem( ... arrays=[array1, array2], ... inverter_parameters={'pdc0': 500} ... ) >>> mc = ModelChain( ... system, location, ... dc_model="pvwatts", ac_model="pvwatts", ... aoi_model="no_loss", spectral_model="no_loss", ... temperature_model="faiman" ... ) >>> eff1 = pd.DataFrame({ ... 'effective_irradiance': [900, 920], ... 'temp_air': [25, 24], ... 'wind_speed': [2.0, 1.5],}, ... index=pd.date_range("2021-06-01", periods=2, freq="h")) >>> eff2 = pd.DataFrame({ ... 'effective_irradiance': [600, 630], ... 'temp_air': [26, 25], ... 'wind_speed': [1.8, 1.2],}, ... index=eff1.index) >>> _ = mc.run_model_from_effective_irradiance( ... [eff1, eff2] ... )
Notes
Optional
datacolumns'cell_temperature','module_temperature'and'poa_global'are used for determining cell temperature.If optional column
'cell_temperature'is present, these values are used and temperature_model is ignored.If optional column
'module_temperature'is preset, temperature_model must be'sapm'.Otherwise, cell temperature is calculated using temperature_model.
The cell temperature models require plane-of-array irradiance as input. If optional column
'poa_global'is present, these data are used. If'poa_global'is not present,'effective_irradiance'is used.Assigns attributes to results:
times,weather,total_irrad,effective_irradiance,cell_temperature,dc,ac,losses,diode_params(if dc_model is a single diode model).