%  1.  NAME
%
%  btcal - Calculate bottom tracking corrections
%
%  2.  USAGE
%
%  btcal
%
%  3.  DESCRIPTION
%
%  This Matlab script is an interface for calling function  btcaluv.
%
%  4.  PARAMETERS
%
%  The following paremeters must be edited:
%
%     ref_file
%        Output file from refabsbt.
%
%     btrk_file
%        Output file from lst_btrk.
%
%     plot_title
%        The title of the plot.
%
%     s  The number of adjacent ensembles to average together.
%
%  5.  AUTHORS
%
%  Pierre Jaccard, Geophysical Institute, University of Bergen, 1999
%

ref_file = '0026.ref';
btrk_file = '0026.btm';
plot_title = 'HMosby - 0026 - Svalbard';
step_min = 1;
step_max = 3;

%------------------------------------------------------------------
% End editing

for s=step_min:step_max,
	[a, phi, good] = btcaluv(ref_file, btrk_file, plot_title, s);
  
  % Print figure
  print -dps -append btcal.ps
  delete btcaluv.ps
  
end


