! written by nbigen.py
! *** do not edit *** (use nbigen.py instead)
 
subroutine nbi_init_dims(zdims)
 
  ! default values for user settable dimensions.
 
  use nbi_dimensions
  use nbi_types
  implicit NONE
 
  type (nbitype_dims), intent(out) :: zdims
 
  zdims%mib = 32
  zdims%mj = 55
  zdims%mig = 7
  zdims%mis = 21
  zdims%mibs = 7
  zdims%mimpt = 300
  zdims%mmini = 3
  zdims%mtheta = 64
  zdims%miefi = 5
  zdims%med2d = 10
  zdims%mimxba = 50
  zdims%mimxbe = 100
  zdims%mgyro = 4
  zdims%mimxba0 = 20
  zdims%mimxbe0 = 100
  zdims%miboxm = 12
  zdims%mitubem = 3
  zdims%mituben = 100
  zdims%mnkaep = 10
 
end subroutine nbi_init_dims
 
subroutine nbi_init_sys(zblock)
 
  ! default values for input block: sys
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_sys), intent(out) :: zblock
 
  zblock%runid = "NUBEAM"
  zblock%mission =  "standard"
  zblock%workpath =  " "
  zblock%nonlin = 6
  zblock%nseed = 1
  zblock%nlbout = .TRUE.
  zblock%lunnbx = 0
  zblock%lunres = 0
  zblock%mrstrt = 1
  zblock%nclass = 0
  zblock%only_io = .FALSE.
  zblock%ref_namelist = .FALSE.
  zblock%quasi_check = .TRUE.
  zblock%nltest_output = .TRUE.
  zblock%BLK_MPI_BCAST_INT =  2000000
  zblock%BLK_MPI_BCAST_R8 =   30000000
 
end subroutine nbi_init_sys
 
subroutine nbi_init_times(zblock)
 
  ! default values for input block: times
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_times), intent(out) :: zblock
 
  zblock%tbm1 = 0.0_fp
  zblock%tbm2 = 0.0_fp
 
end subroutine nbi_init_times
 
subroutine nbi_init_grid(zblock)
 
  ! default values for input block: grid
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_grid), intent(out) :: zblock
 
  zblock%nzones = 0
  zblock%nzone_fb = 0
  zblock%nlsym2b =  .FALSE.
  zblock%nth0 =  2
  zblock%xbmbnd = 1.3
  zblock%id_mcgrid = 0
  zblock%nthets = 64
  zblock%ebdmax = 0.0_fp
  zblock%xplasma_in_memory = 0
  zblock%nznbma = 50
  zblock%nznbme = 100
  zblock%nznbma0 = 10
  zblock%nznbme0 = 50
  zblock%ngyro = 4
 
end subroutine nbi_init_grid
 
subroutine nbi_init_beams(zblock)
 
  ! default values for input block: beams
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_beams), intent(out) :: zblock
 
  zblock%ngmax = 0
  zblock%backz = 0.0_fp
  zblock%aplasm = 0.0_fp
  zblock%nbeam = 0
  zblock%xzbeama = 0.0_fp
  zblock%abeama = 0.0_fp
  zblock%nlco = .TRUE.
  zblock%ntrace = 0
  zblock%rtcena = 0.0_fp
  zblock%xlbtna = 0.0_fp
  zblock%xybsca = 0.0_fp
  zblock%xbzeta = 0.0_fp
  zblock%nbshapa = 1
  zblock%bmwidra = 0.0_fp
  zblock%bmwidza = 0.0_fp
  zblock%divra = 0.0_fp
  zblock%divza = 0.0_fp
  zblock%foclra = 1.0e+6_fp
  zblock%foclza = 1.0e+6_fp
  zblock%nbapsha = 1
  zblock%rapedga = 0.0_fp
  zblock%xzpedga = 0.0_fp
  zblock%xlbapa = 0.0_fp
  zblock%xybapa = 0.0_fp
  zblock%xrapoffa = 0.0_fp
  zblock%xzapoffa = 0.0_fp
  zblock%nbapsh2 = 1
  zblock%rapedg2 = 0.0_fp
  zblock%xzpedg2 = 0.0_fp
  zblock%xlbapa2 = 0.0_fp
  zblock%xrapoff2 = 0.0_fp
  zblock%xzapoff2 = 0.0_fp
 
end subroutine nbi_init_beams
 
subroutine nbi_init_impurity(zblock)
 
  ! default values for input block: impurity
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_impurity), intent(out) :: zblock
 
  zblock%nrhix = 0
  zblock%xzimpx = 0.0_fp
  zblock%aimpx = 0.0_fp
 
