ORB5  v4.9.4
Todo List
Subprogram control_all::initialize_all_modules (datn)
decide where best to place - can it be moved to part.F90 area? ALS
Subprogram diagnostics_mod::initialize_diagnostics
The subroutine velocity_space_diag_init should probably be removed. path_vel1d, path_vel2d, path_vel3d, and path_vel3d_theta are all never assigned, despite being allocated and written. - ALS
Subprogram equil_mod::equil_move_sc (s, chi, zr, ztprime, zB, zgrB, zdivh, zh, addpBst, addp, exh, ztsubB, addvpa)
Commented out these five that are not being used - remove? - ALS
Subprogram fields_mod::create_field_bspl_local_dft (field_bspl_loc, rhs_f_loc, computephibar, transform_)

Maybe split loop here We could modify the input array so that (n=0) = 0.5*(n=0), same for n=Nphi/2 so that we don't need the following test.

Maybe do it globally ?

Subprogram fields_mod::create_field_bspl_pptransp (field_bspl_loc, rhs_f_loc, computephibar, transform_)
Check why we += instead of = in original version
Type globals::diagnostics_variables
Generalize to nspecies>2
Subprogram onestep::update_pic1_and_work2 (iter)
This loop seems to be slower with OpenMP threads than without... When time permits, find out why and fix (but it is not taking a significant fraction of the WCT so it's not top priority).
Subprogram part::compute_all_larmor_positions (isp, pic1_loc, pic2_loc, npart_loc)
Port this to GPU using CUDA prefix scan wrapper - NOA
Subprogram part::diagnostics_in_loop (ip, isp, sigmat, chit, chit_cos, chit_sin, phit, wt, dPsidt0, dPsidt1, zf0, psi0t, ze, pot_equil, tval, zvth2, rt, hh, vpt2, ut, ut2, w3t, pt, pvolgc, df0_dpsi_prof, df0_dchi_prof, dpsi_prof_dt, dchi_prof_dt, vpar, genelec, bstar_inv, bgrb, rhs, tempd, vgc, dvpadt1, dvpadt0, vgb, vpressure, veb_f, vexb, expt_back, eypt_back, b, exh, vecrossb_f2, dpotdpsi, vdr, pvol, ksieta, is_trapped, mut, umin_bin, du_flux_inv, dmu_flux_inv, gyroapar, nval, ithread)

This lone diagnostic uses pvolgc, rather than pvol. The difference is that pvolgc is PVOL_PIC before it is reassigned if nl_2weights. This is probably not intentional and changing it would clean things up a little bit. ALS

temp2 is not defined prior to its use here, so this diagnostic is not working. It is the source of a fair amount of clutter though. Remove? ALS

Subprogram part::electron_fluxes_moments (isp, irloc, zf0, dPsidt1, dPsidt0, ze, wt, ffinit_tmp1, ffinit_tmp2, ffinit_tmp3, ffinit_tmp4, is_trapped, ithread)
change names HEAT_P_DIA in HEAT_P_DIA_TURB, PARTICLE_P_DIA in PARTICLE_P_DIA_TURB ...
Subprogram part::get_larmor_indices (isp, pic1_loc, pic2_loc, npart_loc, initflag)

Port this to GPU using CUDA prefix scan wrapper - NOA

Can optimize this loop - ALS

Subprogram part::get_toroidal_momentum (isp, st, chit, ut, mut, psi_correction, tsubB, psit_prof, psit_pot, fvpllb_out, dfvpllb_den_out, dfvpllb_dpsi_out)
I added these lines since it appears they should be here (with the commented version of the right hand side I'm waiting for someone who knows/uses nl_bgpot to address it; for now, this code hasn't changed anything - ALS
Subprogram part::load_particles
clean up - ALS
Subprogram part::sum_particles_in_radial_bins (isp, ip, irloc, zf0, dPsidt1, dPsidt0, ze, wt, ut, rt2, vpar, zf0_tmp1, zf0_tmp2, zf0_tmp3, sigmat, zf0_local, grsigma2, grsigmagrchi, b, exh, wt_tmp1, wt_tmp2, wt_tmp3, vexb, ffinit_tmp1, ffinit_tmp2, ffinit_tmp3, ffinit_tmp4, ffinit_tmp5, jdote_tot, ithread)
change name of HEAT_DIA in HEAT_DIA_TURB, PARTICLE_DIA in PARTICLE_DIA_TURB......
Subprogram part::test_particle_output (isp, ip, psi0t, ze, pot_equil, wt, zvth2, nval, pvol, zf0)
I noticed a few issues with this diagnostic. (Use of st0, and alpt0, for example. Should be rewritten or deleted. - ALS
Subprogram preload_numpart (isp, lnpart)
What does this do? ALS
Subprogram sources::noise_control_init
Define binings and allocate necessary arrays. Bining for vpll_avg. Should be input parameters really.