writing equation in IDL [message #80745] |
Fri, 29 June 2012 08:55 |
Baro
Messages: 19 Registered: May 2012
|
Junior Member |
|
|
Hello,
I have this function. I computed each parameters and they have the following dimensions
θ = -90 to 90
∅ = -180 to 180
lmax = 60
∆Clm = 60X60
∆Slm = 60X60
Kl = 1X60
l = 1X60
r(θ ,∅)= ((a* Rho_ave)/3 )* ∑(l=2)^lmax ∑(m=0)^l((2l+1)/(1+Kl ))* Plm*(∆Clm Cos(m∅)+∆Slm Sin(m∅))
I wrote it in the following way but the results i am getting is not the one i expect
Factor = Replicate(0.0,1,lmax)
FOR l = 0,lmax-1 DO BEGIN
Factor[l] = trans*((2.0*l+1.0)/(Kl[l]+1.0))
ENDFOR
cosm = REPLICATE(0.0,londim,lmax)
sinm = REPLICATE(0.0,londim,lmax)
FOR m = 0,lmax-1 DO BEGIN
FOR i = 0,londim-1 DO BEGIN
theta = (33.0+i)
phase = theta*m*dtr
cosm[i,m] = COS(phase)
sinm[i,m] = SIN(phase)
ENDFOR
ENDFOR
rmass = Replicate(0.0,londim,latdim)
FOR j = 0,latdim-1 DO BEGIN
phi = (3.0+j)*dtr
Plm = legendresfunction(phi, lmax)
rmass[j,*] = total(rmass + Factor * ((DClm # Plm) ## cosm + (DSlm # Plm) ## sinm))
ENDFOR
Can you help please
|
|
|