10
10
11
11
def _time_delta_in_hours (times ):
12
12
delta = times .to_series ().diff ()
13
- return delta .dt .seconds .div (3600 )
13
+ return delta .dt .total_seconds .div (3600 )
14
14
15
15
16
- def fully_covered (snowfall , threshold = 1. ):
16
+ def snow_nrel_fully_covered (snowfall , threshold = 1. ):
17
17
'''
18
18
Calculates the timesteps when the row's slant height is fully covered
19
19
by snow.
@@ -39,29 +39,32 @@ def fully_covered(snowfall, threshold=1.):
39
39
References
40
40
----------
41
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.
42
+ " Measured and modeled photovoltaic system energy losses from snow for
43
+ Colorado and Wisconsin locations." Solar Energy 97; pp.112-121.
44
44
.. [2] Ryberg, D; Freeman, J. "Integration, Validation, and Application
45
45
of a PV Snow Coverage Model in SAM" (2017) NREL Technical Report
46
46
'''
47
- delta = snowfall .index .to_series ().diff () # [0] will be NaT
48
- timestep = delta .dt .seconds .div (3600 ) # convert to hours
47
+ timestep = _time_delta_in_hours (snowfall .index )
49
48
time_adjusted = snowfall / timestep
50
49
time_adjusted .iloc [0 ] = 0 # replace NaN from NaT / timestep
51
50
return time_adjusted >= threshold
52
51
53
52
54
- def snow_coverage_nrel (snowfall , poa_irradiance , temperature , surface_tilt ,
55
- threshold_snowfall = 1. , m = - 80 ,
56
- sliding_coefficient = 0.197 ):
53
+ def snow_nrel (snowfall , poa_irradiance , temperature , surface_tilt ,
54
+ threshold_snowfall = 1. , m = - 80 , sliding_coefficient = 0.197 ):
57
55
'''
58
56
Calculates the fraction of the slant height of a row of modules covered by
59
57
snow at every time step.
60
58
59
+ Initial snow coverage is assumed to be zero. Implements the model described
60
+ in [1]_ with minor improvements in [2]_, with the change that the output
61
+ is in fraction of the row's slant height rather than in tenths of the row
62
+ slant height. Validated for fixed tilt systems.
63
+
61
64
Parameters
62
65
----------
63
66
snowfall : Series
64
- Accumulated snowfall at the end of each time period. [cm]
67
+ Accumulated snowfall within each time period. [cm]
65
68
poa_irradiance : Series
66
69
Total in-plane irradiance [W/m^2]
67
70
temperature : Series
@@ -71,36 +74,33 @@ def snow_coverage_nrel(snowfall, poa_irradiance, temperature, surface_tilt,
71
74
surface facing horizon = 90. Must be between 0 and 180. [degrees]
72
75
threshold_snowfall : float, default 1.0
73
76
Minimum hourly snowfall to cover a row's slant height. [cm/hr]
74
- m : numeric
75
- A coefficient used in the model described in [1]_. [W/(m^2 C)]
76
- sliding coefficient : numeric
77
- Empirically determined coefficient used in [1]_ to determine how much
77
+ m : float, default -80.
78
+ Coefficient used in [1]_ to determine if snow can slide given
79
+ irradiance and air temperature. [W/(m^2 C)]
80
+ sliding coefficient : float, default 0.197
81
+ Empirical coefficient used in [1]_ to determine how much
78
82
snow slides off in each time period. [unitless]
79
83
80
84
Returns
81
85
-------
82
- snow_coverage : numeric
83
- The fraction of a the slant height of a row of modules that is covered
86
+ snow_coverage : Series
87
+ The fraction of the slant height of a row of modules that is covered
84
88
by snow at each time step.
85
89
86
- Notes
87
- -----
88
- Initial snow coverage is assumed to be zero. Implements the model described
89
- in [1]_ with minor improvements in [2]_. Validated for fixed tilt systems.
90
-
91
90
References
92
91
----------
93
92
.. [1] Marion, B.; Schaefer, R.; Caine, H.; Sanchez, G. (2013).
94
- “ Measured and modeled photovoltaic system energy losses from snow for
95
- Colorado and Wisconsin locations.” Solar Energy 97; pp.112-121.
93
+ " Measured and modeled photovoltaic system energy losses from snow for
94
+ Colorado and Wisconsin locations." Solar Energy 97; pp.112-121.
96
95
.. [2] Ryberg, D; Freeman, J. (2017). "Integration, Validation, and
97
96
Application of a PV Snow Coverage Model in SAM" NREL Technical Report
98
- NREL/TP-6A20-68705
97
+ NREL/TP-6A20-68705
99
98
'''
100
99
101
100
# set up output Series
102
101
snow_coverage = pd .Series (index = poa_irradiance .index , data = np .nan )
103
- snow_events = snowfall [fully_covered (snowfall , threshold_snowfall )]
102
+ snow_events = snowfall [snow_nrel_fully_covered (snowfall ,
103
+ threshold_snowfall )]
104
104
105
105
can_slide = temperature > poa_irradiance / m
106
106
slide_amt = sliding_coefficient * sind (surface_tilt ) * \
@@ -109,8 +109,7 @@ def snow_coverage_nrel(snowfall, poa_irradiance, temperature, surface_tilt,
109
109
uncovered = pd .Series (0.0 , index = poa_irradiance .index )
110
110
uncovered [can_slide ] = slide_amt [can_slide ]
111
111
112
- windows = [(ev , ne ) for (ev , ne ) in
113
- zip (snow_events .index [:- 1 ], snow_events .index [1 :])]
112
+ windows = list (zip (snow_events .index [:- 1 ], snow_events .index [1 :]))
114
113
# add last time window
115
114
windows .append ((snow_events .index [- 1 ], snowfall .index [- 1 ]))
116
115
@@ -125,7 +124,7 @@ def snow_coverage_nrel(snowfall, poa_irradiance, temperature, surface_tilt,
125
124
return snow_coverage
126
125
127
126
128
- def snow_loss_factor (snow_coverage , num_strings ):
127
+ def snow_nrel_dc_loss (snow_coverage , num_strings ):
129
128
'''
130
129
Calculates the DC loss due to snow coverage. Assumes that if a string is
131
130
partially covered by snow, it produces 0W.
0 commit comments