! written by nbigen.py
! *** do not edit *** (use nbigen.py instead)
 
 
subroutine nbo_get_fusion(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_fusion) :: zblock
 
  zblock%io_bbntns = 0
  zblock%io_bbntns(1:mireact) = io_bbntns(1:mireact)
  zblock%io_bbntnt = io_bbntnt
  zblock%io_btntns = 0
  zblock%io_btntns(1:mireact) = io_btntns(1:mireact)
  zblock%io_btntrs = 0
  zblock%io_btntrs(1:mireact) = io_btntrs(1:mireact)
  zblock%io_btntws = 0
  zblock%io_btntws(1:mireact) = io_btntws(1:mireact)
  zblock%io_btntnt = io_btntnt
  zblock%io_rbntnt = io_rbntnt
  zblock%bbntot = bbntot
  zblock%bbnta = 0
  zblock%bbnta(1:mireact) = bbnta(1:mireact)
  zblock%btneut = btneut
  zblock%rbneut = rbneut
  zblock%btnta = 0
  zblock%btnta(1:mireact) = btnta(1:mireact)
  zblock%sftot = 0
  zblock%sftot(1:mireact) = sftot(1:mireact)
 
end subroutine nbo_get_fusion
 
subroutine nbo_get_density(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_density) :: zblock
 
  zblock%io_bdenss = 0
  zblock%io_bdenss(1:mibs) = io_bdenss(1:mibs)
  zblock%io_mc_dens = 0
  zblock%io_mc_dens(1:mibs) = io_mc_dens(1:mibs)
  zblock%io_bdenssw = 0
  zblock%io_bdenssw(1:mibs) = io_bdenssw(1:mibs)
  zblock%io_udenspl = 0
  zblock%io_udenspl(1:mibs) = io_udenspl(1:mibs)
  zblock%io_udenspp = 0
  zblock%io_udenspp(1:mibs) = io_udenspp(1:mibs)
  zblock%io_udensplw = 0
  zblock%io_udensplw(1:mibs) = io_udensplw(1:mibs)
  zblock%io_udensppw = 0
  zblock%io_udensppw(1:mibs) = io_udensppw(1:mibs)
 
end subroutine nbo_get_density
 
subroutine nbo_get_deposition(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_deposition) :: zblock
 
  zblock%io_bdepb = 0
  zblock%io_bdepb(1:3,1:mib) = io_bdepb(1:3,1:mib)
  zblock%io_bdepb_nb = 0
  zblock%io_bdepb_nb(1:mib) = io_bdepb_nb(1:mib)
  zblock%io_bdepe = 0
  zblock%io_bdepe(1:3,1:mibs) = io_bdepe(1:3,1:mibs)
  zblock%io_bdeps = 0
  zblock%io_bdeps(1:mibs) = io_bdeps(1:mibs)
  zblock%io_sdep_oa = 0
  zblock%io_sdep_oa(1:mibs) = io_sdep_oa(1:mibs)
  zblock%SDEP_OAUC = 0
  zblock%SDEP_OAUC(1:mibs) = SDEP_OAUC(1:mibs)
  zblock%io_mc_newdens = 0
  zblock%io_mc_newdens(1:mibs) = io_mc_newdens(1:mibs)
  zblock%einjav = 0
  zblock%einjav(1:mibs) = einjav(1:mibs)*0.001_fp
  zblock%io_sbbidpe = 0
  zblock%io_sbbidpe(1:3,1:mibs) = io_sbbidpe(1:3,1:mibs)
  zblock%io_sbbidps = 0
  zblock%io_sbbidps(1:mibs) = io_sbbidps(1:mibs)
  zblock%io_sbbxdpe = 0
  zblock%io_sbbxdpe(1:3,1:mibs) = io_sbbxdpe(1:3,1:mibs)
  zblock%io_sbbxdps = 0
  zblock%io_sbbxdps(1:mibs) = io_sbbxdps(1:mibs)
  zblock%io_sbcxdpe = 0
  zblock%io_sbcxdpe(1:mig,1:3,1:mibs) = io_sbcxdpe(1:mig,1:3,1:mibs)
  zblock%io_sbcxdps = 0
  zblock%io_sbcxdps(1:mig,1:mibs) = io_sbcxdps(1:mig,1:mibs)
  zblock%io_sbedepe = 0
  zblock%io_sbedepe(1:3,1:mibs) = io_sbedepe(1:3,1:mibs)
  zblock%io_sbedeps = 0
  zblock%io_sbedeps(1:mibs) = io_sbedeps(1:mibs)
  zblock%io_sbiedepe = 0
  zblock%io_sbiedepe(1:3,1:mibs) = io_sbiedepe(1:3,1:mibs)
  zblock%io_sbiedeps = 0
  zblock%io_sbiedeps(1:mibs) = io_sbiedeps(1:mibs)
  zblock%io_sbildepe = 0
  zblock%io_sbildepe(1:3,1:mibs) = io_sbildepe(1:3,1:mibs)
  zblock%io_sbildeps = 0
  zblock%io_sbildeps(1:mibs) = io_sbildeps(1:mibs)
  zblock%io_sbizdepe = 0
  zblock%io_sbizdepe(1:3,1:mibs) = io_sbizdepe(1:3,1:mibs)
  zblock%io_sbizdeps = 0
  zblock%io_sbizdeps(1:mibs) = io_sbizdeps(1:mibs)
  zblock%frac_cur_ndep0 = frac_cur_ndep0
  zblock%ndep0_use = ndep0_use
  zblock%nbs_step = nbs_step
  zblock%n_outtim = n_outtim
 
