pvlib.modelchain.ModelChain#

class pvlib.modelchain.ModelChain(system, location, clearsky_model='ineichen', transposition_model='haydavies', solar_position_method='nrel_numpy', airmass_model='kastenyoung1989', dc_model=None, ac_model=None, aoi_model=None, spectral_model=None, temperature_model=None, dc_ohmic_model='no_loss', losses_model='no_loss', name=None)[source]#

The ModelChain class to provides a standardized, high-level interface for all of the modeling steps necessary for calculating PV power from a time series of weather inputs. The same models are applied to all pvsystem.Array objects, so each Array must contain the appropriate model parameters. For example, if dc_model='pvwatts', then each Array.module_parameters must contain 'pdc0'.

See ModelChain for examples.

Parameters
  • system (PVSystem) – A PVSystem object that represents the connected set of modules, inverters, etc.

  • location (Location) – A Location object that represents the physical location at which to evaluate the model.

  • clearsky_model (str, default 'ineichen') – Passed to location.get_clearsky. Only used when DNI is not found in the weather inputs.

  • transposition_model (str, default 'haydavies') – Passed to system.get_irradiance.

  • solar_position_method (str, default 'nrel_numpy') – Passed to location.get_solarposition.

  • airmass_model (str, default 'kastenyoung1989') – Passed to location.get_airmass.

  • dc_model (str, or function, optional) – If not specified, the model will be inferred from the parameters that are common to all of system.arrays[i].module_parameters. Valid strings are ‘sapm’, ‘desoto’, ‘cec’, ‘pvsyst’, ‘pvwatts’. The ModelChain instance will be passed as the first argument to a user-defined function.

  • ac_model (str, or function, optional) – If not specified, the model will be inferred from the parameters that are common to all of system.inverter_parameters. Valid strings are ‘sandia’, ‘adr’, ‘pvwatts’. The ModelChain instance will be passed as the first argument to a user-defined function.

  • aoi_model (str, or function, optional) – If not specified, the model will be inferred from the parameters that are common to all of system.arrays[i].module_parameters. Valid strings are ‘physical’, ‘ashrae’, ‘sapm’, ‘martin_ruiz’, ‘interp’ and ‘no_loss’. The ModelChain instance will be passed as the first argument to a user-defined function.

  • spectral_model (str, or function, optional) – If not specified, the model will be inferred from the parameters that are common to all of system.arrays[i].module_parameters. Valid strings are ‘sapm’, ‘first_solar’, ‘no_loss’. The ModelChain instance will be passed as the first argument to a user-defined function.

  • temperature_model (str or function, optional) – Valid strings are: ‘sapm’, ‘pvsyst’, ‘faiman’, ‘fuentes’, ‘noct_sam’. The ModelChain instance will be passed as the first argument to a user-defined function.

  • dc_ohmic_model (str or function, default 'no_loss') – Valid strings are ‘dc_ohms_from_percent’, ‘no_loss’. The ModelChain instance will be passed as the first argument to a user-defined function.

  • losses_model (str or function, default 'no_loss') – Valid strings are ‘pvwatts’, ‘no_loss’. The ModelChain instance will be passed as the first argument to a user-defined function.

  • name (str, optional) – Name of ModelChain instance.

Methods

__init__(system, location[, clearsky_model, ...])

adr_inverter()

ashrae_aoi_loss()

cec()

complete_irradiance(weather)

Determine the missing irradiation columns.

dc_ohms_from_percent()

Calculate time series of ohmic losses and apply those to the mpp power output of the dc_model based on the pvsyst equivalent resistance method.

desoto()

effective_irradiance_model()

faiman_temp()

first_solar_spectral_loss()

fuentes_temp()

infer_ac_model()

Infer AC power model from system attributes.

infer_aoi_model()

infer_dc_model()

Infer DC power model from Array module parameters.

infer_losses_model()

infer_spectral_model()

Infer spectral model from system attributes.

infer_temperature_model()

Infer temperature model from system attributes.

interp_aoi_loss()

martin_ruiz_aoi_loss()

no_aoi_loss()

no_dc_ohmic_loss()

no_extra_losses()

no_spectral_loss()

noct_sam_temp()

physical_aoi_loss()

prepare_inputs(weather)

Prepare the solar position, irradiance, and weather inputs to the model, starting with GHI, DNI and DHI.

prepare_inputs_from_poa(data)

Prepare the solar position, irradiance and weather inputs to the model, starting with plane-of-array irradiance.

pvsyst()

pvsyst_temp()

pvwatts_dc()

Calculate DC power using the PVWatts model.

pvwatts_inverter()

pvwatts_losses()

run_model(weather)

Run the model chain starting with broadband global, diffuse and/or direct irradiance.

run_model_from_effective_irradiance(data)

Run the model starting with effective irradiance in the plane of array.

run_model_from_poa(data)

Run the model starting with broadband irradiance in the plane of array.

sandia_inverter()

sapm()

sapm_aoi_loss()

sapm_spectral_loss()

sapm_temp()

with_pvwatts(system, location[, ...])

ModelChain that follows the PVWatts methods.

with_sapm(system, location[, ...])

ModelChain that follows the Sandia Array Performance Model (SAPM) methods.

Attributes

ac_model

aoi_model

dc_model

dc_ohmic_model

losses_model

spectral_model

temperature_model

Examples using pvlib.modelchain.ModelChain#

Bifacial Modeling - modelchain

Bifacial Modeling - modelchain

Mixed Orientation

Mixed Orientation

Seasonal Tilt

Seasonal Tilt

Dual-Axis Tracking

Dual-Axis Tracking

Discontinuous Tracking

Discontinuous Tracking