load x.out
load t.out
load p.out
i=1;
while i == 1
r=input('\n Time-distance plots: \n \n 1) Precipitation \n 2) Omega \n 3) v \n 4) u \n 5) SST \n 51) T_100 \n 52) MPI \n \n Cross-sections: \n \n 6) Omega \n 7) M_u \n 8) M_d \n 9) Streamfunction \n 10) u \n 11) Relative humidity \n 12) Perturbation temperature \n 13) Angular momentum and streamfunction \n \n 0) exit \n');
if r == 2
load omegat.out
b=max(max(omegat));
a=min(min(omegat));
c=transpose(omegat);
contourf(t,x,c,12)   
title(['Level 9 Omega (mb/hour) from ',num2str(a),' to ',num2str(b)])
ylabel('y (km)')
xlabel ('time (days)')
elseif r ==1
load precip.out
b=max(max(precip));
a=min(min(precip));
c=transpose(precip);
contourf(t,x,c,12)   
title(['Precipitation (mm/day) from ',num2str(a),' to ',num2str(b)])
ylabel('y (km)')
xlabel ('time (days)')
elseif r == 3
load vt.out
b=max(max(vt));
a=min(min(vt));
c=transpose(vt);
contourf(t,x,c,12)   
title(['Surface v (m/s) from ',num2str(a),' to ',num2str(b)])
ylabel('y (km)')
xlabel ('time (days)')
elseif r == 4
load ut.out
b=max(max(ut));
a=min(min(ut));
c=transpose(ut);
contourf(t,x,c,12)   
title(['Surface u (m/s) from ',num2str(a),' to ',num2str(b)])
ylabel('y (km)')
xlabel ('time (days)')
elseif r == 5
load sst.out
b=max(max(sst));
a=min(min(sst));
c=transpose(sst);
contourf(t,x,c,12)   
title(['SST (C) from ',num2str(a),' to ',num2str(b)])
ylabel('y (km)')
xlabel ('time (days)')
elseif r == 51
load t100.out
b=max(max(t100));
a=min(min(t100));
c=transpose(t100);
contourf(t,x,c,12)   
title(['T_100 (C) from ',num2str(a),' to ',num2str(b)])
ylabel('y (km)')
xlabel ('time (days)')
elseif r == 52
load mpi.out
b=max(max(mpi));
a=min(min(mpi));
c=transpose(mpi);
contourf(t,x,c,12)
title(['V_{max} (m/s) from ',num2str(a),' to ',num2str(b)])
ylabel('y (km)')
xlabel ('time (days)')
elseif r == 6
load omegal.out
b=max(max(omegal));
a=min(min(omegal));
contourf(x,-p,omegal,12)   
title(['Omega (mb/hour) from ',num2str(a),' to ',num2str(b)])
xlabel('y (km)')
ylabel ('Pressure (mb)')
elseif r == 7
load mul.out
b=max(max(mul));
a=min(min(mul));
contourf(x,-p,mul,12)   
title(['Updraft mass flux from ',num2str(a),' to ',num2str(b)])
xlabel('y (km)')
ylabel ('Pressure (mb)')
elseif r == 8
load mdl.out
b=max(max(mdl));
a=min(min(mdl));
contourf(x,-p,mdl)   
title(['Downdraft mass flux from ',num2str(a),' to ',num2str(b)])
xlabel('y (km)')
ylabel ('Pressure (mb)')
elseif r == 9
load psi.out
b=max(max(psi));
a=min(min(psi));
contourf(x,-p,psi,12)   
title(['Streamfunction from ',num2str(a),' to ',num2str(b)])
xlabel('y (km)')
ylabel ('Pressure (mb)')
elseif r == 10
load ul.out
b=max(max(ul));
a=min(min(ul));
contourf(x,-p,ul,12)   
title(['u (m/s) from ',num2str(a),' to ',num2str(b)])
xlabel('y (km)')
ylabel ('Pressure (mb)')
elseif r == 11
load rh.out
b=max(max(rh));
a=min(min(rh));
contourf(x,-p,rh)   
title(['Relative humidity from ',num2str(a),' to ',num2str(b)])
xlabel('y (km)')
ylabel ('Pressure (mb)')
elseif r == 12
load temp.out
b=max(max(temp));
a=min(min(temp));
contourf(x,-p,temp,15)
title(['Perturbation temperature (C) from ',num2str(a),' to ',num2str(b)])
xlabel('y (km)')
ylabel ('Pressure (mb)')
elseif r == 13
load am.out
load psi.out
b=max(max(am));
a=min(min(am));
contourf(x,-p,am,15)
hold on
contour(x,-p,psi,15,'k')
title(['Angular Momentum (m/s) from ',num2str(a),' to ',num2str(b)])
xlabel('y (km)')
ylabel ('Pressure (mb)')
hold off
elseif r == 0
break
end 
end
