@@ -239,8 +239,10 @@ def integrate(e):
239
239
return smm
240
240
241
241
242
- def spectral_factor_firstsolar (pw , airmass_absolute , module_type = None ,
243
- coefficients = None , min_pw = 0.1 , max_pw = 8 ):
242
+ def spectral_factor_firstsolar (precipitable_water , airmass_absolute ,
243
+ module_type = None , coefficients = None ,
244
+ min_precipitable_water = 0.1 ,
245
+ max_precipitable_water = 8 ):
244
246
r"""
245
247
Spectral mismatch modifier based on precipitable water and absolute
246
248
(pressure-adjusted) airmass.
@@ -277,21 +279,13 @@ def spectral_factor_firstsolar(pw, airmass_absolute, module_type=None,
277
279
278
280
Parameters
279
281
----------
280
- pw : array-like
282
+ precipitable_water : numeric
281
283
atmospheric precipitable water. [cm]
282
284
283
- airmass_absolute : array-like
285
+ airmass_absolute : numeric
284
286
absolute (pressure-adjusted) airmass. [unitless]
285
287
286
- min_pw : float, default 0.1
287
- minimum atmospheric precipitable water. Any pw value lower than min_pw
288
- is set to min_pw to avoid model divergence. [cm]
289
-
290
- max_pw : float, default 8
291
- maximum atmospheric precipitable water. Any pw value higher than max_pw
292
- is set to NaN to avoid model divergence. [cm]
293
-
294
- module_type : None or string, default None
288
+ module_type : str, optional
295
289
a string specifying a cell type. Values of 'cdte', 'monosi', 'xsi',
296
290
'multisi', and 'polysi' (can be lower or upper case). If provided,
297
291
module_type selects default coefficients for the following modules:
@@ -307,7 +301,7 @@ def spectral_factor_firstsolar(pw, airmass_absolute, module_type=None,
307
301
Manufacturer 2 Model C from [3]_. The spectral response (SR) of CIGS
308
302
and a-Si modules used to derive coefficients can be found in [4]_
309
303
310
- coefficients : None or array-like, default None
304
+ coefficients : array-like, optional
311
305
Allows for entry of user-defined spectral correction
312
306
coefficients. Coefficients must be of length 6. Derivation of
313
307
coefficients requires use of SMARTS and PV module quantum
@@ -317,10 +311,20 @@ def spectral_factor_firstsolar(pw, airmass_absolute, module_type=None,
317
311
modules with very similar quantum efficiency should be similar,
318
312
in most cases limiting the need for module specific coefficients.
319
313
314
+ min_precipitable_water : float, default 0.1
315
+ minimum atmospheric precipitable water. Any ``precipitable_water``
316
+ value lower than ``min_precipitable_water``
317
+ is set to ``min_precipitable_water`` to avoid model divergence. [cm]
318
+
319
+ max_precipitable_water : float, default 8
320
+ maximum atmospheric precipitable water. Any ``precipitable_water``
321
+ value greater than ``max_precipitable_water``
322
+ is set to ``np.nan`` to avoid model divergence. [cm]
323
+
320
324
Returns
321
325
-------
322
326
modifier: array-like
323
- spectral mismatch factor (unitless) which is can be multiplied
327
+ spectral mismatch factor (unitless) which can be multiplied
324
328
with broadband irradiance reaching a module's cells to estimate
325
329
effective irradiance, i.e., the irradiance that is converted to
326
330
electrical current.
@@ -347,16 +351,16 @@ def spectral_factor_firstsolar(pw, airmass_absolute, module_type=None,
347
351
# *** Pw ***
348
352
# Replace Pw Values below 0.1 cm with 0.1 cm to prevent model from
349
353
# diverging"
350
- pw = np .atleast_1d (pw )
354
+ pw = np .atleast_1d (precipitable_water )
351
355
pw = pw .astype ('float64' )
352
- if np .min (pw ) < min_pw :
353
- pw = np .maximum (pw , min_pw )
354
- warn (f 'Exceptionally low pw values replaced with { min_pw } cm to '
355
- ' prevent model divergence' )
356
+ if np .min (pw ) < min_precipitable_water :
357
+ pw = np .maximum (pw , min_precipitable_water )
358
+ warn ('Exceptionally low pw values replaced with '
359
+ f' { min_precipitable_water } cm to prevent model divergence' )
356
360
357
361
# Warn user about Pw data that is exceptionally high
358
- if np .max (pw ) > max_pw :
359
- pw [pw > max_pw ] = np .nan
362
+ if np .max (pw ) > max_precipitable_water :
363
+ pw [pw > max_precipitable_water ] = np .nan
360
364
warn ('Exceptionally high pw values replaced by np.nan: '
361
365
'check input data.' )
362
366
0 commit comments