end subroutine nbo_get_deposition
 
subroutine nbo_get_nclass(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_nclass) :: zblock
 
  zblock%io_bnb_ien = 0
  zblock%io_bnb_ien(1:3,1:mib) = io_bnb_ien(1:3,1:mib)
  zblock%io_bdens_nb = 0
  zblock%io_bdens_nb(1:mib) = io_bdens_nb(1:mib)
  zblock%io_pbe_ien = 0
  zblock%io_pbe_ien(1:3,1:mib) = io_pbe_ien(1:3,1:mib)
  zblock%io_pbi_ien = 0
  zblock%io_pbi_ien(1:3,1:mib) = io_pbi_ien(1:3,1:mib)
  zblock%io_upb_ien = 0
  zblock%io_upb_ien(1:3,1:mib) = io_upb_ien(1:3,1:mib)
  zblock%bpshna = 0
  zblock%bpshna(1:mib,1:3) = bpshna(1:mib,1:3)
  zblock%ein_ien = 0
  zblock%ein_ien(1:3,1:mib) = ein_ien(1:3,1:mib)*0.001_fp
  zblock%dei_ien = 0
  zblock%dei_ien(1:3,1:mib) = dei_ien(1:3,1:mib)*0.001_fp
  zblock%io_bnbs_ien = 0
  zblock%io_bnbs_ien(1:3,1:mibs) = io_bnbs_ien(1:3,1:mibs)
  zblock%io_pbes_ien = 0
  zblock%io_pbes_ien(1:3,1:mibs) = io_pbes_ien(1:3,1:mibs)
  zblock%io_pbis_ien = 0
  zblock%io_pbis_ien(1:3,1:mibs) = io_pbis_ien(1:3,1:mibs)
  zblock%io_upbs_ien = 0
  zblock%io_upbs_ien(1:3,1:mibs) = io_upbs_ien(1:3,1:mibs)
 
end subroutine nbo_get_nclass
 
subroutine nbo_get_n0_fast(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_n0_fast) :: zblock
 
  zblock%io_bn00t = 0
  zblock%io_bn00t(1:3) = io_bn00t(1:3)
  zblock%io_bn00ts = 0
  zblock%io_bn00ts(1:3,1:mibs) = io_bn00ts(1:3,1:mibs)
  zblock%io_bn00 = 0
  zblock%io_bn00(1:mib,1:3) = io_bn00(1:mib,1:3)
  zblock%io_bn0tot = 0
  zblock%io_bn0tot(1:mibs) = io_bn0tot(1:mibs)
  zblock%io_bn0cx = 0
  zblock%io_bn0cx(1:mibs) = io_bn0cx(1:mibs)
 
end subroutine nbo_get_n0_fast
 
subroutine nbo_get_trap_fraction(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_trap_fraction) :: zblock
 
  zblock%io_btrap = 0
  zblock%io_btrap(1:mibs) = io_btrap(1:mibs)
  zblock%io_btrap0 = 0
  zblock%io_btrap0(1:mibs) = io_btrap0(1:mibs)
  zblock%tbtrap = 0
  zblock%tbtrap(1:mibs) = tbtrap(1:mibs)
  zblock%tbtrap0 = 0
  zblock%tbtrap0(1:mibs) = tbtrap0(1:mibs)
 
end subroutine nbo_get_trap_fraction
 
subroutine nbo_get_erngfi_output(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_erngfi_output) :: zblock
 
  zblock%io_btrape = 0
  zblock%io_btrape(1:miefi,1:mibs) = io_btrape(1:miefi,1:mibs)
  zblock%io_densfi = 0
  zblock%io_densfi(1:miefi,1:mibs) = io_densfi(1:miefi,1:mibs)
 
end subroutine nbo_get_erngfi_output
 
subroutine nbo_get_average_energies(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_average_energies) :: zblock
 
  zblock%io_ebapl2s = 0
  zblock%io_ebapl2s(1:mibs) = io_ebapl2s(1:mibs)
  zblock%io_ebapp2s = 0
  zblock%io_ebapp2s(1:mibs) = io_ebapp2s(1:mibs)
  zblock%io_ebapl2sw = 0
  zblock%io_ebapl2sw(1:mibs) = io_ebapl2sw(1:mibs)
  zblock%io_ebapp2sw = 0
  zblock%io_ebapp2sw(1:mibs) = io_ebapp2sw(1:mibs)
  zblock%io_ebavps = 0
  zblock%io_ebavps(1:mibs) = io_ebavps(1:mibs)
 
end subroutine nbo_get_average_energies
 
subroutine nbo_get_excited_states(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_excited_states) :: zblock
 
  zblock%io_excit0 = 0
  zblock%io_excit0(1:3,1:mibs) = io_excit0(1:3,1:mibs)
  zblock%io_excitr = 0
  zblock%io_excitr(1:mibs) = io_excitr(1:mibs)
 
end subroutine nbo_get_excited_states
 
