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

      subroutine chkprn(lun,iday,time,alat,alon,sza,solfac, 1,4
     &                  pbar,sclh2o,uw,uo3,o3trp,tcloud,zcloud,
     &                  taerst,zaer,laer,zout,ntop,nbot,
     &                  nz,z,p,t,wh,wo,uu)

      parameter (mxly=50)
      parameter (max=2*mxly)
      parameter (ncldz=5)
      parameter (naerz=5)
      parameter (mxq=63)

      dimension tcloud(ncldz),zcloud(ncldz),lcld(ncldz),
     &          taerst(naerz),zaer(naerz),laer(naerz),
     &          zout(2),z(mxly),p(mxly),t(mxly),
     &          wh(mxly),wo(mxly),uu(mxq,mxly)
c
      if(iday.ne.0) then
        write(lun,'(a,i3)')     'Day of year: ',abs(iday)
        write(lun,'(a,f8.4)')   '        GMT: ',time        
        write(lun,'(a,2f10.4)') '    lat,lon: ',alat,alon
        write(lun,*) ' '
      endif
      write(lun,'(a,2f10.4)') '  sza,solfac: ',sza,solfac
      write(lun,'(a,2f10.4)') '        zout: ',zout
      write(lun,'(a,3i10)')   'nbot,ntop,nz: ',nbot,ntop,nz
      write(lun,*) ' '
      if(pbar.lt.0)   write(lun,1000) 'PBAR'
      if(uw.lt.0)     write(lun,1000) 'UW'
      if(uo3.lt.0)    write(lun,1000) 'UO3'
      if(o3trp.lt.0)  write(lun,1000) 'O3TRP'
      if(sclh2o.lt.0) write(lun,1000) 'SCLH2O'
      write(lun,*) ' '
      if(tcloud(1).ne.0.) then
        call zlayer(nz,z,numset(0.,tcloud,ncldz),zcloud,lcld)
        write(lun,'(a,5f10.4)')'    zcloud:' ,zcloud
        write(lun,'(a,5i10)')  '      lcld:' ,lcld
      endif
      
      if(taerst(1).ne.0.) then
        call zlayer(nz,z,numset(0.,taerst,naerz),zaer,laer)
        write(lun,'(a,5f10.4)') '      zaer:' ,zaer
        write(lun,'(a,5i10)')   '      laer:' ,laer
      endif
      write(lun,*) '"ATM'
      write(lun,*) nz
      write(lun,'(a/1p(10e11.3))') 'z',(      write(lun,'(a/1p(10e11.3))') 'p',(      write(lun,'(a/1p(10e11.3))') 't',(      write(lun,'(a/1p(10e11.3))') 'h2o',(wh(i),i=1,nz)
      write(lun,'(a/1p(10e11.3))') 'o3',(wo(i),i=1,nz)

      write(lun,'(/a/)') 'atmospheric integrals, uu(k,i):'
      do 10 k=1,mxq
        write(lun,'(i3,/,1p(10e11.3))') k,(uu(k,i),i=1,nz)
 10   continue
 1000 format('default value used for ',a)
      return
      end