pvlib.irradiance.dni#
- pvlib.irradiance.dni(ghi, dhi, zenith, dni_clear=None, clearsky_tolerance=1.1, zenith_threshold_for_zero_dni=88.0, zenith_threshold_for_clearsky_limit=80.0)[source]#
- Determine DNI from GHI and DHI. - When calculating the DNI from GHI and DHI the calculated DNI may be unreasonably high or negative for zenith angles close to 90 degrees (sunrise/sunset transitions). This function identifies unreasonable DNI values and sets them to NaN. If the clearsky DNI is given unreasonably high values are cut off. - Parameters:
- ghi (Series) – Global horizontal irradiance. See ghi. [Wm⁻²] 
- dhi (Series) – Diffuse horizontal irradiance. See dhi. [Wm⁻²] 
- zenith (Series) – True (not refraction-corrected) zenith angles. See solar_zenith. [°] 
- dni_clear (Series, optional) – - Clearsky direct normal irradiance. See dni_clear. [Wm⁻²] - Changed in version 0.11.2: Renamed from - clearsky_dnito- dni_clear.
- clearsky_tolerance (float, default 1.1) – If - dni_clearis given this parameter can be used to allow a tolerance by how much the calculated DNI value can be greater than the clearsky value before it is identified as an unreasonable value.
- zenith_threshold_for_zero_dni (float, default 88.0) – Non-zero DNI values for zenith angles greater than or equal to ‘zenith_threshold_for_zero_dni’ will be set to NaN. 
- zenith_threshold_for_clearsky_limit (float, default 80.0) – DNI values for zenith angles greater than or equal to ‘zenith_threshold_for_clearsky_limit’ and smaller the ‘zenith_threshold_for_zero_dni’ that are greater than the clearsky DNI (times allowed tolerance) will be corrected. Only applies if - dni_clearis not None.
 
- Returns:
- dni (Series) – The modeled direct normal irradiance. See dni. [Wm⁻²] 
 
