def basin_ensemble_mean(dict_by_basin, basin_name, case):
    """Compute the multi-GCM ensemble mean SPEI for a given basin and case
    
    Parameters
    ----------
    dict_by_basin : DICT
        Stores SPEI per basin
    basin_name : STR
        Which basin to study
    case : STR
        'WRunoff', 'NRunoff', 'diff'
        
    Returns
    -------
    em: pandas.Series object
        Ensemble mean SPEI for this basin and case
    
    """
    basin_df = dict_by_basin[basin_name][case]
    em = basin_df.mean(axis=1) #compute mean among all models at each timestep
    return em