! written by nbigen.py
! *** do not edit *** (use nbigen.py instead)
 
subroutine nbi_dim_fld_bufput
 
  use nbi_com
  use nbi_bcastbuf
  implicit NONE
  integer :: inumi
 
  inumi=0
 
  call putdat(mib,inumi)
  call putdat(mj,inumi)
  call putdat(mig,inumi)
  call putdat(mis,inumi)
  call putdat(mibs,inumi)
  call putdat(mimpt,inumi)
  call putdat(mmini,inumi)
  call putdat(mtheta,inumi)
  call putdat(miefi,inumi)
  call putdat(med2d,inumi)
  call putdat(mimxba,inumi)
  call putdat(mimxbe,inumi)
  call putdat(mgyro,inumi)
  call putdat(mimxba0,inumi)
  call putdat(mimxbe0,inumi)
  call putdat(miboxm,inumi)
  call putdat(mitubem,inumi)
  call putdat(mituben,inumi)
  call putdat(mnkaep,inumi)
  call putdat(mjeqv,inumi)
  call putdat(mjzb,inumi)
  call putdat(mjzc,inumi)
  call putdat(mtbl,inumi)
  call putdat(mjr,inumi)
  call putdat(mmaxion,inumi)
  call putdat(miz,inumi)
  call putdat(minbs,inumi)
  call putdat(mimaxz,inumi)
  call putdat(mireact,inumi)
  call putdat(miplot,inumi)
  call putdat(mimxbe1,inumi)
  call putdat(nthspl,inumi)
  call putdat(nthpmin,inumi)
  call putdat(nthpmax,inumi)
  call putdat(minspl,inumi)
  call putdat(minbplt,inumi)
  call putdat(mtrk,inumi)
  call putdat(mimxbz,inumi)
  call putdat(mimxbzf,inumi)
  call putdat(minb,inumi)
  call putdat(mdep0,inumi)
  call putdat(mibs_use,inumi)
  call putdat(mtrk0,inumi)
 
end subroutine nbi_dim_fld_bufput
 
subroutine nbi_dim_fld_bufget
 
  use nbi_com
  use nbi_bcastbuf
  implicit NONE
  integer :: inumi
 
  inumi=0
 
  call getdat(mib,inumi)
  call getdat(mj,inumi)
  call getdat(mig,inumi)
  call getdat(mis,inumi)
  call getdat(mibs,inumi)
  call getdat(mimpt,inumi)
  call getdat(mmini,inumi)
  call getdat(mtheta,inumi)
  call getdat(miefi,inumi)
  call getdat(med2d,inumi)
  call getdat(mimxba,inumi)
  call getdat(mimxbe,inumi)
  call getdat(mgyro,inumi)
  call getdat(mimxba0,inumi)
  call getdat(mimxbe0,inumi)
  call getdat(miboxm,inumi)
  call getdat(mitubem,inumi)
  call getdat(mituben,inumi)
  call getdat(mnkaep,inumi)
  call getdat(mjeqv,inumi)
  call getdat(mjzb,inumi)
  call getdat(mjzc,inumi)
  call getdat(mtbl,inumi)
  call getdat(mjr,inumi)
  call getdat(mmaxion,inumi)
  call getdat(miz,inumi)
  call getdat(minbs,inumi)
  call getdat(mimaxz,inumi)
  call getdat(mireact,inumi)
  call getdat(miplot,inumi)
  call getdat(mimxbe1,inumi)
  call getdat(nthspl,inumi)
  call getdat(nthpmin,inumi)
  call getdat(nthpmax,inumi)
  call getdat(minspl,inumi)
  call getdat(minbplt,inumi)
  call getdat(mtrk,inumi)
 
  call nbi_alloc_init
 
  call getdat(mimxbz,inumi)
  call getdat(mimxbzf,inumi)
  call getdat(minb,inumi)
  call getdat(mdep0,inumi)
  call getdat(mibs_use,inumi)
  call getdat(mtrk0,inumi)
 
end subroutine nbi_dim_fld_bufget
 
