def calc_acc(ta, precip, tacc=274.16, **config):
    """
    calculate accumulation when precip is below threshold
    :param ta: grid of current temperature (K)
    :param precip: grid of current precipitation (mm)
    :param tacc: temperature threshold for accumlation  (K)
    :return: acc: grid of accumulation in current timestep (mm)
    """
    acc = precip.copy()
    acc[(ta >= tacc)] = 0

    return acc