Skip to content

Commit 35b5a9b

Browse files
committed
rebase on fs spectral changes
1 parent 9a5e11e commit 35b5a9b

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

pvlib/atmosphere.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
345345
Pwat where:
346346
347347
* 0.5 cm <= Pwat <= 5 cm
348-
* 1.0 <= AMa <= 5.0
348+
* 1.0 <= AMa <= 5.0
349349
* Spectral range is limited to that of CMP11 (280 nm to 2800 nm)
350350
* spectrum simulated on a plane normal to the sun
351351
* All other parameters fixed at G173 standard
@@ -404,8 +404,8 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
404404
radiative transfer of sunshine: algorithms and performance
405405
assessment. Cocoa, FL: Florida Solar Energy Center, 1995.
406406
.. [2] Lee, Mitchell, and Panchula, Alex. "Spectral Correction for
407-
Photovoltaic Module Performance Based on Air Mass and Precipitable
408-
Water." IEEE Photovoltaic Specialists Conference, Portland, 2016
407+
Photovoltaic Module Performance Based on Air Mass and Precipitable
408+
Water." IEEE Photovoltaic Specialists Conference, Portland, 2016
409409
.. [3] Marion, William F., et al. User's Manual for Data for Validating
410410
Models for PV Module Performance. National Renewable Energy
411411
Laboratory, 2014. http://www.nrel.gov/docs/fy14osti/61610.pdf
@@ -419,30 +419,29 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
419419

420420
if np.min(pw) < 0.1:
421421
pw = np.maximum(pw, 0.1)
422-
warn('Exceptionally low Pwat values replaced with 0.1 cm to prevent'+
423-
' model divergence')
422+
warn('Exceptionally low Pwat values replaced with 0.1 cm to prevent' +
423+
' model divergence')
424424

425425

426426
# Warn user about Pwat data that is exceptionally high
427427
if np.max(pw) > 8:
428428
warn('Exceptionally high Pwat values. Check input data:' +
429-
' model may diverge in this range')
429+
' model may diverge in this range')
430430

431431

432432
# *** AMa ***
433433
# Replace Extremely High AM with AM 10 to prevent model divergence
434434
# AM > 10 will only occur very close to sunset
435-
if np.max(airmass_absolute) > 10:
436-
airmass_absolute = np.minimum(airmass_absolute,10)
437-
435+
if np.max(airmass_absolute) > 10:
436+
airmass_absolute = np.minimum(airmass_absolute, 10)
437+
438438
# Warn user about AMa data that is exceptionally low
439439
if np.min(airmass_absolute) < 0.58:
440440
warn('Exceptionally low air mass: ' +
441-
'model not intended for extra-terrestrial use')
442-
# pvl_absoluteairmass(1,pvl_alt2pres(4340)) = 0.58
443-
# Elevation of Mina Pirquita, Argentian = 4340 m. Highest elevation city
444-
# with population over 50,000.
445-
441+
'model not intended for extra-terrestrial use')
442+
# pvl_absoluteairmass(1,pvl_alt2pres(4340)) = 0.58 Elevation of
443+
# Mina Pirquita, Argentian = 4340 m. Highest elevation city with
444+
# population over 50,000.
446445

447446
_coefficients = {}
448447
_coefficients['cdte'] = (
@@ -464,9 +463,9 @@ def first_solar_spectral_correction(pw, airmass_absolute, module_type=None,
464463

465464
# Evaluate Spectral Shift
466465
coeff = coefficients
467-
AMa = airmass_absolute
466+
ama = airmass_absolute
468467
modifier = (
469-
coeff[0] + coeff[1]*AMa + coeff[2]*pw + coeff[3]*np.sqrt(AMa) +
470-
+ coeff[4]*np.sqrt(pw) + coeff[5]*AMa/np.sqrt(pw))
468+
coeff[0] + coeff[1]*ama + coeff[2]*pw + coeff[3]*np.sqrt(ama) +
469+
coeff[4]*np.sqrt(pw) + coeff[5]*ama/np.sqrt(pw))
471470

472471
return modifier

0 commit comments

Comments
 (0)