CJLG************************************************************
c==========================================================================
C
      program main
      
c
        PARAMETER (IM=101,JM=159)
        REAL,ALLOCATABLE:: hgt(:,:),sm(:,:),RES(:,:)
	REAL,ALLOCATABLE:: fill(:,:)
        
c _______________________________________________________________________________
c
        ALLOCATE (fill((IM*2)-1,JM))
            
        ALLOCATE(HGT(IM,JM))
        ALLOCATE(SM(IM,JM))
	ALLOCATE(RES(IM,JM))
        open(1,file="etatopo.dat",status='old',form='unformatted')
        rewind(1)
        read(1) hgt,sm
	read(1) res
        close(1)

        CALL FILLV(hgt,fill,1,(IM*2)-1,JM)
	where(fill<0)fill=0
        write(6,*)(IM*2)-1,JM
        write(92)fill
        CALL FILLV(sm,fill,1,(IM*2)-1,JM)
        write(92)fill
        CALL FILLV(res,fill,1,(IM*2)-1,JM)
        write(92)fill

C-----------------------------------------------------------------------
                             RETURN
                             END
