4343# ModelChain, particularly they are used by the methods
4444# ModelChain.with_pvwatts, ModelChain.with_sapm, etc.
4545
46+
47+
4648# pvwatts documentation states that it uses the following reference for
4749# a temperature model: Fuentes, M. K. (1987). A Simplified Thermal Model
4850# for Flat-Plate Photovoltaic Arrays. SAND85-0330. Albuquerque, NM:
@@ -1713,6 +1715,27 @@ def run_model_from_poa(self, data):
17131715 of Arrays in the PVSystem.
17141716 ValueError
17151717 If the DataFrames in `data` have different indexes.
1718+ Examples
1719+ --------
1720+ Single-array system:
1721+
1722+ >>> import pandas as pd
1723+ >>> from pvlib.pvsystem import PVSystem
1724+ >>> from pvlib.location import Location
1725+ >>> from pvlib.modelchain import ModelChain
1726+ >>>
1727+ >>> system = PVSystem(module_parameters={'pdc0': 300})
1728+ >>> location = Location(35, -110)
1729+ >>> mc = ModelChain(system, location)
1730+ >>>
1731+ >>> poa = pd.DataFrame({
1732+ ... 'poa_global': [900, 850],
1733+ ... 'poa_direct': [600, 560],
1734+ ... 'poa_diffuse': [300, 290],
1735+ ... }, index=pd.date_range("2021-06-01", periods=2, freq="H"))
1736+ >>>
1737+ >>> mc.run_model_from_poa(poa)
1738+ <pvlib.modelchain.ModelChain ...>
17161739
17171740 Notes
17181741 -----
@@ -1738,7 +1761,6 @@ def run_model_from_poa(self, data):
17381761 self ._run_from_effective_irrad (data )
17391762
17401763 return self
1741-
17421764 def _run_from_effective_irrad (self , data ):
17431765 """
17441766 Executes the temperature, DC, losses and AC models.
@@ -1757,7 +1779,7 @@ def _run_from_effective_irrad(self, data):
17571779
17581780 Notes
17591781 -----
1760- Assigns attributes:``cell_temperature``, ``dc`` , ``ac`` , ``losses``,
1782+ Assigns attributes:``cell_temperature, 'dc' , ``ac' , ``losses``,
17611783 ``diode_params`` (if dc_model is a single diode model).
17621784 """
17631785 self ._prepare_temperature (data )
@@ -1798,6 +1820,25 @@ def run_model_from_effective_irradiance(self, data):
17981820 of Arrays in the PVSystem.
17991821 ValueError
18001822 If the DataFrames in `data` have different indexes.
1823+ Examples
1824+ --------
1825+ >>> import pandas as pd
1826+ >>> from pvlib.pvsystem import PVSystem
1827+ >>> from pvlib.location import Location
1828+ >>> from pvlib.modelchain import ModelChain
1829+ >>>
1830+ >>> system = PVSystem(module_parameters={'pdc0': 300})
1831+ >>> location = Location(35, -110)
1832+ >>> mc = ModelChain(system, location)
1833+ >>>
1834+ >>> eff = pd.DataFrame({
1835+ ... 'effective_irradiance': [900, 920],
1836+ ... 'temp_air': [25, 24],
1837+ ... 'wind_speed': [2.0, 1.5],
1838+ ... })
1839+ >>>
1840+ >>> mc.run_model_from_effective_irradiance(eff)
1841+ <pvlib.modelchain.ModelChain ...>
18011842
18021843 Notes
18031844 -----
@@ -1836,6 +1877,7 @@ def run_model_from_effective_irradiance(self, data):
18361877 return self
18371878
18381879
1880+
18391881def _irrad_for_celltemp (total_irrad , effective_irradiance ):
18401882 """
18411883 Determine irradiance to use for cell temperature models, in order
0 commit comments