1
1
"""
2
- The ``snowcoverage`` module contains functions that model snow coverage on
3
- solar modules. The model was first proposed in Marion et al. 2013 and was
4
- later validated and implemented into NREL's SAM.
2
+ The ``snow`` module contains functions that model the effect of snow on
3
+ solar modules.
5
4
"""
6
5
7
6
import numpy as np
8
7
import pandas as pd
8
+ from pvlib .tools import sind
9
9
10
10
11
- def snow_slide_amount (surface_tilt , sliding_coefficient = 1.97 ,
12
- time_step_hours = 1 ):
11
+ def _snow_slide_amount (surface_tilt , sliding_coefficient = 1.97 ,
12
+ time_step = 1 ):
13
13
'''
14
- Calculates the amount of snow that slides off of the surface of a module
15
- following the model first described in [1] and later implemented with minor
16
- improvements in SAM [2] in tenths of panel height.
14
+ Calculates the amount of snow that slides off in each time step.
17
15
18
16
Parameters
19
17
----------
@@ -24,102 +22,84 @@ def snow_slide_amount(surface_tilt, sliding_coefficient=1.97,
24
22
25
23
26
24
sliding_coefficient : numeric
27
- Another empirically determined coefficient used in [1]. It determines
28
- how much snow slides off of the panel if a sliding event occurs.
25
+ An empirically determined coefficient used in [1] to determine
26
+ how much snow slides off if a sliding event occurs.
29
27
30
- time_step_hours : float
31
- Period of the data in hours. (hours between data points)
28
+ time_step : float
29
+ Period of the data. [hour]
32
30
33
31
Returns
34
32
----------
35
33
slide_amount : numeric
36
- The amount of snow that slides off of the panel
37
- in tenths of the panel area at each time step.
38
-
39
- References
40
- ----------
41
- [1] Marion, B.; Schaefer, R.; Caine, H.; Sanchez, G. (2013).
42
- “Measured and modeled photovoltaic system energy losses from snow for
43
- Colorado and Wisconsin locations.” Solar Energy 97; pp.112-121.
44
- [2] Ryberg, D; Freeman, J. "Integration, Validation, and Application
45
- of a PV Snow Coverage Model in SAM" (2017) NREL Technical Report
34
+ The fraction of panel slant height from which snow slides off
35
+ at each time step, in tenths of the panel's slant height.
46
36
'''
47
37
48
- tilt = np .radians (surface_tilt )
49
- slide_amount = sliding_coefficient / 10 * np .sin (tilt ) * time_step_hours
50
- return slide_amount
38
+ return sliding_coefficient / 10 * sind (surface_tilt ) * time_step
51
39
52
40
53
- def snow_slide_event (poa_irradiance , temperature ,
54
- m = - 80 ):
41
+ def _snow_slide_event (poa_irradiance , temperature ,
42
+ m = - 80 ):
55
43
'''
56
- Calculates when snow sliding events will occur following the model first
57
- described in [1] and later implemented in SAM [2].
44
+ Calculates when snow sliding events will occur.
58
45
59
46
Parameters
60
47
----------
61
48
poa_irradiance : numeric
62
- Total in-plane irradiance ( W/m^2)
49
+ Total in-plane irradiance [ W/m^2]
63
50
64
51
temperature : numeric
65
- Ambient air temperature at the surface (C)
52
+ Ambient air temperature at the surface [C]
66
53
67
54
m : numeric
68
- A coefficient used in the model described in [1]. It is an
69
- empirically determined value given in W/m^2.
55
+ A coefficient used in the model described in [1]. [W/m^2 C]
70
56
71
57
Returns
72
58
----------
73
59
slide_event : boolean array
74
60
True if the condiditions are suitable for a snow slide event.
75
61
False elsewhere.
76
-
77
- References
78
- ----------
79
- [1] Marion, B.; Schaefer, R.; Caine, H.; Sanchez, G. (2013).
80
- “Measured and modeled photovoltaic system energy losses from snow for
81
- Colorado and Wisconsin locations.” Solar Energy 97; pp.112-121.
82
- [2] Ryberg, D; Freeman, J. "Integration, Validation, and Application
83
- of a PV Snow Coverage Model in SAM" (2017) NREL Technical Report
84
62
'''
85
63
86
- slide_event = temperature > poa_irradiance / m
87
- return slide_event
64
+ return temperature > poa_irradiance / m
88
65
89
66
90
- def fully_covered_panel (snow_data , time_step_hours = 1 ,
67
+ def fully_covered_panel (snow_data , time_step = 1 ,
91
68
snow_data_type = "snowfall" ):
92
69
'''
93
- Calculates the timesteps where the panel is presumed to be fully covered
94
- by snow. Follows the same model first described in [1] and later
95
- implemented in SAM [2].
70
+ Calculates the timesteps when the panel is presumed to be fully covered
71
+ by snow.
96
72
97
73
Parameters
98
74
----------
99
75
snow_data : numeric
100
- Time series data on either snowfall or ground snow depth. The type of
101
- data should be specified in snow_data_type. The original model was
102
- designed for ground snowdepth only. (cm/hr or cm)
76
+ Time series data on either snowfall (cm/hr) or ground snow depth (cm).
77
+ The type of data should be specified in snow_data_type.
103
78
104
- time_step_hours : float
105
- Period of the data in hours. (hours between data points)
79
+ time_step : float
80
+ Period of the data. [hour]
106
81
107
82
snow_data_type : string
108
83
Defines what type of data is being passed as snow_data. Acceptable
109
- values are "snowfall" and "snow_depth". "snowfall" will be in units of
110
- cm/hr. "snow_depth" is in units of cm.
84
+ values are "snowfall" and "snow_depth".
111
85
112
86
Returns
113
87
----------
114
88
fully_covered_mask : boolean array
115
89
True where the snowfall exceeds the defined threshold to fully cover
116
90
the panel. False elsewhere.
117
91
92
+ Notes
93
+ -----
94
+ Implements the model described in [1] with minor improvements in [2].
95
+
118
96
References
119
97
----------
120
- [1] Marion, B.; Schaefer, R.; Caine, H.; Sanchez, G. (2013).
121
- “Measured and modeled photovoltaic system energy losses from snow for
122
- Colorado and Wisconsin locations.” Solar Energy 97; pp.112-121.
98
+ .. [1] Marion, B.; Schaefer, R.; Caine, H.; Sanchez, G. (2013).
99
+ “Measured and modeled photovoltaic system energy losses from snow for
100
+ Colorado and Wisconsin locations.” Solar Energy 97; pp.112-121.
101
+ .. [2] Ryberg, D; Freeman, J. "Integration, Validation, and Application
102
+ of a PV Snow Coverage Model in SAM" (2017) NREL Technical Report
123
103
'''
124
104
if snow_data_type == "snow_depth" :
125
105
prev_data = snow_data .shift (1 )
@@ -131,19 +111,17 @@ def fully_covered_panel(snow_data, time_step_hours=1,
131
111
raise ValueError ('snow_data_type was not specified or was not set to a'
132
112
'valid option (snowfall, snow_depth).' )
133
113
134
- time_adjusted = snowfall / time_step_hours
114
+ time_adjusted = snowfall / time_step
135
115
fully_covered_mask = time_adjusted >= 1
136
116
return fully_covered_mask
137
117
138
118
139
119
def snow_coverage_model (snow_data , snow_data_type ,
140
120
poa_irradiance , temperature , surface_tilt ,
141
- time_step_hours = 1 , m = - 80 , sliding_coefficient = 1.97 ):
121
+ time_step = 1 , m = - 80 , sliding_coefficient = 1.97 ):
142
122
'''
143
123
Calculates the fraction of the slant height of a row of modules covered by
144
- snow at every time step following the same model first described in [1]
145
- and later implemented in SAM [2]. Currently only validated for fixed tilt
146
- systems.
124
+ snow at every time step.
147
125
148
126
Parameters
149
127
----------
@@ -168,32 +146,45 @@ def snow_coverage_model(snow_data, snow_data_type,
168
146
<=180. The tilt angle is defined as degrees from horizontal
169
147
(e.g. surface facing up = 0, surface facing horizon = 90).
170
148
171
- time_step_hours : float
172
- Period of the data in hours. (hours between data points)
149
+ time_step : float
150
+ Period of the data. [hour]
173
151
174
152
sliding coefficient : numeric
175
- Another empirically determined coefficient used in [1]. It determines
176
- how much snow slides off of the panel if a sliding event occurs.
153
+ Empirically determined coefficient used in [1] to determine how much
154
+ snow slides off if a sliding event occurs.
177
155
178
156
m : numeric
179
- A coefficient used in the model described in [1]. It is an
180
- empirically determined value given in W/(m^2 C).
157
+ A coefficient used in the model described in [1]. [W/(m^2 C)]
181
158
182
159
Returns
183
160
-------
184
161
snow_coverage : numeric
185
- The fraction of a module covered by snow at each time step.
162
+ The fraction of a the slant height of a row of modules that is covered
163
+ by snow at each time step.
164
+
165
+ Notes
166
+ -----
167
+ Implements the model described in [1] with minor improvements in [2].
168
+ Currently only validated for fixed tilt systems.
169
+
170
+ References
171
+ ----------
172
+ .. [1] Marion, B.; Schaefer, R.; Caine, H.; Sanchez, G. (2013).
173
+ “Measured and modeled photovoltaic system energy losses from snow for
174
+ Colorado and Wisconsin locations.” Solar Energy 97; pp.112-121.
175
+ .. [2] Ryberg, D; Freeman, J. "Integration, Validation, and Application
176
+ of a PV Snow Coverage Model in SAM" (2017) NREL Technical Report
186
177
'''
187
178
188
179
full_coverage_events = fully_covered_panel (snow_data ,
189
- time_step_hours = time_step_hours ,
180
+ time_step = time_step ,
190
181
snow_data_type = snow_data_type )
191
182
snow_coverage = pd .Series (np .full (len (snow_data ), np .nan ))
192
183
snow_coverage = snow_coverage .reindex (snow_data .index )
193
184
snow_coverage [full_coverage_events ] = 1
194
- slide_events = snow_slide_event (poa_irradiance , temperature )
195
- slide_amount = snow_slide_amount (surface_tilt , sliding_coefficient ,
196
- time_step_hours )
185
+ slide_events = _snow_slide_event (poa_irradiance , temperature )
186
+ slide_amount = _snow_slide_amount (surface_tilt , sliding_coefficient ,
187
+ time_step )
197
188
slidable_snow = ~ np .isnan (snow_coverage )
198
189
while (np .any (slidable_snow )):
199
190
new_slides = np .logical_and (slide_events , slidable_snow )
@@ -231,5 +222,4 @@ def DC_loss_factor(snow_coverage, num_strings):
231
222
loss : numeric
232
223
DC loss due to snow coverage at each time step.
233
224
'''
234
- loss = np .ceil (snow_coverage * num_strings ) / num_strings
235
- return loss
225
+ return np .ceil (snow_coverage * num_strings ) / num_strings
0 commit comments