generate_poincare_data Subroutine

subroutine generate_poincare_data(equi, n_surfaces, n_turns, n_planes, phi_array, trace_start_loc, filename)

For a given equilibrium equi, this routine generates Poincare data on the toroidal planes with angles given in phi_array.

This is done by tracing n_surfaces number of magnetic field lines n_turns number of full toroidal turns 2pi around the device. The starting locations of each field line, for the first plane, are given in trace_start_loc.

Each time the trace intersects one of the specified planes, the x and y locations of the field line are saved. This data is then saved to netcdf file with the name filename.

Arguments

Type IntentOptional Attributes Name
class(equilibrium_t), intent(inout) :: equi

Equilibrium instance

integer, intent(in) :: n_surfaces

Number of flux surfaces

integer, intent(in) :: n_turns

Number of toroidal rotations 2pi

integer, intent(in) :: n_planes

Number of toroidal planes

real(kind=FP), intent(in), dimension(n_planes) :: phi_array

Toroidal angles at which to save data

real(kind=FP), intent(in), dimension(2, n_surfaces) :: trace_start_loc

Trace starting locations (x, y) for each surface, for the first plane

character(len=*), intent(in) :: filename

File name under which to save the Poincare data


Calls

proc~~generate_poincare_data~~CallsGraph proc~generate_poincare_data generate_poincare_data mpi_wtime mpi_wtime proc~generate_poincare_data->mpi_wtime proc~get_stdout get_stdout proc~generate_poincare_data->proc~get_stdout proc~handle_error handle_error proc~generate_poincare_data->proc~handle_error proc~trace trace proc~generate_poincare_data->proc~trace proc~write_poincare write_poincare proc~generate_poincare_data->proc~write_poincare none~handle_error error_handler_t%handle_error proc~handle_error->none~handle_error proc~trace->proc~handle_error destroy destroy proc~trace->destroy initialize initialize proc~trace->initialize integrate integrate proc~trace->integrate proc~get_stderr get_stderr proc~trace->proc~get_stderr nf90_close nf90_close proc~write_poincare->nf90_close nf90_create nf90_create proc~write_poincare->nf90_create nf90_def_dim nf90_def_dim proc~write_poincare->nf90_def_dim nf90_def_var nf90_def_var proc~write_poincare->nf90_def_var nf90_put_att nf90_put_att proc~write_poincare->nf90_put_att nf90_put_var nf90_put_var proc~write_poincare->nf90_put_var proc~handle_error_netcdf handle_error_netcdf proc~write_poincare->proc~handle_error_netcdf none~handle_error_netcdf error_handler_t%handle_error_netcdf proc~handle_error_netcdf->none~handle_error_netcdf

Called by

proc~~generate_poincare_data~~CalledByGraph proc~generate_poincare_data generate_poincare_data program~diagnose_poincare diagnose_poincare program~diagnose_poincare->proc~generate_poincare_data