Calculate the momentum flux as a function of 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_symmetry(file_id, nout)
use diagnostics_fluxes, only: flux_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_sym
use fields_arrays, only: phinew
implicit none
!> NetCDF ID of the file to write to
integer, intent(in) :: file_id
!> Current timestep
integer, intent(in) :: nout
real, dimension(:,:,:), allocatable :: vflx_sym
allocate (vflx_sym(-ntgrid:ntgrid,nlambda*negrid,nspec))
call flux_vs_theta_vs_vpa (phinew, vflx_sym)
if (proc0) call nc_loop_sym (file_id, nout, vflx_sym)
deallocate (vflx_sym)
end subroutine do_write_symmetry