def ashrae_revised_clear_sky(altitudes, tb, td, use_2017_model=False):
dir_norm_rad = []<EOL>dif_horiz_rad = []<EOL>if use_2017_model is True:<EOL><INDENT>ab = <NUM_LIT> - (<NUM_LIT> * tb) - (<NUM_LIT> * td) - (<NUM_LIT> * tb * td)<EOL>ad = <NUM_LIT> + (<NUM_LIT> * tb) - (<NUM_LIT> * td) - (<NUM_LIT> * tb * td)<EOL><DEDENT>else:<EOL><INDENT>ab = <NUM_LIT> - (<NUM_LIT> * tb) - (<NUM_LIT> * td) - (<NUM_LIT> * tb * td)<EOL>ad = <NUM_LIT> + (<NUM_LIT> * tb) - (<NUM_LIT> * td) - (<NUM_LIT> * tb * td)<EOL><DEDENT>for alt in altitudes:<EOL><INDENT>if alt > <NUM_LIT:0>:<EOL><INDENT>air_mass = get_relative_airmass(alt)<EOL>dir_norm_rad.append(<NUM_LIT> * math.exp(-tb * math.pow(air_mass, ab)))<EOL>dif_horiz_rad.append(<NUM_LIT> * math.exp(-td * math.pow(air_mass, ad)))<EOL><DEDENT>else:<EOL><INDENT>dir_norm_rad.append(<NUM_LIT:0>)<EOL>dif_horiz_rad.append(<NUM_LIT:0>)<EOL><DEDENT><DEDENT>return dir_norm_rad, dif_horiz_rad<EOL>
Calculate solar flux for an ASHRAE Revised Clear Sky ("Tau Model").

    By default, this function returns clear sky values following the
    methods originally published in the ASHRAE 2009 HOF.
    Args:
        altitudes: A list of solar altitudes in degrees.
        tb: A value indicating the beam optical depth of the sky.
        td: A value indicating the diffuse optical depth of the sky.
        use_2017_model: Set to True to use coefficients associated with
            the new version of the Tau model released in the 2013 and 2017 HOF.
            Note that the correct use of the new version requires updated
            tb and td values. At present, all .stat files
            distributed by the US DoE are using the older (2009) values
            for tb and td and so this input defaults to 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.