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

      subroutine stdout2(nz,iout,wlinf,wlsup,nphi,nzen,sazm,phi,uzen,z, 1
     &     airmass,trnsgas)
      parameter (nstrms=40)
      parameter (nrstrm=50)
      parameter (mxly=50)
      parameter (maxulv=mxly+1)
      
      dimension z(*)
      parameter (nta=9)
      dimension airmass(*),trnsgas(nta,*)

      common / out / phidw,topdn,topup,topdir,botdn,botup,botdir,
     &               fxup(maxulv),fxdn(maxulv),fxdir(maxulv),
     &               uurs(nrstrm,nrstrm),uurl(nrstrm,nrstrm,maxulv)

      dimension phi(*),uzen(*)

      data eps/1.e-30/
c
 1000 format(1p10e12.4)

      if(iout.eq.3) then 
        write(*,'(5x,11a13)') 'z','airmass','h2o','co2','o3',
     &       'n2o','co','ch4','o2+n2','trace','total' 
        do j=nz,1,-1
          write(*,'(i5,1p11e13.5)') j,z(j),airmass(j),
     &         (-log(eps+trnsgas(i,j)/phidw),i=1,nta) 
        enddo
      endif

      if(iout.eq.11) then
        write(*,'(i4,1pe15.7)') nz,phidw
        dfdz=0.
        fntm=0.
        do 10 i=1,nz
          zz=z(nz-i+1)
          fnt=fxdn(i)-fxup(i)
          dfdz=(fntm-fnt)/(zm-zz)
          fntm=fnt
          zm=zz
          write(*,1000) zz,fxdn(i),fxup(i),fxdir(i),dfdz
 10     continue
      endif

      if(iout.eq.10.or.iout.eq.20.or.iout.eq.21.or.iout.eq.23)
     &   write(*,'(3f11.4,1p,6e12.4)') 
     &  wlinf,wlsup,phidw,topdn,topup,topdir,botdn,botup,botdir

      if(iout.eq.20.or.iout.eq.21.or.iout.eq.23) then
        write(*,'(3i4)')       nphi,nzen
        write(*,1000) (sazm+phi(j),j=1,nphi)
        write(*,1000) (uzen(j),j=1,nzen)
        do 20 i=nzen,1,-1
          write(*,'(1p20e11.3)' ) (uurs(i,k),k=1,nphi)
 20     continue
      endif

      if(iout.eq.22) then
        write(*,'(3i4,1pe12.4)') nphi,nzen,nz,phidw
        write(*,1000) (sazm+phi(i),i=1,nphi)
        write(*,1000) (uzen(j),j=1,nzen)
        write(*,1000) (        write(*,1000) (fxdn(k),k=1,nz)
        write(*,1000) (fxup(k),k=1,nz)
        write(*,1000) (fxdir(k),k=1,nz)
        write(*,1000) (((uurl(i,j,k),i=1,nphi),j=nzen,1,-1),k=1,nz)
      endif
      return
      end