102
102
columns = {'dni' : 'dni_boland' , 'dhi' : 'dhi_boland' })
103
103
104
104
# %%
105
- # Combine everything together.
105
+ # Comparison Plots
106
+ # ----------------
107
+ # In the plots below we compare the four decomposition models to the TMY3 file
108
+ # for Greensboro, North Carolina. We also compare the clearness index, kt, with
109
+ # GHI normalized by a reference irradiance, E0 = 1000 [W/m^2], to highlight
110
+ # spikes caused when cosine of zenith approaches zero, particularly at sunset.
111
+ #
112
+ # First we combine the dataframes for the decomposition models and the TMY3
113
+ # file together to make plotting easier.
106
114
107
115
dni_renames = {
108
116
'DNI' : 'TMY3' , 'dni_disc' : 'DISC' , 'dni_dirint' : 'DIRINT' ,
121
129
ghi_kt = pd .concat ([greensboro .GHI / 1000.0 , out_erbs .kt ], axis = 1 )
122
130
123
131
# %%
132
+ # Winter
133
+ # ++++++
124
134
# Finally, let's plot them for a few winter days and compare
125
135
126
136
JAN6AM , JAN6PM = '1990-01-04 00:00:00-05:00' , '1990-01-07 23:59:59-05:00'
138
148
f .tight_layout ()
139
149
140
150
# %%
151
+ # Spring
152
+ # ++++++
141
153
# And a few spring days ...
142
154
143
155
APR6AM , APR6PM = '1990-04-04 00:00:00-05:00' , '1990-04-07 23:59:59-05:00'
155
167
f .tight_layout ()
156
168
157
169
# %%
170
+ # Summer
171
+ # ++++++
158
172
# And few summer days to finish off the seasons.
159
173
160
174
JUL6AM , JUL6PM = '1990-07-04 00:00:00-05:00' , '1990-07-07 23:59:59-05:00'
174
188
# %%
175
189
# Conclusion
176
190
# ----------
177
- # This example has compared several decomposition models to a TMY3 file for
178
- # Greensboro, North Carolina. However, DNI and DHI in the TMY3 file are
179
- # themselves the output of a model (either METSTAT or SUNY), and so differences
180
- # between *e.g.* DISC output and TMY3 shouldn't be regarded as an error in the
181
- # DISC model. Therefore, it's not a reasonable expectation to assume that the
182
- # four models should reproduce the TMY3 values. We refer those interested to
183
- # the `TMY3`_ and `NSRDB`_ user manuals.
191
+ # This example compares several decomposition models to a TMY3 file for
192
+ # Greensboro, North Carolina. However, DNI and DHI in TMY3 files are themselves
193
+ # the output of models (either METSTAT or SUNY), and so differences between
194
+ # *e.g.* DISC output and the TMY3 file shouldn't be regarded as errors, and
195
+ # it's not a reasonable expectation to assume that the four models should
196
+ # reproduce the TMY3 values. We refer those interested to the `TMY3`_ and
197
+ # `NSRDB`_ user manuals.
184
198
#
185
- # The Erbs and Boland are correlations with only kt, which is derived from the
186
- # horizontal component of the extra-terrestrial irradiance. Therefore at low
187
- # sun elevation (zenith ~ 90-deg), especially near sunset, this causes kt to
188
- # explode as the denominator approaches zero. This is controlled in pvlib by
189
- # setting ``min_cos_zenith`` and ``max_clearness_index`` which each have
190
- # reasonable defaults, but there are still concerning spikes at sunset for Jan.
191
- # 5th & 7th, April 4th, 5th, & 7th, and July 6th & 7th. The DISC & DIRINT
192
- # methods differ from Erbs and Boland by including airmass, which seems to
193
- # reduce DNI spikes over 1000[W/m^2], but still have errors at other times.
199
+ # The Erbs and Boland models are correlations with only kt, which is derived
200
+ # from the horizontal component of the extra-terrestrial irradiance. At low sun
201
+ # elevation (zenith near 90 degrees), especially near sunset, kt can explode
202
+ # because the denominator (extra-terrestrial irradiance) approaches zero. In
203
+ # pvlib this behavior is moderated by ``min_cos_zenith`` and
204
+ # ``max_clearness_index`` which each have reasonable defaults. Even so, near
205
+ # sunset there are still spikes in kt and DNI from Erbs and Boland for Jan. 5th
206
+ # & 7th, April 4th, 5th, & 7th, and July 6th & 7th.
194
207
#
195
- # Another difference is that DISC & DIRINT return DNI whereas Erbs & Boland
196
- # calculate the diffuse fraction which is then used to derive DNI from GHI and
197
- # the solar zenith, which exacerbates errors at low sun elevation due to the
198
- # relation:
199
- # :math:`DNI = GHI \frac{1 - \mathit{DF}}{\cos \left(\mathit{zenith} \right)}`.
208
+ # By contrast, the DISC and DIRINT methods estimate DNI first by means of
209
+ # correlations, which include additional variables such as airmass. These methods
210
+ # seem to reduce DNI spikes over 1000 [W/m^2].
200
211
#
201
212
# .. _TMY3: https://www.nrel.gov/docs/fy08osti/43156.pdf
202
213
# .. _NSRDB: https://www.nrel.gov/docs/fy12osti/54824.pdf
0 commit comments