function out= oceancurrent(r,x,y)
%Function takes in the variable r, randomly generated within the main body
%of code

%%%WEIGHTED APPROXIMATION OF PARTICLE TRANSLATION ACROSS GRID (TWO
%%%DIMENSIONS) - QUASI-REPRESENTATIVE OF OCEAN CURRENT DATA, INFORMED BY
%%%DATA/ GRAPHICS OBTAINED FROM THE Atlantic Ocean Energy Alliance/

%ABOVE THE NORTHERN FRINGES OF SCOTLAND/ NORTH OF IRELAND
if (x>1000 && y>80)
    if r<0.75
        y=y-1;
        
    else if (r>=0.75) && (r<0.90)
            
            y=y+1;
        else if (r>=0.90) && (r<0.95)
                x=x+1;
                
            else if  (r>=0.95) && (r<=1)
                    x=x-1;
                end
            end
        end
    end
    %%%% The Galway Downer
elseif y<80 && x<300
    if r<0.05
        y=y-1;
        
    else if (r>=0.05) && (r<0.10)
            
            y=y+1;
        else if (r>=0.02) && (r<0.15)
                x=x+1;
                
            else if  (r>=0.15) && (r<=1)
                    x=x-1;
                end
            end
        end
    end
    
    %%% Portion west of France/ South of Ireland
elseif y<200 && x<300
    if r<0.10
        y=y-1;
        
    else if (r>=0.1) && (r<0.98)
            
            y=y+1;
        else if (r>=0.98) && (r<0.99)
                x=x+1;
                
            else if  (r>=0.99) && (r<=1)
                    x=x-1;
                end
            end
        end
    end
    
    %%% Bristol Channel & out
    
elseif ((y>200 && y<300) && (x>300 && x<400))
    if r<0.05
        x=x-1;
        
    else if (r>=0.05) && (r<0.86)
            
            x=x+1;
        else if (r>=0.86) && (r<0.93)
                y=y+1;
                
            else if  (r>=0.93) && (r<=1)
                    y=y-1;
                end
            end
        end
    end
    
    %%% East coast
elseif y>600 && x<1000
    if r<=0.5
        x=x+1;
    elseif (r >0.5 && r<=0.70)
        y=y-1;
    elseif (r>0.7 && r<=0.90)
        y=y+1;
    else
        x=x-1;
    end
    %%%%% Top right
elseif x>1000
    if r<0.75
        y=y-1;
        
    else if (r>=0.75) && (r<0.90)
            
            y=y+1;
        else if (r>=0.90) && (r<0.95)
                x=x+1;
                
            else if  (r>=0.95) && (r<=1)
                    x=x-1;
                end
            end
        end
    end
    %%%Inner Irish sea: weighted region
elseif (x>=491 && x<=690) && (y>=312 && y<470)
    if r<=0.25
        x=x+1;
    elseif r>0.25 && r<=0.70
        y=y-1;
    elseif r>0.70 && r<=0.96
        y=y+1;
    else
        x=x-1;
    end
    
    %%%%Other grid points
else
    if r<0.25
        x=x-1;
        
    else if (r>=0.25) && (r<0.5)
            
            x=x+1;
        else if (r>=0.50) && (r<0.75)
                y=y+1;
                
            else if  (r>=0.75) && (r<=1)
                    y=y-1;
                end
            end
        end
    end
end

out= [x y];