C -*- Mode: Fortran; -*- cc----------------------------------------------------------------- c Ravi Samtaney c Copyright 2005 c Princeton Plasma Physics Laboratory c All Rights Reserved c----------------------------------------------------------------- c $Log$ c program coarsenEq integer:: i,j, k double precision, allocatable:: Rnode(:,:), Znode(:,:) double precision, allocatable:: RTmp(:,:), ZTmp(:,:) double precision, allocatable:: psi(:) double precision, allocatable:: psibig(:) double precision, allocatable:: pprof(:) double precision, allocatable:: gprof(:) double precision, allocatable:: qprof(:) double precision, allocatable:: theta(:) integer:: npsi, ntheta double precision:: rma, zma c c open(16,file='esc.txt',form='formatted') open(16,file='eq3.txt',form='formatted') open(26,file='eq3r.txt',form='formatted') c read(16,*) ntheta read(16,*) npsi write(26,*) ntheta/2+1 write(26,*) npsi/2+1 c allocate(psi(npsi)) allocate(psibig(npsi)) allocate(pprof(npsi)) allocate(gprof(npsi)) allocate(qprof(npsi)) allocate(theta(ntheta)) allocate(RTmp(ntheta,npsi)) allocate(ZTmp(ntheta,npsi)) c read(16,*) rma read(16,*) zma write(26,*) rma write(26,*) zma c write(6,*) 'Rma, Zma',rma, zma read(16,*) psi do i=1,npsi,2 write(26,*) psi(i) enddo c read(16,*) theta do i=1,ntheta,2 write(26,*) theta(i) enddo c read(16,*) psibig do i=1,npsi,2 write(26,*) psibig(i) enddo c read(16,*) pprof do i=1,npsi,2 write(26,*) pprof(i) enddo c read(16,*) gprof do i=1,npsi,2 write(26,*) gprof(i) enddo c read(16,*) qprof do i=1,npsi,2 write(26,*) qprof(i) enddo c read(16,*) RTmp do j=1,npsi,2 do i=1,ntheta,2 write(26,*) RTmp(i,j) enddo enddo c c read(16,*) ZTmp do j=1,npsi,2 do i=1,ntheta,2 write(26,*) ZTmp(i,j) enddo enddo c c Deallocate tmp variables deallocate(theta) deallocate(RTmp) deallocate(ZTmp) stop end c c c----------------------------------------------------------------------