; ; SUMMATIONS Phir=dPhi/dr,Phith=dPhi/dth,and Phiph=dPhi/dphi ; Hr & dHr include the effect of various models ; NOTICE: for CSSS n starts from 0 instead of 1 14NOV2002 ; pro brtp_csss,Nmax,r,sthi,Hr,dHr,Pi,dPi,Gfj,dGfj,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)*Pi(n,m)*Gfj(n,m) Phith= Phith + Hr(n)*dPi(n,m)*Gfj(n,m) Phiph= Phiph + Hr(n)*Pi(n,m)*dGfj(n,m) endfor endfor Br = -1.* Phir Bt = -1.* Phith/r Bp = -1.* Phiph/r/sthi end