function plotpmap(ep,t)
% plot pwv map : ep=[y,m.d],t=time(h)
if nargin<1, ep=[2004,1,1]; end
if nargin<2, t=0; end
dirs='m:\gps\pwvgps';

load(fullfile(dirs,sprintf('pwvgps_ALL_%04d%02d%02d.mat',ep)));
epos=readpos(0,0,rcvs,'','approx');
for n=1:length(rcvs), gpos(n,:)=eceftogeod(epos(1,:,n)'); end
td=caltomjd(ep);

for n=1:length(t)
    pwv=data(abs(time-(td+t(n)/24))<1E-6,:)';
    i=find(~isnan(pwv));
    pwvmap(td,t(n),gpos(i,:),pwv(i));
end

% plot map ---------------------------------------------------------------------
function pwvmap(td,ts,gpos,pwv)
gut('newfigg','','',[600,500]);
[fn,fs]=gut('getfont','g');
gmt('mmap','proj','miller','cent',[138,38],'scale',15,'pos',[0.005,0.04,0.99,0.94],...
    'fontname',fn,'fontsize',fs);
[lon,lat]=meshgrid(125:0.1:150,30:0.1:50);
[xs,ys]=gmt('lltoxy',lon,lat);
[xp,yp]=gmt('lltoxy',gpos(:,2),gpos(:,1));
zs=griddata(xp,yp,pwv*1E3,xs,ys);
caxis([0,25]);
[c,h]=contourf(xs,ys,zs,0:0.5:25);
set(h,'edgecolor',[.8,.8,.8]);
gmt('seamask');
gmt('mcoast');
gmt('mgrid','gint',5,'lint',5,'color',[.5,.5,.5]);
ggt('colorbarh',[0.015,0.03,0.97,0.015],[0,25],'','fontname',fn,'fontsize',fs);
title(['GPS-PWV (Precipitable Water Vapor) Map (mm) : ',tstr(td,ts)]);

% time string ------------------------------------------------------------------
function s=tstr(td,ts)
e=mjdtocal(td,ts*3600); s=sprintf('%4d/%02d/%02d %02d:%02d',e(1:5));
