subroutine hps(x,m,n,dx,hpfre,lpfre) c c apply a recursive Butterworth high pass filter (zero phase) c OR (if lpfre < 0.95*Nyquist_freq ) c apply a recursive Butterworth band pass filter (zero phase) c c derived from xapiir c a.tento 4/02 v.1.0 c a.tento 4/03 v.2.0 (+ band pass) c a.tento 10/03 v.2.1 (+ low pass) c implicit none integer m, n, j real x, dx, hpfre, lpfre dimension x(m,3) c real fny c c fny = 0.95 / (2.0 * dx) c c if lpfre too high NO band pass --> only high pass c if ( lpfre .gt. fny ) then call rmean(x,m,n) do 1 j = 1, 3 call xhpf(x(1,j),n,hpfre,dx) 1 continue c else c if ( hpfre .gt. fny ) then do 3 j = 1, 3 call xlpf(x(1,j),n,lpfre,dx) 3 continue else call rmean(x,m,n) do 2 j = 1, 3 call xbpf(x(1,j),n,hpfre,lpfre,dx) 2 continue endif c endif c c return c end