nc_final_moments Subroutine

public subroutine nc_final_moments(file_id, ntot, density, upar, tpar, tperp, qparflux, pperpj1, qpperpj1)

Write the various low-order moments to the output netCDF file, overwriting existing values

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: file_id

NetCDF ID of the file to write to

complex, intent(in), dimension (:,:,:,:) :: ntot
complex, intent(in), dimension (:,:,:,:) :: density
complex, intent(in), dimension (:,:,:,:) :: upar
complex, intent(in), dimension (:,:,:,:) :: tpar
complex, intent(in), dimension (:,:,:,:) :: tperp
complex, intent(in), dimension (:,:,:,:) :: qparflux
complex, intent(in), dimension (:,:,:,:) :: pperpj1
complex, intent(in), dimension (:,:,:,:) :: qpperpj1

Contents

Source Code


Source Code

  subroutine nc_final_moments (file_id, ntot, density, upar, tpar, tperp, qparflux, pperpj1, qpperpj1)
    implicit none
    !> NetCDF ID of the file to write to
    integer, intent(in) :: file_id
    complex, dimension (:,:,:,:), intent (in) :: ntot, density, upar, tpar, tperp
    complex, dimension (:,:,:,:), intent (in) :: qparflux, pperpj1, qpperpj1
    character(*), dimension(*), parameter :: dim_names = [complex_dim, theta_dim, kx_dim, ky_dim, species_dim]

#ifdef NETCDF
    call netcdf_write_complex(file_id, 'ntot', ntot, dim_names)
    call netcdf_write_complex(file_id, 'density', density, dim_names)
    call netcdf_write_complex(file_id, 'upar', upar, dim_names)
    call netcdf_write_complex(file_id, 'tpar', tpar, dim_names)
    call netcdf_write_complex(file_id, 'tperp', tperp, dim_names)
    call netcdf_write_complex(file_id, 'qparflux', qparflux, dim_names)
    call netcdf_write_complex(file_id, 'pperpj1', pperpj1, dim_names)
    call netcdf_write_complex(file_id, 'qpperpj1', qpperpj1, dim_names)
#endif
  end subroutine nc_final_moments