%
% plot Long and Drinkwater Greenland Ice Facies
%
load Benson_drysnow.txt
load Benson_percolation.txt
load Benson_soaked.txt
%
load LDAblation.txt
load LDdrysnowI.txt
load LDdrysnowII.txt
load LDWetSnow.txt
load LDcoast.txt
%
load /auto/cers0/long/cia/filt_greenland.dat
%    
name='filt_greenland';
line=['map=' name ';'];
eval(line);                  % store mapfile contents into 'map'
line=['clear ' name];        % clear old variable

% plot coastline
ind=find(map(:,4)==1);    % select only coastlines from mapfile

lons=map(ind,2);
lats=map(ind,1);
pen=map(ind,3);

n=find(lons>180);
lons(n)=lons(n)-360;

ind(length(ind)+1)=3;
ind=find(pen==3);
ind(length(ind)+1)=length(pen)+1;
n=length(ind);

% plot in lat/lon form
figure(1)
clf

if (1==1)
for k=1:n-1
  h(8)=plot(lons(ind(k):ind(k+1)-1),lats(ind(k):ind(k+1)-1),'y');
  hold on;
end
end

% plot L&D drysnow and ablation
h(1)=plot(LDAblation(:,3),LDAblation(:,2),'g');
hold on
h(2)=plot(LDdrysnowI(:,3),LDdrysnowI(:,2),'k');
plot(LDdrysnowII(:,3),LDdrysnowII(:,2),'k');

% plot L&D Wet Snow lines

lons=[0; LDWetSnow(:,3); 0];
lats=[0; LDWetSnow(:,2); 0];
ind=find(lons==0);
n=length(ind);
for k=1:n-1
 h(3)=plot(lons(ind(k)+1:ind(k+1)-1),lats(ind(k)+1:ind(k+1)-1),'r');
end

% plot L&D coast
h(7)=plot(LDcoast(:,3),LDcoast(:,2),'b');

h(4)=plot(Benson_drysnow(:,3),Benson_drysnow(:,2),'m');
h(5)=plot(Benson_percolation(:,3),Benson_percolation(:,2),'c');
h(6)=plot(Benson_soaked(:,3),Benson_soaked(:,2),'m:');
legend(h,'LD Abla','LD Dry Snow','LD Wet Snow','Ben Dry Snow','Ben Perc','Ben Soaked','LD Coast','CIA Coast','Location','SouthEast')

axis off











