c=======================================================================


      subroutine rayleigh(wl,uu,nz,tauray,dtaury) 1,1

c  purpose:
c    calculate molecular rayleigh scattering optical depth
c    using approximation of shettle et al., 1980 (appl. opt., 2873-4)
c    with the depolarization = 0.0279 instead of 0.035
c    for temperature = 273 k & pressure = 1 atm.
c
c  input:  
c    wl        wavelength in microns
c    uu        path integral uu(mxq,nxlayr) computed by absint
c                only uu(6,*) is used in this routine
c    nz        number of atmospheric layers
c                nz=1  => integration to bottom level only
c
c  output: 
c    tauray    mean optical depth due to rayleigh scattering
c    dtaury    increments of tauray
c

      parameter (bigexp=87.)
      parameter (mxq=63)

      dimension uu(mxq,nz)
      dimension tauray(nz),dtaury(nz)

c***********************************************************************
      do 10 i=1,nz
        tauray(i)=0.
        dtaury(i)=0.
 10   continue

c convert from wavelength in microns to wavenumber in cm-1

      v=10000./wl

c rayleigh scattering coefficient (1/km) from lowtran subroutine c6dta

      call c6dta(rayla,v)
      do 40 i=1,nz
        im=nz-i+1
        tauray(im)=uu(6,i)*rayla
 40   continue
      dtaury(1)=tauray(1)
      do 50 i=2,nz
        dtaury(i)=tauray(i)-tauray(i-1)
 50   continue
      return
      end