comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Spherical Harmonics.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Spherical Harmonics. [message #3853] Mon, 10 April 1995 00:00 Go to next message
sjt is currently offline  sjt
Messages: 72
Registered: November 1993
Member
Does anyone have either of the following:

1) A routine to fit (low order) spherical harmonics to data. That is take
data tabulated at selected latitude & longitude values and return
spherical harmonic coefficients of the best fit.

or failing that:

2) A routine to return the value of a spherical harmonic function of
given order at a given location?

I can't find anything in the major libraries (APL, ASTRO etc.)

If not I'll have a shot at (2) and post the result.

--
+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+----------------------------------------------------------- --+---------+
Re: Spherical Harmonics. [message #3956 is a reply to message #3853] Fri, 14 April 1995 00:00 Go to previous messageGo to next message
ahlquist is currently offline  ahlquist
Messages: 3
Registered: April 1995
Junior Member
James Tappin (sjt@xuna.sr.bham.ac.uk) wrote:
: Does anyone have either of the following:

: 1) A routine to fit (low order) spherical harmonics to data. That is take
: data tabulated at selected latitude & longitude values and return
: spherical harmonic coefficients of the best fit.

I have some old software that may do some of what you want.
It is in Fortran. Check our anonymous ftp site: ftp.met.fsu.edu
(note that ftp is part of the site address).
Check in directory /pub/spherical_harmonics.
(I'm currently working with a grad student on updated software,
but it isn't ready to release yet and probably won't be until fall.)

: or failing that:

: 2) A routine to return the value of a spherical harmonic function of
: given order at a given location?

Version 2 of Numerical Recipes has function plgndr() which computes
the value of an associated Legendre function.
A more complete source would be "spherepack" which is a spherical
harmonics package. It has been a long time since I retrieved
this package, but I believe that it is available by anonymous
ftp at ftp.ucar.edu (ucar = university corporation for
atmospheric research). Check in directory /dsl/catalog
for a list of software packages (dsl = distributed software libraries).
Check the appropriate subdirectory in directory /dsl/lib
for the Fortran source code.

Jon Ahlquist
Dept. of Meteorology
Florida State University
Tallahassee, FL 32306-3034
Re: Spherical Harmonics. [message #3998 is a reply to message #3853] Mon, 10 April 1995 00:00 Go to previous messageGo to next message
bowman is currently offline  bowman
Messages: 121
Registered: September 1991
Senior Member
In article <3mb3uk$5bn@sun4.bham.ac.uk>, sjt@xuna.sr.bham.ac.uk (James
Tappin) wrote:

> Does anyone have either of the following:
>
> 1) A routine to fit (low order) spherical harmonics to data. That is take
> data tabulated at selected latitude & longitude values and return
> spherical harmonic coefficients of the best fit.

There is a Fortran package available from NCAR (ftp.ncar.ucar.edu) to
compute spherical harmonic transforms (either direction) on regular or
Gaussian lat-lon grids.

Try: http://http.ucar.edu/SOFTLIB/SPHERE.html

You can call Fortran from IDL, although I haven't tried to call this
particular library.

Regards, Ken Bowman

--
Dr. Kenneth P. Bowman 409-862-4060
Associate Professor 409-862-4132 fax
Department of Meteorology bowman@csrp.tamu.edu
Texas A&M University PP-Glider
College Station, TX 77843-3150
Re: spherical harmonics [message #21981 is a reply to message #3853] Fri, 13 October 2000 00:00 Go to previous message
John C. Wright is currently offline  John C. Wright
Messages: 1
Registered: October 2000
Junior Member
On Fri, 13 Oct 2000, Klaus Gottschaldt wrote:

> Subject: spherical harmonics
>
> Hallo!
>
> I want to analyze data on a sphere, representing them by spherical
> harmonic coefficients.
> This is somehow like a Fourier transform, but based on Legendre
> polynoms, which are
> defined on the surface of a sphere.
> Unlike wavelets, this transform is global.
> My data are given in the form [longitude, latitude, data_value], where
> longitude, latitude
> and data_value are vectors of the same length.
> Data points are randomly scattered over the sphere with a resolution of
> approx. 100km
> on the Earth's surface.
>
> Does somebody know, how to do this transform with idl?
>
> Klaus

Hi Klaus,
I may be in need of such a transform in the near future, also. But for
now, the MIDL library has a function, legendre_pol.pro, that returns
associated legendre polynomials, then it would be possible to build the
transform, though I recognize this would be a bit of work, though the
longitudinal transform could be done with IDL's FFT.

A word of warning, there are many different Spherical Harmonic
decompositions, so make sure your basis functions and normalizations are
the same between applications. Let the list know if you find any publicly
available solutions, I for one, would be interested.

-john
Re: spherical harmonics [message #21983 is a reply to message #3853] Fri, 13 October 2000 00:00 Go to previous message
Peter Thorne is currently offline  Peter Thorne
Messages: 13
Registered: October 2000
Junior Member
Klaus,

I have some code to do this, but its been released to me under licence
and therefore I am not at liberty to release it directly. If you contact
me by email I'll point you towards the people who wrote the source code
and you can approach them.

HTH

Peter
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: obj graphics fly-thru help
Next Topic: Re: Contour plots / ps files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:01:16 PDT 2025

Total time taken to generate the page: 0.01101 seconds