
fsalt            = 34.5; % frontal density

[temptrans,tgeo] = roms_genslice(url,'temp', zdlon, zdlat,1,'index',250);
[salttrans,sgeo] = roms_genslice(url,'salt', zdlon, zdlat,1,'index',250);
[utrans,ugeo]    = roms_genslice(url,'u', zdlon, zdlat,1,'index',250);
[vtrans,vgeo]    = roms_genslice(url,'v', zdlon, zdlat,1,'index',250);
[wtrans,wgeo]    = roms_genslice(url,'w', zdlon, zdlat,1,'index',250);
[vel,geo]        = roms_velslice(url,'u','v',zdlon, zdlat,1,'index',250);

pres             = sw_pres(tgeo.z,tgeo.lat);
dens             = sw_dens(salttrans,temptrans,pres)-1000;


figure
colormap(jet)
pcolorjw(tgeo.lat, tgeo.z,temptrans)
xlim([min(zdlat) max(zdlat)]);
ylim([-300 Inf])
caxis(clrlim);
colorbar
hold on
[cc0,hh0] = contour(sgeo.lat,sgeo.z,salttrans,[33:0.5:36]);
set(hh0,'color',[0.5 0.5 0.5]);
[cc,hh] = contour(sgeo.lat,sgeo.z,salttrans,[fsalt fsalt+0.000001]);
set(hh,'color','k','linewidth',2);
for ii = 1:length(zdlat)
    text(zdlat(ii)+.01,3,sname{ii},'fontsize',10);
end
tttxt = ['ROMS temp (^oC) on ' datestr(otime)];
htt = title(tttxt);
set(htt,'fontsize',14,'fontname','Times','Position',[40.1725 8 1.4211e-14]);
grid on;
set(gca,'layer','top','xdir','reverse');
hold off

figure
colormap(jet)

pcolorjw(sgeo.lat, sgeo.z,salttrans)
xlim([min(zdlat) max(zdlat)]);
ylim([-300 Inf])
colorbar
hold on
[cc0,hh0] = contour(sgeo.lat,sgeo.z,salttrans,[33:0.5:36]);
set(hh0,'color',[0.5 0.5 0.5]);
[cc,hh] = contour(sgeo.lat,sgeo.z,salttrans,[fsalt fsalt+0.000001]);
set(hh,'color','k','linewidth',2);
for ii = 1:length(zdlat)
    text(zdlat(ii)+.01,3,sname{ii},'fontsize',10);
end
tttxt = ['ROMS salinity on ' datestr(otime)];
htt = title(tttxt);
set(htt,'fontsize',14,'fontname','Times','Position',[40.1725 8 1.4211e-14]);
grid on;
set(gca,'layer','top','xdir','reverse');
hold off


figure
colormap(jet)
pcolorjw(tgeo.lat, tgeo.z,dens)
xlim([min(zdlat) max(zdlat)]);
ylim([-300 Inf])
caxis([22 27])
colorbar
hold on
[cc0,hh0] = contour(sgeo.lat,sgeo.z,salttrans,[33:0.5:36]);
set(hh0,'color',[0.5 0.5 0.5]);
[cc,hh] = contour(sgeo.lat,sgeo.z,salttrans,[fsalt fsalt+0.000001]);
set(hh,'color','k','linewidth',2);
for ii = 1:length(zdlat)
    text(zdlat(ii)+.01,3,sname{ii},'fontsize',10);
end
tttxt = ['ROMS \sigma_\theta (kg m^-^3) on ' datestr(otime)];
htt = title(tttxt);
set(htt,'fontsize',14,'fontname','Times','Position',[40.1725 8 1.4211e-14]);
grid on;
set(gca,'layer','top','xdir','reverse');
hold off

figure
colormap(redblue)
pcolorjw(geo.lat, geo.z,real(vel))
xlim([min(zdlat) max(zdlat)]);
ylim([-300 Inf])
caxis([-.2 .2])
colorbar
hold on
[cc0,hh0] = contour(sgeo.lat,sgeo.z,salttrans,[33:0.5:36]);
set(hh0,'color',[0.5 0.5 0.5]);
[cc,hh] = contour(sgeo.lat,sgeo.z,salttrans,[fsalt fsalt+0.000001]);
set(hh,'color','k','linewidth',2);
for ii = 1:length(zdlat)
    text(zdlat(ii)+.01,3,sname{ii},'fontsize',10);
end
tttxt = ['ROMS along-transect velocity (m/s) on ' datestr(otime)];
htt = title(tttxt);
set(htt,'fontsize',14,'fontname','Times','Position',[40.1725 8 1.4211e-14]);
grid on;
set(gca,'layer','top','xdir','reverse');
hold off

figure
colormap(redblue)
pcolorjw(geo.lat, geo.z,imag(vel))
xlim([min(zdlat) max(zdlat)]);
ylim([-300 Inf])
caxis([-.2 .2])
colorbar
hold on
[cc0,hh0] = contour(sgeo.lat,sgeo.z,salttrans,[33:0.5:36]);
set(hh0,'color',[0.5 0.5 0.5]);
[cc,hh] = contour(sgeo.lat,sgeo.z,salttrans,[fsalt fsalt+0.000001]);
set(hh,'color','k','linewidth',2);
for ii = 1:length(zdlat)
    text(zdlat(ii)+.01,3,sname{ii},'fontsize',10);
end
tttxt = ['ROMS cross-transect velocity (m/s) on ' datestr(otime)];
htt = title(tttxt);
set(htt,'fontsize',14,'fontname','Times','Position',[40.1725 8 1.4211e-14]);
grid on;
set(gca,'layer','top','xdir','reverse');
hold off

figure
colormap(redblue)
pcolorjw(wgeo.lat, wgeo.z,wtrans)
xlim([min(zdlat) max(zdlat)]);
ylim([-300 Inf])
caxis([-.0005 .0005])
colorbar
hold on
[cc0,hh0] = contour(sgeo.lat,sgeo.z,salttrans,[33:0.5:36]);
set(hh0,'color',[0.5 0.5 0.5]);
[cc,hh] = contour(sgeo.lat,sgeo.z,salttrans,[fsalt fsalt+0.000001]);
set(hh,'color','k','linewidth',2);
for ii = 1:length(zdlat)
    text(zdlat(ii)+.01,3,sname{ii},'fontsize',10);
end
tttxt = ['ROMS w (m/s) on ' datestr(otime)];
htt = title(tttxt);
set(htt,'fontsize',14,'fontname','Times','Position',[40.1725 8 1.4211e-14]);
grid on;
set(gca,'layer','top','xdir','reverse');
hold off