end subroutine nbi_init_impurity
 
subroutine nbi_init_minority(zblock)
 
  ! default values for input block: minority
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_minority), intent(out) :: zblock
 
  zblock%nmini = 0
  zblock%xzmini = 0.0_fp
  zblock%amini = 0.0_fp
  zblock%nthrf = 1
 
end subroutine nbi_init_minority
 
subroutine nbi_init_powers(zblock)
 
  ! default values for input block: powers
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_powers), intent(out) :: zblock
 
  zblock%einjmin = 0.0_fp
  zblock%einja = 0.0_fp
  zblock%pinja = 0.0_fp
  zblock%ffulla = 0.98_fp
  zblock%fhalfa = 0.01_fp
  zblock%orbrzv_toric_Prftot0 = 0.0_fp
  zblock%orbrzv_toric_frnm = 1.0_fp
 
end subroutine nbi_init_powers
 
subroutine nbi_init_fusion(zblock)
 
  ! default values for input block: fusion
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_fusion), intent(out) :: zblock
 
  zblock%nlfhe3 = .FALSE.
  zblock%nlfhe4 = .FALSE.
  zblock%nlfst = .FALSE.
  zblock%nlfsp = .FALSE.
  zblock%nlfsp14 = .FALSE.
  zblock%nlusf3 = .FALSE.
  zblock%xdatsf3 = 0.0_fp
  zblock%nlusfa = .FALSE.
  zblock%xdatsfa = 0.0_fp
  zblock%nlusft = .FALSE.
  zblock%xdatsft = 0.0_fp
  zblock%nlusfp = .FALSE.
  zblock%xdatsfp = 0.0_fp
  zblock%nlusfp14 = .FALSE.
  zblock%xdatsp3 = 0.0_fp
  zblock%plfhe3 = 100.0_fp
  zblock%plfhe4 = 10000.0_fp
  zblock%plfst = 100.0_fp
  zblock%plfsp = 100.0_fp
  zblock%plfsp14 = 100.0_fp
  zblock%nlfatom = .TRUE.
 
end subroutine nbi_init_fusion
 
subroutine nbi_init_fpp(zblock)
 
  ! default values for input block: fpp
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_fpp), intent(out) :: zblock
 
  zblock%nlbfpp = .FALSE.
 
end subroutine nbi_init_fpp
 
subroutine nbi_init_num(zblock)
 
  ! default values for input block: num
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_num), intent(out) :: zblock
 
  zblock%cxsplt = 2.0_fp
  zblock%dxbsmoo = 0.05_fp
  zblock%dxbsm_nc = 0.0_fp
  zblock%nptcls = 1000
  zblock%nptclf = 1000
  zblock%nptclh = 500
  zblock%NFAST_MAP = 1
  zblock%xpand_nptcl = 3.0_fp
  zblock%frac_depmax = 0.25_fp
  zblock%frac_dep_lim = 1.5_fp
  zblock%frac_depmin = 0.01_fp
  zblock%frac_orbrr = 0.10_fp
  zblock%nptcl_max = 0
  zblock%nltrk_dep0 = .FALSE.
  zblock%NLDEP0_GATHER =  .FALSE.
  zblock%ndep0 = 500
  zblock%NDEP0_MAX =    100000
  zblock%ndep_set_beam = 0
  zblock%ndep_set_ien = 0
  zblock%nbbcal = 1000000
  zblock%ncx0 = 100
  zblock%nper_cx = 4
  zblock%LEV_NBIDEP =  1
  zblock%LEV_TTNUK =  0
  zblock%LEVMOD_HALO =  0
  zblock%NSPLT =  100
  zblock%NSPLT_GEO =  1
  zblock%NSPLT_KIN =  1
  zblock%NSPLT_GEN =  1
  zblock%nmimp =  1
  zblock%AIMP =    16._fp
  zblock%XZIMP =    8._fp
  zblock%NTEST_MAX =  0
  zblock%BI_MAX_PL =  1._fp
  zblock%BI_MAX_PR =  1._fp
  zblock%wghta = 1.0_fp
  zblock%goocon = 10.0_fp
  zblock%NGOOCON_VPVBIN =  0
  zblock%NGOOCON_EBIN =  1
  zblock%NGOOCON_RBIN =  1
  zblock%cxpcon = 20.0_fp
  zblock%fppcon = 8.0_fp
  zblock%fdtnxy = 0.5_fp
  zblock%nchdvp = 3
  zblock%dtn = 0.0_fp
  zblock%dt_acc = 1.0e-4
  zblock%orbrzv_option = 0
  zblock%orbrzv_rf_option = 0
  zblock%nlmcrf_on = .false.
  zblock%orbrzv_nr = 160
  zblock%orbrzv_nz = 160
  zblock%orbrzv_zzerr_con = 1.0e-4_fp
 
