
ydstart=132;
pathfile = ['/p2/globec/fcast_archives/FCAST_1.1B1/EN324_FC.38vpr2/CRUISE_Q4.3/DRIFTERS.pth'];
vprfile = ['vpr_0525'];
drfile = '/p2/globec/fcast_archives/FCAST_1.1B1/EN324_FC.38/CRUISE_Q4.3/DRIFTERS.pth';
idrog = [33];


% 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(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(['tracer_DRIFTERS.2.pth'],127);

% Create images and write to ./movframes 

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

pond(P,a.mean,D,idrog);

% Make movie

!./makeflc



