      SUBROUTINE read_sector_size(fname,nxin,nyin,nzin)
  
      implicit none

      INTEGER:: nxin,nyin,nzin
      CHARACTER(len=*)::fname
      INTEGER :: l
      integer,dimension(200)::gds

      l=index(fname//' ',' ')-1
      print *,'Ingesting data - file = ',fname(1:l)
      open(1,file=fname,status='old',form='unformatted')
      read(1)nzin
      close(1)

      open(2,file='gdsinfo.ETA_avn',status='old',form='unformatted')
      read(2)gds
      close(2)

      nxin=gds(2)
      nyin=gds(3)

      print *,'nxin,nyin,nzin = ',nxin,nyin,nzin

      END SUBROUTINE read_sector_size
 
