Hi,
I downloaded the Spherepack application but meanwhile also chanced
upon the following code (I am posting only parts of it) in IDL that
claims to do spherical harmonic transforms. I did not want to use a
fortran/C code as I need to do transforms at every time step of my
calculation and thought going to and fro between IDL and Fortran may
not be very efficient. So if I can get this to work it will be really
helpful. The problem with the code right now is I cannot follow what
it means by collocation points, or the cp parameter that it lists as
one of its input. I post below the parts where it mentions about
collocation points :
; spherical_transform.pro - This routine performs a spherical
harmonic
; transform on a 2-D array.
;
; usage: B = spherical_transform(A,cp,lmax=lmax,period=period)
; where B(lmax,lmax) = transformed array ordered (l,m)
; A(n_phi,n_theta) = array to be transformed ordered
(phi,theta)
; cp = cosine of theta collocation points for theta grid
; lmax = maximum l in expansion (default is (2*n_theta-1)/
3)
; period = periodicity factor in phi
; This routine performs a spherical harmonic transformation on a 2-D
; (N_phi,N_theta) array. Currently all the work is done in idl, but
future
; versions may want to call C or Fortran routines for efficiency
reasons.
; The input parameters include the array A and the colocation points
for the
; grid (cos(theta)), which is of length N_theta, along with an
optional
; specification of lmax.
; preliminaries
costheta=double(cp)
----------------------------------------------------------------------------------
Now I was thinking maybe cp is an array of cos(theta) values for all
theta 0 - 180 but the costheta = double(cp) is unclear to me.
Please advice.
Thanks,
-Parama