% Convective Cumulative CFAD
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hf=figure;

mixmap=colormap([dw_colorbar;map2]);

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',[50;600;1120;1650;2200;2750;3300;3850;4360;4900;5470],...
    'Yticklabel',[0.01;0.1;1;5;25;50;75;95;99;99.9;99.99]);
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]);
w1=[0,0.01,0.1,1,5,25,50,75,95,99,99.9,99.99];
grid on;
hold on;
[c1,h1] = contourf(CFADx,CFADy,convect_CCFAD,w1);
set(h1,'edgecolor','none');
hold on;
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(2) w1(2)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(3) w1(3)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(4) w1(4)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(5) w1(5)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(6) w1(6)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(7) w1(7)]);
set(h2,'linestyle','--','linewidth',2);
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(8) w1(8)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(9) w1(9)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(10) w1(10)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(11) w1(11)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,convect_CCFAD,[w1(12) w1(12)]);
set(h2,'linestyle','-');
clabel(c2,h2);
caxis([-0.01 105]);
title({andy;...
    'Convective Region Cumulative CFAD'},'Fontsize',12);
xlabel ('Reflectivity (dBZ)','Fontsize',12);
ylabel ('Height (km)','Fontsize',12);

Cmlength=length(colormap);
beginslot1=1;
endslot1=length(dw_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 Cumulative CFAD
hf=figure;

mixmap=colormap([dw_colorbar;map2]);

ax2a=subplot(1,2,2);
set(ax2a,'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',[50;600;1120;1650;2200;2750;3300;3850;4360;4900;5470],...
    'Yticklabel',[0.01;0.1;1;5;25;50;75;95;99;99.9;99.99]);
hold on;
pp=imagesc([0 10],[-500 6000],linspace(-500,1,1000)');

ax1a=subplot(1,2,1);
set(ax1a,'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]);
w1=[0,0.01,0.1,1,5,25,50,75,95,99,99.9,99.99];
grid on;
hold on;
[c1,h1] = contourf(CFADx,CFADy,strat_CCFAD,w1);
set(h1,'edgecolor','none');
hold on;
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(2) w1(2)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(3) w1(3)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(4) w1(4)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(5) w1(5)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(6) w1(6)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(7) w1(7)]);
set(h2,'linestyle','--','linewidth',2);
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(8) w1(8)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(9) w1(9)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(10) w1(10)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(11) w1(11)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,strat_CCFAD,[w1(12) w1(12)]);
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 Cumulative CFAD'},'Fontsize',12);
xlabel ('Reflectivity (dBZ)','Fontsize',12);
ylabel ('Height (km)','Fontsize',12);
hold on;
caxis([-0.01 105]);

Cmlength=length(colormap);
beginslot1=1;
endslot1=length(dw_colorbar)-1;
beginslot2=endslot1+1;
endslot2=Cmlength;
clim1a=get(ax1a,'Clim');
clim2a=get(ax2a,'Clim');

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Other Cumulative CFAD
hf=figure;

mixmap=colormap([dw_colorbar;map2]);

ax2b=subplot(1,2,2);
set(ax2b,'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',[50;600;1120;1650;2200;2750;3300;3850;4360;4900;5470],...
    'Yticklabel',[0.01;0.1;1;5;25;50;75;95;99;99.9;99.99]);
hold on;
pp=imagesc([0 10],[-500 6000],linspace(-500,1,1000)');

ax1b=subplot(1,2,1);
set(ax1b,'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]);
w1=[0,0.01,0.1,1,5,25,50,75,95,99,99.9,99.99];
grid on;
hold on;
[c1,h1] = contourf(CFADx,CFADy,other_CCFAD,w1);
set(h1,'edgecolor','none');
hold on;
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(2) w1(2)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(3) w1(3)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(4) w1(4)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(5) w1(5)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(6) w1(6)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(7) w1(7)]);
set(h2,'linestyle','--','linewidth',2);
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(8) w1(8)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(9) w1(9)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(10) w1(10)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(11) w1(11)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,other_CCFAD,[w1(12) w1(12)]);
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 Cumulative CFAD'},'Fontsize',12);
xlabel ('Reflectivity (dBZ)','Fontsize',12);
ylabel ('Height (km)','Fontsize',12);
hold on;
caxis([-0.01 105]);

Cmlength=length(colormap);
beginslot1=1;
endslot1=length(dw_colorbar)-1;
beginslot2=endslot1+1;
endslot2=Cmlength;
clim1b=get(ax1b,'Clim');
clim2b=get(ax2b,'Clim');

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Total Cumulative CFAD
hf=figure;

mixmap=colormap([dw_colorbar;map2]);

ax2c=subplot(1,2,2);
set(ax2c,'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',[50;600;1120;1650;2200;2750;3300;3850;4360;4900;5470],...
    'Yticklabel',[0.01;0.1;1;5;25;50;75;95;99;99.9;99.99]);
hold on;
pp=imagesc([0 10],[-500 6000],linspace(-500,1,1000)');

ax1c=subplot(1,2,1);
set(ax1c,'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]);
w1=[0,0.01,0.1,1,5,25,50,75,95,99,99.9,99.99];
grid on;
hold on;
[c1,h1] = contourf(CFADx,CFADy,tot_CCFAD,w1);
set(h1,'edgecolor','none');
hold on;
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(2) w1(2)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(3) w1(3)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(4) w1(4)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(5) w1(5)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(6) w1(6)]);
set(h2,'linestyle','-');
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(7) w1(7)]);
set(h2,'linestyle','--','linewidth',2);
clabel(c2,h2);
hold on;
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(8) w1(8)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(9) w1(9)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(10) w1(10)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(11) w1(11)]);
set(h2,'linestyle','-');
clabel(c2,h2);
[c2,h2]=contour(CFADx,CFADy,tot_CCFAD,[w1(12) w1(12)]);
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 Cumulative CFAD'},'Fontsize',12);
xlabel ('Reflectivity (dBZ)','Fontsize',12);
ylabel ('Height (km)','Fontsize',12);
hold on;
caxis([-0.01 105]);

Cmlength=length(colormap);
beginslot1=1;
endslot1=length(dw_colorbar)-1;
beginslot2=endslot1+1;
endslot2=Cmlength;
clim1c=get(ax1c,'Clim');
clim2c=get(ax2c,'Clim');

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
