c    @(#)mlbflux.f	1.1
c
      subroutine mlbflux(dpth,ip,usbs)
c
c
c leonard walstad
c
c-----------------------------------------------------------------------
c
c
      include'mladv.inc'
c
c
      bsurf=.01*ag*qsurf(ip)+wflux(ip)*bbar(ip)
      ftmp=1.0
      if(abs(decay*dpth).lt.5)ftmp=(1.0-exp(-decay*dpth))
      usbs=bsurf+qsw(ip)*ag*.01*(2.0-(1.0+2.0/decay/dpth)*ftmp)
c
c 
      return
      end
