% CRUISE_SETUP - script to setup a cruise collecting LADCP and CTD data 
% 
% Description/Help
% ...
%

% Author: Rigo Garcia
% Date: March, 2006
% 
% 
% VERSION: 
%	$Revision: 1.4 $
%	$Date: 2008/01/19 19:33:52 $
%	$Id: cruise_setup.m,v 1.4 2008/01/19 19:33:52 duncombe Exp duncombe $
%
% CHANGELOG:
%

clear all


% Cruise identification
c.cruise_id=input('Please Enter the Cruise''s ID: ','s');
% Ex. cruise_id='WS0604';                  % How we identified the cruise. Ex.: AB -> ABACO
%                                                                           FS -> Florida Straits 

% Cruise's year
c.cruise_year=input('Please Enter the Four digit Cruise Year: ','s');

% Cruise's month
c.cruise_number=input('Please Enter the Cruise Month: ','s');

if length(c.cruise_number)<0 | length(c.cruise_number)>2 % 3
    'Dejate de comer mierda y Please Enter Cruise Month Number: !!!'
elseif length(c.cruise_number)==1
    c.cruise_number=['0' c.cruise_number];
end

% Cruise setup date
c.setup_date_time=datestr(now);

% Setup created by:
c.setup_created_by=input('Name of the person creating the cruise setup: ','s');

% Setup saved in the directory:
c.setup_dir=['C:\FCT\Cruise_Setup\'];                                

%% CRUISE SETUP PATHS, DIRECTORIES AND SUBDIRECTORIES
%%
% Cruise main paths directories
c.cruise_dir=[c.cruise_id '_' c.cruise_year '_' c.cruise_number];    % Cruise Directory. Ex. : WS0604_YYYY_MM;
c.home_dir=['C:\FCT\Cruise_Data\' c.cruise_dir '\'];                 % YYYY: Four digits year
                                                                     % MM  : Two digits month
% Path to instrument directories
c.ladcp_dir=[c.home_dir 'LADCP\'];
c.ctd_dir=[c.home_dir 'CTD\'];
c.gps_dir=[c.home_dir 'GPS\'];

% Data subdirectories for LADCP
c.ladcp_raw_dir=[c.ladcp_dir 'Raw\'];
c.ladcp_pro_dir=[c.ladcp_dir 'Processed\'];

% Data subdirectories for CTD          Directories that use Carlos Fonseca
%                                      in his CTD processing. Note on
%                                      5/4/2006
c.ctd_raw_dir=[c.ctd_dir 'raw_data\'];
c.ctd_pro_dir=[c.ctd_dir 'proc_data\'];
c.ctd_psa_dir=[c.ctd_dir 'psa\'];
c.ctd_bottle_dir=[c.ctd_dir 'bottle\'];

% CREATE DIRECTORIES
eval(['! mkdir ' c.ladcp_dir]);
eval(['! mkdir ' c.ctd_dir]);
eval(['! mkdir ' c.gps_dir]);

% LADCP subdirectories
eval(['! mkdir ' c.ladcp_raw_dir]);
eval(['! mkdir ' c.ladcp_pro_dir]);

% CTD subdirectories
eval(['! mkdir ' c.ctd_raw_dir]);
eval(['! mkdir ' c.ctd_pro_dir]);
eval(['! mkdir ' c.ctd_psa_dir]);
eval(['! mkdir ' c.ctd_bottle_dir]);

% Tambien puedo crear aqui todos los directorios de los datos que sean
% tomados por el CTD y los datos de navegacion....!!!! Ya puse los de CTD

% Save setup structure
save cruise_setup       % This copy change every time that we setup a new cruise
eval(['save ',c.setup_dir,'cruise_setup_',c.cruise_dir,';']) % Copy of setup of that cruise for the records

clear

% END SETUP CRUISE
