c
c @(#)filtml.f	1.1
c
      subroutine filtml(f,qgcomp)

      include'mladv.inc'

      external qgcomp

      dimension f(mnmax,lmax)

      common/parm/kz,m,mm1,mm2,mp1,msq,tim,tmax,tstart,hy,rea,dt,
     +   xbasin,yy(mx0),icalc,kzp1,kzm1,iftop,ifbot,iftvv,ifrel,theta,
     +   ifsbl,ifeva

      do 1 ip=1,msq

         phi = f(ip,1) + qgcomp(ip,1)

         do 2 k=2,ihdpth(ip)
              f(ip,k) = phi - qgcomp(ip,k)
  2       continue

  1    continue

      return
      end