end subroutine nbi_init_num
 
subroutine nbi_init_atomic(zblock)
 
  ! default values for input block: atomic
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_atomic), intent(out) :: zblock
 
  zblock%nsmax = 21
  zblock%khalo =  -1
  zblock%dn0out = 1.0e+11_fp
  zblock%nmsigx = 2
  zblock%nlminsv = .TRUE.
  zblock%nlebei = .TRUE.
  zblock%nsigexc = 0
  zblock%xdepmod = 1.0_fp
  zblock%nlbbcx = .TRUE.
  zblock%nbbcx_avg = 0
  zblock%nbbcx_bb = 0
  zblock%nbfallgr = 0
  zblock%nlbeamcx = .TRUE.
  zblock%nlhvion = .TRUE.
 
end subroutine nbi_init_atomic
 
subroutine nbi_init_collid(zblock)
 
  ! default values for input block: collid
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_collid), intent(out) :: zblock
 
  zblock%xcfanbi = 1.0_fp
  zblock%xdfanbi = 1.0_fp
  zblock%xefanbi = 1.0_fp
  zblock%xcfafus = 1.0_fp
  zblock%xdfafus = 1.0_fp
  zblock%xefafus = 1.0_fp
  zblock%nlbcde = .true.
  zblock%nlbcoh = .true.
  zblock%nlbcpa = .true.
  zblock%nlorbo = .false.
 
end subroutine nbi_init_collid
 
subroutine nbi_init_flr(zblock)
 
  ! default values for input block: flr
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_flr), intent(out) :: zblock
 
  zblock%nlbflr = .TRUE.
  zblock%nlfbmflr = .TRUE.
  zblock%nlbgflr = .FALSE.
  zblock%gflr_min = 0.0_fp
  zblock%gflr_rl = 1.0e+6_fp
  zblock%gflr_ll = 30.0_fp
  zblock%gflr_xv =  (/1.5_fp, 0.4_fp/)
  zblock%gflr_op =  (/0._fp,1.e-4_fp,1.e-5_fp,0._fp,3._fp,10._fp,1._fp,0.2_fp,0.05_fp,1._fp,2._fp,0._fp,0._fp,0._fp,0._fp/)
 
end subroutine nbi_init_flr
 
subroutine nbi_init_saw(zblock)
 
  ! default values for input block: saw
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_saw), intent(out) :: zblock
 
  zblock%sawflag = .FALSE.
  zblock%nlsawb = .TRUE.
  zblock%nlsawf = .TRUE.
  zblock%xswfrac_allfast = 1.0_fp
  zblock%xswfrac_beam = 1.0_fp
  zblock%xswfrac_fusn = 1.0_fp
  zblock%nmix_kdsaw = 1
  zblock%fporcelli = 1.0_fp
 
end subroutine nbi_init_saw
 
subroutine nbi_init_adif(zblock)
 
  ! default values for input block: adif
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_adif), intent(out) :: zblock
 
  zblock%nkaep =  0
  zblock%AEP_ASCALE =  0.0_fp
  zblock%AEP_USCALE =  1.0_fp
  zblock%TAEP_FAC =  0.0_fp
  zblock%nmdifb = 0
  zblock%nkdifb = 3
  zblock%ndifbe = 0
  zblock%fdifbe = 1.0_fp
  zblock%edifbe = 0.0_fp
  zblock%x_qlim0 =  0.0_fp
  zblock%ndifbe_2d =  1
  zblock%dif2d_conv =  0.0_fp
  zblock%dif2d_dpa =  0.0_fp
  zblock%ngradd_opt =  0
 
end subroutine nbi_init_adif
 
subroutine nbi_init_ripple(zblock)
 
  ! default values for input block: ripple
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_ripple), intent(out) :: zblock
 
  zblock%nrip = 0
  zblock%taurip = 0.0_fp
  zblock%id_ripple = 0
  zblock%id_ripple2 = 0
  zblock%ncoils = 0
  zblock%ncoils_2 = 0
  zblock%asrd = 0.0_fp
  zblock%bsrd = 0.0_fp
 
end subroutine nbi_init_ripple
 
