@@ -857,7 +857,7 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
857857
858858 Returns
859859 --------
860- numeric, OrderedDict , or DataFrame
860+ numeric, dict , or DataFrame
861861 Return type controlled by ``return_components`` argument.
862862 If `False`, ``sky_diffuse`` is returned.
863863 If `True`, ``diffuse_components`` is returned.
@@ -866,13 +866,11 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
866866 The sky diffuse component of the solar radiation on a tilted
867867 surface. [Wm⁻²]
868868
869- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
869+ diffuse_components : dict (array input) or DataFrame (Series input)
870870 Keys/columns are:
871871 * poa_sky_diffuse: Total sky diffuse
872872 * poa_isotropic
873873 * poa_circumsolar
874- * poa_horizon (always zero, not accounted for by the
875- Hay-Davies model)
876874
877875 Notes
878876 ------
@@ -930,14 +928,11 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
930928 sky_diffuse = poa_isotropic + poa_circumsolar
931929
932930 if return_components :
933- diffuse_components = OrderedDict ()
934- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
935-
936- # Calculate the individual components
937- diffuse_components ['poa_isotropic' ] = poa_isotropic
938- diffuse_components ['poa_circumsolar' ] = poa_circumsolar
939- diffuse_components ['poa_horizon' ] = np .where (
940- np .isnan (diffuse_components ['poa_isotropic' ]), np .nan , 0. )
931+ diffuse_components = {
932+ 'poa_sky_diffuse' : sky_diffuse ,
933+ 'poa_isotropic' : poa_isotropic ,
934+ 'poa_circumsolar' : poa_circumsolar
935+ }
941936
942937 if isinstance (sky_diffuse , pd .Series ):
943938 diffuse_components = pd .DataFrame (diffuse_components )
@@ -1179,7 +1174,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11791174
11801175 Returns
11811176 --------
1182- numeric, OrderedDict , or DataFrame
1177+ numeric, dict , or DataFrame
11831178 Return type controlled by `return_components` argument.
11841179 If ``return_components=False``, `sky_diffuse` is returned.
11851180 If ``return_components=True``, `diffuse_components` is returned.
@@ -1188,7 +1183,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11881183 The sky diffuse component of the solar radiation on a tilted
11891184 surface.
11901185
1191- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
1186+ diffuse_components : dict (array input) or DataFrame (Series input)
11921187 Keys/columns are:
11931188 * poa_sky_diffuse: Total sky diffuse
11941189 * poa_isotropic
@@ -1275,13 +1270,12 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
12751270 sky_diffuse = np .where (np .isnan (airmass ), 0 , sky_diffuse )
12761271
12771272 if return_components :
1278- diffuse_components = OrderedDict ()
1279- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
1280-
1281- # Calculate the different components
1282- diffuse_components ['poa_isotropic' ] = dhi * term1
1283- diffuse_components ['poa_circumsolar' ] = dhi * term2
1284- diffuse_components ['poa_horizon' ] = dhi * term3
1273+ diffuse_components = {
1274+ 'poa_sky_diffuse' : sky_diffuse ,
1275+ 'poa_isotropic' : dhi * term1 ,
1276+ 'poa_circumsolar' : dhi * term2 ,
1277+ 'poa_horizon' : dhi * term3
1278+ }
12851279
12861280 # Set values of components to 0 when sky_diffuse is 0
12871281 mask = sky_diffuse == 0
@@ -1421,7 +1415,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
14211415
14221416 Returns
14231417 --------
1424- numeric, OrderedDict , or DataFrame
1418+ numeric, dict , or DataFrame
14251419 Return type controlled by `return_components` argument.
14261420 If ``return_components=False``, `sky_diffuse` is returned.
14271421 If ``return_components=True``, `diffuse_components` is returned.
@@ -1430,7 +1424,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
14301424 The sky diffuse component of the solar radiation on a tilted
14311425 surface.
14321426
1433- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
1427+ diffuse_components : dict (array input) or DataFrame (Series input)
14341428 Keys/columns are:
14351429 * poa_sky_diffuse: Total sky diffuse
14361430 * poa_isotropic
@@ -1495,13 +1489,12 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
14951489 sky_diffuse = np .maximum (dhi * (term1 + term2 + term3 ), 0 )
14961490
14971491 if return_components :
1498- diffuse_components = OrderedDict ()
1499- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
1500-
1501- # Calculate the different components
1502- diffuse_components ['poa_isotropic' ] = dhi * term1
1503- diffuse_components ['poa_circumsolar' ] = dhi * term2
1504- diffuse_components ['poa_horizon' ] = dhi * term3
1492+ diffuse_components = {
1493+ 'poa_sky_diffuse' : sky_diffuse ,
1494+ 'poa_isotropic' : dhi * term1 ,
1495+ 'poa_circumsolar' : dhi * term2 ,
1496+ 'poa_horizon' : dhi * term3
1497+ }
15051498
15061499 if isinstance (sky_diffuse , pd .Series ):
15071500 diffuse_components = pd .DataFrame (diffuse_components )
@@ -3192,8 +3185,8 @@ def _liujordan(zenith, transmittance, airmass, dni_extra=1367.0):
31923185 transmittance: float
31933186 Atmospheric transmittance between 0 and 1.
31943187
3195- pressure: float, default 101325.0
3196- Air pressure
3188+ airmass: numeric
3189+ Optical air mass. [unitless]
31973190
31983191 dni_extra: float, default 1367.0
31993192 Direct irradiance incident at the top of the atmosphere.
0 commit comments