%make a movie of sea-ice thickness southern ocean

ifil='../../data/processed/iceCoverYearlyMean_HadISST.nc'

%plotting details
 xlims=[0 360];
 ylims=[-78.15 -20];
 in=[0:1:12];

%get data 
 x=ncread(ifil,'LONGITUDE');
 y=ncread(ifil,'LATITUDE11_50');
 [X,Y]=meshgrid(x,y); 
 hi=ncread(ifil,'ICECLIM'); 

 I=find(hi<=0); hi(I)=NaN; 
 hi=double(hi).*12/100;

    figure; drawnow
          m_proj('stereographic','lat',-90,'long',0,'radius',40);
          hold on
          [xxtt,yytt]=m_ll2xy(X,Y);
          flat_pcolor(xxtt,yytt,squee(sum(hi,3))'), shading flat;
          amcolormap(jet,in); amcaxis(in);

          [cc]=amcolorbar('horiz',in);
          set(cc,'linewidth',2,'tickdir','out','fontweight','bold', ...
                  'xtick',in([1:2:end]),'xticklabel',in([1:2:end]),'position', ...
                  [0.130+0.15 0.1100+0.1 0.7750-0.3 0.0611/4], ...
                  'fontsize',10)
          m_grid('xtick',12,'tickdir','out','ytick',[-80:10:20],'linest','-', ...
                 'color','k','xticklabels',[],'yticklabels',[]);

          m_coast('patch',[0.7 0.7 0.7])
          title('HadISST 1980-2000','fontsize',14)
          legend('off')

print -dtiff ../ps/hadISSTClim.tiff

