      subroutine reflec(iofset,cofs,phi,p1,pr,lat,pteran,rad,ref)
c***********************************************************************
c
c     purpose
c       compute ler reflectivity for 380 nm wavelength 
c       and for both table pressures
c
c     method
c       select interp. indices for table lookup.
c       perform table interpolations, then calculate reflectivity.
c
c      internal
c       indx1     i*4         table index
c       indx2     i*4         coefficient index
c       iptab1(2) i*4         pressure offset for table index
c       iptab2(2) i*4         pressure offset for coefficient index
c
c***********************************************************************
c
c     -- input parameters
      real*8 lat, pwtlo, pwthi, pcloud, pteran
      real*8 grref, clref, phi, cofs(16), p1, pr, rad
      integer iofset, isnow
c     -- internal parameters
      real*8 den, ramcor(2)
      integer iptab1(2),iptab2(2)
      integer indx1, indx2, ip
c     -- output parameters
      real*8 ref
c     -- data statements
      data iptab1/1,61/, iptab2/1,2/
      data ramcor/0.3390,0.1440/
c     --
      pwtlo = (1.-pteran) / .6
      do ip = 1,2
c       -- compute table indices
        indx1 = iptab1(ip) + iofset
        indx2 = iptab2(ip)
c       -- perform interpolations
        call int(indx1,indx2,phi,cofs,p1,pr,ezero,t,sb)
c       -- correct for raman scattering
        ezcor = ezero + ezero*ramcor(ip)/100.
        tcor  = t     + t*ramcor(ip)/100.
        if (ip.eq.1) then
c         -- for ip = 1 (p = 1 atm) save q values
c         -- and denominator used in ref calculation
          den  = rad  - ezcor
          if (den.ne.0.) then
             ref10 = 1. / (tcor/den + sb)
          else
             ref10 = 0.
          endif
        else
          den  = rad  - ezcor
          if (den.ne.0.) then
             ref04 = 1. / (tcor/den + sb)
          else
             reflo = 0.
          endif
        endif
      enddo
      ref = (1.-pwtlo)*ref10 + pwtlo*ref04
      return
      end
