pvlib.modelchain.ModelChain¶
-
class
pvlib.modelchain.
ModelChain
(system, location, orientation_strategy=None, 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, losses_model='no_loss', name=None, **kwargs)[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.
See https://pvlib-python.readthedocs.io/en/stable/modelchain.html 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.orientation_strategy (None or str, default None) – The strategy for aligning the modules. If not None, sets the
surface_azimuth
andsurface_tilt
properties of thesystem
. Allowed strategies include ‘flat’, ‘south_at_latitude_tilt’. Ignored for SingleAxisTracker systems.clearsky_model (str, default 'ineichen') – Passed to location.get_clearsky.
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 (None, str, or function, default None) – If None, the model will be inferred from the contents of system.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 (None, str, or function, default None) – If None, the model will be inferred from the contents of system.inverter_parameters and system.module_parameters. Valid strings are ‘sandia’, ‘adr’, ‘pvwatts’. The ModelChain instance will be passed as the first argument to a user-defined function.
aoi_model (None, str, or function, default None) – If None, the model will be inferred from the contents of system.module_parameters. Valid strings are ‘physical’, ‘ashrae’, ‘sapm’, ‘martin_ruiz’, ‘no_loss’. The ModelChain instance will be passed as the first argument to a user-defined function.
spectral_model (None, str, or function, default None) – If None, the model will be inferred from the contents of system.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 (None, str or function, default None) – Valid strings are ‘sapm’, ‘pvsyst’, ‘faiman’, and ‘fuentes’. 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 (None or str, default None) – Name of ModelChain instance.
Methods
__init__
(system, location[, …])Initialize self.
cec
()complete_irradiance
(weather)Determine the missing irradiation columns.
desoto
()Infer AC power model from system attributes.
Infer DC power model from system attributes.
Infer spectral model from system attributes.
Infer temperature model from system attributes.
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
()run_model
(weather)Run the model chain starting with broadband global, diffuse and/or direct irradiance.
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.
sapm
()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