Skip to content

Commit 050c4f7

Browse files
committed
Fix ModelChain doctest examples
1 parent b065045 commit 050c4f7

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

pvlib/modelchain.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,13 +1725,13 @@ def run_model_from_poa(self, data):
17251725
>>> mount = FixedMount(surface_tilt=30, surface_azimuth=180)
17261726
>>> array = Array(mount=mount, module_parameters={'pdc0': 300})
17271727
>>> system = PVSystem(arrays=[array])
1728-
>>> mc = ModelChain(system, location)
1728+
>>> mc = ModelChain(system, location,dc_model="pvwatts")
17291729
>>> poa = pd.DataFrame({
17301730
... 'poa_global': [900, 850],
17311731
... 'poa_direct': [600, 560],
17321732
... 'poa_diffuse': [300, 290],
17331733
... },
1734-
... index=pd.date_range("2021-06-01", periods=2, freq="H"))
1734+
... index=pd.date_range("2021-06-01", periods=2, freq="h"))
17351735
>>>
17361736
>>> mc.run_model_from_poa(poa)
17371737
<pvlib.modelchain.ModelChain ...>
@@ -1743,13 +1743,13 @@ def run_model_from_poa(self, data):
17431743
>>> array1 = Array(mount=mount1, module_parameters={'pdc0': 300})
17441744
>>> array2 = Array(mount=mount2, module_parameters={'pdc0': 300})
17451745
>>> system = PVSystem(arrays=[array1, array2])
1746-
>>> mc = ModelChain(system, location)
1746+
>>> mc = ModelChain(system, location,dc_model="pvwatts")
17471747
>>> poa1 = pd.DataFrame({
17481748
... 'poa_global': [900, 880],
17491749
... 'poa_direct': [600, 580],
17501750
... 'poa_diffuse': [300, 300],
17511751
... },
1752-
... index=pd.date_range("2021-06-01", periods=2, freq="H"))
1752+
... index=pd.date_range("2021-06-01", periods=2, freq="h"))
17531753
>>> poa2 = pd.DataFrame({
17541754
... 'poa_global': [700, 720],
17551755
... 'poa_direct': [400, 420],
@@ -1855,14 +1855,14 @@ def run_model_from_effective_irradiance(self, data):
18551855
>>> mount = FixedMount(surface_tilt=30, surface_azimuth=180)
18561856
>>> array = Array(mount=mount, module_parameters={'pdc0': 300})
18571857
>>> system = PVSystem(arrays=[array])
1858-
>>> mc = ModelChain(system, location)
1858+
>>> mc = ModelChain(system, location,dc_model="pvwatts")
18591859
>>>
18601860
>>> eff = pd.DataFrame({
18611861
... 'effective_irradiance': [900, 920],
18621862
... 'temp_air': [25, 24],
18631863
... 'wind_speed': [2.0, 1.5],
18641864
... },
1865-
... index=pd.date_range("2021-06-01", periods=2, freq="H"))
1865+
... index=pd.date_range("2021-06-01", periods=2, freq="h"))
18661866
>>>
18671867
>>> mc.run_model_from_effective_irradiance(eff)
18681868
<pvlib.modelchain.ModelChain ...>
@@ -1874,13 +1874,13 @@ def run_model_from_effective_irradiance(self, data):
18741874
>>> array1 = Array(mount=mount1, module_parameters={'pdc0': 300})
18751875
>>> array2 = Array(mount=mount2, module_parameters={'pdc0': 300})
18761876
>>> system = PVSystem(arrays=[array1, array2])
1877-
>>> mc = ModelChain(system, location)
1877+
>>> mc = ModelChain(system, location,dc_model="pvwatts")
18781878
>>> eff1 = pd.DataFrame({
18791879
... 'effective_irradiance': [900, 920],
18801880
... 'temp_air': [25, 24],
18811881
... 'wind_speed': [2.0, 1.5],
18821882
... },
1883-
... index=pd.date_range("2021-06-01", periods=2, freq="H"))
1883+
... index=pd.date_range("2021-06-01", periods=2, freq="h"))
18841884
>>> eff2 = pd.DataFrame({
18851885
... 'effective_irradiance': [600, 630],
18861886
... 'temp_air': [26, 25],

0 commit comments

Comments
 (0)