Skip to content

Commit eaa90b4

Browse files
committed
Update mismatch.py
1 parent 36c9b43 commit eaa90b4

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

pvlib/spectrum/mismatch.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -757,47 +757,39 @@ def spectral_factor_polo(precipitable_water, airmass_absolute, aod500, aoi,
757757
[1]. Polo, J., Sanz-saiz, C., Development of spectral mismatch models
758758
for BIPV applications in building façades Abbreviations : Renew. Energy 245
759759
,122820, 2025.:doi:`10.1016/j.renene.2025.122820`
760-
761760
"""
762761
if module_type is None and coefficients is None:
763762
raise ValueError('Must provide either `module_type` or `coefficients`')
764763
if module_type is not None and coefficients is not None:
765764
raise ValueError('Only one of `module_type` and `coefficients` should '
766765
'be provided')
767-
768766
am_aoi = pvlib.atmosphere.get_relative_airmass(aoi)
769767
pressure = pvlib.atmosphere.alt2pres(altitude)
770-
am90 = pvlib.atmosphere.get_absolute_airmass(am_aoi,pressure)
768+
am90 = pvlib.atmosphere.get_absolute_airmass(am_aoi, pressure)
771769
Ram = am90/airmass_absolute
772-
773770
_coefficients = {}
774771
_coefficients = {
775772
'cdte': (-0.0009, 46.80, 49.20, -0.87, 0.00041, 0.053),
776773
'monosi': (0.0027, 10.34, 9.48, 0.307, 0.00077, 0.006),
777774
'cigs': (0.0017, 2.33, 1.30, 0.11, 0.00098, -0.0177),
778775
'asi': (0.0024, 7.32, 7.09, -0.72, -0.0013, 0.089),
779776
}
780-
781777
c = {
782778
'asi': (0.0056, -0.020, 1.014),
783779
'cigs': (-0.0009, -0.0003, 1),
784780
'cdte': (0.0021, -0.01, 1.01),
785781
'monosi': (0, -0.003, 1.0),
786782
}
787-
788-
if module_type is not None:
783+
if module_type is not None:
789784
coeff = _coefficients[module_type]
790785
c_albedo = c[module_type]
791786
else:
792787
coeff = coefficients
793788
c_albedo = (0.0, 0.0, 1.0) # 0.2 albedo assumed
794789
albedo = 0.2
795-
796790
smm = coeff[0] * Ram + coeff[1] / (coeff[2] + Ram**coeff[3]) \
797791
+ coeff[4] / aod500 + coeff[5]*np.sqrt(precipitable_water)
798-
799792
# Ground albedo correction
800793
g = c_albedo[0] * (albedo/0.2)**2 \
801794
+ c_albedo[1] * (albedo/0.2) + c_albedo[2]
802-
803795
return g*smm

0 commit comments

Comments
 (0)