def dirint(ghi, altitudes, doys, pressures, use_delta_kt_prime=True,<EOL>temp_dew=None, min_sin_altitude=<NUM_LIT>, min_altitude=<NUM_LIT:3>):
<EOL>kt_primes = []<EOL>disc_dni = []<EOL>for i in range(len(ghi)):<EOL><INDENT>dni, kt, airmass = disc(ghi[i], altitudes[i], doys[i], pressure=pressures[i],<EOL>min_sin_altitude=min_sin_altitude,<EOL>min_altitude=min_altitude)<EOL>kt_prime = clearness_index_zenith_independent(<EOL>kt, airmass, max_clearness_index=<NUM_LIT:1>)<EOL>kt_primes.append(kt_prime)<EOL>disc_dni.append(dni)<EOL><DEDENT>if use_delta_kt_prime is True:<EOL><INDENT>delta_kt_prime = []<EOL>for i in range(len(kt_primes)):<EOL><INDENT>try:<EOL><INDENT>kt_prime_1 = kt_primes[i + <NUM_LIT:1>]<EOL><DEDENT>except IndexError:<EOL><INDENT>kt_prime_1 = kt_primes[<NUM_LIT:0>]<EOL><DEDENT>delta_kt_prime.append(<NUM_LIT:0.5> * (abs(kt_primes[i] - kt_prime_1) +<EOL>abs(kt_primes[i] - kt_primes[i - <NUM_LIT:1>])))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>delta_kt_prime = [-<NUM_LIT:1>] * len(ghi)<EOL><DEDENT>if temp_dew is not None:<EOL><INDENT>w = [math.exp(<NUM_LIT> * td - <NUM_LIT>) for td in temp_dew]<EOL><DEDENT>else:<EOL><INDENT>w = [-<NUM_LIT:1>] * len(ghi)<EOL><DEDENT>ktp_bin, alt_bin, w_bin, delta_ktp_bin =_dirint_bins(kt_primes, altitudes, w, delta_kt_prime)<EOL>coeffs = _get_dirint_coeffs()<EOL>dirint_coeffs = [coeffs[ktp_bin[i]][alt_bin[i]][delta_ktp_bin[i]][w_bin[i]]<EOL>for i in range(len(ghi))]<EOL>dni = [disc_d * coef for disc_d, coef in zip(disc_dni, dirint_coeffs)]<EOL>return dni<EOL>
Determine DNI from GHI using the DIRINT modification of the DISC
model.

Implements the modified DISC model known as "DIRINT" introduced in
[1]. DIRINT predicts direct normal irradiance (DNI) from measured
global horizontal irradiance (GHI). DIRINT improves upon the DISC
model by using time-series GHI data and dew point temperature
information. The effectiveness of the DIRINT model improves with
each piece of information provided.

The pvlib implementation limits the clearness index to 1.
The DIRINT model requires time series data.

Note:
    [1] Perez, R., P. Ineichen, E. Maxwell, R. Seals and A. Zelenka,
    (1992). "Dynamic Global-to-Direct Irradiance Conversion Models".
    ASHRAE Transactions-Research Series, pp. 354-369

    [2] Maxwell, E. L., "A Quasi-Physical Model for Converting Hourly
    Global Horizontal to Direct Normal Insolation", Technical Report No.
    SERI/TR-215-3087, Golden, CO: Solar Energy Research Institute, 1987.

Args:
    ghi: array-like
        Global horizontal irradiance in W/m^2.
    altitudes: array-like
        True (not refraction-corrected) solar altitude angles in decimal
        degrees.
    doys: array-like
        Integers representing the day of the year.
    pressures: array-like
        The site pressure in Pascal. Pressure may be measured or an
        average pressure may be calculated from site altitude.
    use_delta_kt_prime: bool, default True
        If True, indicates that the stability index delta_kt_prime is
        included in the model. The stability index adjusts the estimated
        DNI in response to dynamics in the time series of GHI. It is
        recommended that delta_kt_prime is not used if the time between
        GHI points is 1.5 hours or greater. If use_delta_kt_prime=True,
        input data must be Series.
    temp_dew: None or array-like, default None
        Surface dew point temperatures, in degrees C. Values of temp_dew
        must be numeric. If temp_dew is not provided, then dew point
        improvements are not applied.
    min_sin_altitude: numeric, default 0.065
        Minimum value of sin(altitude) to allow when calculating global
        clearness index `kt`. Equivalent to altitude = 3.727 degrees.
    min_altitude: numeric, default 87
        Minimum value of altitude to allow in DNI calculation. DNI will be
        set to 0 for times with altitude values smaller than `min_altitude`.

Returns:
    dni: array-like
        The modeled direct normal irradiance in W/m^2 provided by the
        DIRINT model.