def calc_canopy_drainage_flux(canopyStore, canopyStore_max, k_can):
    ' Calculate the canopy drainage flux from canopy interception storage\n\n    Parameters\n    ----------\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    k_can: float\n        Canopy drainage coe\x0ecient [day^-1]\n\n    Returns\n    -------\n    canopyDrain : int or float\n        Canopy drainage flux [mm day^-1]\n    '
    if (canopyStore < canopyStore_max):
        canopyDrain = 0.0
    else:
        canopyDrain = (k_can * (canopyStore - canopyStore_max))
    return canopyDrain
Calculate the canopy drainage flux from canopy interception storage

Parameters
----------
canopyStore : int or float
    Canopy Interception storage [mm]
canopyStore_max : int or float
    Maximum non-drainable canopy interception storage [mm]
k_can: float
    Canopy drainage coecient [day^-1]

Returns
-------
canopyDrain : int or float
    Canopy drainage flux [mm day^-1]
def calc_canopy_drainage_flux(canopyStore, canopyStore_max, k_can):
    ' Calculate the canopy drainage flux from canopy interception storage\n\n    Parameters\n    ----------\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    k_can: float\n        Canopy drainage coe\x0ecient [day^-1]\n\n    Returns\n    -------\n    canopyDrain : int or float\n        Canopy drainage flux [mm day^-1]\n    '
    if (canopyStore < canopyStore_max):
        canopyDrain = 0.0
    else:
        canopyDrain = (k_can * (canopyStore - canopyStore_max))
    return canopyDrain