def Precipitation(prec, temp, tt, rfcf, sfcf):
    """
    ========================================================
    Precipitation (temp, tt, prec, rfcf, sfcf)
    ========================================================

    Precipitaiton routine of the HBV96 model.

    If temperature is lower than TT [degree C], all the precipitation is considered as
    snow. If the temperature is higher than tt, all the precipitation is
    considered as rainfall.

    Parameters
    ----------
    temp : float
        Measured temperature [C]
    tt : float
        Lower temperature treshold [C]
    prec : float 
        Precipitation [mm]
    rfcf : float
        Rainfall corrector factor
    sfcf : float
        Snowfall corrector factor

    Returns
    -------
    rf : float
        Rainfall [mm]
    sf : float
        Snowfall [mm]
    """

    if temp <= tt:  # if temp <= lower temp threshold 
        rf = 0.0         #no rainfall all the precipitation will convert into snowfall
        sf = prec*sfcf

    else : #temp >= tt: # if temp > upper threshold 
        rf = prec*rfcf # no snowfall all the precipitation becomes rainfall 
        sf = 0.0

    return rf, sf