@@ -358,21 +358,17 @@ def integrate(e):
358
358
def spectral_factor_firstsolar (precipitable_water , airmass_absolute ,
359
359
module_type = None , coefficients = None ,
360
360
min_precipitable_water = 0.1 ,
361
- max_precipitable_water = 8 ):
361
+ max_precipitable_water = 8 ,
362
+ min_airmass_absolute = 0.58 ,
363
+ max_airmass_absolute = 10 ):
362
364
r"""
363
365
Spectral mismatch modifier based on precipitable water and absolute
364
366
(pressure-adjusted) air mass.
365
367
366
- Estimates a spectral mismatch modifier :math:`M` representing the effect on
367
- module short circuit current of variation in the spectral
368
- irradiance. :math:`M` is estimated from absolute (pressure currected) air
369
- mass, :math:`AM_a`, and precipitable water, :math:`Pw`, using the following
370
- function:
371
-
372
- .. math::
373
-
374
- M = c_1 + c_2 AM_a + c_3 Pw + c_4 AM_a^{0.5}
375
- + c_5 Pw^{0.5} + c_6 \frac{AM_a} {Pw^{0.5}}
368
+ Estimates the spectral mismatch modifier, :math:`M`, representing the
369
+ effect of variation in the spectral irradiance on the module short circuit
370
+ current :math:`M` is estimated from absolute (pressure-corrected) air
371
+ mass, :math:`AM_a`, and precipitable water, :math:`Pw`.
376
372
377
373
Default coefficients are determined for several cell types with
378
374
known quantum efficiency curves, by using the Simple Model of the
@@ -383,15 +379,13 @@ def spectral_factor_firstsolar(precipitable_water, airmass_absolute,
383
379
* :math:`0.5 \textrm{cm} <= Pw <= 5 \textrm{cm}`
384
380
* :math:`1.0 <= AM_a <= 5.0`
385
381
* Spectral range is limited to that of CMP11 (280 nm to 2800 nm)
386
- * spectrum simulated on a plane normal to the sun
382
+ * Spectrum simulated on an equatorial facing surface with 37° tilt
387
383
* All other parameters fixed at G173 standard
388
384
389
- From these simulated spectra, M is calculated using the known
385
+ From these simulated spectra, :math:`M` is calculated using the known
390
386
quantum efficiency curves. Multiple linear regression is then
391
- applied to fit Eq. 1 to determine the coefficients for each module.
392
-
393
- Based on the PVLIB Matlab function ``pvl_FSspeccorr`` by Mitchell
394
- Lee and Alex Panchula of First Solar, 2016 [2]_.
387
+ applied to fit Eq. 1 to determine the coefficients for each module. More
388
+ details on the model can be found in [2]_.
395
389
396
390
Parameters
397
391
----------
@@ -406,11 +400,12 @@ def spectral_factor_firstsolar(precipitable_water, airmass_absolute,
406
400
'multisi', and 'polysi' (can be lower or upper case). If provided,
407
401
module_type selects default coefficients for the following modules:
408
402
409
- * 'cdte' - First Solar Series 4-2 CdTe module.
410
- * 'monosi', 'xsi' - First Solar TetraSun module.
411
- * 'multisi', 'polysi' - anonymous multi-crystalline silicon module.
412
- * 'cigs' - anonymous copper indium gallium selenide module.
413
- * 'asi' - anonymous amorphous silicon module.
403
+ * ``'cdte'`` - First Solar Series 4-2 CdTe module.
404
+ * ``'monosi'``, ``'xsi'`` - First Solar TetraSun module.
405
+ * ``'multisi'``, ``'polysi'`` - anonymous multi-crystalline silicon
406
+ module.
407
+ * ``'cigs'`` - anonymous copper indium gallium selenide module.
408
+ * ``'asi'`` - anonymous amorphous silicon module.
414
409
415
410
The module used to calculate the spectral correction
416
411
coefficients corresponds to the Multi-crystalline silicon
@@ -430,12 +425,20 @@ def spectral_factor_firstsolar(precipitable_water, airmass_absolute,
430
425
min_precipitable_water : float, default 0.1
431
426
minimum atmospheric precipitable water. Any ``precipitable_water``
432
427
value lower than ``min_precipitable_water``
433
- is set to ``min_precipitable_water`` to avoid model divergence . [cm]
428
+ is set to ``min_precipitable_water``. [cm]
434
429
435
430
max_precipitable_water : float, default 8
436
431
maximum atmospheric precipitable water. Any ``precipitable_water``
437
432
value greater than ``max_precipitable_water``
438
- is set to ``np.nan`` to avoid model divergence. [cm]
433
+ is set to ``np.nan``. [cm]
434
+
435
+ min_airmass_absolute : float, default 0.58
436
+ minimum absolute airmass. Any ``airmass_absolute`` value lower than
437
+ ``min_airmass_absolute`` is set to ``min_airmass_absolute``. [unitless]
438
+
439
+ max_airmass_absolute : float, default 10
440
+ minimum absolute airmass. Any ``airmass_absolute`` value greater than
441
+ ``max_airmass_absolute`` is set to ``max_airmass_absolute``. [unitless]
439
442
440
443
Returns
441
444
-------
@@ -445,6 +448,22 @@ def spectral_factor_firstsolar(precipitable_water, airmass_absolute,
445
448
effective irradiance, i.e., the irradiance that is converted to
446
449
electrical current.
447
450
451
+ Notes
452
+ ----
453
+ The ``spectral_factor_firstsolar`` model takes the following form:
454
+
455
+ .. math::
456
+
457
+ M = c_1 + c_2 AM_a + c_3 Pw + c_4 AM_a^{0.5}
458
+ + c_5 Pw^{0.5} + c_6 \frac{AM_a} {Pw^{0.5}}.
459
+
460
+ The default values for the limits applied to :math:`AM_a` and :math:`Pw`
461
+ via the ``min_precipitable_water``, ``max_precipitable_water``,
462
+ ``min_airmass_absolute``, and ``max_airmass_absolute`` are set to prevent
463
+ divergence of the model presented above. These default values were
464
+ determined by the publication authors in the original pvlib-python
465
+ implementation (:pull:`208`).
466
+
448
467
References
449
468
----------
450
469
.. [1] Gueymard, Christian. SMARTS2: a simple model of the atmospheric
@@ -461,36 +480,27 @@ def spectral_factor_firstsolar(precipitable_water, airmass_absolute,
461
480
MMF Approach, TUV Rheinland Energy GmbH report 21237296.003,
462
481
January 2017
463
482
"""
464
-
465
- # --- Screen Input Data ---
466
-
467
- # *** Pw ***
468
- # Replace Pw Values below 0.1 cm with 0.1 cm to prevent model from
469
- # diverging"
470
483
pw = np .atleast_1d (precipitable_water )
471
484
pw = pw .astype ('float64' )
472
485
if np .min (pw ) < min_precipitable_water :
473
486
pw = np .maximum (pw , min_precipitable_water )
474
- warn ('Exceptionally low pw values replaced with '
475
- f'{ min_precipitable_water } cm to prevent model divergence' )
487
+ warn ('Low precipitable water values replaced with '
488
+ f'{ min_precipitable_water } cm in the calculation of spectral '
489
+ 'mismatch.' )
476
490
477
- # Warn user about Pw data that is exceptionally high
478
491
if np .max (pw ) > max_precipitable_water :
479
492
pw [pw > max_precipitable_water ] = np .nan
480
- warn ('Exceptionally high pw values replaced by np.nan: '
481
- 'check input data.' )
482
-
483
- # *** AMa ***
484
- # Replace Extremely High AM with AM 10 to prevent model divergence
485
- # AM > 10 will only occur very close to sunset
486
- if np .max (airmass_absolute ) > 10 :
487
- airmass_absolute = np .minimum (airmass_absolute , 10 )
488
-
489
- # Warn user about AMa data that is exceptionally low
490
- if np .min (airmass_absolute ) < 0.58 :
491
- warn ('Exceptionally low air mass: ' +
492
- 'model not intended for extra-terrestrial use' )
493
- # pvl_absoluteairmass(1,pvl_alt2pres(4340)) = 0.58 Elevation of
493
+ warn ('High precipitable water values replaced with np.nan in '
494
+ 'the calculation of spectral mismatch.' )
495
+
496
+ airmass_absolute = np .minimum (airmass_absolute , max_airmass_absolute )
497
+
498
+ if np .min (airmass_absolute ) < min_airmass_absolute :
499
+ airmass_absolute = np .maximum (airmass_absolute , min_airmass_absolute )
500
+ warn ('Low airmass values replaced with ' f'{ min_airmass_absolute } in '
501
+ 'the calculation of spectral mismatch.' )
502
+ # pvlib.atmosphere.get_absolute_airmass(1,
503
+ # pvlib.atmosphere.alt2pres(4340)) = 0.58 Elevation of
494
504
# Mina Pirquita, Argentian = 4340 m. Highest elevation city with
495
505
# population over 50,000.
496
506
@@ -519,7 +529,6 @@ def spectral_factor_firstsolar(precipitable_water, airmass_absolute,
519
529
raise TypeError ('Cannot resolve input, must supply only one of ' +
520
530
'module_type and coefficients' )
521
531
522
- # Evaluate Spectral Shift
523
532
coeff = coefficients
524
533
ama = airmass_absolute
525
534
modifier = (
@@ -640,8 +649,8 @@ def spectral_factor_caballero(precipitable_water, airmass_absolute, aod500,
640
649
One of the following PV technology strings from [1]_:
641
650
642
651
* ``'cdte'`` - anonymous CdTe module.
643
- * ``'monosi'``, - anonymous sc-si module.
644
- * ``'multisi'``, - anonymous mc-si- module.
652
+ * ``'monosi'`` - anonymous sc-si module.
653
+ * ``'multisi'`` - anonymous mc-si- module.
645
654
* ``'cigs'`` - anonymous copper indium gallium selenide module.
646
655
* ``'asi'`` - anonymous amorphous silicon module.
647
656
* ``'perovskite'`` - anonymous pervoskite module.
@@ -755,8 +764,8 @@ def spectral_factor_pvspec(airmass_absolute, clearsky_index,
755
764
756
765
* ``'fs4-1'`` - First Solar series 4-1 and earlier CdTe module.
757
766
* ``'fs4-2'`` - First Solar 4-2 and later CdTe module.
758
- * ``'monosi'``, - anonymous monocrystalline Si module.
759
- * ``'multisi'``, - anonymous multicrystalline Si module.
767
+ * ``'monosi'`` - anonymous monocrystalline Si module.
768
+ * ``'multisi'`` - anonymous multicrystalline Si module.
760
769
* ``'cigs'`` - anonymous copper indium gallium selenide module.
761
770
* ``'asi'`` - anonymous amorphous silicon module.
762
771
0 commit comments