         program makent

         character*21 out
         character*8 filename

         out='$Enter WND-Filename: '
         write(6,2)out
2        format(a)
         read(5,2)filename

         call makentw(filename)

         end


         subroutine makentw(filename) 

         integer itime(3)
         real rtime(1), rdata1(27)
         character*18 ctime(4), cdata(27)
         character*8 filename
         character*40 file
C
         parameter(npawc=500000)
	 common/pawc/hmemo(npawc)
C
         common /ntupr/ itime, rtime, rdata1

         data ctime / 'pb5yr[0,2100]:I', 'pb5day[0,366]:I', 
     +                'pb5ms:I', 'min95:R' /
         data cdata /  
     +      'nprot:R', 'vthprot:R', 'vxgsm:R', 'vygsm:R', 
     +      'vzgsm:R',    'vgsm:R', 'vxgse:R', 'vygse:R', 
     +      'vzgse:R',    'vgse:R','bulkvr:R','bulkvt:R',
     +     'bulkvn:R', 
     +       'bavg:R',    'brms:R', 
     +      'bxgsm:R',   'bygsm:R', 'bzgsm:R', 'brgsm:R', 
     +    'bthegsm:R', 'bphigsm:R',
     +      'bxgse:R',   'bygse:R', 'bzgse:R', 'brgse:R', 
     +    'bthegse:R', 'bphigse:R'  /

         lin=41
         lout=42
         id=103
         call hlimit(npawc)
         file='platte30:[soho.nt]eph'//filename(4:8)//'.ntw'
         call hropen(lout,'NTUPLE',file,'N',1024,istat)
         call hbnt(id,'EPHIN WND L1',' ')
         do i=1,3
           call hbname(id,'ntupr',itime(i), ctime(i))
	 enddo
         call hbname(id,'ntupr',rtime, ctime(4))
	 do i=1,27
           call hbname(id,'ntupr',rdata1(i),cdata(i))
	 enddo
         file='platte40:[soho.l1.wnd]'//filename//'.sup'
         open(unit=lin,file=file,form='formatted',type='old',readonly)
         ik=0
10       read(lin,*,end=20,err=20,iostat=ios)itime,rtime,rdata1
         ik=ik+1
         call hfnt(id)
         go to 10
20       call hrout(id,icycle,' ')
	 print*,' WND:  C entries:  ',ik,'  ios:  ',ios
         call hrend('NTUPLE')
         close (lin)
         close (lout)
         end

