@@ -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 )
@@ -1145,7 +1140,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11451140
11461141 Returns
11471142 --------
1148- numeric, OrderedDict , or DataFrame
1143+ numeric, dict , or DataFrame
11491144 Return type controlled by `return_components` argument.
11501145 If ``return_components=False``, `sky_diffuse` is returned.
11511146 If ``return_components=True``, `diffuse_components` is returned.
@@ -1154,7 +1149,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
11541149 The sky diffuse component of the solar radiation on a tilted
11551150 surface.
11561151
1157- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
1152+ diffuse_components : dict (array input) or DataFrame (Series input)
11581153 Keys/columns are:
11591154 * poa_sky_diffuse: Total sky diffuse
11601155 * poa_isotropic
@@ -1241,13 +1236,12 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
12411236 sky_diffuse = np .where (np .isnan (airmass ), 0 , sky_diffuse )
12421237
12431238 if return_components :
1244- diffuse_components = OrderedDict ()
1245- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
1246-
1247- # Calculate the different components
1248- diffuse_components ['poa_isotropic' ] = dhi * term1
1249- diffuse_components ['poa_circumsolar' ] = dhi * term2
1250- diffuse_components ['poa_horizon' ] = dhi * term3
1239+ diffuse_components = {
1240+ 'poa_sky_diffuse' : sky_diffuse ,
1241+ 'poa_isotropic' : dhi * term1 ,
1242+ 'poa_circumsolar' : dhi * term2 ,
1243+ 'poa_horizon' : dhi * term3
1244+ }
12511245
12521246 # Set values of components to 0 when sky_diffuse is 0
12531247 mask = sky_diffuse == 0
@@ -1387,7 +1381,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13871381
13881382 Returns
13891383 --------
1390- numeric, OrderedDict , or DataFrame
1384+ numeric, dict , or DataFrame
13911385 Return type controlled by `return_components` argument.
13921386 If ``return_components=False``, `sky_diffuse` is returned.
13931387 If ``return_components=True``, `diffuse_components` is returned.
@@ -1396,7 +1390,7 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
13961390 The sky diffuse component of the solar radiation on a tilted
13971391 surface.
13981392
1399- diffuse_components : OrderedDict (array input) or DataFrame (Series input)
1393+ diffuse_components : dict (array input) or DataFrame (Series input)
14001394 Keys/columns are:
14011395 * poa_sky_diffuse: Total sky diffuse
14021396 * poa_isotropic
@@ -1461,13 +1455,12 @@ def perez_driesse(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
14611455 sky_diffuse = np .maximum (dhi * (term1 + term2 + term3 ), 0 )
14621456
14631457 if return_components :
1464- diffuse_components = OrderedDict ()
1465- diffuse_components ['poa_sky_diffuse' ] = sky_diffuse
1466-
1467- # Calculate the different components
1468- diffuse_components ['poa_isotropic' ] = dhi * term1
1469- diffuse_components ['poa_circumsolar' ] = dhi * term2
1470- diffuse_components ['poa_horizon' ] = dhi * term3
1458+ diffuse_components = {
1459+ 'poa_sky_diffuse' : sky_diffuse ,
1460+ 'poa_isotropic' : dhi * term1 ,
1461+ 'poa_circumsolar' : dhi * term2 ,
1462+ 'poa_horizon' : dhi * term3
1463+ }
14711464
14721465 if isinstance (sky_diffuse , pd .Series ):
14731466 diffuse_components = pd .DataFrame (diffuse_components )
@@ -3158,8 +3151,8 @@ def _liujordan(zenith, transmittance, airmass, dni_extra=1367.0):
31583151 transmittance: float
31593152 Atmospheric transmittance between 0 and 1.
31603153
3161- pressure: float, default 101325.0
3162- Air pressure
3154+ airmass: numeric
3155+ Optical air mass. [unitless]
31633156
31643157 dni_extra: float, default 1367.0
31653158 Direct irradiance incident at the top of the atmosphere.
0 commit comments