|
4 | 4 | diffuse horizontal irradiance, and total irradiance
|
5 | 5 | under various conditions.
|
6 | 6 |
|
| 7 | +Extraterrestrial radiation can be modeled using :func:`extraradiation`. |
| 8 | +
|
7 | 9 | .. ipython:: python
|
8 |
| - :suppress: |
9 | 10 |
|
10 | 11 | import numpy as np
|
11 | 12 | import pandas as pd
|
12 | 13 | import matplotlib.pyplot as plt
|
| 14 | + import pvlib |
| 15 | + |
| 16 | + times = pd.date_range('2014-01-01', '2015-01-01', freq='1D') |
| 17 | + spencer = pd.Series(pvlib.irradiance.extraradiation(times, method='spencer'), times) |
| 18 | + asce = pd.Series(pvlib.irradiance.extraradiation(times, method='asce'), times) |
| 19 | + ephem = pvlib.irradiance.extraradiation(times, method='pyephem') # approx 100x slower than the above. |
| 20 | + spencer.plot(label='spencer') |
| 21 | + asce.plot(label='asce') |
| 22 | + ephem.plot(label='pyephem') |
| 23 | + plt.legend() |
| 24 | + @savefig extraradiation.png width=4in |
| 25 | + plt.ylabel('Extraterrestrial radiation (W/m^2)') |
| 26 | + |
13 | 27 | """
|
14 | 28 |
|
15 | 29 | from __future__ import division
|
@@ -94,22 +108,6 @@ def extraradiation(datetime_or_doy, solar_constant=1366.1, method='spencer'):
|
94 | 108 | See Also
|
95 | 109 | --------
|
96 | 110 | pvlib.clearsky.disc
|
97 |
| - |
98 |
| - Examples |
99 |
| - -------- |
100 |
| - .. ipython:: |
101 |
| - |
102 |
| - times = pd.date_range('2014-01-01', '2015-01-01', freq='1D') |
103 |
| - spencer = pd.Series(pvlib.irradiance.extraradiation(times, method='spencer'), times) |
104 |
| - asce = pd.Series(pvlib.irradiance.extraradiation(times, method='asce'), times) |
105 |
| - ephem = pvlib.irradiance.extraradiation(times, method='pyephem') # approx 100x slower than the above. |
106 |
| - spencer.plot(label='spencer') |
107 |
| - asce.plot(label='asce') |
108 |
| - ephem.plot(label='pyephem') |
109 |
| - plt.legend() |
110 |
| - @savefig extraradiation.png width=4in |
111 |
| - plt.ylabel('Extraterrestrial radiation (W/m^2)') |
112 |
| -
|
113 | 111 | """
|
114 | 112 |
|
115 | 113 | pvl_logger.debug('irradiance.extraradiation()')
|
|
0 commit comments