def zhang_huang_solar_split(altitudes, doys, cloud_cover, relative_humidity,<EOL>dry_bulb_present, dry_bulb_t3_hrs, wind_speed,<EOL>atm_pressure, use_disc=False):
<EOL>glob_ir = []<EOL>for i in range(len(altitudes)):<EOL><INDENT>ghi = zhang_huang_solar(altitudes[i], cloud_cover[i], relative_humidity[i],<EOL>dry_bulb_present[i], dry_bulb_t3_hrs[i], wind_speed[i])<EOL>glob_ir.append(ghi)<EOL><DEDENT>if use_disc is False:<EOL><INDENT>temp_dew = [dew_point_from_db_rh(dry_bulb_present[i], relative_humidity[i])<EOL>for i in range(len(glob_ir))]<EOL>dir_norm_rad = dirint(glob_ir, altitudes, doys, atm_pressure,<EOL>use_delta_kt_prime=True, temp_dew=temp_dew)<EOL>dif_horiz_rad = [glob_ir[i] -<EOL>(dir_norm_rad[i] * math.sin(math.radians(altitudes[i])))<EOL>for i in range(len(glob_ir))]<EOL><DEDENT>else:<EOL><INDENT>dir_norm_rad = []<EOL>dif_horiz_rad = []<EOL>for i in range(len(glob_ir)):<EOL><INDENT>dni, kt, am = disc(glob_ir[i], altitudes[i], doys[i], atm_pressure[i])<EOL>dhi = glob_ir[i] - (dni * math.sin(math.radians(altitudes[i])))<EOL>dir_norm_rad.append(dni)<EOL>dif_horiz_rad.append(dhi)<EOL><DEDENT><DEDENT>return dir_norm_rad, dif_horiz_rad<EOL>
Calculate direct and diffuse solar irradiance using the Zhang-Huang model.

    By default, this function uses the DIRINT method (aka. Perez split) to split global
    irradiance into direct and diffuse.  This is the same method used by EnergyPlus.

    Args:
        altitudes: A list of solar altitudes in degrees.
        doys: A list of days of the year that correspond to the altitudes.
        cloud_cover: A list of float values between 0 and 10 that represents cloud cover
            in tenths (0 = clear; 10 = completely overcast)
        relative_humidity: A list of float values between 0 and 100 that represents
            the relative humidity in percent.
        dry_bulb_present: A list of float values that represents the dry bulb
            temperature at the time of interest (in degrees C).
        dry_bulb_t3_hrs: A list of float values that represents the dry bulb
            temperature at three hours before the time of interest (in degrees C).
        wind_speed: A list of float values that represents the wind speed in m/s.
        atm_pressure: A list of float values that represent the
            atmospheric pressure in Pa.
        use_disc: Set to True to use the original DISC model as opposed to the
            newer and more accurate DIRINT model. Default is False.

    Returns:
        dir_norm_rad: A list of direct normal radiation values for each
            of the connected altitudes in W/m2.
        dif_horiz_rad: A list of diffuse horizontall radiation values for each
            of the connected altitudes in W/m2.