cd ~dmenemen/llc_2160/regions/latlon/drift
load global_v3/Release
N=length(Release.Lon);
for t=1:length(Release.Tme)
    flat=['global/DriftLat_n4331_dt3600_' datestr(Release.Tme(t),30)];
    flon=['global/DriftLon_n4331_dt3600_' datestr(Release.Tme(t),30)];
    if exist(flat)
        D=dir(flon);
        Lon=readbin(flon,[N D.bytes/4/N]);
        Lat=readbin(flat,[N D.bytes/4/N]);
        clf
        plot(Lon',Lat','.','markersize',1)
        plotland('k',12,-38:(1/2):322,-50:(1/12):50)
        axis('equal')
        axis([-38 322 -50 50])
        title(['Propagules released on ' datestr(Release.Tme(t)) ' for ' ...
               int2str(D.bytes/4/N/24) ' days'])
        %eval(['print -dtiff figs/frames_tif/frame' myint2str(t,4)])
        eval(['print -dpng figs/frames/frame' myint2str(t,4)])
    else
        break
    end
end

% cd ~dmenemen/llc_2160/regions/latlon/drift/figs/frames
% convert -delay 1 frame0*.png trajectories.gif
% mogrify -format pnm *.png
% ppmtompeg parameters.txt