subroutine nbo_get_mc_statistics(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_mc_statistics) :: zblock
 
  zblock%io_nmc = 0
  zblock%io_nmc(1:mibs) = io_nmc(1:mibs)
  zblock%io_wnmc = 0
  zblock%io_wnmc(1:mibs) = io_wnmc(1:mibs)
  zblock%nmctot = 0
  zblock%nmctot(1:mibs) = nmctot(1:mibs)
  zblock%wnmctot = 0
  zblock%wnmctot(1:mibs) = wnmctot(1:mibs)
  zblock%naeptot = 0
  zblock%naeptot(1:mibs) = naeptot(1:mibs)
  zblock%nstep_aep = 0
  zblock%nstep_aep(1:mnkaep,1:mibs) = nstep_aep(1:mnkaep,1:mibs)
  zblock%nmcloss = 0
  zblock%nmcloss(1:mibs) = nmcloss(1:mibs)
  zblock%nnew = 0
  zblock%nnew(1:mibs) = nnew(1:mibs)
  zblock%xncx0_orb = 0
  zblock%xncx0_orb(1:mibs) = xncx0_orb(1:mibs)
 
end subroutine nbo_get_mc_statistics
 
subroutine nbo_get_rotation(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_rotation) :: zblock
 
  zblock%io_omegabs = 0
  zblock%io_omegabs(1:mibs) = io_omegabs(1:mibs)
  zblock%io_omegabsw = 0
  zblock%io_omegabsw(1:mibs) = io_omegabsw(1:mibs)
 
end subroutine nbo_get_rotation
 
subroutine nbo_get_compression(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_compression) :: zblock
 
  zblock%io_pbcprs = io_pbcprs
  zblock%io_pbcprss = 0
  zblock%io_pbcprss(1:mibs) = io_pbcprss(1:mibs)
 
end subroutine nbo_get_compression
 
subroutine nbo_get_powers(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_powers) :: zblock
 
  zblock%io_pbdfbes = 0
  zblock%io_pbdfbes(1:mibs) = io_pbdfbes(1:mibs)
  zblock%io_pbdfbis = 0
  zblock%io_pbdfbis(1:mibs) = io_pbdfbis(1:mibs)
  zblock%io_pbe = io_pbe
  zblock%io_pbes = 0
  zblock%io_pbes(1:mibs) = io_pbes(1:mibs)
  zblock%io_pbi = io_pbi
  zblock%io_pbis = 0
  zblock%io_pbis(1:mibs) = io_pbis(1:mibs)
  zblock%io_pbohs = 0
  zblock%io_pbohs(1:mibs) = io_pbohs(1:mibs)
  zblock%io_pbephis = 0
  zblock%io_pbephis(1:mibs) = io_pbephis(1:mibs)
  zblock%io_pbephis_ntr = 0
  zblock%io_pbephis_ntr(1:mibs) = io_pbephis_ntr(1:mibs)
  zblock%io_pbephis_dep = 0
  zblock%io_pbephis_dep(1:mibs) = io_pbephis_dep(1:mibs)
  zblock%io_pbth = io_pbth
  zblock%io_pbths = 0
  zblock%io_pbths(1:mibs) = io_pbths(1:mibs)
  zblock%io_pbe_nb = 0
  zblock%io_pbe_nb(1:mib) = io_pbe_nb(1:mib)
  zblock%io_pbi_nb = 0
  zblock%io_pbi_nb(1:mib) = io_pbi_nb(1:mib)
  zblock%io_pbth_nb = 0
  zblock%io_pbth_nb(1:mib) = io_pbth_nb(1:mib)
  zblock%io_pbtot_nb = 0
  zblock%io_pbtot_nb(1:mib) = io_pbtot_nb(1:mib)
  zblock%io_pbthr2s = 0
  zblock%io_pbthr2s(1:mibs) = io_pbthr2s(1:mibs)
  zblock%io_pfe = io_pfe
  zblock%io_pfi = io_pfi
  zblock%io_orbrzv_Prf = 0
  zblock%io_orbrzv_Prf(1:mibs) = io_orbrzv_Prf(1:mibs)
  zblock%io_orbrzv_toric_Prf = 0
  zblock%io_orbrzv_toric_Prf(1:mibs) = io_orbrzv_toric_Prf(1:mibs)
 
end subroutine nbo_get_powers
 
subroutine nbo_get_currents(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_currents) :: zblock
 
  zblock%io_curjbeam = io_curjbeam
  zblock%io_curjfusi = io_curjfusi
  zblock%io_curjs = 0
  zblock%io_curjs(1:mibs) = io_curjs(1:mibs)
  zblock%io_ucurjs = 0
  zblock%io_ucurjs(1:mibs) = io_ucurjs(1:mibs)
  zblock%io_ucurjco = io_ucurjco
  zblock%io_ucurjctr = io_ucurjctr
  zblock%io_ucurjnb = 0
  zblock%io_ucurjnb(1:mib) = io_ucurjnb(1:mib)
  zblock%io_curjnb = 0
  zblock%io_curjnb(1:mib) = io_curjnb(1:mib)
  zblock%io_xjbfac = io_xjbfac
  zblock%io_xjbfacs = 0
  zblock%io_xjbfacs(1:mibs) = io_xjbfacs(1:mibs)
 
end subroutine nbo_get_currents
 
