def compute_likelihood(da_logical, dim='ensemble'):
    """ 
        Returns array of likelihoods computed along dim from logical event data 
        
        Notes
        -----
        See http://www.cawcr.gov.au/projects/verification/
    """
    if dim == None:
        likelihood = da_logical
    else:
        likelihood = da_logical.mean(dim=dim).rename('likelihood')
    return likelihood
