c    @(#)boundary.f	1.2
      subroutine boundary
      include'mladv.inc'
c
      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
      common /cnn/n,nm1,nm2,np1
      common/sbldef/qsw0,qsurf0,wflux0,u10m,angu10m,hdpth0
c
      do 10 ibnd=1,mbnd
        bnddpth(ibnd)=hdpth0
   10 continue
c
      do 20 kk=1,l

        do 15 ibnd=1,mbnd

          ip=ipofb(ibnd)
          bndbuoy(ibnd,kk)=buoy(ip,kk,mlcur)
          bndtemp(ibnd,kk)=temp(ip,kk,mlcur)

          do 14 itrace=1,ntrace
             bndtrace(ibnd,kk,itrace)=trace(ip,kk,mlcur,itrace)
   14      continue

   15   continue
   20 continue
c
      end
