%

clear;

olr=zeros(122,29,64,128);

ncload('rlut_d.CtIV.197106-09.nc','rlut');
olr(:,1,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.197206-09.nc','rlut');
olr(:,2,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.197306-09.nc','rlut');
olr(:,3,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.197406-09.nc','rlut');
olr(:,4,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.197506-09.nc','rlut');
olr(:,5,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.197606-09.nc','rlut');
olr(:,6,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.197706-09.nc','rlut');
olr(:,7,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.197806-09.nc','rlut');
olr(:,8,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.197906-09.nc','rlut');
olr(:,9,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198006-09.nc','rlut');
olr(:,10,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198106-09.nc','rlut');
olr(:,11,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198206-09.nc','rlut');
olr(:,12,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198306-09.nc','rlut');
olr(:,13,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198406-09.nc','rlut');
olr(:,14,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198506-09.nc','rlut');
olr(:,15,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198606-09.nc','rlut');
olr(:,16,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198706-09.nc','rlut');
olr(:,17,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198806-09.nc','rlut');
olr(:,18,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.198906-09.nc','rlut');
olr(:,19,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.199106-09.nc','rlut');
olr(:,20,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.199206-09.nc','rlut');
olr(:,21,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.199306-09.nc','rlut');
olr(:,22,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.199406-09.nc','rlut');
olr(:,23,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.199506-09.nc','rlut');
olr(:,24,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.199606-09.nc','rlut');
olr(:,25,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.199706-09.nc','rlut');
olr(:,26,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.199806-09.nc','rlut');
olr(:,27,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.199906-09.nc','rlut');
olr(:,28,:,:)=rlut; clear rlut;

ncload('rlut_d.CtIV.200006-09.nc','rlut');
olr(:,29,:,:)=rlut; clear rlut;

% selction du domaine geographique
olr1=zeros(122,29,64,128);
olr1(:,:,:,1:64)=olr(:,:,:,65:128);
olr1(:,:,:,65:128)=olr(:,:,:,1:64);
clear olr;
olr=olr1;
clear olr1;
olr=olr(:,:,29:43,54:77);
olr1(:,:,:)=mean(olr);
clear olr;
olr2(:,:)=mean(olr1);
clear olr1;

ncload('rlut_d.AfNQIVIV.199606-09.nc','lat','lon')
lon=lon-180;
lon=lon(54:77);
lat=lat(29:43)';
subplot(3,2,2);
palette;
olr2(1,1)=149.999;
olr2(1,2)=350.001;
contourf(lon,lat,olr2,[150:10:350],'LineStyle','none');
colorbar;

hold on;
cartemonde;
set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';'  0';'10N';'20N';'30N'],'fontname','Arial','fontsize',6);
set (gca,'XTick',[-30:10:30],'XTickLabel',['30W';'20W';'10W';'  0';'10E';'20E';'30E'],'fontname','Arial','fontsize',6);
set (gca,'tickDir','out');
