      subroutine ersinit 
c initialize ers specific constants for reading colinear data base
c  initializes names and record sizes of all files used
      implicit none
      integer*4 nreclephm,nreclmss,nreclsshfl,nrecltime,ncycles
      integer*4 numrevs,nrecldir,nperiod,numrevsp,ncyclesp,nperiodp
      character*80 sshfile,mssfile,flagfile,timefile,ephmfile,
     .   dirfile,errflag
      parameter (numrevsp=501)
      parameter (ncyclesp=86)
      parameter (nperiodp=6040)
      common/cmission/nreclephm,nreclmss,nreclsshfl,nrecltime,
     .  nrecldir,ncycles,numrevs,nperiod
      common/cflag/errflag(16)
      common/cfnamersr/sshfile,mssfile,flagfile,timefile,ephmfile,
     .   dirfile
      save
      data 
     .sshfile/'/nexsan1/alt/NASADATA/ers2_54ad/ssh.dat'/
      data 
     .mssfile/'/nexsan1/alt/NASADATA/ers2_54ad/mss.dat'/
      data 
     .flagfile/'/nexsan1/alt/NASADATA/ers2_54ad/flagword.dat'/
      data 
     .timefile/'/nexsan1/alt/NASADATA/ers2_54ad/time.dat'/
      data 
     .ephmfile/'/nexsan1/alt/NASADATA/ers2_54ad/reforb.dat'/
      data 
     .dirfile/'/nexsan1/alt/NASADATA/ers2_54ad/directry.dat'/
      data errflag/' not set so can read as unsigned integer ',
     .             ' depth of ocean < 200 meters ',
     .             ' sigma H of linear fit to 20/sec data > 15 cm',
     .             ' quality of mispointing estimate (bit 7 OPR MCD)',
     .             ' significant wave height > 10 m',
     .             ' sea surface height colinear residual rms > 30 cm',
     .             ' sigma0 < 6 db or > 27 db',
     .             ' ocean tide: Ray model vs UT model > 5.0 cm ',
     .           ' cross track distance from reference track> 1.0 km ',
     .           ' cross track slope from mean sea surface> 10 cm/km ',
     .           ' quality of altitude estimat (bit 4 OPR MCD)',
     .  ' quality of backscatter coefficient estimate (bit 5 OPR MCD)',
     .  ' quality of significant waveheight estimate (bit 6 OPR MCD)',
     .  ' possibility of radiometer meas. contaminated by rain or
     . ice (bit 11 OPR MCD)',
     .  ' observation failed edit criteria',
     .  ' observation had undefined correction parameter'/
      nperiod=nperiodp
      ncycles=ncyclesp
      numrevs=numrevsp
      nrecldir=nperiod*4
      nreclephm=nperiod*4 
      nreclsshfl=ncycles*2+4 
      nreclmss=nperiod*2 
      nrecltime=12
      end
