Restore g
from restart files. Note that the timestep and simulation time
are restored by read_t0_from_restart_file
subroutine ginit_restart_many
use dist_fn_arrays, only: g, gnew
use fields_arrays, only: phi, apar, bpar, phinew, aparnew, bparnew
use gs2_save, only: gs2_restore
use mp, only: proc0
use file_utils, only: error_unit
use run_parameters, only: has_phi, has_apar, has_bpar
use array_utils, only: copy, zero_array
implicit none
integer :: istatus, ierr
call gs2_restore (g, scale, istatus, has_phi, has_apar, has_bpar)
if (istatus /= 0) then
ierr = error_unit()
if (proc0) write(ierr,*) "Error reading file: ", trim(restart_file)
call zero_array(g)
end if
call copy(g, gnew)
call copy(phinew, phi) ; call copy(aparnew, apar) ; call copy(bparnew, bpar)
end subroutine ginit_restart_many