function y=plterr(x1,x2)
% Y=PLTERR(X1,X2)
% contours two 512-long error vectors

lat=10.5:8:66.5;long=145.5:8:265.5;clf reset

xx=x1(1:128);s=(max(xx)-min(xx))/4;
if s~=0, s=str2num(sprintf('%.0e',s/2))*2; end
subplot(421),plotatoc,pltstate(long,lat,xx,s);title('0-100m depth'),

xx=x2(1:128);subplot(422),plotatoc,
pltstate(long,lat,xx,s);title('0-100m depth'),

xx=x1(129:256)/5;s=(max(xx)-min(xx))/4;
if s~=0, s=str2num(sprintf('%.0e',s/2))*2; end
subplot(423),plotatoc,pltstate(long,lat,xx,s);title('100-600m depth'),

xx=x2(129:256)/5;subplot(424),plotatoc,
pltstate(long,lat,xx,s);title('100-600m depth'),

xx=x1(257:384)/10;s=(max(xx)-min(xx))/4;
if s~=0, s=str2num(sprintf('%.0e',s/2))*2; end
subplot(425),plotatoc,pltstate(long,lat,xx,s);title('600-1600m depth'),

xx=x2(257:384)/10;subplot(426),plotatoc,
pltstate(long,lat,xx,s);title('600-1600m depth'),

xx=x1(385:512)/24;s=(max(xx)-min(xx))/4;
if s~=0, s=str2num(sprintf('%.0e',s/2))*2; end
subplot(427),plotatoc,pltstate(long,lat,xx,s);title('1600-4000m depth'),
 
xx=x2(385:512)/24;subplot(428),plotatoc,
pltstate(long,lat,xx,s);title('1600-4000m depth'),
