def calc_saturated_fraction(unsatStore, unsatStore_max, alpha):
    """ 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
    """

    if unsatStore < unsatStore_max:
        satFrac = 1 - (1 - (unsatStore / unsatStore_max)) ** alpha
    else:
        satFrac = 1

    return satFrac