def xr_count_across_days_of_year(da, count_above=95.0):

    """
    Parameters
    ----------
    da: xr.DataArray
        with 'time' dimensions.
    count_above: float

    Returns
    -------
    data array with a 'year' dimension instead of 'time'.
    """

    da_count = da.where(da > count_above).groupby("time.year").count()
    da_count = da_count.rename(year="time")
    return da_count