6
6
from __future__ import division
7
7
8
8
import numpy as np
9
+ from warnings import warn
9
10
10
11
APPARENT_ZENITH_MODELS = ('simple' , 'kasten1966' , 'kastenyoung1989' ,
11
12
'gueymard1993' , 'pickering2002' )
@@ -339,7 +340,7 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
339
340
.. math::
340
341
341
342
M = c_1 + c_2*AMa + c_3*Pwat + c_4*AMa^.5
342
- + c_5*Pwat^.5 + c_6*AMa/Pwat
343
+ + c_5*Pwat^.5 + c_6*AMa/Pwat^.5
343
344
344
345
Default coefficients are determined for several cell types with
345
346
known quantum efficiency curves, by using the Simple Model of the
@@ -348,7 +349,7 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
348
349
Pwat where:
349
350
350
351
* 0.5 cm <= Pwat <= 5 cm
351
- * 0.8 <= AMa <= 4.75 (Pressure of 800 mbar and 1.01 <= AM <= 6)
352
+ * 1.0 <= AMa <= 5.0
352
353
* Spectral range is limited to that of CMP11 (280 nm to 2800 nm)
353
354
* spectrum simulated on a plane normal to the sun
354
355
* All other parameters fixed at G173 standard
@@ -358,14 +359,14 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
358
359
applied to fit Eq. 1 to determine the coefficients for each module.
359
360
360
361
Based on the PVLIB Matlab function ``pvl_FSspeccorr`` by Mitchell
361
- Lee and Alex Panchula, at First Solar, 2015 .
362
+ Lee and Alex Panchula, at First Solar, 2016 [2]_ .
362
363
363
364
Parameters
364
365
----------
365
366
pw : array-like
366
367
atmospheric precipitable water (cm).
367
368
368
- airmass_absolute :
369
+ airmass_absolute : array-like
369
370
absolute (pressure corrected) airmass.
370
371
371
372
module_type : None or string
@@ -380,7 +381,7 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
380
381
381
382
The module used to calculate the spectral correction
382
383
coefficients corresponds to the Mult-crystalline silicon
383
- Manufacturer 2 Model C from [2 ]_.
384
+ Manufacturer 2 Model C from [3 ]_.
384
385
385
386
coefficients : array-like
386
387
allows for entry of user defined spectral correction
@@ -406,20 +407,55 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
406
407
.. [1] Gueymard, Christian. SMARTS2: a simple model of the atmospheric
407
408
radiative transfer of sunshine: algorithms and performance
408
409
assessment. Cocoa, FL: Florida Solar Energy Center, 1995.
409
-
410
- .. [2] Marion, William F., et al. User's Manual for Data for Validating
410
+ .. [2] Lee, Mitchell, and Panchula, Alex. "Spectral Correction for
411
+ Photovoltaic Module Performance Based on Air Mass and Precipitable
412
+ Water." IEEE Photovoltaic Specialists Conference, Portland, 2016
413
+ .. [3] Marion, William F., et al. User's Manual for Data for Validating
411
414
Models for PV Module Performance. National Renewable Energy
412
415
Laboratory, 2014. http://www.nrel.gov/docs/fy14osti/61610.pdf
413
416
"""
414
417
418
+ # --- Screen Input Data ---
419
+
420
+ # *** Pwat ***
421
+ # Replace Pwat Values below 0.1 cm with 0.1 cm to prevent model from
422
+ # diverging"
423
+
424
+ if np .min (pw ) < 0.1 :
425
+ pw = np .maximum (pw , 0.1 )
426
+ warn ('Exceptionally low Pwat values replaced with 0.1 cm to prevent' +
427
+ ' model divergence' )
428
+
429
+
430
+ # Warn user about Pwat data that is exceptionally high
431
+ if np .max (pw ) > 8 :
432
+ warn ('Exceptionally high Pwat values. Check input data:' +
433
+ ' model may diverge in this range' )
434
+
435
+
436
+ # *** AMa ***
437
+ # Replace Extremely High AM with AM 10 to prevent model divergence
438
+ # AM > 10 will only occur very close to sunset
439
+ if np .max (airmass_absolute ) > 10 :
440
+ airmass_absolute = np .minimum (airmass_absolute ,10 )
441
+
442
+ # Warn user about AMa data that is exceptionally low
443
+ if np .min (airmass_absolute ) < 0.58 :
444
+ warn ('Exceptionally low air mass: ' +
445
+ 'model not intended for extra-terrestrial use' )
446
+ # pvl_absoluteairmass(1,pvl_alt2pres(4340)) = 0.58
447
+ # Elevation of Mina Pirquita, Argentian = 4340 m. Highest elevation city
448
+ # with population over 50,000.
449
+
450
+
415
451
_coefficients = {}
416
452
_coefficients ['cdte' ] = (
417
- 0.87102 , - 0.040543 , - 0.00929202 , 0.10052 , 0.073062 , - 0.0034187 )
453
+ 0.86273 , - 0.038948 , - 0.012506 , 0.098871 , 0.084658 , - 0.0042948 )
418
454
_coefficients ['monosi' ] = (
419
- 0.86588 , - 0.021637 , - 0.0030218 , 0.12081 , 0.017514 , - 0.0012610 )
455
+ 0.85914 , - 0.020880 , - 0.0058853 , 0.12029 , 0.026814 , - 0.0017810 )
420
456
_coefficients ['xsi' ] = _coefficients ['monosi' ]
421
457
_coefficients ['polysi' ] = (
422
- 0.84674 , - 0.028568 , - 0.0051832 , 0.13669 , 0.029234 , - 0.0014207 )
458
+ 0.84090 , - 0.027539 , - 0.0079224 , 0.13570 , 0.038024 , - 0.0021218 )
423
459
_coefficients ['multisi' ] = _coefficients ['polysi' ]
424
460
425
461
if module_type is not None and coefficients is None :
@@ -435,6 +471,6 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
435
471
AMa = airmass_absolute
436
472
modifier = (
437
473
coeff [0 ] + coeff [1 ]* AMa + coeff [2 ]* pw + coeff [3 ]* np .sqrt (AMa ) +
438
- + coeff [4 ]* np .sqrt (pw ) + coeff [5 ]* AMa / pw )
474
+ + coeff [4 ]* np .sqrt (pw ) + coeff [5 ]* AMa / np . sqrt ( pw ) )
439
475
440
476
return modifier
0 commit comments