! written by nbigen.py
! *** do not edit *** (use nbigen.py instead)
 
subroutine nbi_update_sys(zblock)
 
  ! update values for input block: sys
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_sys), intent(in) :: zblock
 
  nlbout = zblock%nlbout
  nltest_output = zblock%nltest_output
#ifdef __MPI
    debug_mpi = nltest_output
#else
    debug_mpi = .FALSE.
#endif
 
end subroutine nbi_update_sys
 
subroutine nbi_update_times(zblock)
 
  ! update values for input block: times
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_times), intent(in) :: zblock
 
  tbm1 = zblock%tbm1
  tbm2 = zblock%tbm2
 
end subroutine nbi_update_times
 
subroutine nbi_update_grid(zblock)
 
  ! update values for input block: grid
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_grid), intent(in) :: zblock
 
  id_mcgrid = zblock%id_mcgrid
  xplasma_in_memory = zblock%xplasma_in_memory
  ngyro = zblock%ngyro
 
end subroutine nbi_update_grid
 
subroutine nbi_update_minority(zblock)
 
  ! update values for input block: minority
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_minority), intent(in) :: zblock
 
  nthrf = zblock%nthrf
 
end subroutine nbi_update_minority
 
subroutine nbi_update_powers(zblock)
 
  ! update values for input block: powers
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_powers), intent(in) :: zblock
 
  einja(1:nbeam) = zblock%einja(1:nbeam)
  pinja(1:nbeam) = zblock%pinja(1:nbeam)
  ffulla(1:nbeam) = zblock%ffulla(1:nbeam)
  fhalfa(1:nbeam) = zblock%fhalfa(1:nbeam)
  orbrzv_toric_Prftot0(1:mibs) = zblock%orbrzv_toric_Prftot0(1:mibs)
  orbrzv_toric_frnm = zblock%orbrzv_toric_frnm
 
end subroutine nbi_update_powers
 
subroutine nbi_update_fusion(zblock)
 
  ! update values for input block: fusion
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_fusion), intent(in) :: zblock
 
  nlusf3 = zblock%nlusf3
  xdatsf3 = zblock%xdatsf3
  nlusfa = zblock%nlusfa
  xdatsfa = zblock%xdatsfa
  nlusft = zblock%nlusft
  xdatsft = zblock%xdatsft
  nlusfp = zblock%nlusfp
  xdatsfp = zblock%xdatsfp
  nlusfp14 = zblock%nlusfp14
  xdatsp3 = zblock%xdatsp3
 
end subroutine nbi_update_fusion
 
subroutine nbi_update_num(zblock)
 
  ! update values for input block: num
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_num), intent(in) :: zblock
 
  nptcls = zblock%nptcls
  nptclf = zblock%nptclf
  nptclh = zblock%nptclh
  NFAST_MAP = zblock%NFAST_MAP
  xpand_nptcl = zblock%xpand_nptcl
  frac_dep_lim = zblock%frac_dep_lim
  nltrk_dep0 = zblock%nltrk_dep0
  NLDEP0_GATHER = zblock%NLDEP0_GATHER
  ndep0 = zblock%ndep0
  NDEP0_MAX = zblock%NDEP0_MAX
  ndep_set_beam = zblock%ndep_set_beam
  ndep_set_ien = zblock%ndep_set_ien
  ncx0 = zblock%ncx0
  nper_cx = zblock%nper_cx
  LEV_NBIDEP = zblock%LEV_NBIDEP
  LEV_TTNUK = zblock%LEV_TTNUK
  LEVMOD_HALO = zblock%LEVMOD_HALO
  NSPLT = zblock%NSPLT
  NSPLT_GEO = zblock%NSPLT_GEO
  NSPLT_KIN = zblock%NSPLT_KIN
  NSPLT_GEN = zblock%NSPLT_GEN
  nmimp = zblock%nmimp
  AIMP = zblock%AIMP
  XZIMP = zblock%XZIMP
  NTEST_MAX = zblock%NTEST_MAX
  BI_MAX_PL = zblock%BI_MAX_PL
  BI_MAX_PR = zblock%BI_MAX_PR
  wghta = zblock%wghta
  orbrzv_rf_option = zblock%orbrzv_rf_option
  nlmcrf_on = zblock%nlmcrf_on
 
end subroutine nbi_update_num
 
subroutine nbi_update_atomic(zblock)
 
  ! update values for input block: atomic
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_atomic), intent(in) :: zblock
 
  dn0out = zblock%dn0out
  nsigexc = zblock%nsigexc
  nlbbcx = zblock%nlbbcx
  nbbcx_avg = zblock%nbbcx_avg
  nbbcx_bb = zblock%nbbcx_bb
 
