def calc_saturated_fraction(unsatStore, unsatStore_max, alpha):
    ' Calculate the saturated fraction of the unsaturated zone\n\n    Parameters\n    ----------\n    unsatStore : int or float\n        Storage in the unsaturated zone [mm]\n    unsatStore_max : int or float\n        Maximum storage in the unsaturated zone [mm]\n    alpha : float\n        Parameter to account for the non-linearity in the variable source area for saturation-excess runoff\n\n    Returns\n    -------\n    satFrac: float\n        Saturated fraction of the unsaturated zone\n    '
    if (unsatStore < unsatStore_max):
        satFrac = (1 - ((1 - (unsatStore / unsatStore_max)) ** alpha))
    else:
        satFrac = 1
    return satFrac
Calculate the saturated fraction of the unsaturated zone

Parameters
----------
unsatStore : int or float
    Storage in the unsaturated zone [mm]
unsatStore_max : int or float
    Maximum storage in the unsaturated zone [mm]
alpha : float
    Parameter to account for the non-linearity in the variable source area for saturation-excess runoff

Returns
-------
satFrac: float
    Saturated fraction of the unsaturated zone
def calc_saturated_fraction(unsatStore, unsatStore_max, alpha):
    ' Calculate the saturated fraction of the unsaturated zone\n\n    Parameters\n    ----------\n    unsatStore : int or float\n        Storage in the unsaturated zone [mm]\n    unsatStore_max : int or float\n        Maximum storage in the unsaturated zone [mm]\n    alpha : float\n        Parameter to account for the non-linearity in the variable source area for saturation-excess runoff\n\n    Returns\n    -------\n    satFrac: float\n        Saturated fraction of the unsaturated zone\n    '
    if (unsatStore < unsatStore_max):
        satFrac = (1 - ((1 - (unsatStore / unsatStore_max)) ** alpha))
    else:
        satFrac = 1
    return satFrac