% Convective CFAD
hf=figure;

mixmap=colormap([d_colorbar;map1]);

ax2=subplot(1,2,2);
set(ax2,'Position',[0.85 0.1 0.04 0.8],'Ylim',[-500 6000],'Xlim',[0 10],...
    'Yaxislocation','right','xtick',[],'layer','top','box','on','ygrid',...
    'on','Ytick',[250;950;1650;2400;3100;3850;4580;5300],...
    'Yticklabel',[0.1,0.5,1,2,5,15,30,40]);
hold on;
pp=imagesc([0 10],[-500 6000],linspace(-500,1,1000)');


ax1=subplot(1,2,1);
set(ax1,'ylim',[0 20],'ytick',(0:1:20),...
    'xlim',[0 60],'xtick',(0:5:60),'Layer','top',...
    'Position',[0.1 0.1 0.7 0.8]);
v1=[0,0.1,0.5,1,2,5,15,30,40];
grid on;
hold on;
[c1,h1] = contourf(CFADx,CFADy,CFAD_convect,v1);
set(h1,'edgecolor','none');
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_convect,[v1(2) v1(2)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_convect,[v1(3) v1(3)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_convect,[v1(4) v1(4)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_convect,[v1(5) v1(5)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_convect,[v1(6) v1(6)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_convect,[v1(7) v1(7)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_convect,[v1(8) v1(8)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,CFAD_convect,[v1(9) v1(9)]);
set(h2,'linestyle','-');
clabel(c2,h2);
title({[char(NM(snum)),'.',char(ORB(snum)),' ',char(MN(snum)),...
    '/',char(DY(snum)),'/',char(YR(snum)),' ',char(TM(snum)),'UTC'];...
    'Convective Region CFAD'});
xlabel ('Reflectivity (dBZ)','Fontsize',12);
ylabel ('Height (km)','Fontsize',12);
hold off;

Cmlength=length(colormap);
beginslot1=1;
endslot1=length(d_colorbar)-1;
beginslot2=endslot1+1;
endslot2=Cmlength;
clim1=get(ax1,'Clim');
clim2=get(ax2,'Clim');

%set(ax1,'Clim',new_climit(beginslot1,endslot1,clim1(1),clim1(2),Cmlength));
set(ax2,'Clim',new_climit(beginslot2,endslot2,clim2(1),clim2(2),Cmlength));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Stratiform CFAD
hf=figure;

mixmap=colormap([d_colorbar;map1]);

ax2=subplot(1,2,2);
set(ax2,'Position',[0.85 0.1 0.04 0.8],'Ylim',[-500 6000],'Xlim',[0 10],...
    'Yaxislocation','right','xtick',[],'layer','top','box','on','ygrid',...
    'on','Ytick',[250;950;1650;2400;3100;3850;4580;5300],...
    'Yticklabel',[0.1,0.5,1,2,5,15,30,40]);
hold on;
pp=imagesc([0 10],[-500 6000],linspace(-500,1,1000)');


ax1=subplot(1,2,1);
set(ax1,'ylim',[0 20],'ytick',(0:1:20),...
    'xlim',[0 60],'xtick',(0:5:60),'Layer','top',...
    'Position',[0.1 0.1 0.7 0.8]);
v1=[0,0.1,0.5,1,2,5,15,30,40];
grid on;
hold on;
[c1,h1] = contourf(CFADx,CFADy,CFAD_strat,v1);
set(h1,'edgecolor','none');
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_strat,[v1(2) v1(2)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_strat,[v1(3) v1(3)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_strat,[v1(4) v1(4)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_strat,[v1(5) v1(5)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_strat,[v1(6) v1(6)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_strat,[v1(7) v1(7)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_strat,[v1(8) v1(8)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,CFAD_strat,[v1(9) v1(9)]);
set(h2,'linestyle','-');
clabel(c2,h2);
title({[char(NM(snum)),'.',char(ORB(snum)),' ',char(MN(snum)),...
    '/',char(DY(snum)),'/',char(YR(snum)),' ',char(TM(snum)),'UTC'];...
    'Stratiform Region CFAD'});
xlabel ('Reflectivity (dBZ)','Fontsize',12);
ylabel ('Height (km)','Fontsize',12);
hold off;

Cmlength=length(colormap);
beginslot1=1;
endslot1=length(d_colorbar)-1;
beginslot2=endslot1+1;
endslot2=Cmlength;
clim1=get(ax1,'Clim');
clim2=get(ax2,'Clim');

%set(ax1,'Clim',new_climit(beginslot1,endslot1,clim1(1),clim1(2),Cmlength));
set(ax2,'Clim',new_climit(beginslot2,endslot2,clim2(1),clim2(2),Cmlength));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Other CFAD

hf=figure;

mixmap=colormap([d_colorbar;map1]);

ax2=subplot(1,2,2);
set(ax2,'Position',[0.85 0.1 0.04 0.8],'Ylim',[-500 6000],'Xlim',[0 10],...
    'Yaxislocation','right','xtick',[],'layer','top','box','on','ygrid',...
    'on','Ytick',[250;950;1650;2400;3100;3850;4580;5300],...
    'Yticklabel',[0.1,0.5,1,2,5,15,30,40]);
hold on;
pp=imagesc([0 10],[-500 6000],linspace(-500,1,1000)');


ax1=subplot(1,2,1);
set(ax1,'ylim',[0 20],'ytick',(0:1:20),...
    'xlim',[0 60],'xtick',(0:5:60),'Layer','top',...
    'Position',[0.1 0.1 0.7 0.8]);
v1=[0,0.1,0.5,1,2,5,15,30,40];
grid on;
hold on;
[c1,h1] = contourf(CFADx,CFADy,CFAD_other,v1);
set(h1,'edgecolor','none');
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_other,[v1(2) v1(2)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_other,[v1(3) v1(3)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_other,[v1(4) v1(4)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_other,[v1(5) v1(5)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_other,[v1(6) v1(6)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_other,[v1(7) v1(7)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_other,[v1(8) v1(8)]);

set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,CFAD_other,[v1(9) v1(9)]);
set(h2,'linestyle','-');
clabel(c2,h2);
title({[char(NM(snum)),'.',char(ORB(snum)),' ',char(MN(snum)),...
    '/',char(DY(snum)),'/',char(YR(snum)),' ',char(TM(snum)),'UTC'];...
    'Other Region CFAD'});
xlabel ('Reflectivity (dBZ)','Fontsize',12);
ylabel ('Height (km)','Fontsize',12);
hold off;

Cmlength=length(colormap);
beginslot1=1;
endslot1=length(d_colorbar)-1;
beginslot2=endslot1+1;
endslot2=Cmlength;
clim1=get(ax1,'Clim');
clim2=get(ax2,'Clim');

%set(ax1,'Clim',new_climit(beginslot1,endslot1,clim1(1),clim1(2),Cmlength));
set(ax2,'Clim',new_climit(beginslot2,endslot2,clim2(1),clim2(2),Cmlength));

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Total CFAD 

hf=figure;

mixmap=colormap([d_colorbar;map1]);

ax2=subplot(1,2,2);
set(ax2,'Position',[0.85 0.1 0.04 0.8],'Ylim',[-500 6000],'Xlim',[0 10],...
    'Yaxislocation','right','xtick',[],'layer','top','box','on','ygrid',...
    'on','Ytick',[250;950;1650;2400;3100;3850;4580;5300],...
    'Yticklabel',[0.1,0.5,1,2,5,15,30,40]);
hold on;
pp=imagesc([0 10],[-500 6000],linspace(-500,1,1000)');


ax1=subplot(1,2,1);
set(ax1,'ylim',[0 20],'ytick',(0:1:20),...
    'xlim',[0 60],'xtick',(0:5:60),'Layer','top',...
    'Position',[0.1 0.1 0.7 0.8]);
v1=[0,0.1,0.5,1,2,5,15,30,40];
grid on;
hold on;
[c1,h1] = contourf(CFADx,CFADy,CFAD_tot,v1);
set(h1,'edgecolor','none');
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_tot,[v1(2) v1(2)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_tot,[v1(3) v1(3)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_tot,[v1(4) v1(4)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_tot,[v1(5) v1(5)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_tot,[v1(6) v1(6)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_tot,[v1(7) v1(7)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,CFAD_tot,[v1(8) v1(8)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,CFAD_tot,[v1(9) v1(9)]);
set(h2,'linestyle','-');
clabel(c2,h2);
title({[char(NM(snum)),'.',char(ORB(snum)),' ',char(MN(snum)),...
    '/',char(DY(snum)),'/',char(YR(snum)),' ',char(TM(snum)),'UTC'];...
    'Total CFAD'});
xlabel ('Reflectivity (dBZ)','Fontsize',12);
ylabel ('Height (km)','Fontsize',12);
hold on;
caxis([0 45]);
set(gca,'Fontname','Arial','FontSize',12)


Cmlength=length(colormap);
beginslot1=1;
endslot1=length(d_colorbar)-1;
beginslot2=endslot1+1;
endslot2=Cmlength;
clim1=get(ax1,'Clim');
clim2=get(ax2,'Clim');

%set(ax1,'Clim',new_climit(beginslot1,endslot1,clim1(1),clim1(2),Cmlength));
set(ax2,'Clim',new_climit(beginslot2,endslot2,clim2(1),clim2(2),Cmlength));
