clear

fig_ps=[752 56 1537 1038];
cm=brewermap(64,'*Spectral'); 
figure(1)
set(gcf,'Position',fig_ps)


% NSIDC SIarea
nnx=304; nny=448;
nlat=readbin('NSIDC_IceCon/psn25lats.dat',[nnx nny],1,'int32')/100000;
nlon=readbin('NSIDC_IceCon/psn25lons.dat',[nnx nny],1,'int32')/100000;
ix=find(nlon>180);
nlon(ix)=nlon(ix)-360;
% read southern data grid coordinates
snx=316; sny=332;
slat=readbin('NSIDC_IceCon/pss25lats.dat',[snx sny],1,'int32')/100000;
slon=readbin('NSIDC_IceCon/pss25lons.dat',[snx sny],1,'int32')/100000;
ix=find(slon>180);
slon(ix)=slon(ix)-360;

%fn='NSIDC_IceCon/NSIDC_LLC_SIarea.mat';
fn='NSIDC_IceCon/NSIDC_LLC_SIarea_2020.mat';
load(fn)

for i=1:365
	dd=datestr(datenum(2020,3,i));
sst_mur = nic_nsidc(:,:,i); sst_llc = nic_llc(:,:,i);     
%sst_mur = sic_nsidc(:,:,i); sst_llc = sic_llc(:,:,i);     
sst_dif=sst_llc-sst_mur;


subplot(221)
m_proj('stereo','lat',90,'lon',0,'rad',40)
m_pcolor(nlon,nlat,sst_mur)
%m_proj('stereo','lat',-90,'lon',0,'rad',40)
%m_pcolor(slon,slat,sst_mur)

caxis([0 1])
shading flat,thincb(1);
m_grid('xtick',-180:30:180,'ytick',40:10:80)
%m_grid('xtick',-180:30:180,'ytick',-80:10:-40,'Xaxislocation','top','Yaxislocation','middle')
title(['NSIDC SIarea'])

subplot(222)
m_proj('stereo','lat',90,'lon',0,'rad',40)
m_pcolor(nlon,nlat,sst_llc)
%m_proj('stereo','lat',-90,'lon',0,'rad',40)
%m_pcolor(slon,slat,sst_llc)
caxis([0 1])
shading flat,thincb(1);
m_grid('xtick',-180:30:180,'ytick',40:10:80)
%m_grid('xtick',-180:30:180,'ytick',-80:10:-40,'Xaxislocation','top','Yaxislocation','middle')
title(['LLC2160 SIarea'])

cx=subplot(223);
m_proj('stereo','lat',90,'lon',0,'rad',40)
m_pcolor(nlon,nlat,sst_dif)
%m_proj('stereo','lat',-90,'lon',0,'rad',40)
%m_pcolor(slon,slat,sst_dif)
caxis([-1 1]*1)
shading flat,thincb(1);
m_grid('xtick',-180:30:180,'ytick',40:10:80)
%m_grid('xtick',-180:30:180,'ytick',-80:10:-40,'Xaxislocation','top','Yaxislocation','middle')
colormap(cx,bluewhitered)
title(['LLC2160 - NSIDC SIarea @' dd])

print('-dpng',['fig_MUR_SST' myint2str(i,3)])


end
