def get_meterological_equation_case_cdd(t_min, t_max, t_base):
    """Calculatease number to calculate cdd with Meteorological
    Office equations as outlined in Day (2006): Degree-days: theory and application

    Arguments
    ---------
    t_min : float
        Minimum daily temperature
    t_max : float
        Maximum dail temperature
    t_base : float
        Base temperature

    Return
    -------
    case_nr : int
        Case number
    """
    if t_max - t_base == t_base - t_min:
        t_base += 0.0001
    if t_min >= t_base:
        return 1
    elif t_max <= t_base:
        return 4
    elif t_max > t_base and t_max - t_base > t_base - t_min:
        return 2
    elif t_min < t_base and t_max - t_base < t_base - t_min:
        return 3
    else:
        raise Exception(
            'Error in calculating methorological office equation case {} {} {}'
            .format(t_min, t_max, t_base))
