
fid=fopen('/bdd/CFMIP/GOCCP/PARASOL/grid_2x2/liste');
 c=textscan(fid,'%s','delimiter','');      
 list=c{1};

ncload([list{1}])

%%% Initialize lat/lon/alt
lat(1:length(latitude)+1)=90;
lon(1:length(longitude)+1)=-180;

%%% Create top latitude / top longitude
for i=1:length(latitude)
  lat(i+1)=lat(i)-180/length(latitude);
end

for i=1:length(longitude)
  lon(i+1)=lon(i)+360/length(longitude);
end

%%% Initialize tot low mid high vectors
refl(1:length(latitude),1:length(longitude),1:length(list))=0;

for i = 1:length(list)
  list{i}
  ncload([list{i}]);

reflectance(reflectance==-9999)=nan;
toto(1,1)=max(max(reflectance));
toto(1,2)=min(min(reflectance));

theta_s(theta_s==-9999)=nan;
toto(2,1)=max(max(theta_s));
toto(2,2)=min(min(theta_s));

toto


a=[0.75 0 1; 0.5 0 1; 0 0 1; 0 0.5 1; 0 1 1; 0 1 0.5; 0 1 0; 0.5 1 0; 1 1 0; 1 0.5 0; 1 0 0; 1 0 0.5];

figure
%%% Map (hammer graph)
m_proj('hammer-aitoff','clongitude',0);
m_pcolor(longitude,latitude,reflectance)

% some latitude line to make easier the reading of the plot
 y(1:length(longitude))=0;
m_line(longitude,y','color','black')
 y(1:length(longitude))=30;
m_line(longitude,y','color','black')
 y(1:length(longitude))=60;
m_line(longitude,y','color','black')
 y(1:length(longitude))=-60;
m_line(longitude,y','color','black')
 y(1:length(longitude))=-30;
m_line(longitude,y','color','black')

m_coast('color','black') ; % pour les cotes continents
caxis([0 1])
m_grid('xtick', [], 'ytick', []);
colormap(a)
colorbar
shading flat;     % pour ne pas mettre de grille

clear reflectance theta_s toto
end
