def derived_P_species(df_R, f_TDP):
    """
    Calculate: Total P as the sum of TDP and PP
               SRP as a function of TDP
               for both the daily mass flux and the concentrations
    Inputs: reach results dataframe; value to multiply TDP by to get SRP
    Returns: dataframe of reach results, with extra columns added
    """
    # Calculate total P as the sum of TDP and PP
    df_R['TP_mgl'] = df_R['TDP_mgl'] + df_R['PP_mgl'] # Concentration (mg/l)
    df_R['TP_kg/day'] = df_R['TDP_kg/day'] + df_R['PP_kg/day'] # Mass (kg/day)
    
    # Calculate SRP from TDP using a constant user-supplied factor
    df_R['SRP_mgl'] = df_R['TDP_mgl']*f_TDP # Concentration (mg/l)
    df_R['SRP_kg/day'] = df_R['TDP_kg/day']*f_TDP # Mass (kg/day)
    
    return df_R