
      
      pi=3.141592
      id1=99
      
      ix1=61
      iy1=31
      iz1=91
      dx=ix1-1
      dy=iy1-1
      dz=iz1-1
      open(id1,file="M3DLat_samp03.dat",status="new")
      write(id1,*) 1
      write(id1,*) ix1,iy1,iz1
      do 10 iz=1,iz1
      do 10 ix=1,ix1
      do 10 iy=1,iy1
         x=ix-1
         y=iy-1
         z=iz-1
         xx=(x-dx*0.5)/dx*pi
         yy=(y-dy*0.5)/dy*pi
         zz=(z-dz*0.5)/dz*pi
         p=(sin(xx)+sin(yy)+sin(zz))*3000.0+3000.0
         write(id1,*) x,y,z,p
   10 continue
      
      close(id1)
      stop
      end
      
      