
c-----------------------------------------------------------------------------
      program magfit 
c-----------------------------------------------------------------------------
c 
c c rdata inputs coded for synthetic shaved output from gensyn 
c jcain 5/29/1999
c-----------------------------------------------------------------------------
      integer extfld,prcoef
      parameter (inop=903,imaxd=7500,nskip=1,iter=3,errlim=30000.) 
      parameter (prcoef=4,azer=6371.2,epoch=1995.,avetim=1995.0) 
      parameter (mono=2,nmax=11,nmaxt=0,nmaxtt=0,extfld=0) 
      real*8 d,f
      common /dd/d(imaxd) 
      common /fld/cd,ci,ch,cf,cz,cx,cy,cddeg,cideg,wt,tm, 
     +       cxd,cyd,czd,nor,nop,lat,lon,no,nonot,f(inop) 
      open (4, file='synwt', form='unformatted')  
      open (5, file='syntst')  
      open (6, file='output') 
      open (10, file='testshav', form='unformatted')
      open (11, file='tape11', form='unformatted') 
      open (12, file='outcoef')
 10   call fit(inop,imaxd,nskip,iter,errlim,azer,avetim,
     +          epoch,nmax,nmaxt,nmaxtt,extfld,mono,prcoef)
c----------------------------------------------------------------------------- 
c fita is entry to rerun with same coeffs from prior call to fit
c coeffs with n > nmax already loaded will continue to be used
c   1 call fita(inop,imaxd,nskip,iter,errlim,azer,avetim,
c    +epoch,nmax,nmaxt,nmaxtt,extfld,mono,prcoef) 
c-----------------------------------------------------------------------------
      close(5)
      close(10) 
      close(11, status='keep') 
      close(12, status='keep') 
      stop'normal'
      end 








