@@ -814,7 +814,7 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
814814
815815 Returns
816816 --------
817- numeric, OrderedDict , or DataFrame
817+ numeric, dict , or DataFrame
818818 Return type controlled by ``return_components`` argument.
819819 If `False`, ``sky_diffuse`` is returned.
820820 If `True`, ``diffuse_components`` is returned.
@@ -823,13 +823,11 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
823823 The sky diffuse component of the solar radiation on a tilted
824824 surface. [Wm⁻²]
825825
826- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
826+ diffuse_components : dict (array input) or DataFrame (Series input)
827827 Keys/columns are:
828828 * poa_sky_diffuse: Total sky diffuse
829829 * poa_isotropic
830830 * poa_circumsolar
831- * poa_horizon (always zero, not accounted for by the
832- Hay-Davies model)
833831
834832 Notes
835833 ------
@@ -887,14 +885,11 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
887885 sky_diffuse = poa_isotropic + poa_circumsolar
888886
889887 if return_components :
890- diffuse_components = OrderedDict ()
891- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
892-
893- # Calculate the individual components
894- diffuse_components ['poa_isotropic' ] = poa_isotropic
895- diffuse_components ['poa_circumsolar' ] = poa_circumsolar
896- diffuse_components ['poa_horizon' ] = np .where (
897- np .isnan (diffuse_components ['poa_isotropic' ]), np .nan , 0. )
888+ diffuse_components = {
889+ 'poa_sky_diffuse' : sky_diffuse ,
890+ 'poa_isotropic' : poa_isotropic ,
891+ 'poa_circumsolar' : poa_circumsolar
892+ }
898893
899894 if isinstance (sky_diffuse , pd .Series ):
900895 diffuse_components = pd .DataFrame (diffuse_components )
@@ -1136,7 +1131,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11361131
11371132 Returns
11381133 --------
1139- numeric, OrderedDict , or DataFrame
1134+ numeric, dict , or DataFrame
11401135 Return type controlled by `return_components` argument.
11411136 If ``return_components=False``, `sky_diffuse` is returned.
11421137 If ``return_components=True``, `diffuse_components` is returned.
@@ -1145,7 +1140,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11451140 The sky diffuse component of the solar radiation on a tilted
11461141 surface.
11471142
1148- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
1143+ diffuse_components : dict (array input) or DataFrame (Series input)
11491144 Keys/columns are:
11501145 * poa_sky_diffuse: Total sky diffuse
11511146 * poa_isotropic
@@ -1232,13 +1227,12 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
12321227 sky_diffuse = np .where (np .isnan (airmass ), 0 , sky_diffuse )
12331228
12341229 if return_components :
1235- diffuse_components = OrderedDict ()
1236- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
1237-
1238- # Calculate the different components
1239- diffuse_components ['poa_isotropic' ] = dhi * term1
1240- diffuse_components ['poa_circumsolar' ] = dhi * term2
1241- diffuse_components ['poa_horizon' ] = dhi * term3
1230+ diffuse_components = {
1231+ 'poa_sky_diffuse' : sky_diffuse ,
1232+ 'poa_isotropic' : dhi * term1 ,
1233+ 'poa_circumsolar' : dhi * term2 ,
1234+ 'poa_horizon' : dhi * term3
1235+ }
12421236
12431237 # Set values of components to 0 when sky_diffuse is 0
12441238 mask = sky_diffuse == 0
@@ -1378,7 +1372,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13781372
13791373 Returns
13801374 --------
1381- numeric, OrderedDict , or DataFrame
1375+ numeric, dict , or DataFrame
13821376 Return type controlled by `return_components` argument.
13831377 If ``return_components=False``, `sky_diffuse` is returned.
13841378 If ``return_components=True``, `diffuse_components` is returned.
@@ -1387,7 +1381,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13871381 The sky diffuse component of the solar radiation on a tilted
13881382 surface.
13891383
1390- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
1384+ diffuse_components : dict (array input) or DataFrame (Series input)
13911385 Keys/columns are:
13921386 * poa_sky_diffuse: Total sky diffuse
13931387 * poa_isotropic
@@ -1452,13 +1446,12 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
14521446 sky_diffuse = np .maximum (dhi * (term1 + term2 + term3 ), 0 )
14531447
14541448 if return_components :
1455- diffuse_components = OrderedDict ()
1456- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
1457-
1458- # Calculate the different components
1459- diffuse_components ['poa_isotropic' ] = dhi * term1
1460- diffuse_components ['poa_circumsolar' ] = dhi * term2
1461- diffuse_components ['poa_horizon' ] = dhi * term3
1449+ diffuse_components = {
1450+ 'poa_sky_diffuse' : sky_diffuse ,
1451+ 'poa_isotropic' : dhi * term1 ,
1452+ 'poa_circumsolar' : dhi * term2 ,
1453+ 'poa_horizon' : dhi * term3
1454+ }
14621455
14631456 if isinstance (sky_diffuse , pd .Series ):
14641457 diffuse_components = pd .DataFrame (diffuse_components )
@@ -3149,8 +3142,8 @@ def _liujordan(zenith, transmittance, airmass, dni_extra=1367.0):
31493142 transmittance: float
31503143 Atmospheric transmittance between 0 and 1.
31513144
3152- pressure: float, default 101325.0
3153- Air pressure
3145+ airmass: numeric
3146+ Optical air mass. [unitless]
31543147
31553148 dni_extra: float, default 1367.0
31563149 Direct irradiance incident at the top of the atmosphere.
0 commit comments