c GWH: I believe this version (itgp.cmn) is now obsolete. c Use itg.cmn instead. c c INCLUDE file itg.cmn: ITG subroutine common blocks c c major parameters for the grid, fields, and modes c integer ld ! # of radial meshpoints integer ldb ! (# of radial mespoints) - 1 integer nffty ! # of y grid points, with dealiasing integer nfftx ! # of x grid points, with dealiasing integer nmin ! fourier modes range from nmin to nmax. integer nmax ! nmin=nmax=0 for single helicity integer nd ! total # of n's, nd=nmax-nmin+1 integer nspecies ! number of species integer iperiod ! 1 -> periodic b.c.'s, 0 -> 0 b.c.'s integer idt ! switch for adjustable time step real pi ! 3.14159... real dtadj ! dt -> 1.05*dtadj*dt or dt -> dt/dtadj real dtmax ! max value for dt real dtmin ! min value for dt real dt0 ! time step (in units of Ln/cs) integer lin ! 1= linear run, 0=nonlinear run. character note*80 ! note about the run. real etae ! eta_e real rmime ! m_i / m_e real r(lz) ! grid for the radial (x) coordinate real bdel(lz) ! By/B profile (includes shear effects) real vdely(lz) ! vy/Lv profile (includes poloidal shear) real vdelz(lz) ! vz/Lv profile (includes toroidal shear) real omegad(lz,mz,nz) ! omega_d profile (toroidal terms) real bmag(lz) ! magnitude of B profile real bmaginv(lz) ! 1/B profile real bgrad(lz) ! 1/B dB/dl profile real kpar(lz) ! array for kpar fft's real stochf ! stochasticity parameter for poisson c c mdspec doesn't need to be in a common block? integer mmin(nz),mmax(nz),md,mdspec,nddp,nddm,ivex(lz,mzz), * malias,nalias,madd,nadd,mlow,mhi,iseed c c Fourier transform conventions used in the ITG code are described c in more detail in itg.hlp. c c All primary variables are for guiding centers (i.e., w is the guiding c center density, which is different from the particle density due to c FLR effects.) c c w = guiding center density n c pr = parallel pressure c v = parallel velocity c u = phi (electrostatic potential) c t = perpendicular temperature c c postfix codes are: c c=cosine mode, s=sine mode, o=old. c c The "home" basis for most fields is (theta,ky,kx). For example, c ws(lz,mz,nz,nspecz) is the guiding center density vs. c l=1,ldb along-the-field-line grid index c m=1,md ky (poloidal mode) index c n=1,nd kx (radial mode) index c nsp=1,nspecies species index c real ws(lz,mz,nz,nspecz),wc(lz,mz,nz,nspecz), * us(lz,mz,nz,nspecz),uc(lz,mz,nz,nspecz), * prs(lz,mz,nz,nspecz),prc(lz,mz,nz,nspecz), * vs(lz,mz,nz,nspecz),vc(lz,mz,nz,nspecz), * ts(lz,mz,nz,nspecz),tc(lz,mz,nz,nspecz), * qc(lz,mz,nz,nspecz),qs(lz,mz,nz,nspecz), * ephic(lz,mz,nz,nspecz),ephis(lz,mz,nz,nspecz) real qpars(lz,mz,nz,nspecz),qparc(lz,mz,nz,nspecz), * tparc(lz,mz,nz,nspecz),tpars(lz,mz,nz,nspecz) c real rpc(lz,mz,nz,nspecz),rps(lz,mz,nz,nspecz), c * spc(lz,mz,nz,nspecz),sps(lz,mz,nz,nspecz) c c The following quantities include FLR corrections to Phi: c un is the FLR-corrected w_* term for the density equation c uv is the FLR-corrected w_* term for the parallel velocity equation c ut is the FLR-corrected w_* term for the perpendicular temperature equation c uq is the FLR-corrected w_* term for the par-perp heat equation real unc(lz,mz,nz,nspecz),uns(lz,mz,nz,nspecz) real uvc(lz,mz,nz,nspecz),uvs(lz,mz,nz,nspecz) real utparc(lz,mz,nz,nspecz),utpars(lz,mz,nz,nspecz) real utc(lz,mz,nz,nspecz),uts(lz,mz,nz,nspecz) real uqc(lz,mz,nz,nspecz),uqs(lz,mz,nz,nspecz) real urc(lz,mz,nz,nspecz),urs(lz,mz,nz,nspecz) real uflrc(lz,mz,nz,nspecz),uflrs(lz,mz,nz,nspecz) real uflr2c(lz,mz,nz,nspecz),uflr2s(lz,mz,nz,nspecz) cpm real uflr3c(lz,mz,nz,nspecz),uflr3s(lz,mz,nz,nspecz) c real lambda1,lambda2,nu1,nu2,cflx,cfly,vmax real vy,vz,shr,qsf,epsn,eps,alpha real etai,etaik1,nuii,rmu1,rmu2,rkap,rootm,rootn real tiovte,rkkin,rkkperp,tkap,qkap,etaipar,rkkperp2, * nu1r,nu1i,nu2r,nu2i,nu3r,nu3i,nu4r,nu4i,nu5r,nu5i,nu6r,nu6i, * nu7r,nu7i,nu8r,nu8i,nu9r,nu9i,nu10r,nu10i,nu11r,nu11i, * nu12r,nu12i,nu13r,nu13i,nu14r,nu14i, * zDq1,zBq1,zEq1,beta,qkappar,etaik integer mrr(mz,nz),nrr(nz),igradon,iphi00,iflr,nstp,ifilter,ihdf, * nprnt,nread,imp1,imp2,imkap,movieon,ninterv,meq,neq, * navgflag,ncycle,ne,nfreqcnt,nperpmom,nparmom,iodd,ntrace, * iexp,ikx,inlpm,l_left,l_right real dr(lz),r0(mz,nz),x0,xp,y0,z0,eb(lz),fb(lz), * pmag,dens,avgflag, * wpnc(lz,mz,nz,nspecz),wpns(lz,mz,nz,nspecz), * wptpc(lz,mz,nz,nspecz),wptps(lz,mz,nz,nspecz), * wpvc(lz,mz,nz,nspecz),wpvs(lz,mz,nz,nspecz) real wptc(lz,mz,nz,nspecz),wpts(lz,mz,nz,nspecz), * wgnc(lz,mz,nz,nspecz),wgns(lz,mz,nz,nspecz), * wgtc(lz,mz,nz,nspecz),wgts(lz,mz,nz,nspecz), * wgtpc(lz,mz,nz,nspecz),wgtps(lz,mz,nz,nspecz), * wgqpc(lz,mz,nz,nspecz),wgqps(lz,mz,nz,nspecz), * wdtc(lz,mz,nz,nspecz),wdts(lz,mz,nz,nspecz), * wdqc(lz,mz,nz,nspecz),wdqs(lz,mz,nz,nspecz), * wpqc(lz,mz,nz,nspecz),wpqs(lz,mz,nz,nspecz) real wgqc(lz,mz,nz,nspecz),wgqs(lz,mz,nz,nspecz), * wgvc(lz,mz,nz,nspecz),wgvs(lz,mz,nz,nspecz), * wpqpc(lz,mz,nz,nspecz),wpqps(lz,mz,nz,nspecz) cpm * pmptpc(lz,mz,nz,nspecz),pmptps(lz,mz,nz,nspecz), cpm * pmptc(lz,mz,nz,nspecz),pmpts(lz,mz,nz,nspecz) cpm real pmt5c(lz,mz,nz,nspecz),pmt5s(lz,mz,nz,nspecz), cpm * pmptnc(lz,mz,nz,nspecz),pmptns(lz,mz,nz,nspecz), cpm * pmpvc(lz,mz,nz,nspecz),pmpvs(lz,mz,nz,nspecz), cpm * pmpqvc(lz,mz,nz,nspecz),pmpqvs(lz,mz,nz,nspecz), cpm * pmq5c(lz,mz,nz,nspecz),pmq5s(lz,mz,nz,nspecz), cpm * pmpqpc(lz,mz,nz,nspecz),pmpqps(lz,mz,nz,nspecz) integer lhistory ! phi @ r(lhistory) saved for plots real timo(nez),wpfx(nez),gamx(nez),wrhx(nez),wrhy(nez) real wenr,wenr1,wiox(nez,mz,nz),phik2(lz,nez), * pcerr(nez),phisq(mz,nz),mgamx(mz,nz,nez) real therm(lz),wxsp(nez),grtmx(nez,mz,nz), * wplx(nez,mz,nz),wakx(nez),waky(nez), * wkif(nez,mz,nz),wpif(nez,mz,nz),wtif(nez,mz,nz), * wenx(nez),wpcx(nez),wppif(nez,mz,nz), * wlux(nez),wdpx(nez),wdvx(nez),wdfx(nez), * wdux(nez),wu2x(nez),wp2x(nez),wv2x(nez), * timf(nez),upol(nez),utor(nez), * psp(nez,mz,nz),phirms(nez) real uctim(nez,mz,nz),ustim(nez,mz,nz) integer mfr,nfr,nfreq,ntotal character*30 date real rky(mz,nz) ! ky for each mode real rky2(mz,nz) ! ky**2 for each mode. real rkx2(lz,mz,nz) ! kx**2 grid. real rkx(lz,mz,nz) ! kx grid. real kxwgt(lz*mz*nz) ! k_x weight real gnwgt(lz*mz*nz) ! density equation weight real gtpwgt(lz*mz*nz) ! T_par equation weight real gtwgt(lz*mz*nz) ! T_perp equation weight real grwgt(lz*mz*nz) ! r_perp equation weight real g0wgt(lz*mz*nz) ! gamma_0^(1/2) real g0wgtp(lz*mz*nz) ! gamma_0^(1/2) in poisson real flrwgt(lz*mz*nz) ! nonlinear FLR weight real flrwgt2(lz*mz*nz) ! T nonlinear FLR weight real flrwgt3(lz*mz*nz) ! n,u nonlinear FLR weight real gewgt(lz*mz*nz) real twgt(lz*mz*nz) real nwgt(lz*mz*nz) real wgt00(lz*mz*nz) real pfilter(lz*mz*nz) ! filter weights to get phi from n. real pfilter2(lz*mz*nz) ! filter weights to get E_phi. c nag FFT arrays obsolete and can be removed??: character*10 initx,initkx,inity,initky,initkp real trigx(2*nzz) ! NAG workspace real trigkx(2*nzz) ! NAG workspace real trigy(2*mzz) ! NAG workspace real trigky(2*mzz) ! NAG workspace real trigkp(2*lz) ! NAG workspace real tablekp(100+2*lz) ! mcfft trig array real tablex(100+2*nzz) ! mcfft trig array real tabley(100+2*mzz) ! mcfft trig array real worky((2*mzz+4)*lz*nzz) ! fft workspace c Arrays used in nlpsc, put in common block to save between calls: real kxa3(mzz,nzz*lz),kya3(mzz,nzz*lz) real kxb3(mzz,nzz*lz),kyb3(mzz,nzz*lz) integer stepnlps real vxmax,vymax common/nlpssave/kxa3,kya3,kxb3,kyb3,vxmax,vymax,stepnlps common/ffttrig/trigx,trigkx,trigy,trigky,trigkp common/mcfft/tablekp,tablex,tabley,worky common/fftinit/initx,initkx,inity,initky,initkp common/flrcom/rky,rky2,rkx2,rkx,kxwgt,gnwgt,gtpwgt,gtwgt,grwgt, * g0wgt,flrwgt,flrwgt2,flrwgt3,gewgt,twgt,nwgt,wgt00,pfilter, * pfilter2,g0wgtp common/mmai1/ws,wc,us,uc,prs,prc,vs,vc,ts,tc,qc,qs,ephic,ephis common/mmai2/qparc,qpars,tparc,tpars c ,rpc,rps,spc,sps common /ddat/ld,ldb,nffty,nfftx,nmin,nmax,nd,lin,lhistory, & iexp,nddp,nddm,iseed common /ddat3/pi,dt0,tiovte,pcerr,etaipar,rootn,rootm,dtadj, * dtmax,dtmin,note common /ddat2/mmin,mmax,md,ifilter,ikx,mdspec,idt,inlpm common /dpara/vy,vz,shr,qsf,epsn,eps,alpha, * etai,etaik1,nuii,rmu1,rmu2,rkap,mlow,mhi, * rkkin,rkkperp,tkap,qkap,etaik,malias,nalias,nadd,madd,rkkperp2, * lambda1,lambda2,nu1,nu2,cflx,cfly,vmax, * nu1r,nu1i,nu2r,nu2i,nu3r,nu3i,nu4r,nu4i,nu5r,nu5i,nu6r,nu6i, * nu7r,nu7i,nu8r,nu8i,nu9r,nu9i,nu10r,nu10i,nu11r,nu11i, * nu12r,nu12i,nu13r,nu13i,nu14r,nu14i common /grid/r,bdel,omegad,bmag,bmaginv,bgrad,kpar, * mrr,nrr,l_left,l_right,dr,r0,x0,xp,y0,z0,stochf, * vdely,vdelz,rmime,etae,date common /mesh/eb,fb,zDq1,zBq1,zEq1,beta,qkappar common /control/avgflag,pmag,dens,igradon,iphi00,iflr,ihdf, * nprnt,nread,imp1,imp2,imkap,movieon,ntrace,nstp,nperpmom, * ninterv,meq,neq,navgflag,ncycle,ne,nfreqcnt,nparmom,iodd, * nspecies,ivex,iperiod common /pdata/wenr,wenr1,wiox,phik2 common /pdata1/timo,wpfx,gamx,wrhx,wrhy,mgamx,phisq common /pdata2/wdux,wu2x,wp2x,wv2x common /pdata3/wlux,wdpx,wdvx,wdfx common /pdata4/wenx,wpcx,wppif common /pdata5/wkif,wpif,wtif common /pdata6/wplx,wakx,waky common /pdata7/therm,wxsp common /pdata8/grtmx,psp,phirms common /pdata9/uctim,ustim common /pdata10/mfr,nfr,timf,nfreq,ntotal common/nonlin/wpnc,wpns,wptpc,wptps,wpvc,wpvs,wptc,wpts, * wgnc,wgns,wgtc,wgts,wdtc,wdts,wpqc,wpqs,wgqc,wgqs, * wgvc,wgvs,wpqpc,wpqps,wdqc,wdqs,wgqpc,wgqps,wgtpc,wgtps, * unc,uns,uvc,uvs,utparc,utpars,utc,uts,uqc,uqs,uflrc,uflrs, * uflr2c,uflr2s cpm common/nlpmcom/pmptpc,pmptps,pmptc,pmpts,pmt5c,pmt5s,pmptnc, cpm * pmptns,pmpvc,pmpvs,pmpqvc,pmpqvs,pmq5c,pmq5s,pmpqpc,pmpqps common/flow/utor,upol