function hax = roms_cview(file,var,time,ij,iindex,sz,zvalue,grd,ax1,ax2)
% Combined horizintal and vertical slice
% e.g.
% hax = roms_cview(file,var,time,'i',iindex,'s',s,grd)
% 
% Plot vertical slice and a map to show where it is

if nargin < 5
  grd = roms_get_grid(file,file);
end
if nargin < 9
  ax1 = 'auto';
end
if nargin < 10;
  ax2 = 'auto';
end

nc = netcdf(file);
data = nc{var}(time,:);
close(nc)
[data,z,lon,lat] = roms_slice_var(data,grd,iindex,ij(1),1);

hax = nfigaxes([1 2]);

dist = cumsum([0 sw_dist(lat(1,:),lon(1,:),'km')]);
axes(hax(1))
pcolorjw(repmat(dist,[size(data,1) 1]),z,data)
caxis([0 2e-2])
hold on
plot(get(gca,'xlim'),[-2 -2],'w-')
hold off
% colorbar
if length(ij)>1
  set(gca,'xdir','reverse')
end
axis(ax1)


axes(hax(2))
switch sz
  case 's'
    roms_sview(file,var,time,zvalue,grd)
  case 'z'
    roms_zview(file,var,time,zvalue,grd)
end
caxis([0 2e-2])
colorbar
axis(ax2)
pnc
hold on
plot(lon(1,:),lat(1,:),'w-')
hold off
