      subroutine save_pop_ratios( rut_in, rlt_in, zt_in, 
     &   nl_in, rut_sav, rlt_sav, zt_sav, nl_sav, 
     &   tm_ml, tm_mgb, tm_mt,  ml, mgs,mt)
     
      implicit none
      integer*4 nl_in, nl_sav, 
     &   tm_ml, tm_mgb, tm_mt,  ml, mgs, mt
     
      real*4 rut_in(*), rlt_in(*), zt_in(*),
     &  rut_sav(*), rlt_sav(*), zt_sav(*)
c local
      integer*4 i
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c

      if(tm_ml*tm_mgb*tm_mt .gt. ml*mgs*mt  .or.
     &     nl_in  .gt.  tm_ml) then
         stop 'dimension error in sav_pop_ratios'
      endif
      
      nl_sav = nl_in
      
      do i=1,nl_sav
         zt_sav(i) = zt_in(i)
      enddo
      
      do i = 1, tm_ml*tm_mgb*tm_mt
         rlt_sav(i) = rlt_in(i)
         rut_sav(i) = rut_in(i)
      enddo

c       print*, 'save ratios' 
c      do i = 1, nl_sav
c         print*, zt_sav(i), rlt_in(i), rut_in(i)
c      enddo
c      print*,'&' 
      return
      end
