      subroutine unsavd(ldir,
     $       lpri,lun,lun11,
     $       t,r,rdel,delr,xcol,xee,xpx,
     $       tau0,dpthc,tauc,epi,ncn2)
c
c     this routine  saves only depths for iterative calculation
c     author:  T. Kallman
c
      implicit none
c
      include './PARAM'
      real epi(ncn)
c     line optical depths
      real tau0(2,nnnl)
c     continuum optical depths
      real dpthc(2,ncn)
      integer ldir,lpri,lun,lun11
      real tauc(2,nnml)
      real t,r,rdel,xcol,xee,xpx,delr
      real tau0d(2,nnnl),dpthcd(2,ncn),taucd(2,nnml)
      integer lind1,lind2,kl,ll,nlyc,nry,ncn2,nbinc
c
      read (lun)t
      read (lun)r
      read (lun)rdel
      read (lun)delr
      read (lun)xcol
      read (lun)xee
      read (lun)xpx
      read (lun)tau0d
      read (lun)dpthcd
      read (lun)taucd
      lind1=1
      lind2=2
      if (ldir.gt.0) lind2=1
      if (ldir.lt.0) lind1=2
      do ll=lind1,lind2
        do kl=1,nnnl
          tau0(ll,kl)=tau0d(ll,kl)
          enddo
        do kl=1,ncn2
          dpthc(ll,kl)=dpthcd(ll,kl)
          enddo
        do kl=1,nnml
          tauc(ll,kl)=taucd(ll,kl)
          enddo
        enddo
      nlyc=nbinc(13.7,epi,ncn2)
      nry=nlyc+1
      if (lpri.ne.0) write (lun11,*)'in unsavd',rdel,t,tauc(1,25),
     $                ldir,dpthc(1,nry),dpthc(2,nry)
c
      return
      end
