PROGRAM SHALLOW2D
  
  IMPLICIT NONE
  INTEGER(8),PARAMETER :: M=200
  INTEGER(8) :: I,J
  REAL(8) :: X,Y,DX,DL,ETA0,SIGMA
  REAL(8) :: VAR(0:M,0:M,0:2) ! VAR(:,:,0): η, VAR(:,:,1): u, VAR(:,:,2): v
  
  DL=2000000
  DX=DL/M 
  SIGMA=50000
  ETA0=1.0_8

  VAR=0
  DO J=0,M-1
     DO I=0,M-1
        X=(I+0.5_8)*DX
        Y=(J+0.5_8)*DX        
        VAR(I,J,0)=ETA0*EXP(-((X-0.5*DL)**2+(Y-0.5*DL)**2)/(2*SIGMA**2))
     END DO
  END DO
  
  OPEN(1,FILE='shallow2d.dat',FORM='UNFORMATTED',ACCESS='STREAM')
  WRITE(1) M
  WRITE(1) DX
  WRITE(1) VAR
  CLOSE(1)
  
END PROGRAM SHALLOW2D
