; ; SUMMATIONS Phir=dPhi/dr,Phith=dPhi/dth,and Phiph=dPhi/dphi ; Hr & dHr include the effect of CSSS model ; NOTICE: for CSSS n must start from 0 instead of 1 14NOV2002 ; pro brtp_csss,Nmax,r,sthj,Hr,dHr,Pj,dPj,Gfi,dGfi,Br,Bt,Bp Phir = double(0.0) Phith = double(0.0) Phiph = double(0.0) for n=0, Nmax do begin for m=0, n do begin Phir= Phir + dHr(n)*Pj(n,m)*Gfi(n,m) Phith= Phith + Hr(n)*dPj(n,m)*Gfi(n,m) Phiph= Phiph + Hr(n)*Pj(n,m)*dGfi(n,m) endfor endfor Br = -1.* Phir Bt = -1.* Phith/r Bp = -1.* Phiph/r/sthj end