f='swf_grid8.nc';
h=nc_varget(f,'h');


mask = nc_varget(f,'mask_rho');
h(~mask) = nan;
%figure;
%pcolor(h);
%shading flat;

%colorbar;
%title(['h'])


z=20;
t=26;

if 1,
    cd ../OUTDRY8r
f='tmpnc04.nc';
w=nc_varget(f,'w');
% % size(w)
% % 
% % ans =
% % 
% %     26    21   200   250
% 
% 
% w_=reshape(w(t,z,:,:),200,250);
% figure;pcolor(w_);shading flat;colorbar;title(['w, z=' num2str(t) ', t=' ...
%     num2str(t)])
% 
% 
zeta=nc_varget(f,'zeta');
%zeta_=reshape(zeta(t,:,:),200,250);
%figure;pcolor(zeta_);shading flat;colorbar;title(['zeta, t=' num2str(t)])

[T,R,C]=size(zeta);

for t=350:T-1,
zeta_=reshape(zeta(t,:,:),200,250);
if t==1, 
    figure;
else
    figure(gcf)
end
pcolor(zeta_);
shading flat;
caxis([-0.75 0.75])
colorbar;
title(['zeta,  t=' ...
    num2str(t)])
pause(1)
end

pause

for t=350:T-1,
w_=reshape(w(t,z,:,:),200,250);
if t==1, 
    figure;
else
    figure(gcf)
end
pcolor(w_);
shading flat;
caxis([-0.0001 0.0001])
colorbar;
title(['w, z=' num2str(z) ', t=' ...
    num2str(t)])
pause(1)
end
pause
end


if 0,
    
f='tmpnc04.nc';
u=nc_varget(f,'u');
v=nc_varget(f,'v');

[T,R,C]=size(u);
% u_=reshape(u(t,z,:,:),200,250);
% figure;pcolor(u_);shading flat;colorbar;title(['u, z=' num2str(t) ', t=' ...
%     num2str(t)])
% 
% v_=reshape(v(t,z,:,:),200,250);
% figure;pcolor(v_);shading flat;colorbar;title(['v, z=' num2str(t) ', t=' ...
%     num2str(t)])



for t=350:T,
u_=reshape(u(t,z,:,:),200,249);
if t==350, 
    figure;
else
    figure(gcf)
end
pcolor(u_);
shading flat;
caxis([-2 2])
colorbar;
title(['u, z=' num2str(z) ', t=' ...
    num2str(t)])
pause(0.5)
end
pause

for t=360:T,
v_=reshape(v(t,z,:,:),199,250);
if t==360, 
    figure;
else
    figure(gcf)
end
pcolor(v_);
shading flat;
caxis([-2 2])
colorbar;
title(['v, z=' num2str(z) ', t=' ...
    num2str(t)])
pause(0.5)
end
pause
end

cd ../wet/analout
