load('output\time.out')
load('output\profile.out')
p=-profile(:,1);
time1=time(:,1);
i=1;
while i == 1
it=input('Menu choices: \n \n Evolution: \n   1) Precipitation and Evaporation \n   2) Surface air and sea surface temperatures \n   3) 500 mb T and q \n   4) TOA shortwave and longwave   \n  \n  Vertical Profiles:  \n   5) Temperature \n   6) Specific humidity \n   7) Buoyancy \n   8) Relative humidity \n   9) Heating rates  \n  10) Mass fluxes \n  11) Entrainment and detrainment  \n  12) Moist static energy  \n  13) Cloud fraction  \n  14) Cloud condensed water      \n \n  0) exit \n ');
if it == 1
   precip=time(:,2);
   evap=time(:,3);
   h=plot(time1,precip,'-',time1,evap,'--');
   set(h,'linewidth',2)
   xlabel('Time (days)','fontweight','bold')         
   ylabel('Precipitation and Evaporation (mm/day)','fontweight','bold')
   legend('Precipitation','Evaporation',0)
elseif it == 2
   sst=time(:,5);
   ta=time(:,4);
   h=plot(time1,sst,'-',time1,ta,'--');
   set(h,'linewidth',2)
   xlabel('Time (days)','fontweight','bold')         
   ylabel('SST and Ta (C)','fontweight','bold')
   legend('SST','Air temperature',0)
elseif it == 3
   t500=time(:,6);
   q500=time(:,7);
   h=plot(time1,t500,'-',time1,q500,'--');
   set(h,'linewidth',2)
   xlabel('Time (days)','fontweight','bold')         
   ylabel('500 mb T (C) and q (g/Kg)','fontweight','bold')
   legend('T','q',0)
elseif it == 4
   sw=time(:,8);
   lw=time(:,9);
   h=plot(time1,sw,'-',time1,lw,'--');
   set(h,'linewidth',2)
   xlabel('Time (days)','fontweight','bold')         
   ylabel('TOA Shortwave and Longwave (W/m^2)','fontweight','bold')
   legend('SW','LW',0)
elseif it == 5
   tpro=profile(:,2);
   h=plot(tpro,p);
   set(h,'linewidth',2)
   xlabel('Temperature (C)','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
elseif it == 6
   qpro=profile(:,3);
   h=plot(qpro,p);
   set(h,'linewidth',2)
   xlabel('Specific humidity (gm/Kg)','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
elseif it == 7
   buoy=profile(:,4);
   h=plot(buoy,p);
   set(h,'linewidth',2)
   xlabel('Buoyancy (C)','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
elseif it ==8 
   rh=100.*profile(:,5);
   h=plot(rh,p);
   set(h,'linewidth',2)
   xlabel('Relative humidity (%)','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
elseif it ==9 
   cq=profile(:,6);
   rq=profile(:,7);
   tq=profile(:,8);
   aq=profile(:,9);
   h=plot(cq,p,rq,p,tq,p,aq,p);
   set(h,'linewidth',2)
   xlabel('Heating (C/day)','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
   legend('Convective','Radiative','Turbulent', 'Large-scale adiabatic',0)
elseif it == 10
   mu=profile(:,10);
   mpen=profile(:,11);
   md=profile(:,12);
   h=plot(mu,p,mpen,p,md,p);
   set(h,'linewidth',2)
   xlabel('Mass flux (10^{-3} Kg m^{-2} s^{-1})','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
   legend('Net upward','Penetrative','Unsaturated',0)
elseif it == 11
   ent=profile(:,13);
   det=profile(:,14);
   h=plot(ent,p,det,p);
   set(h,'linewidth',2)
   xlabel('Entrainment and detrainment (10^{-3} Kg m^{-2} s^{-1})','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
   legend('Entrainment','Detrainment',0)
elseif it == 12
   mse=profile(:,15);
   h=plot(mse,p);
   set(h,'linewidth',2)
   xlabel('Moist static energy (K)','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
elseif it == 13
   clf=profile(:,16);
   h=plot(clf,p);
   set(h,'linewidth',2)
   xlabel('Cloud fraction','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
elseif it == 14
   clq=profile(:,17);
   h=plot(clq,p);
   set(h,'linewidth',2)
   xlabel('Cloud condensed water (g/Kg)','fontweight','bold')         
   ylabel('Pressure (mb)','fontweight','bold')
elseif it == 0
break
end
end

