def calc_throughfall_flux(precip, canopyStore, canopyStore_max):
    ' Calculate the throughfall flux from canopy interception storage\n\n    Parameters\n    ----------\n    precip : int or float\n        Precipitation flux [mm day^-1]\n    canopyStore : int or float\n        Canopy Interception storage [mm]\n    canopyStore_max : int or float\n        Maximum non-drainable canopy interception storage [mm]\n\n    Returns\n    -------\n    throughfall : int or float\n        Throughfall flux [mm day^-1]\n    '
    if (canopyStore < canopyStore_max):
        throughfall = (precip * (canopyStore / canopyStore_max))
    else:
        throughfall = precip
    return throughfall
Calculate the throughfall flux from canopy interception storage

Parameters
----------
precip : int or float
    Precipitation flux [mm day^-1]
canopyStore : int or float
    Canopy Interception storage [mm]
canopyStore_max : int or float
    Maximum non-drainable canopy interception storage [mm]

Returns
-------
throughfall : int or float
    Throughfall flux [mm day^-1]
def calc_throughfall_flux(precip, canopyStore, canopyStore_max):
    ' Calculate the throughfall flux from canopy interception storage\n\n    Parameters\n    ----------\n    precip : int or float\n        Precipitation flux [mm day^-1]\n    canopyStore : int or float\n        Canopy Interception storage [mm]\n    canopyStore_max : int or float\n        Maximum non-drainable canopy interception storage [mm]\n\n    Returns\n    -------\n    throughfall : int or float\n        Throughfall flux [mm day^-1]\n    '
    if (canopyStore < canopyStore_max):
        throughfall = (precip * (canopyStore / canopyStore_max))
    else:
        throughfall = precip
    return throughfall