@@ -22,35 +22,63 @@ def basic_chain(times, latitude, longitude,
22
22
airmass_model = 'kastenyoung1989' ,
23
23
** kwargs ):
24
24
"""
25
- A function that computes all of the modeling steps necessary for
26
- calculating power or energy for a PV system at a given location.
25
+ An experimental function that computes all of the modeling steps
26
+ necessary for calculating power or energy for a PV system at a given
27
+ location.
27
28
28
29
Parameters
29
30
----------
30
- system : dict
31
- The connected set of modules, inverters, etc.
32
- keys must include latitude, longitude, module_parameters
33
-
34
- location : dict
35
- The physical location at which to evaluate the model.
36
-
37
31
times : DatetimeIndex
38
32
Times at which to evaluate the model.
39
33
34
+ latitude : float.
35
+ Positive is north of the equator.
36
+ Use decimal degrees notation.
37
+
38
+ longitude : float.
39
+ Positive is east of the prime meridian.
40
+ Use decimal degrees notation.
41
+
42
+ module_parameters : None, dict or Series
43
+ Module parameters as defined by the SAPM, CEC, or other.
44
+
45
+ inverter_parameters : None, dict or Series
46
+ Inverter parameters as defined by the SAPM, CEC, or other.
47
+
48
+ irradiance : None or DataFrame
49
+ If None, calculates clear sky data.
50
+ Columns must be 'dni', 'ghi', 'dhi'.
51
+
52
+ weather : None or DataFrame
53
+ If None, assumes air temperature is 20 C and
54
+ wind speed is 0 m/s.
55
+ Columns must be 'wind_speed', 'temp_air'.
56
+
57
+ surface_tilt : float or Series
58
+ Surface tilt angles in decimal degrees.
59
+ The tilt angle is defined as degrees from horizontal
60
+ (e.g. surface facing up = 0, surface facing horizon = 90)
61
+
62
+ surface_azimuth : float or Series
63
+ Surface azimuth angles in decimal degrees.
64
+ The azimuth convention is defined
65
+ as degrees east of north
66
+ (North=0, South=180, East=90, West=270).
67
+
40
68
orientation_strategy : None or str
41
69
The strategy for aligning the modules.
42
70
If not None, sets the ``surface_azimuth`` and ``surface_tilt``
43
71
properties of the ``system``.
44
72
45
- clearsky_model : str
46
- Passed to location.get_clearsky.
47
-
48
73
transposition_model : str
49
74
Passed to system.get_irradiance.
50
75
51
76
solar_position_method : str
52
77
Passed to location.get_solarposition.
53
78
79
+ airmass_model : str
80
+ Passed to location.get_airmass.
81
+
54
82
**kwargs
55
83
Arbitrary keyword arguments.
56
84
See code for details.
@@ -154,27 +182,25 @@ def get_orientation(strategy, **kwargs):
154
182
155
183
class ModelChain (object ):
156
184
"""
157
- A class that represents all of the modeling steps necessary for
158
- calculating power or energy for a PV system at a given location.
159
-
160
- Consider an abstract base class.
185
+ An experimental class that represents all of the modeling steps
186
+ necessary for calculating power or energy for a PV system at a given
187
+ location.
161
188
162
189
Parameters
163
190
----------
164
191
system : PVSystem
165
- The connected set of modules, inverters, etc.
192
+ A :py:class:`~pvlib.pvsystem.PVSystem` object that represents
193
+ the connected set of modules, inverters, etc.
166
194
167
- location : location
168
- The physical location at which to evaluate the model.
169
-
170
- times : DatetimeIndex
171
- Times at which to evaluate the model.
195
+ location : Location
196
+ A :py:class:`~pvlib.location.Location` object that represents
197
+ the physical location at which to evaluate the model.
172
198
173
199
orientation_strategy : None or str
174
- The strategy for aligning the modules.
175
- If not None, sets the ``surface_azimuth`` and ``surface_tilt``
176
- properties of the ``system``.
177
- Allowed strategies include 'flat', 'south_at_latitude_tilt'.
200
+ The strategy for aligning the modules. If not None, sets the
201
+ ``surface_azimuth`` and ``surface_tilt`` properties of the
202
+ ``system``. Allowed strategies include 'flat',
203
+ 'south_at_latitude_tilt'.
178
204
179
205
clearsky_model : str
180
206
Passed to location.get_clearsky.
@@ -185,14 +211,12 @@ class ModelChain(object):
185
211
solar_position_method : str
186
212
Passed to location.get_solarposition.
187
213
214
+ airmass_model : str
215
+ Passed to location.get_airmass.
216
+
188
217
**kwargs
189
218
Arbitrary keyword arguments.
190
219
Included for compatibility, but not used.
191
-
192
- See also
193
- --------
194
- location.Location
195
- pvsystem.PVSystem
196
220
"""
197
221
198
222
def __init__ (self , system , location ,
@@ -235,18 +259,22 @@ def run_model(self, times, irradiance=None, weather=None):
235
259
Parameters
236
260
----------
237
261
times : DatetimeIndex
262
+ Times at which to evaluate the model.
263
+
238
264
irradiance : None or DataFrame
239
265
If None, calculates clear sky data.
240
- Columns must be 'dni', 'ghi', 'dhi'
266
+ Columns must be 'dni', 'ghi', 'dhi'.
267
+
241
268
weather : None or DataFrame
242
269
If None, assumes air temperature is 20 C and
243
270
wind speed is 0 m/s.
244
271
Columns must be 'wind_speed', 'temp_air'.
245
272
246
273
Returns
247
274
-------
248
- output : DataFrame
249
- Some combination of AC power, DC power, POA irrad, etc.
275
+ output : (ac, dc)
276
+ Tuple of AC power (Series) and DC power with SAPM parameters
277
+ (DataFrame).
250
278
251
279
Assigns attributes: times, solar_position, airmass, irradiance,
252
280
total_irrad, weather, temps, aoi, dc, ac
@@ -294,7 +322,6 @@ def run_model(self, times, irradiance=None, weather=None):
294
322
295
323
return self .dc , self .ac
296
324
297
-
298
325
def model_system (self ):
299
326
"""
300
327
Model the system?
@@ -311,7 +338,6 @@ def model_system(self):
311
338
modeling_steps = self .get_modeling_steps ()
312
339
313
340
314
-
315
341
class MoreSpecificModelChain (ModelChain ):
316
342
"""
317
343
Something more specific.
@@ -321,4 +347,4 @@ def __init__(self, *args, **kwargs):
321
347
322
348
def run_model (self ):
323
349
# overrides the parent ModelChain method
324
- pass
350
+ pass
0 commit comments