subroutine flr(phic,phis,nphic,nphis,vphic,vphis,tpphic,tpphis, * tphic,tphis,qphic,qphis,rphic,rphis,flrphi1c,flrphi1s,flrphi2c, * flrphi2s) c c calculate the proper FLR-averaged potentials: c c c $Header: /afs/pppl.gov/u/qpliu/cvsroot/codes/gryffin/src/old/flrrw.f,v 4.0 1995/05/24 04:46:58 mbeer Exp $ c c Written by Greg Hammett 17-Dec-1990 c Modified by Bill Dorland 4-Mar-1991 c and again by Bill 15-Sep-1991 c Now pseudo-spectral in radial direction. c and again by Bill in Jan-1992 c added adiabatic electrons. c and again by Bill in Mar-1992 c simplified burgeoning code and added nlpm terms. c mbeer -- changed to Cowley coordinates, kx = s z ky, May 8, 1992 c implicit none ! force every variable's type to be declared. ! (This is useful as a check for typographical errors.) include 'itg.par' include 'itg.cmn' c define the arguments: real phic(lz,mz,nz,nspecz) ! potential, cosine part. real phis(lz,mz,nz,nspecz) ! potential, sine part. real nphic(lz,mz,nz,nspecz) ! density w_* term, cosine part. real nphis(lz,mz,nz,nspecz) ! density w_* term, sine part. real vphic(lz,mz,nz,nspecz) ! Gamma_0^(1/2) phi, cosine part. real vphis(lz,mz,nz,nspecz) ! Gamma_0^(1/2) phi, sine part. real tpphic(lz,mz,nz,nspecz) ! T_par w_* term, cosine part. real tpphis(lz,mz,nz,nspecz) ! T_par w_* term, sine part. real tphic(lz,mz,nz,nspecz) ! T_perp w_* term, cosine part. real tphis(lz,mz,nz,nspecz) ! T_perp w_* term, sine part. real qphic(lz,mz,nz,nspecz) ! q_perp w_* term, cosine part. real qphis(lz,mz,nz,nspecz) ! q_perp w_* term, sine part. real rphic(lz,mz,nz,nspecz) ! r_perp w_* term, cosine part. real rphis(lz,mz,nz,nspecz) ! r_perp w_* term, sine part. real flrphi1c(lz,mz,nz,nspecz) ! phi in nl FLR, cosine part. real flrphi1s(lz,mz,nz,nspecz) ! phi in nl FLR, sine part. real flrphi2c(lz,mz,nz,nspecz) ! phi in nl FLR (T), cosine part. real flrphi2s(lz,mz,nz,nspecz) ! phi in nl FLR (T), sine part. c c declare other local variables: integer n,m,l c c start executable code: c call flrcow(phic,phis,vphic,vphis,g0wgt) call flrcow(phic,phis,qphic,qphis,flrwgt) call flrcow(phic,phis,tphic,tphis,gtwgt) call flrcow(phic,phis,tpphic,tpphis,gtpwgt) call flrcow(phic,phis,nphic,nphis,gnwgt) call flrcow(phic,phis,flrphi1c,flrphi1s,flrwgt) call flrcow(phic,phis,flrphi2c,flrphi2s,flrwgt2) c if(nperpmom.eq.3) call flrcow(phic,phis,rphic,rphis,grwgt) call flrcow(phic,phis,rphic,rphis,grwgt) c c for Ron's flr, will use uq and ur in omega_d terms. c c c electron w-star terms: c if(nspecies.eq.2) then do 400 n=1,nd do 400 m=1,md do 400 l=1,ld nphic(l,m,n,2)=phic(l,m,n,1) nphis(l,m,n,2)=phis(l,m,n,1) vphic(l,m,n,2)=phic(l,m,n,1) vphis(l,m,n,2)=phis(l,m,n,1) tpphic(l,m,n,2)=etae*phic(l,m,n,1) tpphis(l,m,n,2)=etae*phis(l,m,n,1) 400 continue endif return end