function oaciplot

run /home/ruoying/Software/opnml_matlab5/startup
g=loadgrid('../mesh/stw2');
e=g.e';

  dpost=read_s3r('../output/Tanalysis.s3r');
%  dpost_v=read_s3r('../output/Tvariance.s3r');
  dpost_v=read_s3r('../output/Tvariance.s3r');
  dprior=read_s3r('../obs/ICS.NLLC4.MJ.T.s3r');
  sca=[2 12]; anm=[0 2];

  tpost=dpost(21:21:end,3);
  tprior=dprior(21:21:end,3);
  tpost_v=dpost_v(21:21:end,3);
 
  subplot(2,2,1);
  patch(g.x(e),g.y(e),tprior(e)); 
  set(gca,'xtick',[],'ytick',[]);
  shading interp;caxis(sca); colorbar('horiz')
  title('Prior','fontsize',12,'fontweight','bold')
  ylabel('Surface temperature','fontsize',12,'fontweight','bold');
  axis equal;
  
  subplot(2,2,2);
  patch(g.x(e),g.y(e),tpost(e));
  set(gca,'xtick',[],'ytick',[]);
  shading interp;caxis(sca); colorbar('horiz')
  title('Posterior','fontsize',12,'fontweight','bold')
  axis equal;


  dpost=read_s3r('../output/Sanalysis.s3r');
  dpost_v=read_s3r('../output/Svariance.s3r');
  dprior=read_s3r('../obs/ICS.NLLC4.MJ.S.s3r');
  sca=[30 33]; anm=[0 5];
 
  tpost=dpost(21:21:end,3);
  tprior=dprior(21:21:end,3);
  tpost_v=dpost_v(21:21:end,3);
 
  subplot(2,2,3);
  patch(g.x(e),g.y(e),tprior(e));
  set(gca,'xtick',[],'ytick',[]);
  shading interp;caxis(sca); colorbar('horiz')
  title('Prior','fontsize',12,'fontweight','bold')
  ylabel('Surface salinity','fontsize',12,'fontweight','bold');
  axis equal;

  subplot(2,2,4);
  patch(g.x(e),g.y(e),tpost(e));
  set(gca,'xtick',[],'ytick',[]);
  shading interp;caxis(sca); colorbar('horiz')
  title('Posterior','fontsize',12,'fontweight','bold')
  axis equal;


