%%-------------------------------------------------------------------------
%% 
%% psmoothr.m -- 
%% 
%% Author          : Jaccard Pierre
%% Created On      : 1999/09/16 15:12:53
%% Last Modified By: Pierre Jaccard
%% Last Modified On: 1999/11/16 14:30:47
%% Update Count    : 28
%% Directory       : /pcdata1/jaccard/codas3c/gfi/matlab/matlab50/
%% Version         : 0.0
%% Status          : Unknown
%% --------------------------------------------------------------------- ++
%% DESCRIPTION: 
%% 
%%    Undocumented.
%% 
%% --------------------------------------------------------------------- ++
%% REVISIONS: 
%% --------------------------------------------------------------------- ++
%% CHANGES: 
%%-------------------------------------------------------------------------

file = '0026.sm';
str = '';

year_base = 2000;

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

ens_time = 300;

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

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

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

%--- 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
	psmooth2(file_1, str_1, file_2, str_2, psfile, ...
			year_base, cruise, note);
elseif exist('file', 'var'),
	psmooth1(file, psfile, year_base, cruise, note);
elseif exist('file_1', 'var'),
	psmooth1(file_1, psfile, year_base, cruise, note);
elseif exist('file_2', 'var'),
	psmooth1(file_2, psfile, year_base, cruise, note);
else
	error([ 'Missing input file' ]);
end