subroutine nbo_get_neutral_sources(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_neutral_sources) :: zblock
 
  zblock%io_sbcx0s = 0
  zblock%io_sbcx0s(1:mibs) = io_sbcx0s(1:mibs)
  zblock%io_sorbn0 = 0
  zblock%io_sorbn0(1:mig) = io_sorbn0(1:mig)
  zblock%io_sorbn0s = 0
  zblock%io_sorbn0s(1:mig,1:mibs) = io_sorbn0s(1:mig,1:mibs)
  zblock%io_sorbn0s_dep = 0
  zblock%io_sorbn0s_dep(1:mig,1:mibs) = io_sorbn0s_dep(1:mig,1:mibs)
  zblock%io_sn0s3dh = 0
  zblock%io_sn0s3dh(1:mig,1:mibs) = io_sn0s3dh(1:mig,1:mibs)
 
end subroutine nbo_get_neutral_sources
 
subroutine nbo_get_recapture(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_recapture) :: zblock
 
  zblock%io_sbcxrbs = 0
  zblock%io_sbcxrbs(1:mibs) = io_sbcxrbs(1:mibs)
  zblock%io_sbcxres = 0
  zblock%io_sbcxres(1:mibs) = io_sbcxres(1:mibs)
  zblock%io_sbcxris = 0
  zblock%io_sbcxris(1:mibs) = io_sbcxris(1:mibs)
  zblock%io_sbcxrls = 0
  zblock%io_sbcxrls(1:mibs) = io_sbcxrls(1:mibs)
  zblock%io_sbcxrxs = 0
  zblock%io_sbcxrxs(1:mig,1:mibs) = io_sbcxrxs(1:mig,1:mibs)
  zblock%io_sbcxrzs = 0
  zblock%io_sbcxrzs(1:mibs) = io_sbcxrzs(1:mibs)
 
end subroutine nbo_get_recapture
 
subroutine nbo_get_neutral_sinks(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_neutral_sinks) :: zblock
 
  zblock%io_sinb0i = 0
  zblock%io_sinb0i(1:mig) = io_sinb0i(1:mig)
  zblock%io_sinb0is = 0
  zblock%io_sinb0is(1:mig,1:mibs) = io_sinb0is(1:mig,1:mibs)
  zblock%io_sinbn0 = 0
  zblock%io_sinbn0(1:mig) = io_sinbn0(1:mig)
  zblock%io_sinbn0s = 0
  zblock%io_sinbn0s(1:mig,1:mibs) = io_sinbn0s(1:mig,1:mibs)
 
end subroutine nbo_get_neutral_sinks
 
subroutine nbo_get_sources(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_sources) :: zblock
 
  zblock%io_sorbe = io_sorbe
  zblock%io_sorbes = 0
  zblock%io_sorbes(1:mibs) = io_sorbes(1:mibs)
  zblock%io_sorbes_ntr = 0
  zblock%io_sorbes_ntr(1:mibs) = io_sorbes_ntr(1:mibs)
  zblock%io_sorbes_dep = 0
  zblock%io_sorbes_dep(1:mibs) = io_sorbes_dep(1:mibs)
  zblock%io_sorbh = 0
  zblock%io_sorbh(1:mig) = io_sorbh(1:mig)
  zblock%io_sorbhs = 0
  zblock%io_sorbhs(1:mig,1:mibs) = io_sorbhs(1:mig,1:mibs)
  zblock%io_sorbhs_ntr = 0
  zblock%io_sorbhs_ntr(1:mig,1:mibs) = io_sorbhs_ntr(1:mig,1:mibs)
  zblock%io_sorbhs_dep = 0
  zblock%io_sorbhs_dep(1:mig,1:mibs) = io_sorbhs_dep(1:mig,1:mibs)
  zblock%io_sorbth = io_sorbth
  zblock%io_sorbths = 0
  zblock%io_sorbths(1:mibs) = io_sorbths(1:mibs)
 
end subroutine nbo_get_sources
 
subroutine nbo_get_fokker_planck(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_fokker_planck) :: zblock
 
  zblock%io_taubpa0 = 0
  zblock%io_taubpa0(1:mibs) = io_taubpa0(1:mibs)
  zblock%io_taubpaco1 = 0
  zblock%io_taubpaco1(1:mibs) = io_taubpaco1(1:mibs)
  zblock%io_taubpaco2 = 0
  zblock%io_taubpaco2(1:mibs) = io_taubpaco2(1:mibs)
  zblock%io_taubpaco3 = 0
  zblock%io_taubpaco3(1:mibs) = io_taubpaco3(1:mibs)
  zblock%io_taubpactr1 = 0
  zblock%io_taubpactr1(1:mibs) = io_taubpactr1(1:mibs)
  zblock%io_taubpactr2 = 0
  zblock%io_taubpactr2(1:mibs) = io_taubpactr2(1:mibs)
  zblock%io_taubpactr3 = 0
  zblock%io_taubpactr3(1:mibs) = io_taubpactr3(1:mibs)
  zblock%io_taubsl0 = 0
  zblock%io_taubsl0(1:mibs) = io_taubsl0(1:mibs)
  zblock%io_taubslco1 = 0
  zblock%io_taubslco1(1:mibs) = io_taubslco1(1:mibs)
  zblock%io_taubslco2 = 0
  zblock%io_taubslco2(1:mibs) = io_taubslco2(1:mibs)
  zblock%io_taubslco3 = 0
  zblock%io_taubslco3(1:mibs) = io_taubslco3(1:mibs)
  zblock%io_taubslctr1 = 0
  zblock%io_taubslctr1(1:mibs) = io_taubslctr1(1:mibs)
  zblock%io_taubslctr2 = 0
  zblock%io_taubslctr2(1:mibs) = io_taubslctr2(1:mibs)
  zblock%io_taubslctr3 = 0
  zblock%io_taubslctr3(1:mibs) = io_taubslctr3(1:mibs)
  zblock%io_paxfrc = 0
  zblock%io_paxfrc(1:mibs) = io_paxfrc(1:mibs)
  zblock%io_pbxfrc = 0
  zblock%io_pbxfrc(1:mibs) = io_pbxfrc(1:mibs)
 
