SHTns 3.7
|
SHTns provides a Python interface that uses NumPy arrays to perform Spherical Harmonic Transforms. The Python interface has been generated using SWIG (but you don't need it to compile the the Python package).
SHTNS_OPENMP=0
in front of the above commands.To start using SHTns you must then create an sht object, from which you can call the transform functions and more. The arrays should be created using NumPy.
The Python interface also supports cuda GPU transparently, if the CUDA_PATH
environment variable was pointing to the cuda toolkit installed on your system when you installed the shtns module (see above). To enable transforms on GPU, grids must be set with SHT_ALLOW_GPU
and SHT_THETA_CONTIGUOUS
.
There is also and the full working example shallow_water.py that solves the non-linear shallow water equations.
In case of segfaults, you may have alignment problems (should not occur on 64 bit systems). Please file a bugreport or contact the author.