c This is to reduce the resolution before using readxyz.f:

       program main
       integer i,j,k,l,m,n,ij,nx,nth,nv  
       parameter(nx=120,nth=64,nv=nx*nth)  ! Initial dimensions
       real*8 a,b,c,d,e,x(nv),y(nv),z(nv)

       open(7,file='soln1')
       open(8,file='soln1lowres.sol')
       do i=1,nx
         do j=1,nth
          ij=(i-1)*nth + j                 
          read(7,*)x(ij),y(ij),z(ij)!read in vertex coords
         end do
       end do

       do i=1,nx,2     ! Reduce x resolution by factor of 2
         do j=1,nth,2  ! Reduce theta resolution by factor of 2
          ij=(i-1)*nth + j                 
          write(8,*)x(ij),y(ij),z(ij)  
         end do
       end do 

       end
