function global_cmpd_vals = tally_changes_in_cmpd_numbers(global_id, local_cmpd_nums, global_cmpd_vals)


num_cmpds = length(global_id);
    
for i = 1:num_cmpds
    
    this_gid = global_id(i);
    
    global_cmpd_vals(this_gid,2) = global_cmpd_vals(this_gid,2) + local_cmpd_nums(i,2);
    
end

