function index_dups = find_repeats (output)

%
% want to find duplicates of 
% station number and niskin number
%
% II should be (number_duplicate, 2) array of the indeces of all duplicates
%
num_duplicates = 0;
index_dups = [];
for II = 1:length(output)
    i_check_sta = output(II,1);
    i_check_niskin = output(II,3);
    JJ = find(output(:,1) == i_check_sta & output(:,3) == i_check_niskin);
    if length(JJ) > 1
        % found a duplicate       
        num_duplicates = num_duplicates + 1;
        index_dups(:,num_duplicates) = JJ;
    end
end
if isempty(index_dups)
    fprintf(1,'\nNo Duplicates Found\n\n')
else
    index_dups=unique(index_dups','rows');
end
return;


    
    
