@@ -105,11 +105,11 @@ def extraradiation(datetime_or_doy, solar_constant=1366.1, method='spencer'):
105
105
106
106
if method == 'asce' :
107
107
pvl_logger .debug ('Calculating ET rad using ASCE method' )
108
- RoverR0sqrd = 1 + 0.033 * np .cos (B )
108
+ RoverR0sqrd = 1 + 0.033 * np .cos (B )
109
109
elif method == 'spencer' :
110
110
pvl_logger .debug ('Calculating ET rad using Spencer method' )
111
- RoverR0sqrd = (1.00011 + 0.034221 * np .cos (B ) + 0.00128 * np .sin (B ) +
112
- 0.000719 * np .cos (2 * B ) + 7.7e-05 * np .sin (2 * B ))
111
+ RoverR0sqrd = (1.00011 + 0.034221 * np .cos (B ) + 0.00128 * np .sin (B ) +
112
+ 0.000719 * np .cos (2 * B ) + 7.7e-05 * np .sin (2 * B ))
113
113
elif method == 'pyephem' :
114
114
pvl_logger .debug ('Calculating ET rad using pyephem method' )
115
115
times = input_to_datetimeindex (datetime_or_doy )
@@ -149,7 +149,7 @@ def _array_to_datetimeindex(doy_array):
149
149
-------
150
150
pd.DatetimeIndex
151
151
"""
152
- return pd .DatetimeIndex (map (_doy_to_timestamp , doy_array ))
152
+ return pd .DatetimeIndex (list ( map (_doy_to_timestamp , doy_array ) ))
153
153
154
154
155
155
def _doy_to_timestamp (doy , epoch = '2013-12-31' ):
@@ -433,7 +433,7 @@ def globalinplane(AOI, DNI, In_Plane_SkyDiffuse, GR):
433
433
* ``Ediff`` : Total in-plane diffuse irradiance (W/m^2)
434
434
'''
435
435
436
- Eb = DNI * np .cos (np .radians (AOI ))
436
+ Eb = DNI * np .cos (np .radians (AOI ))
437
437
E = Eb + In_Plane_SkyDiffuse + GR
438
438
Ediff = In_Plane_SkyDiffuse + GR
439
439
@@ -662,7 +662,7 @@ def klucher(surf_tilt, surf_az, DHI, GHI, sun_zen, sun_az):
662
662
F = 0
663
663
664
664
term1 = 0.5 * (1 + tools .cosd (surf_tilt ))
665
- term2 = 1 + F * (tools .sind (0.5 * surf_tilt ) ** 3 )
665
+ term2 = 1 + F * (tools .sind (0.5 * surf_tilt ) ** 3 )
666
666
term3 = 1 + F * (cos_tt ** 2 ) * (tools .sind (sun_zen ) ** 3 )
667
667
668
668
sky_diffuse = DHI * term1 * term2 * term3
@@ -871,7 +871,7 @@ def reindl(surf_tilt, surf_az, DHI, DNI, GHI, DNI_ET, sun_zen, sun_az):
871
871
# these are actually the () and [] sub-terms of the second term of eqn 8
872
872
term1 = 1 - AI
873
873
term2 = 0.5 * (1 + tools .cosd (surf_tilt ))
874
- term3 = 1 + np .sqrt (HB / GHI ) * (tools .sind (0.5 * surf_tilt ) ** 3 )
874
+ term3 = 1 + np .sqrt (HB / GHI ) * (tools .sind (0.5 * surf_tilt ) ** 3 )
875
875
876
876
sky_diffuse = DHI * (AI * Rb + term1 * term2 * term3 )
877
877
sky_diffuse [sky_diffuse < 0 ] = 0
@@ -1048,7 +1048,7 @@ def perez(surf_tilt, surf_az, DHI, DNI, DNI_ET, sun_zen, sun_az, AM,
1048
1048
z = np .radians (sun_zen ) # convert to radians
1049
1049
1050
1050
# epsilon is the sky's "clearness"
1051
- eps = ((DHI + DNI )/ DHI + kappa * (z ** 3 )) / (1 + kappa * (z ** 3 ))
1051
+ eps = ((DHI + DNI ) / DHI + kappa * (z ** 3 )) / (1 + kappa * (z ** 3 ))
1052
1052
1053
1053
# Perez et al define clearness bins according to the following rules.
1054
1054
# 1 = overcast ... 8 = clear
@@ -1094,7 +1094,7 @@ def perez(surf_tilt, surf_az, DHI, DNI, DNI_ET, sun_zen, sun_az, AM,
1094
1094
F1 [F1 < 0 ] = 0
1095
1095
F1 = F1 .astype (float )
1096
1096
1097
- F2 = F2c [ebin , 0 ] + F2c [ebin , 1 ]* delta + F2c [ebin , 2 ] * z
1097
+ F2 = F2c [ebin , 0 ] + F2c [ebin , 1 ] * delta + F2c [ebin , 2 ] * z
1098
1098
F2 [F2 < 0 ] = 0
1099
1099
F2 = F2 .astype (float )
1100
1100
@@ -1108,7 +1108,7 @@ def perez(surf_tilt, surf_az, DHI, DNI, DNI_ET, sun_zen, sun_az, AM,
1108
1108
1109
1109
term1 = 0.5 * (1 - F1 ) * (1 + tools .cosd (surf_tilt ))
1110
1110
term2 = F1 * A [ebin .index ] / B [ebin .index ]
1111
- term3 = F2 * tools .sind (surf_tilt )
1111
+ term3 = F2 * tools .sind (surf_tilt )
1112
1112
1113
1113
sky_diffuse = DHI [ebin .index ] * (term1 + term2 + term3 )
1114
1114
sky_diffuse [sky_diffuse < 0 ] = 0
0 commit comments