      subroutine short_name(name1,name2)
      implicit none
      character*40 name1,dummy
      character*16 name2
      character*1 blank, names(40)
      integer i, j, shift
      data blank /' '/
      equivalence (names(1),dummy)
      dummy=name1
      do i=1,39
         if(names(i).eq.blank) then
           j=i
           do while((names(j).eq.blank).and.(j.lt.16))
              j=j+1
           enddo
           shift=j-i
           do j=i+shift,40
              names(j-shift)=names(j)
           enddo
         endif
      enddo
      name2=dummy
      return
      end
         