end subroutine nbo_get_fokker_planck
 
subroutine nbo_get_radial_current(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_radial_current) :: zblock
 
  zblock%io_tirabd = io_tirabd
  zblock%io_tirabds = 0
  zblock%io_tirabds(1:mibs) = io_tirabds(1:mibs)
  zblock%io_tirfsh = io_tirfsh
  zblock%io_tirfshs = 0
  zblock%io_tirfshs(1:mibs) = io_tirfshs(1:mibs)
  zblock%io_tirorb = io_tirorb
  zblock%io_tirorbs = 0
  zblock%io_tirorbs(1:mibs) = io_tirorbs(1:mibs)
  zblock%io_tirrip = io_tirrip
  zblock%io_tirrips = 0
  zblock%io_tirrips(1:mibs) = io_tirrips(1:mibs)
  zblock%io_difbx = 0
  zblock%io_difbx(1:mibs) = io_difbx(1:mibs)
  zblock%io_velbx = 0
  zblock%io_velbx(1:mibs) = io_velbx(1:mibs)
 
end subroutine nbo_get_radial_current
 
subroutine nbo_get_torques(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_torques) :: zblock
 
  zblock%io_tqbsum = io_tqbsum
  zblock%io_tqbcx = io_tqbcx
  zblock%io_tqbcxs = 0
  zblock%io_tqbcxs(1:mibs) = io_tqbcxs(1:mibs)
  zblock%io_tqbcxs_dep = 0
  zblock%io_tqbcxs_dep(1:mibs) = io_tqbcxs_dep(1:mibs)
  zblock%io_tqbe = io_tqbe
  zblock%io_tqbes = 0
  zblock%io_tqbes(1:mibs) = io_tqbes(1:mibs)
  zblock%io_tqbi = io_tqbi
  zblock%io_tqbis = 0
  zblock%io_tqbis(1:mibs) = io_tqbis(1:mibs)
  zblock%io_tqbco_nb = 0
  zblock%io_tqbco_nb(1:mib) = io_tqbco_nb(1:mib)
  zblock%io_tqbth_nb = 0
  zblock%io_tqbth_nb(1:mib) = io_tqbth_nb(1:mib)
  zblock%io_tqtot_nb = 0
  zblock%io_tqtot_nb(1:mib) = io_tqtot_nb(1:mib)
  zblock%io_tqbth = io_tqbth
  zblock%io_tqbths = 0
  zblock%io_tqbths(1:mibs) = io_tqbths(1:mibs)
  zblock%io_tqbxf = io_tqbxf
  zblock%io_tqbxfs = 0
  zblock%io_tqbxfs(1:mibs) = io_tqbxfs(1:mibs)
  zblock%io_tqdifb = io_tqdifb
  zblock%io_tqdifbs = 0
  zblock%io_tqdifbs(1:mibs) = io_tqdifbs(1:mibs)
  zblock%io_tqjxb = io_tqjxb
  zblock%io_tqjxbs = 0
  zblock%io_tqjxbs(1:mibs) = io_tqjxbs(1:mibs)
  zblock%io_tqjxbs_ntr = 0
  zblock%io_tqjxbs_ntr(1:mibs) = io_tqjxbs_ntr(1:mibs)
  zblock%io_tqjxb_nb = 0
  zblock%io_tqjxb_nb(1:mib) = io_tqjxb_nb(1:mib)
  zblock%io_tqjxbnb_ntr = 0
  zblock%io_tqjxbnb_ntr(1:mib) = io_tqjxbnb_ntr(1:mib)
  zblock%io_tqjxbs_dep = 0
  zblock%io_tqjxbs_dep(1:mibs) = io_tqjxbs_dep(1:mibs)
  zblock%io_tqjxb_nb_dep = 0
  zblock%io_tqjxb_nb_dep(1:mib) = io_tqjxb_nb_dep(1:mib)
  zblock%io_tqohb = io_tqohb
  zblock%io_tqohbs = 0
  zblock%io_tqohbs(1:mibs) = io_tqohbs(1:mibs)
  zblock%io_tqrpl = io_tqrpl
  zblock%io_tqrpls = 0
  zblock%io_tqrpls(1:mibs) = io_tqrpls(1:mibs)
 
end subroutine nbo_get_torques
 
