def daily_avg_all_years(soil_moisture_dataframe):
    """Function that takes an input dataframe of raw soil moisture data 
    and turns it into a dataframe showing average soil moisture value for 
    each Julian day of the year, across all years of data.

        Parameters
        ----------
        soil_moisture_dataframe : dataframe
            Input dataframe containing raw soil moisture data.


        Returns
        ------
        sm_year_daily_all_years : dataframe
            Dataframe showing average soil moisture value for 
            each Julian day of the year, across all years of data.

    """
    
    sm_daily_avg_all_years = soil_moisture_dataframe.set_index('doy')

    sm_year_daily_all_years = sm_daily_avg_all_years.groupby(
        ["doy"])[["sm_5cm", "sm_10cm", "sm_20cm", "sm_50cm", "sm_100cm"]].mean()
    
    return sm_year_daily_all_years