Calculate the field-line average of and write to dump_check1_unit
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | t |
subroutine do_write_dump_1(t)
use mp, only: proc0
use kt_grids, only: naky, ntheta0, aky, akx
use theta_grid, only: field_line_average
use fields_arrays, only: phinew
use dist_fn, only: omega0, gamma0
use constants, only: zi
implicit none
real, intent(in) :: t
complex :: tmp, sourcefac
integer :: ik, it
if(.not.proc0) return
!Should we not actually use the sourcefac calculated in dist_fn for consistency?
sourcefac = exp(-zi*omega0*t+gamma0*t)
do ik = 1, naky
do it = 1, ntheta0
tmp=field_line_average(phinew(:,it,ik))
write (dump_check1_unit, "(20(1x,e12.5))") &
t, aky(ik), akx(it), tmp, tmp/sourcefac
end do
end do
end subroutine do_write_dump_1