subroutine nbo_get_frantic(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_frantic) :: zblock
 
  zblock%io_nbi_den0mn = 0
  zblock%io_nbi_den0mn(1:mig,1:mis) = io_nbi_den0mn(1:mig,1:mis)
  zblock%io_nbi_en0mn = 0
  zblock%io_nbi_en0mn(1:mig,1:mis) = io_nbi_en0mn(1:mig,1:mis)
  zblock%io_nbi_omg0mn = 0
  zblock%io_nbi_omg0mn(1:mig,1:mis) = io_nbi_omg0mn(1:mig,1:mis)
  zblock%io_nbi_snimn = 0
  zblock%io_nbi_snimn(1:mig,1:mis) = io_nbi_snimn(1:mig,1:mis)
  zblock%nbi_outflx = 0
  zblock%nbi_outflx(1:mig,1:mis) = nbi_outflx(1:mig,1:mis)
  zblock%nbi_eescav = 0
  zblock%nbi_eescav(1:mig,1:mis) = nbi_eescav(1:mig,1:mis)
  zblock%nbi_cexflx = 0
  zblock%nbi_cexflx(1:mig,1:mis) = nbi_cexflx(1:mig,1:mis)
  zblock%io_nbi_snemn = 0
  zblock%io_nbi_snemn(1:2,1:mis) = io_nbi_snemn(1:2,1:mis)
  zblock%io_nbi_scxmn = 0
  zblock%io_nbi_scxmn(1:mis) = io_nbi_scxmn(1:mis)
  zblock%io_nbi_pcxmn = 0
  zblock%io_nbi_pcxmn(1:mis) = io_nbi_pcxmn(1:mis)
  zblock%io_nbi_pnimn = 0
  zblock%io_nbi_pnimn(1:mis) = io_nbi_pnimn(1:mis)
  zblock%io_nbi_tqcxmn = 0
  zblock%io_nbi_tqcxmn(1:mis) = io_nbi_tqcxmn(1:mis)
  zblock%io_nbi_tqnimn = 0
  zblock%io_nbi_tqnimn(1:mis) = io_nbi_tqnimn(1:mis)
  zblock%io_nbi_pfcxmn = 0
  zblock%io_nbi_pfcxmn(1:mis) = io_nbi_pfcxmn(1:mis)
  zblock%io_nbi_pfnimn = 0
  zblock%io_nbi_pfnimn(1:mis) = io_nbi_pfnimn(1:mis)
  zblock%io_nbi_sflx0m = 0
  zblock%io_nbi_sflx0m(1:2,1:mis) = io_nbi_sflx0m(1:2,1:mis)
  zblock%io_nbi_pflx0m = 0
  zblock%io_nbi_pflx0m(1:2,1:mis) = io_nbi_pflx0m(1:2,1:mis)
  zblock%io_nbi_tqflx0 = 0
  zblock%io_nbi_tqflx0(1:mis) = io_nbi_tqflx0(1:mis)
  zblock%io_nbi_pb0mn = 0
  zblock%io_nbi_pb0mn(1:mis) = io_nbi_pb0mn(1:mis)
  zblock%io_nbi_pscmn = 0
  zblock%io_nbi_pscmn(1:mis) = io_nbi_pscmn(1:mis)
  zblock%io_nbi_tqb0mn = 0
  zblock%io_nbi_tqb0mn(1:mis) = io_nbi_tqb0mn(1:mis)
  zblock%io_nbi_tqscmn = 0
  zblock%io_nbi_tqscmn(1:mis) = io_nbi_tqscmn(1:mis)
 
end subroutine nbo_get_frantic
 
subroutine nbo_get_hi_z_beams(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_hi_z_beams) :: zblock
 
  zblock%io_xzbmav = 0
  zblock%io_xzbmav(1:mibs) = io_xzbmav(1:mibs)
 
end subroutine nbo_get_hi_z_beams
 
subroutine nbo_get_cptimes(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_cptimes) :: zblock
 
  zblock%CPBPS = CPBPS
  zblock%CPBSTART = CPBSTART
  zblock%CPBDEP = CPBDEP
  zblock%CPBORB = CPBORB
  zblock%CPBFIN = CPBFIN
  zblock%CPBMAX = CPBMAX
  zblock%CPBMIN = CPBMIN
  zblock%CPBROOT = CPBROOT
 
end subroutine nbo_get_cptimes
 
subroutine nbo_get_power_balance(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_power_balance) :: zblock
 
  zblock%bpcxers = 0
  zblock%bpcxers(1:mibs) = bpcxers(1:mibs)
  zblock%bpcxi0s = 0
  zblock%bpcxi0s(1:mibs) = bpcxi0s(1:mibs)
  zblock%bpcxins = 0
  zblock%bpcxins(1:mibs) = bpcxins(1:mibs)
  zblock%bpcxots = 0
  zblock%bpcxots(1:mibs) = bpcxots(1:mibs)
  zblock%bpcxris = 0
  zblock%bpcxris(1:mibs) = bpcxris(1:mibs)
  zblock%bpcxrxs = 0
  zblock%bpcxrxs(1:mibs) = bpcxrxs(1:mibs)
  zblock%bpcxx0s = 0
  zblock%bpcxx0s(1:mibs) = bpcxx0s(1:mibs)
  zblock%bperr = bperr
  zblock%bperrs = 0
  zblock%bperrs(1:mibs) = bperrs(1:mibs)
  zblock%io_PBAEPMS = 0
  zblock%io_PBAEPMS(1:mnkaep,1:mibs) = io_PBAEPMS(1:mnkaep,1:mibs)
  zblock%bpfshs = 0
  zblock%bpfshs(1:mibs) = bpfshs(1:mibs)
  zblock%bpls = 0
  zblock%bpls(1:mibs) = bpls(1:mibs)
  zblock%bpls_dep = 0
  zblock%bpls_dep(1:mibs) = bpls_dep(1:mibs)
  zblock%bpohs = 0
  zblock%bpohs(1:mibs) = bpohs(1:mibs)
  zblock%bprpls = 0
  zblock%bprpls(1:mibs) = bprpls(1:mibs)
  zblock%bpshins = 0
  zblock%bpshins(1:mibs) = bpshins(1:mibs)
  zblock%bpsts = 0
  zblock%bpsts(1:mibs) = bpsts(1:mibs)
  zblock%bpths = 0
  zblock%bpths(1:mibs) = bpths(1:mibs)
  zblock%pftota = pftota
  zblock%bpprma = 0
  zblock%bpprma(1:mib) = bpprma(1:mib)
  zblock%pinjs = 0
  zblock%pinjs(1:mibs) = pinjs(1:mibs)
  zblock%pinjs_res = 0
  zblock%pinjs_res(1:mibs) = pinjs_res(1:mibs)
  zblock%pbdepmc = 0
  zblock%pbdepmc(1:mibs) = pbdepmc(1:mibs)
  zblock%PBDEPBA = 0
  zblock%PBDEPBA(1:mibs) = PBDEPBA(1:mibs)
  zblock%bpephis = 0
  zblock%bpephis(1:mibs) = bpephis(1:mibs)
  zblock%orbrzv_Prftot = 0
  zblock%orbrzv_Prftot(1:mibs) = orbrzv_Prftot(1:mibs)
  zblock%orbrzv_toric_Prftot = 0
  zblock%orbrzv_toric_Prftot(1:mibs) = orbrzv_toric_Prftot(1:mibs)
  zblock%orbrzv_toric_ufrnm = 0
  zblock%orbrzv_toric_ufrnm(1:mibs) = orbrzv_toric_ufrnm(1:mibs)
 
