SHTns  2.6.5
Using SHTns with Fortran 77

SHTns provides an interface to Fortran language (compatible with gfortran).

First of all you need to initialize SHTns. There are two ways to do this :

Multi-threaded transforms can be enabled (if available, see Compiling and installing SHTns) by a call to shtns_use_threads before shtns_init or shtns_create.

Note that you can call initialization function(s) only once, which means that only one size and grid can be used with the Fortran interface (C and Python do not have this limitation). Then you must allocate some memory, and finaly you can perform some spherical harmonic transforms.

See Also
See The full reference of the Fortran API.
See the Fortran example for a simple usage of SHTns from Fortran language.

When your program is ready, compile it adding these options to the compiler (gfortran) :

-L/path/to/lib/ -I/path/to/include/ -lshtns -lfftw3 -lm -lc