Spectral coefficient of a derivative of a scalar function in the latitude direction

Issue #30 resolved
Chayut Teeraratkul created an issue

Hi,

I am trying to take the derivative of a scalar function in the latitude direction using this library. I understand that this task involves taking the inverse transform of the spectral coefficient of the function with the derivative of the associated Legendre polynomial. I cannot find any mention of this task under the scalar transforms in the documentation. I am wondering if there is a function in this library that can do this, and if so, how would one go about calling it in Fortran.

Thank you so much

Comments (3)

  1. Nathanaël Schaeffer repo owner

    Hello,

    The function you are looking for is SHsph_to_spat(), with a name that is admittedly not very descriptive.

    From Fortran, it is the following:

        shtns_sph_to_spat(Spectral_array, Grad_lat_array, Grad_long_array)
    

    where Spectral_array is the input spectral coefficients, while Grad_lat_array and Grad_long_array are filled by the function with the derivative in the spatial domain along the latitudinal and longitudinal directions respectively.

    All the best

  2. Log in to comment