%%-------------------------------------------------------------------------
%% 
%% prefabs.m -- 
%% 
%% Author          : Jaccard Pierre
%% Created On      : 1999/09/16 14:50:24
%% Last Modified By: Pierre Jaccard
%% Last Modified On: 1999/11/16 14:30:23
%% Update Count    : 17
%% Directory       : /pcdata1/jaccard/codas3c/gfi/matlab/matlab50/
%% Version         : 0.0
%% Status          : Unknown
%% --------------------------------------------------------------------- ++
%% DESCRIPTION: 
%% 
%%    Undocumented.
%% 
%% --------------------------------------------------------------------- ++
%% REVISIONS: 
%% --------------------------------------------------------------------- ++
%% CHANGES: 
%%-------------------------------------------------------------------------

file = '0026.ref';
str = '';

year_base = 2000;

cruise = 'HMosby - 0026';
note = '2000-0026 ';
psfile = 'prefabs.ps';
new_ps = 1;

min_speed = 1.0;
max_speed = 5.0;
ens_time = 300;

%------------------------------------------------------------------
% No more editing!!!

%--- Delete ps file:
if exist(psfile, 'file') & new_ps,
	delete(psfile);
end

%--- Make threshold values global:
tmp = min_speed; clear min_speed; global min_speed; min_speed = tmp; clear tmp;
tmp = max_speed; clear max_speed; global max_speed; max_speed = tmp; clear tmp;
tmp = ens_time ; clear ens_time ; global ens_time ; ens_time  = tmp; clear tmp;

%--- Select what to do:
if exist('file_1', 'var') & exist('file_2', 'var'),
	if ~exist('str_1', 'var'),
		str_1 = '';
	end
	if ~exist('str_2', 'var'),
		str_2 = '';
	end
	prefabs2(file_1, str_1, file_2, str_2, psfile, ...
	   year_base, cruise, note);
elseif exist('file', 'var'),
	prefabs1(file, psfile, year_base, cruise, note);
elseif exist('file_1', 'var'),
	prefabs1(file_1, psfile, year_base, cruise, note);
elseif exist('file_2', 'var'),
	prefabs1(file_2, psfile, year_base, cruise, note);
else
	error([ 'Missing input file' ]);
end




	


















