c file:                  suralb.f
c
c external routines:     salbedo,suralb
c
c internal routines:     useralb,snow,clearw,lakew,seaw,sand,vegeta
c
c internal common:       sr
c=======================================================================

      function salbedo(wl) 1
c 
c input:   wl
c output:  surface albedo
c
      parameter (mxwv=751)
c
      common/sr/ alb(mxwv),wmin,wmax,dw
c
      i=int((wl-wmin)/dw)+1
      i=max(1,min(mxwv-1,i))
      f=(wl-wmin-dw*(i-1))/dw
      f=max(0.,min(1.,f))
      salbedo=(1.-f)*alb(i)+f*alb(i+1)
      return
      end