Skip to content

Commit d431aa8

Browse files
committed
irradiance.py: dni(), _get_dirint_coeffs(), complete_irradiance()
1 parent bc5a7ad commit d431aa8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pvlib/irradiance.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3600,7 +3600,7 @@ def _get_dirint_coeffs():
36003600
return coeffs[1:, 1:, :, :]
36013601

36023602

3603-
def dni(ghi, dhi, zenith, clearsky_dni=None, clearsky_tolerance=1.1,
3603+
def dni(ghi, dhi, zenith, dni_clear=None, clearsky_tolerance=1.1,
36043604
zenith_threshold_for_zero_dni=88.0,
36053605
zenith_threshold_for_clearsky_limit=80.0):
36063606
"""
@@ -3624,11 +3624,11 @@ def dni(ghi, dhi, zenith, clearsky_dni=None, clearsky_tolerance=1.1,
36243624
True (not refraction-corrected) zenith angles in decimal
36253625
degrees. Angles must be >=0 and <=180.
36263626
3627-
clearsky_dni : Series, optional
3627+
dni_clear : Series, optional
36283628
Clearsky direct normal irradiance.
36293629
36303630
clearsky_tolerance : float, default 1.1
3631-
If 'clearsky_dni' is given this parameter can be used to allow a
3631+
If `dni_clear` is given this parameter can be used to allow a
36323632
tolerance by how much the calculated DNI value can be greater than
36333633
the clearsky value before it is identified as an unreasonable value.
36343634
@@ -3641,7 +3641,7 @@ def dni(ghi, dhi, zenith, clearsky_dni=None, clearsky_tolerance=1.1,
36413641
'zenith_threshold_for_clearsky_limit' and smaller the
36423642
'zenith_threshold_for_zero_dni' that are greater than the clearsky DNI
36433643
(times allowed tolerance) will be corrected. Only applies if
3644-
'clearsky_dni' is not None.
3644+
`dni_clear` is not None.
36453645
36463646
Returns
36473647
-------
@@ -3663,8 +3663,8 @@ def dni(ghi, dhi, zenith, clearsky_dni=None, clearsky_tolerance=1.1,
36633663
# zenith_threshold_for_clearsky_limit and smaller than the
36643664
# upper_cutoff_zenith that are greater than the clearsky DNI (times
36653665
# clearsky_tolerance)
3666-
if clearsky_dni is not None:
3667-
max_dni = clearsky_dni * clearsky_tolerance
3666+
if dni_clear is not None:
3667+
max_dni = dni_clear * clearsky_tolerance
36683668
dni[(zenith >= zenith_threshold_for_clearsky_limit) &
36693669
(zenith < zenith_threshold_for_zero_dni) &
36703670
(dni > max_dni)] = max_dni
@@ -3716,7 +3716,7 @@ def complete_irradiance(solar_zenith,
37163716
"""
37173717
if ghi is not None and dhi is not None and dni is None:
37183718
dni = pvlib.irradiance.dni(ghi, dhi, solar_zenith,
3719-
clearsky_dni=dni_clear,
3719+
dni_clear=dni_clear,
37203720
clearsky_tolerance=1.1)
37213721
elif dni is not None and dhi is not None and ghi is None:
37223722
ghi = (dhi + dni * tools.cosd(solar_zenith))

0 commit comments

Comments
 (0)