tq = datenum('2018-07-24 00:00');
zq = 200;  % meters, positive down

cmax = 50;
skip = 10;
scl = 2;
rowref = 491;
colref = 371;

load('pe_vel_2018072400_2018080600_01h.mat');
ttol = 1/48; % day
ztol = 1; % m
tind = find(abs(time - tq) < ttol);
zind = find(abs(depth - zq) < ztol);
if isempty(tind) | isempty(zind)
  disp('Cannot find your requested date and/or depth in this file.');
  disp('Please select different ones.');
  exit;
end

uwk = squeeze(U(tind,:,:,zind));
vwk = squeeze(V(tind,:,:,zind));

figure;
hold on;
umag = sqrt(uwk.^2 + vwk.^2);
pcolor(LON,LAT,umag);
shading interp;
uwk(rowref,colref) = cmax;
vwk(rowref,colref) = 0;
quiver(LON(1:skip:end,1:skip:end),LAT(1:skip:end,1:skip:end),...
  uwk(1:skip:end,1:skip:end),vwk(1:skip:end,1:skip:end),scl,'k');
text(LON(rowref,colref),LAT(rowref,colref)+0.15,[num2str(cmax) ' cm/s']);
colorbar;
colormap(turbo);
axis([min(LON(:)) max(LON(:)) min(LAT(:)) max(LAT(:))]);
clim([0 cmax]);
title([num2str(depth(zind)) 'm Velocity (cm/s); ' datestr(time(tind),'yyyy-mm-dd HH:MMZ')]);

