% um_time_test % Making sure that the correct times are plotted together % Time is calculated from analysis time 1 2 3 ...13 % Time1 and Time2 find the appropriate times for the variables. % gnp 31.01.2007 noanal = [7 8 15:1:22]; mean6h = 23:1:31; lsmoro = [11 12]; found1 = find(noanal == ivar); found2 = find(mean6h == ivar); if (isempty(found1) == 1) if (isempty(found2) == 1) disp('Var1 found at analysis time') itime1=itime; else disp('Var1 is a 6 hour mean') itime1=itime-1; end else disp('Var1 not found at analysis time') itime1=itime-1; end itime; % For orography and lsm there is only one time step found1 = find(lsmoro == ivar); if (isempty(found1) == 0) disp('lsm or orography') itime(:) = 1; end if (ivar2 ~= 0) found3 = find(noanal == ivar2); found4 = find(mean6h == ivar2); if (isempty(found3) == 1) if (isempty(found4) == 1) disp('Var2 found at analysis time') itime2=itime; else disp('Var2 is a 6 hour mean') itime2=itime-1; end else disp('Var2 not found at analysis time') itime2=itime-1; end found1 = find(lsmoro == ivar2) if (isempty(found1) == 0) disp('Var2 is lsm or orography') itime2(:) = 1; end end % For vectors: if (ivec ~= 0) found1 = find(noanal == ivar_vec(1)); f5 = isempty(found1); found1 = find(mean6h == ivar_vec(1)); f6 = isempty(found1); found1 = find(noanal == ivar_vec(2)); f7 = isempty(found1); found1 = find(mean6h == ivar_vec(2)); f8 = isempty(found1); if (f5 == 0 || f6 == 0 || f7==0 || f8 == 0) disp('No vectors avialable at analysis time') itime3 = itime -1; no_vec = 1; else itime3 = itime; end end clear found1 found2 found3 found4 f5 f6 f7 f8; return