	INTEGER I,J,TIME,NX,NY,NT
	PARAMETER (NX=400,NY=400,NT=500)
	REAL HX(NX,NY),HY(NX,NY),EZ(NX,NY)
	REAL EPS,MU,PAI,DX,DY,DT,TMP

	PAI=ACOS(-1.0)
	EPS=8.854E-12
	MU=4.0*PAI*1.E-7
	DX=0.01
	DY=DX
	DT=1.E-11


	DO 1000 TIME=1,NT

	   WRITE(*,*) 'TIME STEP = ', TIME

	EZ(NX/2,NY/2)=SIN(TIME*DT*2.0*PAI*1.E9)

	DO 200 I=2,NX
	DO 210 J=2,NY
	   HX(I,J-1)=HX(I,J-1)-DT*(EZ(I,J)-EZ(I,J-1))/MU/DY
210 	CONTINUE
200	CONTINUE

	DO 300 I=2,NX
	DO 310 J=1,NY
	   HY(I-1,J)=HY(I-1,J)+DT*(EZ(I,J)-EZ(I-1,J))/MU/DX
310 	CONTINUE
300	CONTINUE

	DO 100 I=2,NX
	DO 110 J=2,NY
	   TMP=(HY(I,J)-HY(I-1,J))/DX-(HX(I,J)-HX(I,J-1))/DY
           EZ(I,J)=EZ(I,J)+DT/EPS*TMP
110 	CONTINUE
100	CONTINUE

1000	CONTINUE

	OPEN(7,FILE='ez.dat')
	DO 400 I=2,NX-1
	DO 410 J=2,NY-1
	   WRITE(7,500) I, J, EZ(I,J)
410 	CONTINUE
400	CONTINUE

500	FORMAT(I4,3X,I4,3X,E16.6)

	CLOSE(7)


	STOP
	END
