Write some geometry information to text file <runname>.g
subroutine do_write_geom
use mp, only: proc0
use file_utils, only: open_output_file, close_output_file
use theta_grid, only: ntgrid, theta, Rplot, Zplot, aplot, Rprime, Zprime, aprime, drhodpsi, qval, shape
implicit none
integer :: i, unit
if(.not.proc0) return
!May want to guard this with if(write_ascii) but not until we provide this
!data in main netcdf output by default.
call open_output_file (unit, ".g")
write (unit,fmt="('# shape: ',a)") trim(shape)
write (unit,fmt="('# q = ',e11.4,' drhodpsi = ',e11.4)") qval, drhodpsi
write (unit,fmt="('# theta1 R2 Z3 alpha4 ', &
& ' Rprime5 Zprime6 alpha_prime7 ')")
do i=-ntgrid,ntgrid
write (unit,1000) theta(i),Rplot(i),Zplot(i),aplot(i), &
Rprime(i),Zprime(i),aprime(i)
enddo
call close_output_file (unit)
1000 format(20(1x,1pg18.11))
end subroutine do_write_geom