
ydstart=146;
tstart = 154.4167;
tend = 155.5417;
pathfile = ['/whoinet/putnam/p2/globec/fcast_archives/FCAST_1.1B1/EN324NF_FC.27/CRUISE_Q4.3/DRIFTERS.pth'];
vprfile = ['vpr_0605'];
drfile = '/whoinet/putnam/p2/globec/fcast_archives/FCAST_1.1B1/EN324NF_FC.21d/CRUISE_Q4.3/DRIFTERS.pth';
idrog = [1];


% Clean output directories

!rm -rf movframes
!rm -rf mf.bak
!mkdir mf.bak
!mkdir movframes

% Load a vpr data file in which columns are as follows
% 1 time
% 2 lat
% 3 lon (postive)
% 4 depth (positive)
% 5 Temperature
% 9 Fluorescence

eval(['load ' vprfile]);
conc=volts2conc(b(:,9),b(:,5),2);
% conc=log10(b(:,9));

% Parse towyos

a=towyo_parse(tstart,tend,b(:,1),b(:,2),-b(:,3),b(:,4),conc);

% Read path file for drifters marking towyo and dye locations

disp('Read path file for drifters marking towyo locations');

P=read_pthtd(pathfile,ydstart);

disp('Reading path files for dye locations')

D(1)=read_pthtd(drfile,ydstart);
% D(2)=read_pthtd(drfile,ydstart);

% Create images and write to ./movframes 

disp('Writing First and last frame postscript files')
disp('and saving movie frames')

pond_0605(P,a.mean,D,idrog,tend);

% Make movie

% !./makeflc



