% mk_mat_ctd.m - to make cast data into .mat files EDDIES 07/05

%change dirs here
%thedir='/mnt/oc415-4a/oc415_4/ctd/';
thedir='../';
%thedir='offcd';


for ii = 19:21
  disp(int2str(ii))
  %ii = input('Enter Cast number: ');
  %ii = cast;
  if ii < 10
    eval(['!\cp ',thedir,'process/oc41540',int2str(ii),'.flt data'])
  elseif ii < 100
    disp('loading data')
    eval(['!\cp ',thedir,'process/oc4154',int2str(ii),'.flt data'])
  end

  load data
  press = data(:,1);
  t0 = data(:,2);
  c0 = data(:,3);
  s0 = data(:,4);
  t1 = data(:,5);
  c1 = data(:,6);
  s1 = data(:,7);
  o2 = data(:,8);
  par = data(:,9);
  chl = data(:,10);


  if ii < 10
    eval(['save ',thedir,'/process/oc41540',int2str(ii), ...
	  ' press t0 t1 c0 c1 s0 s1 o2 par chl']);
  elseif ii < 100
    disp('saving data fn:')
    disp([thedir,'/oc4154',int2str(ii)])
    eval(['save ',thedir,'/process/oc4154',int2str(ii), ...
	  ' press t0 t1 c0 c1 s0 s1 o2 par chl']);
  end

end
