c-----------------------------------------------------------------------

      subroutine radrng(uur,nzen,nzp,nphi,iz,idz,radmin,radmax) 5

c purpose: find minimum and maxium value of radiance array within a
c          range of atmospheric layers
c
c input:
c   uur    radiance array uur(nzen,nzp,nphi)
c   nzen   number of zenith angles
c   nzp    number of layers plus one
c   nphi   number of azimuth angles
c   iz     center of layer range
c   idz    half-width of layer range
      parameter (nstrms=40)
      parameter (mxly=50)
      parameter (maxulv=mxly+1)

      dimension uur(nstrms,maxulv,nstrms)

      radmin=1.e30
      radmax=-1.e30

      nz1=max(iz-idz+1,1)
      nz2=min(iz+idz-1,nzp)
      do 30 k=1,nphi
        do 20 j=nz1,nz2
          do 10 i=1,nzen
            radmin=min(radmin,uur(i,j,k))
            radmax=max(radmax,uur(i,j,k))
 10       continue
 20     continue
 30   continue
      return
      end