def get_season_data(data, season='ALL'):
    """Get data within given season."""

    if season == 'ALL':
        return data

    if season == 'DJF':
        return data[(data.index.month == 12) |
                    (data.index.month == 1) |
                    (data.index.month == 2)]

    if season == 'MAM':
        return data[(data.index.month == 3) |
                    (data.index.month == 4) |
                    (data.index.month == 5)]

    if season == 'JJA':
        return data[(data.index.month == 6) |
                    (data.index.month == 7) |
                    (data.index.month == 8)]

    if season == 'SON':
        return data[(data.index.month == 9) |
                    (data.index.month == 10) |
                    (data.index.month == 11)]

    raise ValueError("Unrecognized season '%r'" % season)