Write the correlation function over the physical domain 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 output timestep |
||
complex, | intent(in), | dimension (-ntgrid:,:) | :: | phi_2pi_corr |
The correlation function over the physical domain |
subroutine nc_loop_corr (file_id, nout, phi_2pi_corr)
use theta_grid, only: ntgrid
# ifdef NETCDF
use run_parameters, only: has_phi
# endif
implicit none
!> NetCDF ID of the file to write to
integer, intent(in) :: file_id
!> Current output timestep
integer, intent (in) :: nout
!> The correlation function over the physical domain
complex, dimension (-ntgrid:,:), intent (in) :: phi_2pi_corr
# ifdef NETCDF
if (has_phi) then
call netcdf_write_complex(file_id, "phi_corr_2pi", phi_2pi_corr, &
dim_names=[complex_dim, theta_dim, ky_dim, time_dim], start=starts(4, nout), &
long_name="2 point correlation function calculated from the electric potential")
end if
# endif
end subroutine nc_loop_corr