      subroutine getsec(infd,pfe,npad,nt,nx,iadpin,ntaupow2,dodata)
      implicit none
      integer nt,nx,npad,infd,iadpin,ntaupow2
      logical dodata
      real pfe(nt,nx)
      integer feoff(2),cmst(2),cmend(2),cmax(2),fedim(2)
      integer it,ix
      integer reed,icnt
      integer ideb
      include '/usr/include/cm/paris-configuration-fort.h'
      if(.not.(dodata))goto 23000
         icnt=reed(infd,pfe(1,1+npad),4*nt*(nx-2*npad))
         do 23002 ix=1,npad 
            do 23004 it=1,nt 
               pfe(it,ix)=pfe(it,npad+1)
23004          continue
23002       continue
         do 23006 ix=nx-npad+1,nx 
            do 23008 it=1,nt 
               pfe(it,ix)=pfe(it,nx-npad)
23008          continue
23006       continue
c%      ideb=CM_allocate_stack_field(1)
23000 continue
      do 23010 it=1,nt,ntaupow2 
         if(.not.(dodata))goto 23012
            fedim(2)=nt
            fedim(1)=nx
            feoff(2)=it-1
            feoff(1)=0
            cmst(1)=0
            cmst(2)=0
            cmend(2)=min(ntaupow2,nt+1-it) 
            cmend(1)=nx
            cmax(1)=0
            cmax(2)=1
23012    continue
         if(it.gt.1) iadpin=CM_add_offset_to_field_id(iadpin,32)
         if(.not.(dodata))goto 23014
         call CM_f_move_zero_always_1L(iadpin,23,8)
         call CM_f_write_to_news_array_1L(pfe,feoff,cmst,cmend,
     1        cmax,iadpin,23,8,2,fedim,CM_float_single_array)
c%         call CM_f_ne_zero_1L(iadpin,23,8)
c%         call CM_store_test(ideb)
c%         call CM_latch_leds_always(ideb)
23014    continue
23010    continue
c%      call CM_deallocate_stack_through(ideb)
      return
      end
