def calc_met_equation_hdd(case, t_min, t_max, t_base):
    """Calculate hdd according to Meteorological
    Office equations as outlined in Day (2006): Degree-days: theory and application
    """
    if case == 1:
        hdd = t_base - 0.5 * (t_max + t_min)
    elif case == 2:
        hdd = 0.5 * (t_base - t_min) - 0.25 * (t_max - t_base)
    elif case == 3:
        hdd = 0.25 * (t_base - t_min)
    else:
        hdd = 0
    return hdd
