def _disc_kn(clearness_index, airmass, max_airmass=<NUM_LIT:12>):
<EOL>kt = clearness_index<EOL>am = airmass<EOL>am = np.minimum(am, max_airmass)  <EOL>kt2 = kt * kt  <EOL>kt3 = kt2 * kt  <EOL>bools = (kt <= <NUM_LIT>)<EOL>a = np.where(bools,<EOL><NUM_LIT> - <NUM_LIT>*kt + <NUM_LIT>*kt2 - <NUM_LIT>*kt3,<EOL>-<NUM_LIT> + <NUM_LIT>*kt - <NUM_LIT>*kt2 + <NUM_LIT>*kt3)<EOL>b = np.where(bools,<EOL><NUM_LIT> + <NUM_LIT>*kt,<EOL><NUM_LIT> - <NUM_LIT>*kt + <NUM_LIT>*kt2 + <NUM_LIT>*kt3)<EOL>c = np.where(bools,<EOL>-<NUM_LIT> + <NUM_LIT>*kt - <NUM_LIT>*kt2,<EOL>-<NUM_LIT> + <NUM_LIT>*kt - <NUM_LIT>*kt2 + <NUM_LIT>*kt3)<EOL>delta_kn = a + b * np.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`

Parameters
----------
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.