def total(globvars, dict_list):
    """
    Function to take the difference of two dict objects.
    Assumes that all objects have the same keys.

    Args:
        globvars: obj of type _GlobVars
            Global variables needed for budget computations.
        dict_list: list of dict
            Dictionaries to be summed.

    Returns:
        result: dict
            Key-by-key sum of all dicts in dict_list.
    """
    # Initialize
    result = {}
    for spc in globvars.species_list:
        result[spc + "_f"] = 0.0   # full-atmosphere
        result[spc + "_t"] = 0.0   # trop-only
        result[spc + "_s"] = 0.0   # strat-only

    # Sum over all dictionaries
    for d in dict_list:
        for k, v in d.items():
            result[k] += v

    return result