pvlib.modelchain.ModelChain.with_pvwatts#

classmethod ModelChain.with_pvwatts(system, location, clearsky_model='ineichen', airmass_model='kastenyoung1989', name=None, **kwargs)[source]#

ModelChain that follows the PVWatts methods.

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.

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

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

  • **kwargs – Parameters supplied here are passed to the ModelChain constructor and take precedence over the default configuration.

Warning

The PVWatts model defaults to 14 % total system losses. The PVWatts losses are fractions of DC power and can be modified, as shown in the example below.

Examples

>>> from pvlib import temperature, pvsystem, location, modelchain
>>> module_parameters = dict(gamma_pdc=-0.003, pdc0=4500)
>>> inverter_parameters = dict(pdc0=4000)
>>> tparams = temperature.TEMPERATURE_MODEL_PARAMETERS['sapm']['open_rack_glass_glass']
>>> system = pvsystem.PVSystem(
>>>     surface_tilt=30, surface_azimuth=180,
>>>     module_parameters=module_parameters,
>>>     inverter_parameters=inverter_parameters,
>>>     temperature_model_parameters=tparams)
>>> loc = location.Location(32.2, -110.9)
>>> modelchain.ModelChain.with_pvwatts(system, loc)

The following example is a modification of the example above but where custom losses have been specified.

>>> pvwatts_losses = {'soiling': 2, 'shading': 3, 'snow': 0, 'mismatch': 2,
>>>                   'wiring': 2, 'connections': 0.5, 'lid': 1.5,
>>>                   'nameplate_rating': 1, 'age': 0, 'availability': 30}
>>> system_with_custom_losses = pvsystem.PVSystem(
>>>     surface_tilt=30, surface_azimuth=180,
>>>     module_parameters=module_parameters,
>>>     inverter_parameters=inverter_parameters,
>>>     temperature_model_parameters=tparams,
>>>     losses_parameters=pvwatts_losses)
>>> modelchain.ModelChain.with_pvwatts(system_with_custom_losses, loc)
ModelChain:
  name: None
  clearsky_model: ineichen
  transposition_model: perez
  solar_position_method: nrel_numpy
  airmass_model: kastenyoung1989
  dc_model: pvwatts_dc
  ac_model: pvwatts_inverter
  aoi_model: physical_aoi_loss
  spectral_model: no_spectral_loss
  temperature_model: sapm_temp
  losses_model: pvwatts_losses