end subroutine nbo_get_power_balance
 
subroutine nbo_get_momentum_balance(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_momentum_balance) :: zblock
 
  zblock%bph0was = 0
  zblock%bph0was(1:mibs) = bph0was(1:mibs)
  zblock%bphcks = 0
  zblock%bphcks(1:mibs) = bphcks(1:mibs)
  zblock%bphcols = 0
  zblock%bphcols(1:mibs) = bphcols(1:mibs)
  zblock%bphcons = 0
  zblock%bphcons(1:mibs) = bphcons(1:mibs)
  zblock%bphcxls = 0
  zblock%bphcxls(1:mibs) = bphcxls(1:mibs)
  zblock%bphinjs = 0
  zblock%bphinjs(1:mibs) = bphinjs(1:mibs)
  zblock%bphdepsgc = 0
  zblock%bphdepsgc(1:mibs) = bphdepsgc(1:mibs)
  zblock%bphdeps = 0
  zblock%bphdeps(1:mibs) = bphdeps(1:mibs)
  zblock%bphshins = 0
  zblock%bphshins(1:mibs) = bphshins(1:mibs)
  zblock%bphdpba = 0
  zblock%bphdpba(1:mibs) = bphdpba(1:mibs)
  zblock%bphdfbs = 0
  zblock%bphdfbs(1:mibs) = bphdfbs(1:mibs)
  zblock%bpherr = bpherr
  zblock%bpherrs = 0
  zblock%bpherrs(1:mibs) = bpherrs(1:mibs)
  zblock%bphfshs = 0
  zblock%bphfshs(1:mibs) = bphfshs(1:mibs)
  zblock%bphjxbs = 0
  zblock%bphjxbs(1:mibs) = bphjxbs(1:mibs)
  zblock%bphjxbs_ntr = 0
  zblock%bphjxbs_ntr(1:mibs) = bphjxbs_ntr(1:mibs)
  zblock%bphjxbs_dep = 0
  zblock%bphjxbs_dep(1:mibs) = bphjxbs_dep(1:mibs)
  zblock%bphohbs = 0
  zblock%bphohbs(1:mibs) = bphohbs(1:mibs)
  zblock%bpholds = 0
  zblock%bpholds(1:mibs) = bpholds(1:mibs)
  zblock%bphorbs = 0
  zblock%bphorbs(1:mibs) = bphorbs(1:mibs)
  zblock%bphorbs_dep = 0
  zblock%bphorbs_dep(1:mibs) = bphorbs_dep(1:mibs)
  zblock%bphrcas = 0
  zblock%bphrcas(1:mibs) = bphrcas(1:mibs)
  zblock%bphrpls = 0
  zblock%bphrpls(1:mibs) = bphrpls(1:mibs)
  zblock%bphsts = 0
  zblock%bphsts(1:mibs) = bphsts(1:mibs)
  zblock%bphths = 0
  zblock%bphths(1:mibs) = bphths(1:mibs)
 
end subroutine nbo_get_momentum_balance
 
subroutine nbo_get_torque_work(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_torque_work) :: zblock
 
  zblock%bptcols = 0
  zblock%bptcols(1:mibs) = bptcols(1:mibs)
  zblock%bptdfbs = 0
  zblock%bptdfbs(1:mibs) = bptdfbs(1:mibs)
  zblock%bpthros = 0
  zblock%bpthros(1:mibs) = bpthros(1:mibs)
  zblock%bpthsfs = 0
  zblock%bpthsfs(1:mibs) = bpthsfs(1:mibs)
  zblock%bpjxbs = 0
  zblock%bpjxbs(1:mibs) = bpjxbs(1:mibs)
  zblock%bpjxbs_ntr = 0
  zblock%bpjxbs_ntr(1:mibs) = bpjxbs_ntr(1:mibs)
  zblock%bpjxbs_dep = 0
  zblock%bpjxbs_dep(1:mibs) = bpjxbs_dep(1:mibs)
  zblock%bpthafs = 0
  zblock%bpthafs(1:mibs) = bpthafs(1:mibs)
 
end subroutine nbo_get_torque_work
 
subroutine nbo_get_particle_balance(zblock)
 
  use nbi_com
  use nbi_types
 
  implicit NONE
 
  type (nbotype_particle_balance) :: zblock
 
  zblock%bxflws = 0
  zblock%bxflws(1:mibs) = bxflws(1:mibs)
  zblock%bxflws_dep = 0
  zblock%bxflws_dep(1:mibs) = bxflws_dep(1:mibs)
  zblock%bxflws_prompt = 0
  zblock%bxflws_prompt(1:mibs) = bxflws_prompt(1:mibs)
  zblock%bxfshs = 0
  zblock%bxfshs(1:mibs) = bxfshs(1:mibs)
  zblock%bxrpls = 0
  zblock%bxrpls(1:mibs) = bxrpls(1:mibs)
  zblock%sbcxxs = 0
  zblock%sbcxxs(1:mibs) = sbcxxs(1:mibs)
  zblock%sfcx0mc = 0
  zblock%sfcx0mc(1:mibs) = sfcx0mc(1:mibs)
  zblock%io_sfcxmc1d = 0
  zblock%io_sfcxmc1d(1:mibs) = io_sfcxmc1d(1:mibs)
  zblock%sfcxbal = 0
  zblock%sfcxbal(1:mibs) = sfcxbal(1:mibs)
  zblock%sfcxesc = 0
  zblock%sfcxesc(1:mibs) = sfcxesc(1:mibs)
  zblock%sfcxrmc = 0
  zblock%sfcxrmc(1:mibs) = sfcxrmc(1:mibs)
  zblock%sfcxrr = 0
  zblock%sfcxrr(1:mibs) = sfcxrr(1:mibs)
  zblock%sfdbbcx = 0
  zblock%sfdbbcx(1:mibs) = sfdbbcx(1:mibs)
  zblock%sfdbbiz = 0
  zblock%sfdbbiz(1:mibs) = sfdbbiz(1:mibs)
  zblock%sfdepba = 0
  zblock%sfdepba(1:mibs) = sfdepba(1:mibs)
  zblock%sfdepcx = 0
  zblock%sfdepcx(1:mibs) = sfdepcx(1:mibs)
  zblock%sfdepiz = 0
  zblock%sfdepiz(1:mibs) = sfdepiz(1:mibs)
  zblock%sfdepmc = 0
  zblock%sfdepmc(1:mibs) = sfdepmc(1:mibs)
  zblock%sfdeprr = 0
  zblock%sfdeprr(1:mibs) = sfdeprr(1:mibs)
  zblock%sfdepsc = 0
  zblock%sfdepsc(1:mibs) = sfdepsc(1:mibs)
  zblock%sfdtbmc = 0
  zblock%sfdtbmc(1:mibs) = sfdtbmc(1:mibs)
  zblock%sforbal = 0
  zblock%sforbal(1:mibs) = sforbal(1:mibs)
  zblock%sforbrr = 0
  zblock%sforbrr(1:mibs) = sforbrr(1:mibs)
  zblock%sfrbbcx = 0
  zblock%sfrbbcx(1:mibs) = sfrbbcx(1:mibs)
  zblock%sfrbbiz = 0
  zblock%sfrbbiz(1:mibs) = sfrbbiz(1:mibs)
  zblock%sfshine = 0
  zblock%sfshine(1:mibs) = sfshine(1:mibs)
  zblock%sfxrccx = 0
  zblock%sfxrccx(1:mibs) = sfxrccx(1:mibs)
  zblock%sfxrciz = 0
  zblock%sfxrciz(1:mibs) = sfxrciz(1:mibs)
  zblock%sfxrcsc = 0
  zblock%sfxrcsc(1:mibs) = sfxrcsc(1:mibs)
  zblock%snbcxos = 0
  zblock%snbcxos(1:mibs) = snbcxos(1:mibs)
  zblock%snbcxs = 0
  zblock%snbcxs(1:mibs) = snbcxs(1:mibs)
  zblock%snbxbb0 = 0
  zblock%snbxbb0(1:mibs) = snbxbb0(1:mibs)
  zblock%snbxbb1 = 0
  zblock%snbxbb1(1:mibs) = snbxbb1(1:mibs)
  zblock%snbxtot = 0
  zblock%snbxtot(1:mibs) = snbxtot(1:mibs)
  zblock%io_snbx1d = 0
  zblock%io_snbx1d(1:mibs) = io_snbx1d(1:mibs)
  zblock%snbxv0 = 0
  zblock%snbxv0(1:mibs) = snbxv0(1:mibs)
  zblock%snbxw0 = 0
  zblock%snbxw0(1:mibs) = snbxw0(1:mibs)
  zblock%xysbcxs = 0
  zblock%xysbcxs(1:mibs) = xysbcxs(1:mibs)
  zblock%xninjs = 0
  zblock%xninjs(1:mibs) = xninjs(1:mibs)
  zblock%xninjea = 0
  zblock%xninjea(1:mibs) = xninjea(1:mibs)
  zblock%sftota = sftota
 
end subroutine nbo_get_particle_balance
