close all 
clear all 

%% load values 
S   = load('Qsmall.mat'); 
Q   = S.Qsmall          ; % the data field, [space,time,variableNumber] 
dx  = S.dx              ; 
dt  = S.dt              ; 

%% load shifts 
S           = load('shifts.mat'); 
shifts      = S.shifts          ;     
shiftNames  = S.shiftNames      ; 
%%

[Nx, Nt, varNum ]  = size(Q) ;  

x   = (0:Nx-1)*dx ;  % space
t   = (0:Nt-1)*dt ;  % time 


[T,XX] = meshgrid( t,x )  ;  % for plotting 

variableName ={'rho','rhoU','p','massFrac'} ;

varNum = 1 ; % rho 



pcolor(XX,T, log(Q(:,:,varNum )) ) ; shading flat   % log does not work for second variable 
title(variableName{varNum}); 
hold all 
plot(shifts(:,1),t) ;  
plot(shifts(:,2),t) ;  
plot(shifts(:,3),t) ;  
plot(shifts(:,4),t) ;  

xlabel('x [m]')
ylabel('t [s]')
legend( [ {'data'} shiftNames] ) 