@@ -24,12 +24,13 @@ def test_snow_nrel_hourly():
2424 freq = '1h' )
2525 poa_irradiance = pd .Series ([400 , 200 , 100 , 1234 , 134 , 982 , 100 , 100 ],
2626 index = dt )
27- temperature = pd .Series ([10 , 2 , 10 , 1234 , 34 , 982 , 10 , 10 ], index = dt )
28- slide_amt = sliding_coefficient * sind (surface_tilt )
27+ temp_air = pd .Series ([10 , 2 , 10 , 1234 , 34 , 982 , 10 , 10 ], index = dt )
2928 snowfall_data = pd .Series ([1 , .5 , .6 , .4 , .23 , - 5 , .1 , .1 ], index = dt )
3029 snow_coverage = snowcoverage .snow_nrel (
31- snowfall_data , poa_irradiance , temperature , surface_tilt ,
30+ snowfall_data , poa_irradiance , temp_air , surface_tilt ,
3231 threshold_snowfall = 0.6 )
32+
33+ slide_amt = sliding_coefficient * sind (surface_tilt )
3334 covered = np .append (np .array ([0. , 0. ]),
3435 1.0 - slide_amt * np .array ([0 , 1 , 2 , 3 , 4 , 5 ]))
3536 expected = pd .Series (covered , index = dt )
@@ -41,16 +42,20 @@ def test_snow_nrel_subhourly():
4142 sliding_coefficient = 0.197
4243 dt = pd .date_range (start = "2019-1-1 11:00:00" , end = "2019-1-1 14:00:00" ,
4344 freq = '15T' )
44- poa_irradiance = pd .Series ([400 , 200 , 100 , 1234 , 134 , 982 , 100 , 100 ],
45+ poa_irradiance = pd .Series ([400 , 200 , 100 , 1234 , 134 , 982 , 100 , 100 , 100 ,
46+ 100 , 1000 , 1000 , 0 ],
4547 index = dt )
46- temperature = pd .Series ([10 , 2 , 10 , 1234 , 34 , 982 , 10 , 10 ], index = dt )
47- slide_amt = sliding_coefficient * sind (surface_tilt )
48- snowfall_data = pd .Series ([1 , .5 , .6 , .4 , .23 , - 5 , .1 , .1 ], index = dt )
48+ temp_air = pd .Series ([10 , 2 , 10 , 1234 , 34 , 982 , 10 , 10 , 10 , 10 , 10 , 10 ,
49+ 10 ], index = dt )
50+ snowfall_data = pd .Series ([1 , .5 , .6 , .4 , .23 , - 5 , .1 , .1 , 0. , 1. , 0. , 0. ,
51+ 0. ], index = dt )
4952 snow_coverage = snowcoverage .snow_nrel (
50- snowfall_data , poa_irradiance , temperature , surface_tilt ,
51- threshold_snowfall = 0.6 )
52- covered = np .append (np .array ([0. , 0. ]),
53- 1.0 - slide_amt * np .array ([0 , 1 , 2 , 3 , 4 , 5 ]))
53+ snowfall_data , poa_irradiance , temp_air , surface_tilt ,
54+ threshold_snowfall = 0.5 )
55+ slide_amt = sliding_coefficient * sind (surface_tilt ) * 0.25
56+ covered = np .append (np .array ([0. , 1. , 1. ]),
57+ 1.0 - slide_amt * np .array ([1 , 2 , 3 , 4 , 5 , 6 ]))
58+ covered = np .append (covered , np .array ([1. , 1. , 1. , 1. - slide_amt ]))
5459 expected = pd .Series (covered , index = dt )
5560 assert_series_equal (snow_coverage , expected )
5661
0 commit comments