@@ -159,8 +159,63 @@ the variability of the data set.
159
159
Examples
160
160
^^^^^^^^
161
161
162
+ A clear sky time series using basic pvlib functions.
163
+
164
+ .. ipython :: python
165
+
166
+ latitude, longitude, tz, altitude, name = 32.2 , - 111 , ' US/Arizona' , 700 , ' Tucson'
167
+ times = pd.date_range(start = ' 2014-01-01' , end = ' 2014-01-02' , freq = ' 1Min' , tz = tz)
168
+ solpos = pvlib.solarposition.get_solarposition(times, latitude, longitude)
169
+
170
+ apparent_zenith = solpos[' apparent_zenith' ]
171
+ airmass = pvlib.atmosphere.relativeairmass(apparent_zenith)
172
+ pressure = pvlib.atmosphere.alt2pres(altitude)
173
+ airmass = pvlib.atmosphere.absoluteairmass(airmass, pressure)
174
+ linke_turbidity = pvlib.clearsky.lookup_linke_turbidity(times, latitude, longitude)
175
+ dni_extra = pvlib.irradiance.extraradiation(apparent_zenith.index.dayofyear)
176
+
177
+ # an input is a Series, so solis is a DataFrame
178
+ ineichen = clearsky.ineichen(apparent_zenith, airmass, linke_turbidity,
179
+ altitude, dni_extra)
180
+ ax = ineichen.plot();
181
+ ax.set_ylabel(' Irradiance $W/m^2$' );
182
+ ax.legend(loc = 2 );
183
+ @savefig ineichen -vs-time-climo.png width=6in
184
+ plt.show();
185
+
186
+ The function respects the input types. Array input results in an OrderedDict
187
+ of array output, and Series input results in a DataFrame output. The keys
188
+ are 'ghi', 'dni', and 'dhi'.
189
+
190
+ Grid with a clear sky irradiance for a few turbidity values.
191
+
162
192
.. ipython :: python
163
193
194
+ times = pd.date_range(start = ' 2014-09-01' , end = ' 2014-09-02' , freq = ' 1Min' , tz = tz)
195
+ solpos = pvlib.solarposition.get_solarposition(times, latitude, longitude)
196
+
197
+ apparent_zenith = solpos[' apparent_zenith' ]
198
+ airmass = pvlib.atmosphere.relativeairmass(apparent_zenith)
199
+ pressure = pvlib.atmosphere.alt2pres(altitude)
200
+ airmass = pvlib.atmosphere.absoluteairmass(airmass, pressure)
201
+ linke_turbidity = pvlib.clearsky.lookup_linke_turbidity(times, latitude, longitude)
202
+ print (' climatological linke_turbidity = {} ' .format(linke_turbidity.mean()))
203
+ dni_extra = pvlib.irradiance.extraradiation(apparent_zenith.index.dayofyear)
204
+
205
+ linke_turbidities = [linke_turbidity.mean(), 2 , 4 ]
206
+
207
+ fig, axes = plt.subplots(ncols = 3 , nrows = 1 , sharex = True , sharey = True , squeeze = True )
208
+ axes = axes.flatten()
209
+
210
+ for linke_turbidity, ax in zip (linke_turbidities, axes):
211
+ ineichen = clearsky.ineichen(apparent_zenith, airmass, linke_turbidity,
212
+ altitude, dni_extra)
213
+ ineichen.plot(ax = ax, title = ' Linke turbidity = {:0.1f } ' .format(linke_turbidity))
214
+ ax.legend(loc = 1 )
215
+
216
+ @savefig ineichen -grid.png width=10in
217
+ plt.show();
218
+
164
219
165
220
166
221
Validation
@@ -198,7 +253,9 @@ from `radiosondes <http://weather.uwyo.edu/upperair/sounding.html>`_,
198
253
derived from surface relative humidity using functions such as
199
254
:py:func: `pvlib.atmosphere.gueymard94_pw `.
200
255
Numerous gridded products from satellites, weather models, and climate models
201
- contain one or both of aerosols and precipitable water.
256
+ contain one or both of aerosols and precipitable water. Consider data
257
+ from the `ECMWF <https://software.ecmwf.int/wiki/display/WEBAPI/Access+ECMWF+Public+Datasets >`_
258
+ and `SoDa <http://www.soda-pro.com/web-services/radiation/cams-mcclear >`_.
202
259
203
260
Aerosol optical depth is a function of wavelength, and the Simplified
204
261
Solis model requires AOD at 700 nm. Models exist to convert AOD between
@@ -223,6 +280,7 @@ A clear sky time series using basic pvlib functions.
223
280
pressure = pvlib.atmosphere.alt2pres(altitude)
224
281
dni_extra = pvlib.irradiance.extraradiation(apparent_elevation.index.dayofyear)
225
282
283
+ # an input is a Series, so solis is a DataFrame
226
284
solis = clearsky.simplified_solis(apparent_elevation, aod700, precipitable_water,
227
285
pressure, dni_extra)
228
286
ax = solis.plot();
@@ -231,6 +289,9 @@ A clear sky time series using basic pvlib functions.
231
289
@savefig solis -vs-time-0.1-1.png width=6in
232
290
plt.show();
233
291
292
+ The function respects the input types. Array input results in an OrderedDict
293
+ of array output, and Series input results in a DataFrame output. The keys
294
+ are 'ghi', 'dni', and 'dhi'.
234
295
235
296
Irradiance as a function of solar elevation.
236
297
@@ -288,6 +349,7 @@ Contour plots of irradiance as a function of both PW and AOD.
288
349
289
350
aod700, precipitable_water = np.meshgrid(aod700, precipitable_water)
290
351
352
+ # inputs are arrays, so solis is an OrderedDict
291
353
solis = clearsky.simplified_solis(apparent_elevation, aod700,
292
354
precipitable_water, pressure,
293
355
dni_extra)
0 commit comments