%This is the start of the 'autoedit' collection  of programs.
% see aREADME_basics.txt and aREADME_details.txt for more details

%% Edit these variables (structure field values):\
%% The path is relative to the current subdirectory
%%    which is expected to be edit/ (within an ADCP  processing tree)


config.start_dd  = 97;                % start decimal day
config.end_dd    = 99;                % beginning of last decimal day
config.ddrange   = 1;                 % extract this much data to look at
config.yearbase  = 1993;              % year base
config.comment   = 'demo';           % comment, used for titles (usually 
                                      %    cruiseid)
config.dbpath    = '../adcpdb/';      % because you are in edit/
config.dbname    =  'ademo';          % dbname not including "???.blk"
config.nbins     = 60;                % number of bins in the database
config.rl_range  = [5 20];            % sets up a ref layer for editing 
                                      %   criteria.  This does not affect 
                                      %   the reference layer used to 
                                      %   calculate ocean velocity
                                      %   See refsm.m for that.
config.prefix    =       'a_';        % prefix used by getmat (do not change)
config.navfile = '../nav/a0002.ags';  % Read this file to get navigation. 
                                      %   If you manufacture it manually, it 
                                      %   should have columns [dday lon lat]


%% Might have to set this manually if the cruisetrack is pathological:
% config.lon_branch   =  0;           % split longitude here (eg. 0 if in the
                                      %     Pacific, 180 if in the Atlantic   


% -------------  END of section to be edited by user --------------------
adcppath

clear start_dd end_dd yearbase comment dbpath dbname reflayer_range ...
      numbins longitude_split 


%add paths

%look for a file in autoedit/ 
if (exist('alocateit.m') ~= 2)
   aeditpath
end

%look for a file in codas3/
if (exist('smoothr.m') ~= 2)
   adcppath
end

%look for a file in m_map
if (exist('m_plotbndry.m') ~= 2)
   mmappath
end