subroutine nbi_init_outcon(zblock)
 
  ! default values for input block: outcon
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_outcon), intent(out) :: zblock
 
  zblock%nerngfi = 1
  zblock%erngfi = 0.0_fp
  zblock%nsdbgb = 1
 
end subroutine nbi_init_outcon
 
subroutine nbi_init_fishbone(zblock)
 
  ! default values for input block: fishbone
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_fishbone), intent(out) :: zblock
 
  zblock%nlfbon = .FALSE.
  zblock%fbemin = 0.0_fp
  zblock%fbemax = 0.0_fp
  zblock%fvpvmn =  0.0_fp
  zblock%fvpvmx =  0.0_fp
  zblock%fbltim =  1.0e-7_fp
  zblock%fshper =  5.0e-3_fp
  zblock%fshwid =  1.0e-3_fp
  zblock%tfshon =  -1000.0_fp
  zblock%tfshof =  +1.0e+34_fp
  zblock%xfishmin =  0.0_fp
  zblock%xfishmax =  1.0_fp
  zblock%nfbon_vpvopt = 0
  zblock%fbtrap_depth = 0.0_fp
  zblock%nfbon_species = 3
 
end subroutine nbi_init_fishbone
 
subroutine nbi_init_box(zblock)
 
  ! default values for input block: box
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_box), intent(out) :: zblock
 
  zblock%nbbox = 0
  zblock%nbsbox = 0
  zblock%nsample_box = 0
  zblock%xninja_box = 0
  zblock%xninjs_box = 0
  zblock%xninj_box = 0
  zblock%nbebox = 1
  zblock%nxbox = 1
  zblock%nybox = 1
  zblock%nlbox = 100
  zblock%xboxhw = 5.0_fp
  zblock%yboxhw = 5.0_fp
  zblock%xlbox1 = 100.0_fp
  zblock%xlbox2 = 500.0_fp
  zblock%ndepbox = 500
 
end subroutine nbi_init_box
 
subroutine nbi_init_tube(zblock)
 
  ! default values for input block: tube
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_tube), intent(out) :: zblock
 
  zblock%nbtube = 0
  zblock%nbstube = 0
  zblock%nbetube = 1
  zblock%Rtube = 0.
  zblock%Ytube = 0.
  zblock%XZETAtube = 0.
  zblock%PHItube = 0.
  zblock%THETAtube = 0.
  zblock%LMIDtube = 0
  zblock%XL1tube = 0.
  zblock%XL2tube = 0.
  zblock%NSEGtube = 100
  zblock%RHOtube =  1._fp
  zblock%NDEPtube = 500
 
end subroutine nbi_init_tube
 
subroutine nbi_init_misc(zblock)
 
  ! default values for input block: misc
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_misc), intent(out) :: zblock
 
  zblock%plhgt = 0.0_fp
  zblock%nlcprb = .TRUE.
  zblock%nlpsirz = .FALSE.
  zblock%edbfac = 10.0_fp
  zblock%nmcurb = 1
  zblock%nlfdep = .FALSE.
 
end subroutine nbi_init_misc
 
subroutine nbi_init_profiles(zblock)
 
  ! default values for input block: profiles
 
  use nbi_com
  use nbi_types
  implicit NONE
 
  type (nbitype_profiles), intent(out) :: zblock
 
  zblock%id_te = 0
  zblock%id_ti = 0
  zblock%id_tifusn = 0
  zblock%id_ne = 0
  zblock%ng = 0
  zblock%id_nh = 0
  zblock%id_nimp = 0
  zblock%id_nrf = 0
  zblock%id_eperpmin = 0
  zblock%id_epllmin = 0
  zblock%id_nfast = 0
  zblock%id_eperpfast = 0
  zblock%id_epllfast = 0
  zblock%id_aimp = 0
  zblock%id_zimp = 0
  zblock%id_omega = 0
  zblock%id_epot = 0
  zblock%id_vpoh = 0
  zblock%id_curt = 0
  zblock%id_difb = 0
  zblock%id_velb = 0
  zblock%id_difb_bi = 0
  zblock%id_velb_bi = 0
  zblock%id_difb_fi = 0
  zblock%id_velb_fi = 0
  zblock%id_fd0 = 0
  zblock%id_fdb = 0
  zblock%id_fdp = 0
  zblock%id_fdq = 0
  zblock%id_fdr = 0
  zblock%id_fds = 0
  zblock%id_n0 = 0
  zblock%id_t0 = 0
  zblock%id_omeg0 = 0
 
end subroutine nbi_init_profiles
 
