Calculate the particle flux contribution to toroidal momentum flux and write to netCDF
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | file_id |
NetCDF ID of the file to write to |
||
integer, | intent(in) | :: | nout |
Current timestep |
subroutine do_write_pflux_sym(file_id, nout)
use dist_fn, only: pflux_vs_theta_vs_vpa
use theta_grid, only: ntgrid
use le_grids, only: nlambda, negrid
use species, only: nspec
use mp, only: proc0
use gs2_io, only: nc_loop_partsym_tormom
implicit none
!> NetCDF ID of the file to write to
integer, intent(in) :: file_id
!> Current timestep
integer, intent(in) :: nout
real, dimension(:,:,:), allocatable :: pflux_sym
allocate (pflux_sym(-ntgrid:ntgrid,nlambda*negrid,nspec))
call pflux_vs_theta_vs_vpa (pflux_sym)
if (proc0) call nc_loop_partsym_tormom (file_id, nout, pflux_sym)
deallocate (pflux_sym)
end subroutine do_write_pflux_sym