! written by nbigen.py
! *** do not edit *** (use nbigen.py instead)
module nbi_dimensions
  implicit NONE
  SAVE
 
  logical :: nbidim_init  = .FALSE.  ! 1st initialization
  logical :: nbidim_initf = .FALSE.  ! final initialization
 
  ! user settable dimensions:
 
  integer :: mib = 32
  ! -> maximum user value allowed: 320
          ! = nbeam
          ! max number of neutral beams "nbeam" in simulation.
          ! beams may be added during a simulation but not removed.
 
  integer :: mj = 55
          ! = nzones + 3
          ! mj is related to the max number of radial zones in the
          ! simulation:  mj must exceed <desired-number-of-zones> + 2
 
  integer :: mig = 7
  ! -> maximum user value allowed: 10
          ! = ngmax
          ! max number of non-impurity thermal plasma species.
          ! the number of knownn non-impurity species is "ngmax";
          ! ngmax can increase up to the max number, mig, during a run.
          ! (inside the Monte Carlo code, the number of species with
          ! non-zero density is ng, ng.le.ngmax at all times).
 
  integer :: mis = 21
  ! -> maximum user value allowed: 50
          ! = nsmax
          ! number of externally supplied thermal neutral sources:
          ! leading to neutral densities & temperatures for CX evaluation
 
  integer :: mibs = 7
  ! -> maximum user value allowed: 15
          ! = verbatim:inumfast(2)
          ! max total number of fast ion species including beam ions,
          ! fusion product ions, and RF minority ions
 
  integer :: mimpt = 300
  ! -> maximum user value allowed: 300
          ! = nrhix
          ! max number of impurity thermal plasma species "nrhix".
          ! nrhix can increase up to the max number during a run.
 
  integer :: mmini = 3
  ! -> maximum user value allowed: 10
          ! = nmini
          ! max number of RF minority species; the actual number "nmini"
          ! can increase up to the max number during a run.
 
  integer :: mtheta = 64
          ! = nthets
          ! number of poloidal grid points in bicubic spline
          ! representations of [1/B] and [J] used in orbiting
 
  integer :: miefi = 5
  ! -> maximum user value allowed: 10
          ! = nerngfi
          ! coarse energy grid (cf erngfi(1:nerngfi)) for select
          ! output profiles
 
  integer :: med2d = 10
          ! = ndifbe_2d
          ! energy grid for Diffusivity vs. (x,E) data
          !  (FD0, FDB, etc).
 
  integer :: mimxba = 50
          ! = nznbma
          ! number of pitch angle zones (evenly spaced in vpll/v) in
          ! lab frame fast ion distribution functions.
          ! note: pitch angle grid the same for all species
 
  integer :: mimxbe = 100
          ! = nznbme
          ! maximum number of energy zones in fast ion distribution
          ! functions; actual number and zone spacing can vary from
          ! fast specie to fast specie.
          ! definition of spatial zones:  see xplasma MC grid.
 
  integer :: mgyro = 4
          ! = ngyro
          ! NUMBER OF poloidal AIMING ANGLE ZONES, BEAM F-DIST. CALC.
          ! atan2(V_Z,V_R)-atan2(B_Z,B_R)
          ! zone 1 -- [-pi/4,pi/4]          always means perpendicular to
          ! the flux surface and outward
          ! zone 2 -- [pi/4,3/4pi]  is tangential to the flux
          ! surface with an inward FLR displacement to GC
          ! zone 4 -- [-pi/4,-3/4pi] is tangential to the flux
          ! surface with an outward FLR displacement to GC
          ! zone 3 -- [3pi/4,-3/4pi] is perpendicular and inward
 
  integer :: mimxba0 = 20
          ! = nznbma0
          ! number of pitch angle zones (evenly spaced in vpll/v) in
          ! lab frame for neutrals
          ! note: pitch angle grid the same for all species
 
  integer :: mimxbe0 = 100
          ! = nznbme0
          ! maximum number of energy zones for neutrals
 
  integer :: miboxm = 12
  ! -> maximum user value allowed: 100
          ! = nbbox
          ! max number of "beam-in-box" 3d neutral density profiles to
          ! compute-- actual number "nbbox" can vary from timestep
          ! to timestep
 
  integer :: mitubem = 3
  ! -> maximum user value allowed: 200
          ! = nbtube
          ! max number of "beam in tube" 3d neutral density profiles to
          ! compute
 
  integer :: mituben = 100
  ! -> maximum user value allowed: 500
          ! = maxval(NSEGtube)
          ! max number of segments per tube for the "beam in tube"
 
  integer :: mnkaep = 10
  ! -> maximum user value allowed: 10
          ! = nkaep
          ! number of modes (NK) used in MHD transport operator (Mario Podesta)
 
 
  ! program controlled dimensions:
  integer :: mjeqv = -1
  integer :: mjzb = -1
  integer :: mjzc = -1
  integer :: mtbl = -1
  integer :: mjr = -1
  integer :: mmaxion = -1
  integer :: miz = -1
  integer :: minbs = -1
  integer :: mimaxz = -1
  integer :: mireact = -1
  integer :: miplot = -1
  integer :: mimxbe1 = -1
  integer :: nthspl = -1
  integer :: nthpmin = -1
  integer :: nthpmax = -1
  integer :: minspl = -1
  integer :: minbplt = -1
  integer :: mtrk = -1
 
  ! program controlled dimensions:
  ! (not set until after input is read):
  integer :: mimxbz = -1
  integer :: mimxbzf = -1
  integer :: minb = -1
  integer :: mdep0 = -1
  integer :: mlost_data = -1
  integer :: mibs_use = -1
  integer :: mtrk0 = -1
 
end module nbi_dimensions
