@@ -787,7 +787,7 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
787787
788788 Returns
789789 --------
790- numeric, OrderedDict , or DataFrame
790+ numeric, dict , or DataFrame
791791 Return type controlled by ``return_components`` argument.
792792 If `False`, ``sky_diffuse`` is returned.
793793 If `True`, ``diffuse_components`` is returned.
@@ -796,13 +796,11 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
796796 The sky diffuse component of the solar radiation on a tilted
797797 surface. [Wm⁻²]
798798
799- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
799+ diffuse_components : dict (array input) or DataFrame (Series input)
800800 Keys/columns are:
801801 * poa_sky_diffuse: Total sky diffuse
802802 * poa_isotropic
803803 * poa_circumsolar
804- * poa_horizon (always zero, not accounted for by the
805- Hay-Davies model)
806804
807805 Notes
808806 ------
@@ -860,14 +858,11 @@ def haydavies(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
860858 sky_diffuse = poa_isotropic + poa_circumsolar
861859
862860 if return_components :
863- diffuse_components = OrderedDict ()
864- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
865-
866- # Calculate the individual components
867- diffuse_components ['poa_isotropic' ] = poa_isotropic
868- diffuse_components ['poa_circumsolar' ] = poa_circumsolar
869- diffuse_components ['poa_horizon' ] = np .where (
870- np .isnan (diffuse_components ['poa_isotropic' ]), np .nan , 0. )
861+ diffuse_components = {
862+ 'poa_sky_diffuse' : sky_diffuse ,
863+ 'poa_isotropic' : poa_isotropic ,
864+ 'poa_circumsolar' : poa_circumsolar
865+ }
871866
872867 if isinstance (sky_diffuse , pd .Series ):
873868 diffuse_components = pd .DataFrame (diffuse_components )
@@ -1115,7 +1110,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11151110
11161111 Returns
11171112 --------
1118- numeric, OrderedDict , or DataFrame
1113+ numeric, dict , or DataFrame
11191114 Return type controlled by `return_components` argument.
11201115 If ``return_components=False``, `sky_diffuse` is returned.
11211116 If ``return_components=True``, `diffuse_components` is returned.
@@ -1124,7 +1119,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11241119 The sky diffuse component of the solar radiation on a tilted
11251120 surface.
11261121
1127- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
1122+ diffuse_components : dict (array input) or DataFrame (Series input)
11281123 Keys/columns are:
11291124 * poa_sky_diffuse: Total sky diffuse
11301125 * poa_isotropic
@@ -1211,13 +1206,12 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
12111206 sky_diffuse = np .where (np .isnan (airmass ), 0 , sky_diffuse )
12121207
12131208 if return_components :
1214- diffuse_components = OrderedDict ()
1215- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
1216-
1217- # Calculate the different components
1218- diffuse_components ['poa_isotropic' ] = dhi * term1
1219- diffuse_components ['poa_circumsolar' ] = dhi * term2
1220- diffuse_components ['poa_horizon' ] = dhi * term3
1209+ diffuse_components = {
1210+ 'poa_sky_diffuse' : sky_diffuse ,
1211+ 'poa_isotropic' : dhi * term1 ,
1212+ 'poa_circumsolar' : dhi * term2 ,
1213+ 'poa_horizon' : dhi * term3
1214+ }
12211215
12221216 # Set values of components to 0 when sky_diffuse is 0
12231217 mask = sky_diffuse == 0
@@ -1357,7 +1351,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13571351
13581352 Returns
13591353 --------
1360- numeric, OrderedDict , or DataFrame
1354+ numeric, dict , or DataFrame
13611355 Return type controlled by `return_components` argument.
13621356 If ``return_components=False``, `sky_diffuse` is returned.
13631357 If ``return_components=True``, `diffuse_components` is returned.
@@ -1366,7 +1360,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13661360 The sky diffuse component of the solar radiation on a tilted
13671361 surface.
13681362
1369- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
1363+ diffuse_components : dict (array input) or DataFrame (Series input)
13701364 Keys/columns are:
13711365 * poa_sky_diffuse: Total sky diffuse
13721366 * poa_isotropic
@@ -1431,13 +1425,12 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
14311425 sky_diffuse = np .maximum (dhi * (term1 + term2 + term3 ), 0 )
14321426
14331427 if return_components :
1434- diffuse_components = OrderedDict ()
1435- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
1436-
1437- # Calculate the different components
1438- diffuse_components ['poa_isotropic' ] = dhi * term1
1439- diffuse_components ['poa_circumsolar' ] = dhi * term2
1440- diffuse_components ['poa_horizon' ] = dhi * term3
1428+ diffuse_components = {
1429+ 'poa_sky_diffuse' : sky_diffuse ,
1430+ 'poa_isotropic' : dhi * term1 ,
1431+ 'poa_circumsolar' : dhi * term2 ,
1432+ 'poa_horizon' : dhi * term3
1433+ }
14411434
14421435 if isinstance (sky_diffuse , pd .Series ):
14431436 diffuse_components = pd .DataFrame (diffuse_components )
@@ -3128,8 +3121,8 @@ def _liujordan(zenith, transmittance, airmass, dni_extra=1367.0):
31283121 transmittance: float
31293122 Atmospheric transmittance between 0 and 1.
31303123
3131- pressure: float, default 101325.0
3132- Air pressure
3124+ airmass: numeric
3125+ Optical air mass. [unitless]
31333126
31343127 dni_extra: float, default 1367.0
31353128 Direct irradiance incident at the top of the atmosphere.
0 commit comments