c
c    @(#)posdef.f	1.1
c
      subroutine posdef(itrace,imlpnt)

      include'mladv.inc'
      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

      icurtrace = itrace

      do 1 k=1,l
         do 2 j=1,msq
            if (trace(j,k,imlpnt,itrace) + trcqgofk(j,k) .lt. 0.)
     .               trace(j,k,imlpnt,itrace) = - trcqgofk(j,k)
  2       continue
  1    continue
      return
      end
