function [lowtemp,lowpres,lowlat,lowlon,lowu,lowv,lowwwww] = datalow(wind, len)
%
%  The function [ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(window, length)
%  uses a choice of window (inputted as a string in the variable window; it
%  should be one of the sampling windows provided by the Matlab Signal Toolbox)
%  and length to lowpass the float data in order to eliminate tidal effects....
%
% ------------------------------------------------------------------
%  Written by Vassilis Zervakis, while at
%             AINCO-Interocean, Madrid, Spain, in January 1996.
%
%  Modified by Mike Sparrow Jan.'97 
%-------------------------------------------------------------------
%
global float number timer temp pres lat  lon u v wwww
global lowpassdone handles
%
mikos = num2str(len) ;
windower = [wind '(' mikos ')'] ;
w = eval( windower ) ;
%  w = hanning(5);
h = waitbar(0.0,'Lowpassing the data; please wait');
lowtemp = runaver(temp, w);
lowpres = runaver(pres, w);
waitbar(0.2); 
lowlat  = runaver(lat , w);
lowlon  = runaver(lon , w);
waitbar(0.5); 
lowu    = runaver(u   , w);
lowv    = runaver(v   , w);
waitbar(0.85); 
lowwwww = runaver(wwww, w);
lowtemp = lowtemp';
lowpres = lowpres'; 
lowlat  = lowlat' ;
lowlon  = lowlon' ; 
lowu    = lowu'   ; 
lowv    = lowv'   ; 
lowwwww = lowwwww'; 
waitbar(1.0); 
close(h);
lowpassdone = 'on';
close(handles(1));
harpro;

