def _disc_kn(clearness_index, airmass, max_airmass=<NUM_LIT:12>):
<EOL>kt = clearness_index<EOL>am = airmass<EOL>am = min(am, max_airmass)  <EOL>kt2 = kt * kt  <EOL>kt3 = kt2 * kt  <EOL>if kt <= <NUM_LIT>:<EOL><INDENT>a = <NUM_LIT> - <NUM_LIT>*kt + <NUM_LIT>*kt2 - <NUM_LIT>*kt3<EOL>b = <NUM_LIT> + <NUM_LIT>*kt<EOL>c = -<NUM_LIT> + <NUM_LIT>*kt - <NUM_LIT>*kt2<EOL><DEDENT>else:<EOL><INDENT>a = -<NUM_LIT> + <NUM_LIT>*kt - <NUM_LIT>*kt2 + <NUM_LIT>*kt3<EOL>b = <NUM_LIT> - <NUM_LIT>*kt + <NUM_LIT>*kt2 + <NUM_LIT>*kt3<EOL>c = -<NUM_LIT> + <NUM_LIT>*kt - <NUM_LIT>*kt2 + <NUM_LIT>*kt3<EOL><DEDENT>delta_kn = a + b * math.exp(c*am)<EOL>Knc = <NUM_LIT> - <NUM_LIT>*am + <NUM_LIT>*am**<NUM_LIT:2> - <NUM_LIT>*am**<NUM_LIT:3> + <NUM_LIT>*am**<NUM_LIT:4><EOL>Kn = Knc - delta_kn<EOL>return Kn, am<EOL>
Calculate Kn for `disc`

Args:
    clearness_index : numeric
    airmass : numeric
    max_airmass : float
        airmass > max_airmass is set to max_airmass before being used
        in calculating Kn.

Returns:
    Kn : numeric
    am : numeric
        airmass used in the calculation of Kn. am <= max_airmass.