
! written by nbigen.py
! *** do not edit *** (use nbigen.py instead)

subroutine cnubeam_set_mission(cstr,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: cstr
    integer :: ierr
    ierr = 0
    call nubeam_set_mission(cstr,ierr)
end subroutine cnubeam_set_mission

subroutine cnubeam_set_workpath(cstr,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: cstr
    integer :: ierr
    ierr = 0
    call nubeam_set_workpath(cstr,ierr)
end subroutine cnubeam_set_workpath

subroutine cnubeam_ctrl_init(ssh,nbi_ctrl,ierr)
    use plasma_state_mod
    use nbi_pstypes
    implicit none
    integer :: ssh(12) ! opaque handle to plasma_state
    type (nbi_ctrl_init) :: nbi_ctrl
    integer, intent(out) :: ierr
    ! local
    type plasma_state_ptr
         type(plasma_state), pointer :: ptr
    end type
    type(plasma_state_ptr) :: ss_ptr
    ! unpack
    ss_ptr = transfer(ssh, ss_ptr)
    ! invoke
    call nubeam_ctrl_init(ss_ptr%ptr,nbi_ctrl,ierr)
end subroutine cnubeam_ctrl_init

subroutine cnubeam_ctrl_step(ss_inh,ss_outh,nbi_ctrl,ierr)
    use plasma_state_mod
    use nbi_pstypes
    implicit none
    integer :: ss_inh(12) ! opaque handle to plasma_state
    integer :: ss_outh(12) ! opaque handle to plasma_state
    type (nbi_ctrl_update) :: nbi_ctrl
    integer, intent(out) :: ierr
    ! local
    type plasma_state_ptr
         type(plasma_state), pointer :: ptr
    end type
    type(plasma_state_ptr) :: ss_in_ptr, ss_out_ptr
    ! unpack
    ss_in_ptr = transfer(ss_inh, ss_in_ptr)
    ss_out_ptr = transfer(ss_outh, ss_out_ptr)
    ! invoke
    call nubeam_ctrl_step(ss_in_ptr%ptr,ss_out_ptr%ptr,nbi_ctrl,ierr)
end subroutine cnubeam_ctrl_step

subroutine cnubeam_ctrl_step_child(ierr)
    use plasma_state_mod
    use nbi_pstypes
    implicit none
    integer, intent(out) :: ierr
    ! invoke
    call nubeam_ctrl_step_child(ierr)
end subroutine cnubeam_ctrl_step_child

subroutine cnubeam_ctrl_nostep(ss_inh,ierr)
    use plasma_state_mod
    use nbi_pstypes
    implicit none
    integer :: ss_inh(12) ! opaque handle to plasma_state
    integer, intent(out) :: ierr
    ! local
    type plasma_state_ptr
         type(plasma_state), pointer :: ptr
    end type
    type(plasma_state_ptr) :: ss_in_ptr
    ! unpack
    ss_in_ptr = transfer(ss_inh, ss_in_ptr)
    ! invoke
    call nubeam_ctrl_nostep(ss_in_ptr%ptr,ierr)
end subroutine cnubeam_ctrl_nostep


subroutine cnbi_ctrl_init_dflt(blk)
    use nbi_pstypes
    implicit none
    type (nbi_ctrl_init) :: blk
    call nbi_ctrl_init_dflt(blk)
end subroutine cnbi_ctrl_init_dflt
    

subroutine cnbi_ctrl_update_dflt(blk)
    use nbi_pstypes
    implicit none
    type (nbi_ctrl_update) :: blk
    call nbi_ctrl_update_dflt(blk)
end subroutine cnbi_ctrl_update_dflt
    

subroutine cnbi_ctrl_init_cdfread(ofile,blk,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: ofile            ! input file
    type (nbi_ctrl_init) :: blk    ! loaded from file
    integer, intent(out) :: ierr      ! status, 0=OK
    ierr = 0
    call nbi_ctrl_init_cdfread(ofile,blk,ierr)
end subroutine cnbi_ctrl_init_cdfread
    

subroutine cnbi_ctrl_update_cdfread(ofile,blk,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: ofile            ! input file
    type (nbi_ctrl_update) :: blk    ! loaded from file
    integer, intent(out) :: ierr      ! status, 0=OK
    ierr = 0
    call nbi_ctrl_update_cdfread(ofile,blk,ierr)
end subroutine cnbi_ctrl_update_cdfread
    

subroutine cnbi_ctrl_init_read(ofile,blk,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: ofile            ! input file
    type (nbi_ctrl_init) :: blk    ! loaded from file
    integer, intent(out) :: ierr      ! status, 0=OK
    ierr = 0
    call nbi_ctrl_init_read(ofile,blk,ierr)
end subroutine cnbi_ctrl_init_read
    

subroutine cnbi_ctrl_update_read(ifile,blk,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: ifile            ! input file
    type (nbi_ctrl_update) :: blk    ! loaded from file
    integer, intent(out) :: ierr      ! status, 0=OK
    ierr = 0
    call nbi_ctrl_update_read(ifile,blk,ierr)
end subroutine cnbi_ctrl_update_read
    

subroutine cnbi_ctrl_init_cdfwrite(ofile,blk,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: ofile            ! output file
    type (nbi_ctrl_init) :: blk    ! written to file
    integer, intent(out) :: ierr      ! status, 0=OK
    ierr = 0
    call nbi_ctrl_init_cdfwrite(ofile,blk,ierr)
end subroutine cnbi_ctrl_init_cdfwrite
    

subroutine cnbi_ctrl_update_cdfwrite(ofile,blk,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: ofile            ! output file
    type (nbi_ctrl_update) :: blk    ! written to file
    integer, intent(out) :: ierr      ! status, 0=OK
    ierr = 0
    call nbi_ctrl_update_cdfwrite(ofile,blk,ierr)
end subroutine cnbi_ctrl_update_cdfwrite
    

subroutine cnbi_ctrl_init_write(ofile,blk,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: ofile            ! output file
    type (nbi_ctrl_init) :: blk    ! written to file
    integer, intent(out) :: ierr      ! status, 0=OK
    ierr = 0
    call nbi_ctrl_init_write(ofile,blk,ierr)
end subroutine cnbi_ctrl_init_write
    

subroutine cnbi_ctrl_update_write(ofile,blk,ierr)
    use nbi_pstypes
    implicit none
    character*(*) :: ofile            ! output file
    type (nbi_ctrl_update) :: blk    ! written to file
    integer, intent(out) :: ierr      ! status, 0=OK
    ierr = 0
    call nbi_ctrl_update_write(ofile,blk,ierr)
end subroutine cnbi_ctrl_update_write
    
