Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are vector spherical harmonic transforms available? #153

Open
ajdawson opened this issue Sep 29, 2021 · 2 comments
Open

Are vector spherical harmonic transforms available? #153

ajdawson opened this issue Sep 29, 2021 · 2 comments

Comments

@ajdawson
Copy link

I have a beginner question: I would like to compute some vector spherical harmonic transforms, specifically I want to be able to compute vorticity and divergence from eastward and northward vector components, and also the reverse. I am new to Julia, but in Python I have been using shtns and there I would use their 2-argument forms of SH analysis and synthesis with some scaling (just like the getuv and getvrtdiv methods in their shallow_water.py example).

I am having trouble understanding how (or if) this is possible in FastTransforms.jl, can you offer any advice? I've seen the plan_sphv* functions but I am not well enough versed in the topic to understand what these do (i.e. they operate on a single field, not a pair). Thanks!

@dlfivefifty
Copy link
Member

FYI It's probably not so clear but the first place to look is at the docs for the C library: https://mikaelslevinsky.github.io/FastTransforms/

Though it also doesn't say much about VSH so best to wait for @MikaelSlevinsky to respond...

@MikaelSlevinsky
Copy link
Member

Hi @ajdawson! There are at least three ways to work with vector fields here: using the sphv transforms for components of vector fields in spherical coordinates (components in e_\theta and e_\varphi), using the sph transforms for components of vector fields in Cartesian coordinates, and using spin-weighted spherical harmonics as certain complex combinations of the covariant and contravariant derivatives are "diagonalized" by an increment or decrement of spin.

Probably the most efficient are the sphv transforms because they work with only two components to a vector field on the surface of the sphere while the Cartesian coordinate representation requires three and spin-weighted requires complex data (so x 2) and also feels to me like bringing a gun to knife fight. However, the orthonormal basis used to resolve the components of the vector field in the sphv transforms is probably not so well-known. See this arXiv pre-print for more details.

As a general rule, this library is slower and more accurate than SHTns (except for spherical rotations where I'm told our pre-paper algorithm is supposedly the best available).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants