! written by nbigen.py
! *** do not edit *** (use nbigen.py instead)
module nbi_types
  use iso_c_binding, only: fp => c_double
  implicit NONE
 
  ! user settable dimensions:
  ! see nbi_dimensions.f90 for description.
 
  type nbitype_dims
 
    integer :: mib
    integer :: mj
    integer :: mig
    integer :: mis
    integer :: mibs
    integer :: mimpt
    integer :: mmini
    integer :: mtheta
    integer :: miefi
    integer :: med2d
    integer :: mimxba
    integer :: mimxbe
    integer :: mgyro
    integer :: mimxba0
    integer :: mimxbe0
    integer :: miboxm
    integer :: mitubem
    integer :: mituben
    integer :: mnkaep
 
  end type nbitype_dims
 
  type nbitype_sys
 
    CHARACTER*32 :: runid
    CHARACTER*120 :: mission
    CHARACTER*120 :: workpath
    INTEGER :: nonlin
    INTEGER :: nseed
    LOGICAL :: nlbout
    INTEGER :: lunnbx
    INTEGER :: lunres
    INTEGER :: mrstrt
    INTEGER :: nclass
    LOGICAL :: only_io
    LOGICAL :: ref_namelist
    LOGICAL :: quasi_check
    LOGICAL :: nltest_output
    INTEGER :: BLK_MPI_BCAST_INT
    INTEGER :: BLK_MPI_BCAST_R8
 
  end type nbitype_sys
 
  type nbitype_times
 
    REAL(fp) :: tbm1
    REAL(fp) :: tbm2
 
  end type nbitype_times
 
  type nbitype_grid
 
    INTEGER :: nzones
    INTEGER :: nzone_fb
    LOGICAL :: nlsym2b
    INTEGER :: nth0
    REAL(fp) :: xbmbnd
    INTEGER :: id_mcgrid
    INTEGER :: nthets
    REAL(fp) :: ebdmax
    INTEGER :: xplasma_in_memory
    INTEGER :: nznbma
    INTEGER :: nznbme
    INTEGER :: nznbma0
    INTEGER :: nznbme0
    INTEGER :: ngyro
 
  end type nbitype_grid
 
  type nbitype_beams
 
    INTEGER :: ngmax
    real(fp) :: backz(10)  ! (1:ngmax)
    real(fp) :: aplasm(10)  ! (1:ngmax)
    INTEGER :: nbeam
    real(fp) :: xzbeama(320)  ! (1:nbeam)
    real(fp) :: abeama(320)  ! (1:nbeam)
    logical :: nlco(320)  ! (1:nbeam)
    integer :: ntrace(320)  ! (1:nbeam)
    real(fp) :: rtcena(320)  ! (1:nbeam)
    real(fp) :: xlbtna(320)  ! (1:nbeam)
    real(fp) :: xybsca(320)  ! (1:nbeam)
    real(fp) :: xbzeta(320)  ! (1:nbeam)
    integer :: nbshapa(320)  ! (1:nbeam)
    real(fp) :: bmwidra(320)  ! (1:nbeam)
    real(fp) :: bmwidza(320)  ! (1:nbeam)
    real(fp) :: divra(320)  ! (1:nbeam)
    real(fp) :: divza(320)  ! (1:nbeam)
    real(fp) :: foclra(320)  ! (1:nbeam)
    real(fp) :: foclza(320)  ! (1:nbeam)
    integer :: nbapsha(320)  ! (1:nbeam)
    real(fp) :: rapedga(320)  ! (1:nbeam)
    real(fp) :: xzpedga(320)  ! (1:nbeam)
    real(fp) :: xlbapa(320)  ! (1:nbeam)
    real(fp) :: xybapa(320)  ! (1:nbeam)
    real(fp) :: xrapoffa(320)  ! (1:nbeam)
    real(fp) :: xzapoffa(320)  ! (1:nbeam)
    integer :: nbapsh2(320)  ! (1:nbeam)
    real(fp) :: rapedg2(320)  ! (1:nbeam)
    real(fp) :: xzpedg2(320)  ! (1:nbeam)
    real(fp) :: xlbapa2(320)  ! (1:nbeam)
    real(fp) :: xrapoff2(320)  ! (1:nbeam)
    real(fp) :: xzapoff2(320)  ! (1:nbeam)
 
  end type nbitype_beams
 
  type nbitype_impurity
 
    INTEGER :: nrhix
    real(fp) :: xzimpx(300)  ! (1:nrhix)
    real(fp) :: aimpx(300)  ! (1:nrhix)
 
  end type nbitype_impurity
 
  type nbitype_minority
 
    INTEGER :: nmini
    real(fp) :: xzmini(10)  ! (1:nmini)
    real(fp) :: amini(10)  ! (1:nmini)
    INTEGER :: nthrf
 
  end type nbitype_minority
 
  type nbitype_powers
 
    real(fp) :: einjmin(320)  ! (1:nbeam)
    real(fp) :: einja(320)  ! (1:nbeam)
    real(fp) :: pinja(320)  ! (1:nbeam)
    real(fp) :: ffulla(320)  ! (1:nbeam)
    real(fp) :: fhalfa(320)  ! (1:nbeam)
    real(fp) :: orbrzv_toric_Prftot0(15)  ! (1:mibs)
    REAL(fp) :: orbrzv_toric_frnm
 
  end type nbitype_powers
 
  type nbitype_fusion
 
    LOGICAL :: nlfhe3
    LOGICAL :: nlfhe4
    LOGICAL :: nlfst
    LOGICAL :: nlfsp
    LOGICAL :: nlfsp14
    LOGICAL :: nlusf3
    REAL(fp) :: xdatsf3
    LOGICAL :: nlusfa
    REAL(fp) :: xdatsfa
    LOGICAL :: nlusft
    REAL(fp) :: xdatsft
    LOGICAL :: nlusfp
    REAL(fp) :: xdatsfp
    LOGICAL :: nlusfp14
    REAL(fp) :: xdatsp3
    REAL(fp) :: plfhe3
    REAL(fp) :: plfhe4
    REAL(fp) :: plfst
    REAL(fp) :: plfsp
    REAL(fp) :: plfsp14
    LOGICAL :: nlfatom
 
  end type nbitype_fusion
 
  type nbitype_fpp
 
    LOGICAL :: nlbfpp
 
  end type nbitype_fpp
 
  type nbitype_num
 
    REAL(fp) :: cxsplt
    REAL(fp) :: dxbsmoo
    REAL(fp) :: dxbsm_nc
    INTEGER :: nptcls
    INTEGER :: nptclf
    INTEGER :: nptclh
    INTEGER :: NFAST_MAP
    REAL(fp) :: xpand_nptcl
    REAL(fp) :: frac_depmax
    REAL(fp) :: frac_dep_lim
    REAL(fp) :: frac_depmin
    REAL(fp) :: frac_orbrr
    INTEGER :: nptcl_max
    LOGICAL :: nltrk_dep0
    LOGICAL :: NLDEP0_GATHER
    INTEGER :: ndep0
    INTEGER :: NDEP0_MAX
    INTEGER :: ndep_set_beam
    INTEGER :: ndep_set_ien
    INTEGER :: nbbcal
    INTEGER :: ncx0
    INTEGER :: nper_cx
    INTEGER :: LEV_NBIDEP
    INTEGER :: LEV_TTNUK
    INTEGER :: LEVMOD_HALO
    INTEGER :: NSPLT
    INTEGER :: NSPLT_GEO
    INTEGER :: NSPLT_KIN
    INTEGER :: NSPLT_GEN
    INTEGER :: nmimp
    REAL(fp) :: AIMP
    REAL(fp) :: XZIMP
    INTEGER :: NTEST_MAX
    REAL(fp) :: BI_MAX_PL
    REAL(fp) :: BI_MAX_PR
    REAL(fp) :: wghta
    REAL(fp) :: goocon
    INTEGER :: NGOOCON_VPVBIN
    INTEGER :: NGOOCON_EBIN
    INTEGER :: NGOOCON_RBIN
    REAL(fp) :: cxpcon
    REAL(fp) :: fppcon
    REAL(fp) :: fdtnxy
    INTEGER :: nchdvp
    REAL(fp) :: dtn
    REAL(fp) :: dt_acc
    INTEGER :: orbrzv_option
    INTEGER :: orbrzv_rf_option
    LOGICAL :: nlmcrf_on
    INTEGER :: orbrzv_nr
    INTEGER :: orbrzv_nz
    REAL(fp) :: orbrzv_zzerr_con
 
  end type nbitype_num
 
  type nbitype_atomic
 
    INTEGER :: nsmax
    integer :: khalo(50)  ! (1:mis)
    REAL(fp) :: dn0out
    INTEGER :: nmsigx
    LOGICAL :: nlminsv
    LOGICAL :: nlebei
    INTEGER :: nsigexc
    REAL(fp) :: xdepmod
    LOGICAL :: nlbbcx
    INTEGER :: nbbcx_avg
    INTEGER :: nbbcx_bb
    INTEGER :: nbfallgr
    LOGICAL :: nlbeamcx
    LOGICAL :: nlhvion
 
  end type nbitype_atomic
 
  type nbitype_collid
 
    REAL(fp) :: xcfanbi
    REAL(fp) :: xdfanbi
    REAL(fp) :: xefanbi
    REAL(fp) :: xcfafus
    REAL(fp) :: xdfafus
    REAL(fp) :: xefafus
    LOGICAL :: nlbcde
    LOGICAL :: nlbcoh
    LOGICAL :: nlbcpa
    LOGICAL :: nlorbo
 
  end type nbitype_collid
 
  type nbitype_flr
 
    LOGICAL :: nlbflr
    LOGICAL :: nlfbmflr
    LOGICAL :: nlbgflr
    REAL(fp) :: gflr_min
    REAL(fp) :: gflr_rl
    REAL(fp) :: gflr_ll
    real(fp) :: gflr_xv(2)  ! (1:2)
    real(fp) :: gflr_op(15)  ! (1:15)
 
  end type nbitype_flr
 
  type nbitype_saw
 
    LOGICAL :: sawflag
    LOGICAL :: nlsawb
    LOGICAL :: nlsawf
    REAL(fp) :: xswfrac_allfast
    REAL(fp) :: xswfrac_beam
    REAL(fp) :: xswfrac_fusn
    INTEGER :: nmix_kdsaw
    REAL(fp) :: fporcelli
 
  end type nbitype_saw
 
  type nbitype_adif
 
    INTEGER :: nkaep
    real(fp) :: AEP_ASCALE(10)  ! (1:mnkaep)
    REAL(fp) :: AEP_USCALE
    real(fp) :: TAEP_FAC(10)  ! (1:mnkaep)
    INTEGER :: nmdifb
    INTEGER :: nkdifb
    INTEGER :: ndifbe
    real(fp) :: fdifbe(20)  ! (1:ndifbe)
    real(fp) :: edifbe(20)  ! (1:ndifbe)
    REAL(fp) :: x_qlim0
    INTEGER :: ndifbe_2d
    REAL(fp) :: dif2d_conv
    REAL(fp) :: dif2d_dpa
    INTEGER :: ngradd_opt
 
  end type nbitype_adif
 
  type nbitype_ripple
 
    INTEGER :: nrip
    REAL(fp) :: taurip
    INTEGER :: id_ripple
    INTEGER :: id_ripple2
    INTEGER :: ncoils
    INTEGER :: ncoils_2
    REAL(fp) :: asrd
    REAL(fp) :: bsrd
 
  end type nbitype_ripple
 
  type nbitype_outcon
 
    INTEGER :: nerngfi
    real(fp) :: erngfi(10,15)  ! (1:nerngfi,1:mibs)
    INTEGER :: nsdbgb
 
  end type nbitype_outcon
 
  type nbitype_fishbone
 
    LOGICAL :: nlfbon
    REAL(fp) :: fbemin
    REAL(fp) :: fbemax
    REAL(fp) :: fvpvmn
    REAL(fp) :: fvpvmx
    REAL(fp) :: fbltim
    REAL(fp) :: fshper
    REAL(fp) :: fshwid
    REAL(fp) :: tfshon
    REAL(fp) :: tfshof
    REAL(fp) :: xfishmin
    REAL(fp) :: xfishmax
    INTEGER :: nfbon_vpvopt
    REAL(fp) :: fbtrap_depth
    INTEGER :: nfbon_species
 
  end type nbitype_fishbone
 
  type nbitype_box
 
    INTEGER :: nbbox
    integer :: nbsbox(100)  ! (1:nbbox)
    integer :: nsample_box(100)  ! (1:nbbox)
    real(fp) :: xninja_box(100)  ! (1:nbbox)
    real(fp) :: xninjs_box(100)  ! (1:nbbox)
    REAL(fp) :: xninj_box
    integer :: nbebox(100)  ! (1:nbbox)
    INTEGER :: nxbox
    INTEGER :: nybox
    INTEGER :: nlbox
    REAL(fp) :: xboxhw
    REAL(fp) :: yboxhw
    REAL(fp) :: xlbox1
    REAL(fp) :: xlbox2
    INTEGER :: ndepbox
 
  end type nbitype_box
 
  type nbitype_tube
 
    INTEGER :: nbtube
    integer :: nbstube(200)  ! (1:nbtube)
    integer :: nbetube(200)  ! (1:nbtube)
    real(fp) :: Rtube(200)  ! (1:nbtube)
    real(fp) :: Ytube(200)  ! (1:nbtube)
    real(fp) :: XZETAtube(200)  ! (1:nbtube)
    real(fp) :: PHItube(200)  ! (1:nbtube)
    real(fp) :: THETAtube(200)  ! (1:nbtube)
    integer :: LMIDtube(200)  ! (1:nbtube)
    real(fp) :: XL1tube(200)  ! (1:nbtube)
    real(fp) :: XL2tube(200)  ! (1:nbtube)
    integer :: NSEGtube(200)  ! (1:nbtube)
    REAL(fp) :: RHOtube
    INTEGER :: NDEPtube
 
  end type nbitype_tube
 
  type nbitype_misc
 
    REAL(fp) :: plhgt
    LOGICAL :: nlcprb
    LOGICAL :: nlpsirz
    REAL(fp) :: edbfac
    INTEGER :: nmcurb
    LOGICAL :: nlfdep
 
  end type nbitype_misc
 
  type nbitype_profiles
 
    INTEGER :: id_te
    INTEGER :: id_ti
    INTEGER :: id_tifusn
    INTEGER :: id_ne
    INTEGER :: ng
    integer :: id_nh(10)  ! (1:ngmax)
    integer :: id_nimp(300)  ! (1:nrhix)
    integer :: id_nrf(10)  ! (1:nmini)
    integer :: id_eperpmin(10)  ! (1:nmini)
    integer :: id_epllmin(10)  ! (1:nmini)
    integer :: id_nfast(15)  ! (1:nsfast)
    integer :: id_eperpfast(15)  ! (1:nsfast)
    integer :: id_epllfast(15)  ! (1:nsfast)
    INTEGER :: id_aimp
    INTEGER :: id_zimp
    INTEGER :: id_omega
    INTEGER :: id_epot
    INTEGER :: id_vpoh
    INTEGER :: id_curt
    INTEGER :: id_difb
    INTEGER :: id_velb
    INTEGER :: id_difb_bi
    INTEGER :: id_velb_bi
    INTEGER :: id_difb_fi
    INTEGER :: id_velb_fi
    integer :: id_fd0(15)  ! (1:nsfast)
    integer :: id_fdb(15)  ! (1:nsfast)
    integer :: id_fdp(15)  ! (1:nsfast)
    integer :: id_fdq(15)  ! (1:nsfast)
    integer :: id_fdr(15)  ! (1:nsfast)
    integer :: id_fds(15)  ! (1:nsfast)
    integer :: id_n0(50,10)  ! (1:nsmax,1:ngmax)
    integer :: id_t0(50,10)  ! (1:nsmax,1:ngmax)
    integer :: id_omeg0(50,10)  ! (1:nsmax,1:ngmax)
 
  end type nbitype_profiles
 
 
  type nbotype_fusion
    INTEGER :: io_bbntns(18)  ! (mireact)
    INTEGER :: io_bbntnt
    INTEGER :: io_btntns(18)  ! (mireact)
    INTEGER :: io_btntrs(18)  ! (mireact)
    INTEGER :: io_btntws(18)  ! (mireact)
    INTEGER :: io_btntnt
    INTEGER :: io_rbntnt
    real(fp) :: bbntot
    real(fp) :: bbnta(18)  ! (mireact)
    real(fp) :: btneut
    real(fp) :: rbneut
    real(fp) :: btnta(18)  ! (mireact)
    real(fp) :: sftot(18)  ! (mireact)
  end type nbotype_fusion
 
  type nbotype_density
    INTEGER :: io_bdenss(15)  ! (mibs)
    INTEGER :: io_mc_dens(15)  ! (mibs)
    INTEGER :: io_bdenssw(15)  ! (mibs)
    INTEGER :: io_udenspl(15)  ! (mibs)
    INTEGER :: io_udenspp(15)  ! (mibs)
    INTEGER :: io_udensplw(15)  ! (mibs)
    INTEGER :: io_udensppw(15)  ! (mibs)
  end type nbotype_density
 
  type nbotype_deposition
    INTEGER :: io_bdepb(3,320)  ! (3,mib)
    INTEGER :: io_bdepb_nb(320)  ! (mib)
    INTEGER :: io_bdepe(3,15)  ! (3,mibs)
    INTEGER :: io_bdeps(15)  ! (mibs)
    INTEGER :: io_sdep_oa(15)  ! (mibs)
    real(fp) :: SDEP_OAUC(15)  ! (mibs)
    INTEGER :: io_mc_newdens(15)  ! (mibs)
    real(fp) :: einjav(15)  ! (mibs)
    INTEGER :: io_sbbidpe(3,15)  ! (3,mibs)
    INTEGER :: io_sbbidps(15)  ! (mibs)
    INTEGER :: io_sbbxdpe(3,15)  ! (3,mibs)
    INTEGER :: io_sbbxdps(15)  ! (mibs)
    INTEGER :: io_sbcxdpe(10,3,15)  ! (mig,3,mibs)
    INTEGER :: io_sbcxdps(10,15)  ! (mig,mibs)
    INTEGER :: io_sbedepe(3,15)  ! (3,mibs)
    INTEGER :: io_sbedeps(15)  ! (mibs)
    INTEGER :: io_sbiedepe(3,15)  ! (3,mibs)
    INTEGER :: io_sbiedeps(15)  ! (mibs)
    INTEGER :: io_sbildepe(3,15)  ! (3,mibs)
    INTEGER :: io_sbildeps(15)  ! (mibs)
    INTEGER :: io_sbizdepe(3,15)  ! (3,mibs)
    INTEGER :: io_sbizdeps(15)  ! (mibs)
    real(fp) :: frac_cur_ndep0
    integer :: ndep0_use
    integer :: nbs_step
    integer :: n_outtim
  end type nbotype_deposition
 
  type nbotype_nclass
    INTEGER :: io_bnb_ien(3,320)  ! (3,mib)
    INTEGER :: io_bdens_nb(320)  ! (mib)
    INTEGER :: io_pbe_ien(3,320)  ! (3,mib)
    INTEGER :: io_pbi_ien(3,320)  ! (3,mib)
    INTEGER :: io_upb_ien(3,320)  ! (3,mib)
    real(fp) :: bpshna(320,3)  ! (mib,3)
    real(fp) :: ein_ien(3,320)  ! (3, mib)
    real(fp) :: dei_ien(3,320)  ! (3, mib)
    INTEGER :: io_bnbs_ien(3,15)  ! (3,mibs)
    INTEGER :: io_pbes_ien(3,15)  ! (3,mibs)
    INTEGER :: io_pbis_ien(3,15)  ! (3,mibs)
    INTEGER :: io_upbs_ien(3,15)  ! (3,mibs)
  end type nbotype_nclass
 
  type nbotype_n0_fast
    INTEGER :: io_bn00t(3)  ! (3)
    INTEGER :: io_bn00ts(3,15)  ! (3,mibs)
    INTEGER :: io_bn00(320,3)  ! (mib,3)
    INTEGER :: io_bn0tot(15)  ! (mibs)
    INTEGER :: io_bn0cx(15)  ! (mibs)
  end type nbotype_n0_fast
 
  type nbotype_trap_fraction
    INTEGER :: io_btrap(15)  ! (mibs)
    INTEGER :: io_btrap0(15)  ! (mibs)
    real(fp) :: tbtrap(15)  ! (mibs)
    real(fp) :: tbtrap0(15)  ! (mibs)
  end type nbotype_trap_fraction
 
  type nbotype_erngfi_output
    INTEGER :: io_btrape(10,15)  ! (miefi,mibs)
    INTEGER :: io_densfi(10,15)  ! (miefi,mibs)
  end type nbotype_erngfi_output
 
  type nbotype_average_energies
    INTEGER :: io_ebapl2s(15)  ! (mibs)
    INTEGER :: io_ebapp2s(15)  ! (mibs)
    INTEGER :: io_ebapl2sw(15)  ! (mibs)
    INTEGER :: io_ebapp2sw(15)  ! (mibs)
    INTEGER :: io_ebavps(15)  ! (mibs)
  end type nbotype_average_energies
 
  type nbotype_excited_states
    INTEGER :: io_excit0(3,15)  ! (3,mibs)
    INTEGER :: io_excitr(15)  ! (mibs)
  end type nbotype_excited_states
 
  type nbotype_mc_statistics
    INTEGER :: io_nmc(15)  ! (mibs)
    INTEGER :: io_wnmc(15)  ! (mibs)
    integer :: nmctot(15)  ! (mibs)
    real(fp) :: wnmctot(15)  ! (mibs)
    integer :: naeptot(15)  ! (mibs)
    integer :: nstep_aep(10,15)  ! (mnkaep,mibs)
    integer :: nmcloss(15)  ! (mibs)
    integer :: nnew(15)  ! (mibs)
    real(fp) :: xncx0_orb(15)  ! (mibs)
  end type nbotype_mc_statistics
 
  type nbotype_rotation
    INTEGER :: io_omegabs(15)  ! (mibs)
    INTEGER :: io_omegabsw(15)  ! (mibs)
  end type nbotype_rotation
 
  type nbotype_compression
    INTEGER :: io_pbcprs
    INTEGER :: io_pbcprss(15)  ! (mibs)
  end type nbotype_compression
 
  type nbotype_powers
    INTEGER :: io_pbdfbes(15)  ! (mibs)
    INTEGER :: io_pbdfbis(15)  ! (mibs)
    INTEGER :: io_pbe
    INTEGER :: io_pbes(15)  ! (mibs)
    INTEGER :: io_pbi
    INTEGER :: io_pbis(15)  ! (mibs)
    INTEGER :: io_pbohs(15)  ! (mibs)
    INTEGER :: io_pbephis(15)  ! (mibs)
    INTEGER :: io_pbephis_ntr(15)  ! (mibs)
    INTEGER :: io_pbephis_dep(15)  ! (mibs)
    INTEGER :: io_pbth
    INTEGER :: io_pbths(15)  ! (mibs)
    INTEGER :: io_pbe_nb(320)  ! (mib)
    INTEGER :: io_pbi_nb(320)  ! (mib)
    INTEGER :: io_pbth_nb(320)  ! (mib)
    INTEGER :: io_pbtot_nb(320)  ! (mib)
    INTEGER :: io_pbthr2s(15)  ! (mibs)
    INTEGER :: io_pfe
    INTEGER :: io_pfi
    INTEGER :: io_orbrzv_Prf(15)  ! (mibs)
    INTEGER :: io_orbrzv_toric_Prf(15)  ! (mibs)
  end type nbotype_powers
 
  type nbotype_currents
    INTEGER :: io_curjbeam
    INTEGER :: io_curjfusi
    INTEGER :: io_curjs(15)  ! (mibs)
    INTEGER :: io_ucurjs(15)  ! (mibs)
    INTEGER :: io_ucurjco
    INTEGER :: io_ucurjctr
    INTEGER :: io_ucurjnb(320)  ! (mib)
    INTEGER :: io_curjnb(320)  ! (mib)
    INTEGER :: io_xjbfac
    INTEGER :: io_xjbfacs(15)  ! (mibs)
  end type nbotype_currents
 
  type nbotype_neutral_sources
    INTEGER :: io_sbcx0s(15)  ! (mibs)
    INTEGER :: io_sorbn0(10)  ! (mig)
    INTEGER :: io_sorbn0s(10,15)  ! (mig,mibs)
    INTEGER :: io_sorbn0s_dep(10,15)  ! (mig,mibs)
    INTEGER :: io_sn0s3dh(10,15)  ! (mig,mibs)
  end type nbotype_neutral_sources
 
  type nbotype_recapture
    INTEGER :: io_sbcxrbs(15)  ! (mibs)
    INTEGER :: io_sbcxres(15)  ! (mibs)
    INTEGER :: io_sbcxris(15)  ! (mibs)
    INTEGER :: io_sbcxrls(15)  ! (mibs)
    INTEGER :: io_sbcxrxs(10,15)  ! (mig,mibs)
    INTEGER :: io_sbcxrzs(15)  ! (mibs)
  end type nbotype_recapture
 
  type nbotype_neutral_sinks
    INTEGER :: io_sinb0i(10)  ! (mig)
    INTEGER :: io_sinb0is(10,15)  ! (mig,mibs)
    INTEGER :: io_sinbn0(10)  ! (mig)
    INTEGER :: io_sinbn0s(10,15)  ! (mig,mibs)
  end type nbotype_neutral_sinks
 
  type nbotype_sources
    INTEGER :: io_sorbe
    INTEGER :: io_sorbes(15)  ! (mibs)
    INTEGER :: io_sorbes_ntr(15)  ! (mibs)
    INTEGER :: io_sorbes_dep(15)  ! (mibs)
    INTEGER :: io_sorbh(10)  ! (mig)
    INTEGER :: io_sorbhs(10,15)  ! (mig,mibs)
    INTEGER :: io_sorbhs_ntr(10,15)  ! (mig,mibs)
    INTEGER :: io_sorbhs_dep(10,15)  ! (mig,mibs)
    INTEGER :: io_sorbth
    INTEGER :: io_sorbths(15)  ! (mibs)
  end type nbotype_sources
 
  type nbotype_fokker_planck
    INTEGER :: io_taubpa0(15)  ! (mibs)
    INTEGER :: io_taubpaco1(15)  ! (mibs)
    INTEGER :: io_taubpaco2(15)  ! (mibs)
    INTEGER :: io_taubpaco3(15)  ! (mibs)
    INTEGER :: io_taubpactr1(15)  ! (mibs)
    INTEGER :: io_taubpactr2(15)  ! (mibs)
    INTEGER :: io_taubpactr3(15)  ! (mibs)
    INTEGER :: io_taubsl0(15)  ! (mibs)
    INTEGER :: io_taubslco1(15)  ! (mibs)
    INTEGER :: io_taubslco2(15)  ! (mibs)
    INTEGER :: io_taubslco3(15)  ! (mibs)
    INTEGER :: io_taubslctr1(15)  ! (mibs)
    INTEGER :: io_taubslctr2(15)  ! (mibs)
    INTEGER :: io_taubslctr3(15)  ! (mibs)
    INTEGER :: io_paxfrc(15)  ! (mibs)
    INTEGER :: io_pbxfrc(15)  ! (mibs)
  end type nbotype_fokker_planck
 
  type nbotype_radial_current
    INTEGER :: io_tirabd
    INTEGER :: io_tirabds(15)  ! (mibs)
    INTEGER :: io_tirfsh
    INTEGER :: io_tirfshs(15)  ! (mibs)
    INTEGER :: io_tirorb
    INTEGER :: io_tirorbs(15)  ! (mibs)
    INTEGER :: io_tirrip
    INTEGER :: io_tirrips(15)  ! (mibs)
    INTEGER :: io_difbx(15)  ! (mibs)
    INTEGER :: io_velbx(15)  ! (mibs)
  end type nbotype_radial_current
 
  type nbotype_torques
    INTEGER :: io_tqbsum
    INTEGER :: io_tqbcx
    INTEGER :: io_tqbcxs(15)  ! (mibs)
    INTEGER :: io_tqbcxs_dep(15)  ! (mibs)
    INTEGER :: io_tqbe
    INTEGER :: io_tqbes(15)  ! (mibs)
    INTEGER :: io_tqbi
    INTEGER :: io_tqbis(15)  ! (mibs)
    INTEGER :: io_tqbco_nb(320)  ! (mib)
    INTEGER :: io_tqbth_nb(320)  ! (mib)
    INTEGER :: io_tqtot_nb(320)  ! (mib)
    INTEGER :: io_tqbth
    INTEGER :: io_tqbths(15)  ! (mibs)
    INTEGER :: io_tqbxf
    INTEGER :: io_tqbxfs(15)  ! (mibs)
    INTEGER :: io_tqdifb
    INTEGER :: io_tqdifbs(15)  ! (mibs)
    INTEGER :: io_tqjxb
    INTEGER :: io_tqjxbs(15)  ! (mibs)
    INTEGER :: io_tqjxbs_ntr(15)  ! (mibs)
    INTEGER :: io_tqjxb_nb(320)  ! (mib)
    INTEGER :: io_tqjxbnb_ntr(320)  ! (mib)
    INTEGER :: io_tqjxbs_dep(15)  ! (mibs)
    INTEGER :: io_tqjxb_nb_dep(320)  ! (mib)
    INTEGER :: io_tqohb
    INTEGER :: io_tqohbs(15)  ! (mibs)
    INTEGER :: io_tqrpl
    INTEGER :: io_tqrpls(15)  ! (mibs)
  end type nbotype_torques
 
  type nbotype_frantic
    INTEGER :: io_nbi_den0mn(10,50)  ! (mig,mis)
    INTEGER :: io_nbi_en0mn(10,50)  ! (mig,mis)
    INTEGER :: io_nbi_omg0mn(10,50)  ! (mig,mis)
    INTEGER :: io_nbi_snimn(10,50)  ! (mig,mis)
    real(fp) :: nbi_outflx(10,50)  ! (mig, mis)
    real(fp) :: nbi_eescav(10,50)  ! (mig, mis)
    real(fp) :: nbi_cexflx(10,50)  ! (mig, mis)
    INTEGER :: io_nbi_snemn(2,50)  ! (2,mis)
    INTEGER :: io_nbi_scxmn(50)  ! (mis)
    INTEGER :: io_nbi_pcxmn(50)  ! (mis)
    INTEGER :: io_nbi_pnimn(50)  ! (mis)
    INTEGER :: io_nbi_tqcxmn(50)  ! (mis)
    INTEGER :: io_nbi_tqnimn(50)  ! (mis)
    INTEGER :: io_nbi_pfcxmn(50)  ! (mis)
    INTEGER :: io_nbi_pfnimn(50)  ! (mis)
    INTEGER :: io_nbi_sflx0m(2,50)  ! (2,mis)
    INTEGER :: io_nbi_pflx0m(2,50)  ! (2,mis)
    INTEGER :: io_nbi_tqflx0(50)  ! (mis)
    INTEGER :: io_nbi_pb0mn(50)  ! (mis)
    INTEGER :: io_nbi_pscmn(50)  ! (mis)
    INTEGER :: io_nbi_tqb0mn(50)  ! (mis)
    INTEGER :: io_nbi_tqscmn(50)  ! (mis)
  end type nbotype_frantic
 
  type nbotype_hi_z_beams
    INTEGER :: io_xzbmav(15)  ! (mibs)
  end type nbotype_hi_z_beams
 
  type nbotype_cptimes
    real(fp) :: CPBPS
    real(fp) :: CPBSTART
    real(fp) :: CPBDEP
    real(fp) :: CPBORB
    real(fp) :: CPBFIN
    real(fp) :: CPBMAX
    real(fp) :: CPBMIN
    real(fp) :: CPBROOT
  end type nbotype_cptimes
 
  type nbotype_power_balance
    real(fp) :: bpcxers(15)  ! (mibs)
    real(fp) :: bpcxi0s(15)  ! (mibs)
    real(fp) :: bpcxins(15)  ! (mibs)
    real(fp) :: bpcxots(15)  ! (mibs)
    real(fp) :: bpcxris(15)  ! (mibs)
    real(fp) :: bpcxrxs(15)  ! (mibs)
    real(fp) :: bpcxx0s(15)  ! (mibs)
    real(fp) :: bperr
    real(fp) :: bperrs(15)  ! (mibs)
    INTEGER :: io_PBAEPMS(10,15)  ! (mnkaep,mibs)
    real(fp) :: bpfshs(15)  ! (mibs)
    real(fp) :: bpls(15)  ! (mibs)
    real(fp) :: bpls_dep(15)  ! (mibs)
    real(fp) :: bpohs(15)  ! (mibs)
    real(fp) :: bprpls(15)  ! (mibs)
    real(fp) :: bpshins(15)  ! (mibs)
    real(fp) :: bpsts(15)  ! (mibs)
    real(fp) :: bpths(15)  ! (mibs)
    real(fp) :: pftota
    real(fp) :: bpprma(320)  ! (mib)
    real(fp) :: pinjs(15)  ! (mibs)
    real(fp) :: pinjs_res(15)  ! (mibs)
    real(fp) :: pbdepmc(15)  ! (mibs)
    real(fp) :: PBDEPBA(15)  ! (mibs)
    real(fp) :: bpephis(15)  ! (mibs)
    real(fp) :: orbrzv_Prftot(15)  ! (mibs)
    real(fp) :: orbrzv_toric_Prftot(15)  ! (mibs)
    real(fp) :: orbrzv_toric_ufrnm(15)  ! (mibs)
  end type nbotype_power_balance
 
  type nbotype_momentum_balance
    real(fp) :: bph0was(15)  ! (mibs)
    real(fp) :: bphcks(15)  ! (mibs)
    real(fp) :: bphcols(15)  ! (mibs)
    real(fp) :: bphcons(15)  ! (mibs)
    real(fp) :: bphcxls(15)  ! (mibs)
    real(fp) :: bphinjs(15)  ! (mibs)
    real(fp) :: bphdepsgc(15)  ! (mibs)
    real(fp) :: bphdeps(15)  ! (mibs)
    real(fp) :: bphshins(15)  ! (mibs)
    real(fp) :: bphdpba(15)  ! (mibs)
    real(fp) :: bphdfbs(15)  ! (mibs)
    real(fp) :: bpherr
    real(fp) :: bpherrs(15)  ! (mibs)
    real(fp) :: bphfshs(15)  ! (mibs)
    real(fp) :: bphjxbs(15)  ! (mibs)
    real(fp) :: bphjxbs_ntr(15)  ! (mibs)
    real(fp) :: bphjxbs_dep(15)  ! (mibs)
    real(fp) :: bphohbs(15)  ! (mibs)
    real(fp) :: bpholds(15)  ! (mibs)
    real(fp) :: bphorbs(15)  ! (mibs)
    real(fp) :: bphorbs_dep(15)  ! (mibs)
    real(fp) :: bphrcas(15)  ! (mibs)
    real(fp) :: bphrpls(15)  ! (mibs)
    real(fp) :: bphsts(15)  ! (mibs)
    real(fp) :: bphths(15)  ! (mibs)
  end type nbotype_momentum_balance
 
  type nbotype_torque_work
    real(fp) :: bptcols(15)  ! (mibs)
    real(fp) :: bptdfbs(15)  ! (mibs)
    real(fp) :: bpthros(15)  ! (mibs)
    real(fp) :: bpthsfs(15)  ! (mibs)
    real(fp) :: bpjxbs(15)  ! (mibs)
    real(fp) :: bpjxbs_ntr(15)  ! (mibs)
    real(fp) :: bpjxbs_dep(15)  ! (mibs)
    real(fp) :: bpthafs(15)  ! (mibs)
  end type nbotype_torque_work
 
  type nbotype_particle_balance
    real(fp) :: bxflws(15)  ! (mibs)
    real(fp) :: bxflws_dep(15)  ! (mibs)
    real(fp) :: bxflws_prompt(15)  ! (mibs)
    real(fp) :: bxfshs(15)  ! (mibs)
    real(fp) :: bxrpls(15)  ! (mibs)
    real(fp) :: sbcxxs(15)  ! (mibs)
    real(fp) :: sfcx0mc(15)  ! (mibs)
    INTEGER :: io_sfcxmc1d(15)  ! (mibs)
    real(fp) :: sfcxbal(15)  ! (mibs)
    real(fp) :: sfcxesc(15)  ! (mibs)
    real(fp) :: sfcxrmc(15)  ! (mibs)
    real(fp) :: sfcxrr(15)  ! (mibs)
    real(fp) :: sfdbbcx(15)  ! (mibs)
    real(fp) :: sfdbbiz(15)  ! (mibs)
    real(fp) :: sfdepba(15)  ! (mibs)
    real(fp) :: sfdepcx(15)  ! (mibs)
    real(fp) :: sfdepiz(15)  ! (mibs)
    real(fp) :: sfdepmc(15)  ! (mibs)
    real(fp) :: sfdeprr(15)  ! (mibs)
    real(fp) :: sfdepsc(15)  ! (mibs)
    real(fp) :: sfdtbmc(15)  ! (mibs)
    real(fp) :: sforbal(15)  ! (mibs)
    real(fp) :: sforbrr(15)  ! (mibs)
    real(fp) :: sfrbbcx(15)  ! (mibs)
    real(fp) :: sfrbbiz(15)  ! (mibs)
    real(fp) :: sfshine(15)  ! (mibs)
    real(fp) :: sfxrccx(15)  ! (mibs)
    real(fp) :: sfxrciz(15)  ! (mibs)
    real(fp) :: sfxrcsc(15)  ! (mibs)
    real(fp) :: snbcxos(15)  ! (mibs)
    real(fp) :: snbcxs(15)  ! (mibs)
    real(fp) :: snbxbb0(15)  ! (mibs)
    real(fp) :: snbxbb1(15)  ! (mibs)
    real(fp) :: snbxtot(15)  ! (mibs)
    INTEGER :: io_snbx1d(15)  ! (mibs)
    real(fp) :: snbxv0(15)  ! (mibs)
    real(fp) :: snbxw0(15)  ! (mibs)
    real(fp) :: xysbcxs(15)  ! (mibs)
    real(fp) :: xninjs(15)  ! (mibs)
    real(fp) :: xninjea(15)  ! (mibs)
    real(fp) :: sftota
  end type nbotype_particle_balance
 
end module nbi_types
