function sourcegen = sourcefunk(aran,x,y)

%Takes in the variable aran generated within the main body of code and assigns particle origin
%on the basis of weighting informed by literature. FOR EXAMPLE, DOUNREAY
%AND SELLAFIELD STATIONS ARE DECOMISSIONED/ IN THE PROCESS OF BEING
%DECOMISSIONED AND CONTAIN SIGNIFICANT VOLUMES OF WASTE MATERIAL, INCLUDING
%FISSILE/IRRADIATED WATER
if aran <0.32
        %DOUNREAY power station location
        x=1040;
        %   y=600;
        y=411;
        
    elseif (aran>0.32 && aran<0.64)
        %SELLAFIELD (Ditto above)
        x=661;
        y=418;
    elseif(aran>64 && aran<0.76)
        %Hinkley point B (Ditto above)
%WHILE THE SITE IS STILL OPERATIONAL THIS STATION HAS ALSO BEEN WEIGHTED STRONGLY, GIVEN ITS PROXIMAL LOCATION
%TO THE NORTH IRISH COAST
        x=392;
        y=385;
    %% Bradwell
    elseif(aran>0.76 && aran<0.78)
        x=431;
        y=660;
    %% Torness
    elseif(aran>0.78 && aran<0.80)
         x=801;
         y=478;
    %% Hartlepool
    elseif(aran>0.80 && aran<0.82)
         x=684;
         y=550;
    %% Sizewell
    elseif(aran>0.82 && aran<0.84)
         x=479;
         y=691;
    %% Dungeness
    elseif(aran>0.84 && aran<0.86)
         x=366;
         y=655;
    %% Winfrith
    elseif(aran>0.86 && aran<0.88)
         x=344;
         y=521;
    %% Berkeley
    elseif(aran>0.88 && aran<0.90)
         x=418;
         y=465;
    %% Transfynydd
    elseif(aran>0.90 && aran<0.92)
         x=523;
         y=390;
    %% Wylfa
    elseif(aran>0.92 && aran<0.94)
         x=578;
         y=376;
    %% Heysham
    elseif(aran>0.94 && aran<0.96)
         x=682;
         y=424;
    %% Chapelcross
    elseif(aran>0.96 && aran<0.98)
        x=702;
        y=433;
    %% Hunterston
    else
         x=763;
         y=355;
    
    end
 %VECTOR ALLOCATION (TO BE READ BACK IN BY THE MAIN BODY OF CODE)   
 sourcegen=[x y];
 
 %N.B. STATIONS/GEOGRAPHIC LOCATIONS OBTAINED FROM GOOGLE MAPS/WIKIPEDIA/ http://www.sepa.org.uk/