25
25
@requires_scipy
26
26
def test_ineichen_required ():
27
27
# the clearsky function should call lookup_linke_turbidity by default
28
- expected = pd .DataFrame (np .array ([[0. ,0. ,0. ],
29
- [0. ,0. ,0. ],
30
- [51.0100314 ,259.73341927 ,82.76689082 ],
31
- [104.99512329 ,832.22000002 ,682.43280974 ],
32
- [121.97931179 ,901.31646645 ,1008.00975362 ],
33
- [112.5726345 ,867.73434086 ,824.48415382 ],
34
- [76.61228483 ,587.82419004 ,253.67624301 ],
35
- [0. ,0. ,0. ],
36
- [0. ,0. ,0. ]]),
28
+ expected = pd .DataFrame (
29
+ np .array ([[ 0. , 0. , 0. ],
30
+ [ 0. , 0. , 0. ],
31
+ [ 51.47811191 , 265.33462162 , 84.48262202 ],
32
+ [ 105.008507 , 832.29100407 , 682.67761951 ],
33
+ [ 121.97988054 , 901.31821834 , 1008.02102657 ],
34
+ [ 112.57957512 , 867.76297247 , 824.61702926 ],
35
+ [ 76.69672675 , 588.8462898 , 254.5808329 ],
36
+ [ 0. , 0. , 0. ],
37
+ [ 0. , 0. , 0. ]]),
37
38
columns = ['dhi' , 'dni' , 'ghi' ],
38
39
index = times_localized )
39
40
out = clearsky .ineichen (times_localized , tus .latitude , tus .longitude )
40
41
assert_frame_equal (expected , out )
41
42
42
43
43
44
def test_ineichen_supply_linke ():
44
- expected = pd .DataFrame (np .array ([[0. ,0. ,0. ],
45
- [0. ,0. ,0. ],
46
- [39.81862097 ,316.23284759 ,78.48350328 ],
47
- [95.12705301 ,876.43232906 ,703.24156169 ],
48
- [118.45796469 ,939.81499487 ,1042.33401282 ],
49
- [105.35769022 ,909.0884868 ,851.19721202 ],
50
- [61.83556162 ,646.45362207 ,256.55983299 ],
51
- [0. ,0. ,0. ],
52
- [0. ,0. ,0. ]]),
45
+ expected = pd .DataFrame (
46
+ np .array ([[ 0. , 0. , 0. ],
47
+ [ 0. , 0. , 0. ],
48
+ [ 40.19492186 , 322.1949484 , 80.27218726 ],
49
+ [ 95.14479487 , 876.49778895 , 703.49655602 ],
50
+ [ 118.45876694 , 939.816594 , 1042.34575261 ],
51
+ [ 105.36721216 , 909.11474576 , 851.33560265 ],
52
+ [ 61.91851386 , 647.43752674 , 257.50239737 ],
53
+ [ 0. , 0. , 0. ],
54
+ [ 0. , 0. , 0. ]]),
53
55
columns = ['dhi' , 'dni' , 'ghi' ],
54
56
index = times_localized )
55
57
out = clearsky .ineichen (times_localized , tus .latitude , tus .longitude ,
@@ -65,15 +67,16 @@ def test_ineichen_solpos():
65
67
66
68
67
69
def test_ineichen_airmass ():
68
- expected = pd .DataFrame (np .array ([[0. ,0. ,0. ],
69
- [0. ,0. ,0. ],
70
- [53.52826665 ,250.64463008 ,84.17386592 ],
71
- [101.32775752 ,842.86030421 ,686.14824255 ],
72
- [117.7568185 ,909.70199089 ,1012.03056908 ],
73
- [108.61662929 ,877.27820363 ,828.35817853 ],
74
- [75.15682967 ,601.03375193 ,256.19976209 ],
75
- [0. ,0. ,0. ],
76
- [0. ,0. ,0. ]]),
70
+ expected = pd .DataFrame (
71
+ np .array ([[ 0. , 0. , 0. ],
72
+ [ 0. , 0. , 0. ],
73
+ [ 53.90422388 , 257.01655613 , 85.87406435 ],
74
+ [ 101.34055688 , 842.92925705 , 686.39337307 ],
75
+ [ 117.7573735 , 909.70367947 , 1012.04184961 ],
76
+ [ 108.6233401 , 877.30589626 , 828.49118038 ],
77
+ [ 75.23108133 , 602.06895546 , 257.10961202 ],
78
+ [ 0. , 0. , 0. ],
79
+ [ 0. , 0. , 0. ]]),
77
80
columns = ['dhi' , 'dni' , 'ghi' ],
78
81
index = times_localized )
79
82
out = clearsky .ineichen (times_localized , tus .latitude , tus .longitude ,
@@ -82,6 +85,7 @@ def test_ineichen_airmass():
82
85
assert_frame_equal (expected , out )
83
86
84
87
88
+ @requires_scipy
85
89
def test_lookup_linke_turbidity ():
86
90
times = pd .date_range (start = '2014-06-24' , end = '2014-06-25' ,
87
91
freq = '12h' , tz = tus .tz )
@@ -93,6 +97,7 @@ def test_lookup_linke_turbidity():
93
97
assert_series_equal (expected , out )
94
98
95
99
100
+ @requires_scipy
96
101
def test_lookup_linke_turbidity_nointerp ():
97
102
times = pd .date_range (start = '2014-06-24' , end = '2014-06-25' ,
98
103
freq = '12h' , tz = tus .tz )
@@ -103,6 +108,7 @@ def test_lookup_linke_turbidity_nointerp():
103
108
assert_series_equal (expected , out )
104
109
105
110
111
+ @requires_scipy
106
112
def test_lookup_linke_turbidity_months ():
107
113
times = pd .date_range (start = '2014-04-01' , end = '2014-07-01' ,
108
114
freq = '1M' , tz = tus .tz )
@@ -113,6 +119,7 @@ def test_lookup_linke_turbidity_months():
113
119
assert_series_equal (expected , out )
114
120
115
121
122
+ @requires_scipy
116
123
def test_lookup_linke_turbidity_nointerp_months ():
117
124
times = pd .date_range (start = '2014-04-10' , end = '2014-07-10' ,
118
125
freq = '1M' , tz = tus .tz )
0 commit comments