end subroutine nbi_update_atomic
 
subroutine nbi_update_collid(zblock)
 
  ! update values for input block: collid
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_collid), intent(in) :: zblock
 
  nlorbo = zblock%nlorbo
 
end subroutine nbi_update_collid
 
subroutine nbi_update_flr(zblock)
 
  ! update values for input block: flr
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_flr), intent(in) :: zblock
 
  nlbgflr = zblock%nlbgflr
 
end subroutine nbi_update_flr
 
subroutine nbi_update_saw(zblock)
 
  ! update values for input block: saw
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_saw), intent(in) :: zblock
 
  sawflag = zblock%sawflag
  nlsawb = zblock%nlsawb
  nlsawf = zblock%nlsawf
 
end subroutine nbi_update_saw
 
subroutine nbi_update_adif(zblock)
 
  ! update values for input block: adif
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_adif), intent(in) :: zblock
 
  nkaep = zblock%nkaep
  AEP_ASCALE(1:mnkaep) = zblock%AEP_ASCALE(1:mnkaep)
  AEP_USCALE = zblock%AEP_USCALE
  TAEP_FAC(1:mnkaep) = zblock%TAEP_FAC(1:mnkaep)
  nmdifb = zblock%nmdifb
  fdifbe(1:ndifbe) = zblock%fdifbe(1:ndifbe)
  x_qlim0 = zblock%x_qlim0
 
end subroutine nbi_update_adif
 
subroutine nbi_update_ripple(zblock)
 
  ! update values for input block: ripple
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_ripple), intent(in) :: zblock
 
  taurip = zblock%taurip
  id_ripple = zblock%id_ripple
  id_ripple2 = zblock%id_ripple2
 
end subroutine nbi_update_ripple
 
subroutine nbi_update_fishbone(zblock)
 
  ! update values for input block: fishbone
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_fishbone), intent(in) :: zblock
 
  nlfbon = zblock%nlfbon
 
end subroutine nbi_update_fishbone
 
subroutine nbi_update_misc(zblock)
 
  ! update values for input block: misc
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_misc), intent(in) :: zblock
 
  plhgt = zblock%plhgt
  edbfac = zblock%edbfac
 
end subroutine nbi_update_misc
 
subroutine nbi_update_profiles(zblock)
 
  ! update values for input block: profiles
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_profiles), intent(in) :: zblock
 
  id_te = zblock%id_te
  id_ti = zblock%id_ti
  id_tifusn = zblock%id_tifusn
  id_ne = zblock%id_ne
  ng = zblock%ng
  id_nh(1:ngmax) = zblock%id_nh(1:ngmax)
  id_nimp(1:nrhix) = zblock%id_nimp(1:nrhix)
  id_nrf(1:nmini) = zblock%id_nrf(1:nmini)
  id_eperpmin(1:nmini) = zblock%id_eperpmin(1:nmini)
  id_epllmin(1:nmini) = zblock%id_epllmin(1:nmini)
  id_nfast(1:nsfast) = zblock%id_nfast(1:nsfast)
  id_eperpfast(1:nsfast) = zblock%id_eperpfast(1:nsfast)
  id_epllfast(1:nsfast) = zblock%id_epllfast(1:nsfast)
  id_aimp = zblock%id_aimp
  id_zimp = zblock%id_zimp
  id_omega = zblock%id_omega
  id_epot = zblock%id_epot
  id_vpoh = zblock%id_vpoh
  id_curt = zblock%id_curt
  id_difb = zblock%id_difb
  id_velb = zblock%id_velb
  id_difb_bi = zblock%id_difb_bi
  id_velb_bi = zblock%id_velb_bi
  id_difb_fi = zblock%id_difb_fi
  id_velb_fi = zblock%id_velb_fi
  id_fd0(1:nsfast) = zblock%id_fd0(1:nsfast)
  id_fdb(1:nsfast) = zblock%id_fdb(1:nsfast)
  id_fdp(1:nsfast) = zblock%id_fdp(1:nsfast)
  id_fdq(1:nsfast) = zblock%id_fdq(1:nsfast)
  id_fdr(1:nsfast) = zblock%id_fdr(1:nsfast)
  id_fds(1:nsfast) = zblock%id_fds(1:nsfast)
  id_n0(1:nsmax,1:ngmax) = zblock%id_n0(1:nsmax,1:ngmax)
  id_t0(1:nsmax,1:ngmax) = zblock%id_t0(1:nsmax,1:ngmax)
  id_omeg0(1:nsmax,1:ngmax) = zblock%id_omeg0(1:nsmax,1:ngmax)
 
end subroutine nbi_update_profiles
 