subroutine nbi_fld_bufput
 
  use nbi_com
  use nbi_bcastbuf
  use nbi_random
  use rngdef
  use nbi_idhdr
  implicit NONE
  integer :: inumi,inumr,inumc,inuml
  integer :: NBI_STATE_INDX
  real(double), dimension(0:rng_k-1) :: NBI_STATE_ARR
 
  NBI_STATE_INDX=RNG_CURSTATE%INDEX
  NBI_STATE_ARR(0:RNG_K-1)=RNG_CURSTATE%ARRAY(0:RNG_K-1)
 
  inumi=0
  inumr=0
  inumc=0
  inuml=0
 
  call putdat(init_sys,inuml)
  call putdat(runid,inumc)
  call putdat(mission,inumc)
  call putdat(workpath,inumc)
  call putdat(nonlin,inumi)
  call putdat(nseed,inumi)
  call putdat(nlbout,inuml)
  call putdat(lunnbx,inumi)
  call putdat(lunres,inumi)
  call putdat(mrstrt,inumi)
  call putdat(nclass,inumi)
  call putdat(only_io,inuml)
  call putdat(ref_namelist,inuml)
  call putdat(quasi_check,inuml)
  call putdat(nltest_output,inuml)
  call putdat(BLK_MPI_BCAST_INT,inumi)
  call putdat(BLK_MPI_BCAST_R8,inumi)
  call putdat(init_times,inuml)
  call putdat(tbm1,inumr)
  call putdat(tbm2,inumr)
  call putdat(init_grid,inuml)
  call putdat(nzones,inumi)
  call putdat(nzone_fb,inumi)
  call putdat(nlsym2b,inuml)
  call putdat(nth0,inumi)
  call putdat(xbmbnd,inumr)
  call putdat(id_mcgrid,inumi)
  call putdat(nthets,inumi)
  call putdat(ebdmax,inumr)
  call putdat(xplasma_in_memory,inumi)
  call putdat(nznbma,inumi)
  call putdat(nznbme,inumi)
  call putdat(nznbma0,inumi)
  call putdat(nznbme0,inumi)
  call putdat(ngyro,inumi)
  call putdat(init_beams,inuml)
  call putdat(ngmax,inumi)
  call putdat(backz,inumr)
  call putdat(aplasm,inumr)
  call putdat(nbeam,inumi)
  call putdat(xzbeama,inumr)
  call putdat(abeama,inumr)
  call putdat(nlco,inuml)
  call putdat(ntrace,inumi)
  call putdat(rtcena,inumr)
  call putdat(xlbtna,inumr)
  call putdat(xybsca,inumr)
  call putdat(xbzeta,inumr)
  call putdat(nbshapa,inumi)
  call putdat(bmwidra,inumr)
  call putdat(bmwidza,inumr)
  call putdat(divra,inumr)
  call putdat(divza,inumr)
  call putdat(foclra,inumr)
  call putdat(foclza,inumr)
  call putdat(nbapsha,inumi)
  call putdat(rapedga,inumr)
  call putdat(xzpedga,inumr)
  call putdat(xlbapa,inumr)
  call putdat(xybapa,inumr)
  call putdat(xrapoffa,inumr)
  call putdat(xzapoffa,inumr)
  call putdat(nbapsh2,inumi)
  call putdat(rapedg2,inumr)
  call putdat(xzpedg2,inumr)
  call putdat(xlbapa2,inumr)
  call putdat(xrapoff2,inumr)
  call putdat(xzapoff2,inumr)
  call putdat(init_impurity,inuml)
  call putdat(nrhix,inumi)
  call putdat(xzimpx,inumr)
  call putdat(aimpx,inumr)
  call putdat(init_minority,inuml)
  call putdat(nmini,inumi)
  call putdat(xzmini,inumr)
  call putdat(amini,inumr)
  call putdat(nthrf,inumi)
  call putdat(init_powers,inuml)
  call putdat(einjmin,inumr)
  call putdat(einja,inumr)
  call putdat(pinja,inumr)
  call putdat(ffulla,inumr)
  call putdat(fhalfa,inumr)
  call putdat(orbrzv_toric_Prftot0,inumr)
  call putdat(orbrzv_toric_frnm,inumr)
  call putdat(init_fusion,inuml)
  call putdat(nlfhe3,inuml)
  call putdat(nlfhe4,inuml)
  call putdat(nlfst,inuml)
  call putdat(nlfsp,inuml)
  call putdat(nlfsp14,inuml)
  call putdat(nlusf3,inuml)
  call putdat(xdatsf3,inumr)
  call putdat(nlusfa,inuml)
  call putdat(xdatsfa,inumr)
  call putdat(nlusft,inuml)
  call putdat(xdatsft,inumr)
  call putdat(nlusfp,inuml)
  call putdat(xdatsfp,inumr)
  call putdat(nlusfp14,inuml)
  call putdat(xdatsp3,inumr)
  call putdat(plfhe3,inumr)
  call putdat(plfhe4,inumr)
  call putdat(plfst,inumr)
  call putdat(plfsp,inumr)
  call putdat(plfsp14,inumr)
  call putdat(nlfatom,inuml)
  call putdat(init_fpp,inuml)
  call putdat(nlbfpp,inuml)
  call putdat(init_num,inuml)
  call putdat(cxsplt,inumr)
  call putdat(dxbsmoo,inumr)
  call putdat(dxbsm_nc,inumr)
  call putdat(nptcls,inumi)
  call putdat(nptclf,inumi)
  call putdat(nptclh,inumi)
  call putdat(NFAST_MAP,inumi)
  call putdat(xpand_nptcl,inumr)
  call putdat(frac_depmax,inumr)
  call putdat(frac_dep_lim,inumr)
  call putdat(frac_depmin,inumr)
  call putdat(frac_orbrr,inumr)
  call putdat(nptcl_max,inumi)
  call putdat(nltrk_dep0,inuml)
  call putdat(NLDEP0_GATHER,inuml)
  call putdat(ndep0,inumi)
  call putdat(NDEP0_MAX,inumi)
  call putdat(ndep_set_beam,inumi)
  call putdat(ndep_set_ien,inumi)
  call putdat(nbbcal,inumi)
  call putdat(ncx0,inumi)
  call putdat(nper_cx,inumi)
  call putdat(LEV_NBIDEP,inumi)
  call putdat(LEV_TTNUK,inumi)
  call putdat(LEVMOD_HALO,inumi)
  call putdat(NSPLT,inumi)
  call putdat(NSPLT_GEO,inumi)
  call putdat(NSPLT_KIN,inumi)
  call putdat(NSPLT_GEN,inumi)
  call putdat(nmimp,inumi)
  call putdat(AIMP,inumr)
  call putdat(XZIMP,inumr)
  call putdat(NTEST_MAX,inumi)
  call putdat(BI_MAX_PL,inumr)
  call putdat(BI_MAX_PR,inumr)
  call putdat(wghta,inumr)
  call putdat(goocon,inumr)
  call putdat(NGOOCON_VPVBIN,inumi)
  call putdat(NGOOCON_EBIN,inumi)
  call putdat(NGOOCON_RBIN,inumi)
  call putdat(cxpcon,inumr)
  call putdat(fppcon,inumr)
  call putdat(fdtnxy,inumr)
  call putdat(nchdvp,inumi)
  call putdat(dtn,inumr)
  call putdat(dt_acc,inumr)
  call putdat(orbrzv_option,inumi)
  call putdat(orbrzv_rf_option,inumi)
  call putdat(nlmcrf_on,inuml)
  call putdat(orbrzv_nr,inumi)
  call putdat(orbrzv_nz,inumi)
  call putdat(orbrzv_zzerr_con,inumr)
  call putdat(init_atomic,inuml)
  call putdat(nsmax,inumi)
  call putdat(khalo,inumi)
  call putdat(dn0out,inumr)
  call putdat(nmsigx,inumi)
  call putdat(nlminsv,inuml)
  call putdat(nlebei,inuml)
  call putdat(nsigexc,inumi)
  call putdat(xdepmod,inumr)
  call putdat(nlbbcx,inuml)
  call putdat(nbbcx_avg,inumi)
  call putdat(nbbcx_bb,inumi)
  call putdat(nbfallgr,inumi)
  call putdat(nlbeamcx,inuml)
  call putdat(nlhvion,inuml)
  call putdat(init_collid,inuml)
  call putdat(xcfanbi,inumr)
  call putdat(xdfanbi,inumr)
  call putdat(xefanbi,inumr)
  call putdat(xcfafus,inumr)
  call putdat(xdfafus,inumr)
  call putdat(xefafus,inumr)
  call putdat(nlbcde,inuml)
  call putdat(nlbcoh,inuml)
  call putdat(nlbcpa,inuml)
  call putdat(nlorbo,inuml)
  call putdat(init_flr,inuml)
  call putdat(nlbflr,inuml)
  call putdat(nlfbmflr,inuml)
  call putdat(nlbgflr,inuml)
  call putdat(gflr_min,inumr)
  call putdat(gflr_rl,inumr)
  call putdat(gflr_ll,inumr)
  call putdat(gflr_xv,inumr)
  call putdat(gflr_op,inumr)
  call putdat(init_saw,inuml)
  call putdat(sawflag,inuml)
  call putdat(nlsawb,inuml)
  call putdat(nlsawf,inuml)
  call putdat(xswfrac_allfast,inumr)
  call putdat(xswfrac_beam,inumr)
  call putdat(xswfrac_fusn,inumr)
  call putdat(nmix_kdsaw,inumi)
  call putdat(fporcelli,inumr)
  call putdat(init_adif,inuml)
  call putdat(nkaep,inumi)
  call putdat(AEP_ASCALE,inumr)
  call putdat(AEP_USCALE,inumr)
  call putdat(TAEP_FAC,inumr)
  call putdat(nmdifb,inumi)
  call putdat(nkdifb,inumi)
  call putdat(ndifbe,inumi)
  call putdat(fdifbe,inumr)
  call putdat(edifbe,inumr)
  call putdat(x_qlim0,inumr)
  call putdat(ndifbe_2d,inumi)
  call putdat(dif2d_conv,inumr)
  call putdat(dif2d_dpa,inumr)
  call putdat(ngradd_opt,inumi)
  call putdat(init_ripple,inuml)
  call putdat(nrip,inumi)
  call putdat(taurip,inumr)
  call putdat(id_ripple,inumi)
  call putdat(id_ripple2,inumi)
  call putdat(ncoils,inumi)
  call putdat(ncoils_2,inumi)
  call putdat(asrd,inumr)
  call putdat(bsrd,inumr)
  call putdat(init_outcon,inuml)
  call putdat(nerngfi,inumi)
  call putdat(erngfi,inumr)
  call putdat(nsdbgb,inumi)
  call putdat(init_fishbone,inuml)
  call putdat(nlfbon,inuml)
  call putdat(fbemin,inumr)
  call putdat(fbemax,inumr)
  call putdat(fvpvmn,inumr)
  call putdat(fvpvmx,inumr)
  call putdat(fbltim,inumr)
  call putdat(fshper,inumr)
  call putdat(fshwid,inumr)
  call putdat(tfshon,inumr)
  call putdat(tfshof,inumr)
  call putdat(xfishmin,inumr)
  call putdat(xfishmax,inumr)
  call putdat(nfbon_vpvopt,inumi)
  call putdat(fbtrap_depth,inumr)
  call putdat(nfbon_species,inumi)
  call putdat(init_box,inuml)
  call putdat(nbbox,inumi)
  call putdat(nbsbox,inumi)
  call putdat(nsample_box,inumi)
  call putdat(xninja_box,inumr)
  call putdat(xninjs_box,inumr)
  call putdat(xninj_box,inumr)
  call putdat(nbebox,inumi)
  call putdat(nxbox,inumi)
  call putdat(nybox,inumi)
  call putdat(nlbox,inumi)
  call putdat(xboxhw,inumr)
  call putdat(yboxhw,inumr)
  call putdat(xlbox1,inumr)
  call putdat(xlbox2,inumr)
  call putdat(ndepbox,inumi)
  call putdat(init_tube,inuml)
  call putdat(nbtube,inumi)
  call putdat(nbstube,inumi)
  call putdat(nbetube,inumi)
  call putdat(Rtube,inumr)
  call putdat(Ytube,inumr)
  call putdat(XZETAtube,inumr)
  call putdat(PHItube,inumr)
  call putdat(THETAtube,inumr)
  call putdat(LMIDtube,inumi)
  call putdat(XL1tube,inumr)
  call putdat(XL2tube,inumr)
  call putdat(NSEGtube,inumi)
  call putdat(RHOtube,inumr)
  call putdat(NDEPtube,inumi)
  call putdat(init_misc,inuml)
  call putdat(plhgt,inumr)
  call putdat(nlcprb,inuml)
  call putdat(nlpsirz,inuml)
  call putdat(edbfac,inumr)
  call putdat(nmcurb,inumi)
  call putdat(nlfdep,inuml)
  call putdat(init_profiles,inuml)
  call putdat(id_te,inumi)
  call putdat(id_ti,inumi)
  call putdat(id_tifusn,inumi)
  call putdat(id_ne,inumi)
  call putdat(ng,inumi)
  call putdat(id_nh,inumi)
  call putdat(id_nimp,inumi)
  call putdat(id_nrf,inumi)
  call putdat(id_eperpmin,inumi)
  call putdat(id_epllmin,inumi)
  call putdat(id_nfast,inumi)
  call putdat(id_eperpfast,inumi)
  call putdat(id_epllfast,inumi)
  call putdat(id_aimp,inumi)
  call putdat(id_zimp,inumi)
  call putdat(id_omega,inumi)
  call putdat(id_epot,inumi)
  call putdat(id_vpoh,inumi)
  call putdat(id_curt,inumi)
  call putdat(id_difb,inumi)
  call putdat(id_velb,inumi)
  call putdat(id_difb_bi,inumi)
  call putdat(id_velb_bi,inumi)
  call putdat(id_difb_fi,inumi)
  call putdat(id_velb_fi,inumi)
  call putdat(id_fd0,inumi)
  call putdat(id_fdb,inumi)
  call putdat(id_fdp,inumi)
  call putdat(id_fdq,inumi)
  call putdat(id_fdr,inumi)
  call putdat(id_fds,inumi)
  call putdat(id_n0,inumi)
  call putdat(id_t0,inumi)
  call putdat(id_omeg0,inumi)
 
  call putdat(debug_mpi,inuml)
  call putdat(nbsteps,inumi)
  call putdat(nsigexc_use,inumi)
  call putdat(ebb_rel_co,inumr)
  call putdat(ebb_rel2_co,inumr)
  call putdat(rms_ebb_co,inumr)
  call putdat(ebb_relx_co,inumr)
  call putdat(rms_ebbx_co,inumr)
  call putdat(ebb_rel_cnt,inumr)
  call putdat(ebb_rel2_cnt,inumr)
  call putdat(rms_ebb_cnt,inumr)
  call putdat(ebb_relx_cnt,inumr)
  call putdat(rms_ebbx_cnt,inumr)
  call putdat(bnb_ien2,inumr)
  call putdat(bnb_ienx,inumr)
  call putdat(ebb_rel_fn,inumr)
  call putdat(ebb_rel2_fn,inumr)
  call putdat(rms_ebb_fn,inumr)
  call putdat(ebb_relx_fn,inumr)
  call putdat(rms_ebbx_fn,inumr)
  call putdat(bnb_fn,inumr)
  call putdat(bnb_fnx,inumr)
  call putdat(flag_dt_reset,inuml)
  call putdat(frac_survive,inumr)
  call putdat(ndepmod,inumi)
  call putdat(bbnvol,inumr)
  call putdat(bdns2p,inumr)
  call putdat(be0cx2,inumr)
  call putdat(be20cx2,inumr)
  call putdat(be0x2p,inumr)
  call putdat(bn0cx2,inumr)
  call putdat(bn0x2p,inumr)
  call putdat(bntots,inumr)
  call putdat(btntn2,inumr)
  call putdat(bv0cx2,inumr)
  call putdat(bv0x2p,inumr)
  call putdat(bvrhocx2,inumr)
  call putdat(bvrhox2p,inumr)
  call putdat(bvthcx2,inumr)
  call putdat(bvthx2p,inumr)
  call putdat(bvpllcx2,inumr)
  call putdat(bvpllx2p,inumr)
  call putdat(balpha_gyro,inumr)
  call putdat(balpha_gyrop,inumr)
  call putdat(delt,inumr)
  call putdat(tbm2p,inumr)
  call putdat(dvbox,inumr)
  call putdat(eb2plp,inumr)
  call putdat(eb2ppp,inumr)
  call putdat(efbm,inumr)
  call putdat(efbmb,inumr)
  call putdat(einj,inumr)
  call putdat(einjs,inumr)
  call putdat(vmins,inumr)
  call putdat(fbz,inumr)
  call putdat(dt_adj0,inumr)
  call putdat(dt_adj0s,inumr)
  call putdat(hexbbxrp,inumr)
  call putdat(init_xplasma,inumi)
  call putdat(write_xplasma,inumi)
  call putdat(lrunid,inumi)
  call putdat(nadrbox,inumi)
  call putdat(nbi_init_flag,inuml)
  call putdat(need_read_ptcl,inuml)
  call putdat(sawflag2,inuml)
  call putdat(nbouta,inumi)
  call putdat(nbs,inumi)
  call putdat(nlfprod,inuml)
  call putdat(nout,inumi)
  call putdat(nreact,inumi)
  call putdat(puseyp,inumr)
  call putdat(nwrite_global,inumi)
  call putdat(nznbmr,inumi)
  call putdat(nznbmri,inumi)
  call putdat(nthzsm0,inumi)
  call putdat(phibsce,inumr)
  call putdat(sn00i2,inumr)
  call putdat(sn00x2,inumr)
  call putdat(snb0i2,inumr)
  call putdat(snbn02,inumr)
  if(levmod_halo.eq.2) then
     call putdat(svn3vii_h,inumr)
  endif
  if(levmod_halo.eq.2) then
     call putdat(svn3vii_he,inumr)
  endif
  if(levmod_halo.eq.2) then
     call putdat(svn3vcx_h,inumr)
  endif
  if(levmod_halo.eq.2) then
     call putdat(svn3vcx_he,inumr)
  endif
  call putdat(srbn02,inumr)
  call putdat(tfluxp,inumr)
  call putdat(vbtr2p,inumr)
  call putdat(xibado,inumr)
  call putdat(xiliml,inumr)
  call putdat(ebcons,inumr)
  call putdat(xwght0,inumr)
  call putdat(wnlight,inumr)
  call putdat(wbav,inumr)
  call putdat(wbav_kill,inumr)
  call putdat(tausl_avg,inumr)
  call putdat(tuben0,inumr)
  call putdat(tubedot,inumr)
  call putdat(tubes0,inumr)
 
  call putdat(bdenss,inumr)
  call putdat(mc_dens,inumr)
  call putdat(bdenssw,inumr)
  call putdat(udensplw,inumr)
  call putdat(udensppw,inumr)
  call putdat(mc_newdens,inumr)
  call putdat(einjav,inumr)
  call putdat(nbs_step,inumi)
  call putdat(n_outtim,inumi)
  call putdat(bnb_ien,inumr)
  call putdat(bn0cx,inumr)
  call putdat(ebavps,inumr)
  call putdat(nmc,inumr)
  call putdat(wnmc,inumr)
  call putdat(nmctot,inumi)
  call putdat(wnmctot,inumr)
  call putdat(naeptot,inumi)
  call putdat(nstep_aep,inumi)
  call putdat(nnew,inumi)
  call putdat(omegabsw,inumr)
  call putdat(sorbn0s,inumr)
  call putdat(sorbn0s_dep,inumr)
  call putdat(xzbmav,inumr)
  call putdat(pinjs_res,inumr)
  call putdat(bphcons,inumr)
 
 
end subroutine nbi_fld_bufput
