55"""
66
77import datetime
8- from collections import OrderedDict
98from functools import partial
109
1110import numpy as np
@@ -1958,7 +1957,7 @@ def disc(ghi, solar_zenith, datetime_or_doy, pressure=101325,
19581957
19591958 Returns
19601959 -------
1961- output : OrderedDict or DataFrame
1960+ output : dict or DataFrame
19621961 Contains the following keys:
19631962
19641963 * ``dni``: The modeled direct normal irradiance
@@ -2000,7 +1999,7 @@ def disc(ghi, solar_zenith, datetime_or_doy, pressure=101325,
20001999 bad_values = (solar_zenith > max_zenith ) | (ghi < 0 ) | (dni < 0 )
20012000 dni = np .where (bad_values , 0 , dni )
20022001
2003- output = OrderedDict ()
2002+ output = {}
20042003 output ['dni' ] = dni
20052004 output ['kt' ] = kt
20062005 output ['airmass' ] = am
@@ -2479,7 +2478,7 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
24792478
24802479 Returns
24812480 -------
2482- data : DataFrame
2481+ data : dict or DataFrame
24832482 Contains the following keys/columns:
24842483
24852484 * ``ghi``: the modeled global horizontal irradiance. [Wm⁻²]
@@ -2517,7 +2516,7 @@ def gti_dirint(poa_global, aoi, solar_zenith, solar_azimuth, times,
25172516 ghi_gte_90 , dni_gte_90 , dhi_gte_90 = np .nan , np .nan , np .nan
25182517
25192518 # put the AOI < 90 and AOI >= 90 conditions together
2520- output = OrderedDict ()
2519+ output = {}
25212520 output ['ghi' ] = ghi .where (aoi_lt_90 , ghi_gte_90 )
25222521 output ['dni' ] = dni .where (aoi_lt_90 , dni_gte_90 )
25232522 output ['dhi' ] = dhi .where (aoi_lt_90 , dhi_gte_90 )
@@ -2776,7 +2775,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87):
27762775
27772776 Returns
27782777 -------
2779- data : OrderedDict or DataFrame
2778+ data : dict or DataFrame
27802779 Contains the following keys/columns:
27812780
27822781 * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
@@ -2823,7 +2822,7 @@ def erbs(ghi, zenith, datetime_or_doy, min_cos_zenith=0.065, max_zenith=87):
28232822 # ensure that closure relationship remains valid
28242823 dhi = np .where (bad_values , ghi , dhi )
28252824
2826- data = OrderedDict ()
2825+ data = {}
28272826 data ['dni' ] = dni
28282827 data ['dhi' ] = dhi
28292828 data ['kt' ] = kt
@@ -2885,7 +2884,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None,
28852884
28862885 Returns
28872886 -------
2888- data : OrderedDict or DataFrame
2887+ data : dict or DataFrame
28892888 Contains the following keys/columns:
28902889
28912890 * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
@@ -2960,7 +2959,7 @@ def erbs_driesse(ghi, zenith, datetime_or_doy=None, dni_extra=None,
29602959 # ensure that closure relationship remains valid
29612960 dhi = np .where (bad_values , ghi , dhi )
29622961
2963- data = OrderedDict ()
2962+ data = {}
29642963 data ['dni' ] = dni
29652964 data ['dhi' ] = dhi
29662965 data ['kt' ] = kt
@@ -3012,7 +3011,7 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None,
30123011
30133012 Returns
30143013 -------
3015- data : OrderedDict or DataFrame
3014+ data : dict or DataFrame
30163015 Contains the following keys/columns:
30173016
30183017 * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
@@ -3058,7 +3057,7 @@ def orgill_hollands(ghi, zenith, datetime_or_doy, dni_extra=None,
30583057 # ensure that closure relationship remains valid
30593058 dhi = np .where (bad_values , ghi , dhi )
30603059
3061- data = OrderedDict ()
3060+ data = {}
30623061 data ['dni' ] = dni
30633062 data ['dhi' ] = dhi
30643063 data ['kt' ] = kt
@@ -3113,7 +3112,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613,
31133112
31143113 Returns
31153114 -------
3116- data : OrderedDict or DataFrame
3115+ data : dict or DataFrame
31173116 Contains the following keys/columns:
31183117
31193118 * ``dni``: the modeled direct normal irradiance. [Wm⁻²]
@@ -3169,7 +3168,7 @@ def boland(ghi, solar_zenith, datetime_or_doy, a_coeff=8.645, b_coeff=0.613,
31693168 # ensure that closure relationship remains valid
31703169 dhi = np .where (bad_values , ghi , dhi )
31713170
3172- data = OrderedDict ()
3171+ data = {}
31733172 data ['dni' ] = dni
31743173 data ['dhi' ] = dhi
31753174 data ['kt' ] = kt
@@ -3204,7 +3203,7 @@ def campbell_norman(zenith, transmittance, pressure=101325.0,
32043203
32053204 Returns
32063205 -------
3207- irradiance: DataFrame
3206+ irradiance: dict or DataFrame
32083207 Modeled direct normal irradiance, direct horizontal irradiance,
32093208 and global horizontal irradiance. [Wm⁻²]
32103209
@@ -3223,7 +3222,7 @@ def campbell_norman(zenith, transmittance, pressure=101325.0,
32233222 dhi = 0.3 * (1.0 - tau ** airmass ) * dni_extra * cos_zen
32243223 ghi = dhi + dni * cos_zen
32253224
3226- irrads = OrderedDict ()
3225+ irrads = {}
32273226 irrads ['ghi' ] = ghi
32283227 irrads ['dni' ] = dni
32293228 irrads ['dhi' ] = dhi
@@ -3902,7 +3901,7 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90):
39023901
39033902 Returns
39043903 -------
3905- data: OrderedDict or DataFrame
3904+ data: dict or DataFrame
39063905 Contains the following keys/columns:
39073906
39083907 * ``dni``: the modeled direct normal irradiance, see :term:`dni`.
@@ -3934,7 +3933,7 @@ def louche(ghi, solar_zenith, datetime_or_doy, max_zenith=90):
39343933 # ensure that closure relationship remains valid
39353934 dhi = np .where (bad_values , ghi , dhi )
39363935
3937- data = OrderedDict ()
3936+ data = {}
39383937 data ['dni' ] = dni
39393938 data ['dhi' ] = dhi
39403939 data ['kt' ] = Kt
0 commit comments