legendre Module

For computing direct and inverse Legendre transforms.


Uses

  • module~~legendre~~UsesGraph module~legendre legendre module~params params module~legendre->module~params

Used by

  • module~~legendre~~UsedByGraph module~legendre legendre proc~spec_to_grid spec_to_grid proc~spec_to_grid->module~legendre proc~grid_to_spec grid_to_spec proc~grid_to_spec->module~legendre proc~initialize_spectral initialize_spectral proc~initialize_spectral->module~legendre

Contents


Variables

TypeVisibility AttributesNameInitial
real, private :: cpol(2*mx,nx,iy)

The Legendre polynomials

real, public :: epsi(mx+1,nx+1)

Epsilon function used for various spectral calculations

real, private :: repsi(mx+1,nx+1)

1/epsi

integer, private :: nsh2(nx)

Used for defining shape of spectral triangle

real, private, dimension(iy):: wt

Gaussian weights used for integration in direct Legendre transform


Functions

public function legendre_inv(input) result(output)

Computes inverse Legendre transformation.

Arguments

Type IntentOptional AttributesName
real, intent(in) :: input(2*mx,nx)

Input field

Return Value real (2*mx,il)

Output field

public function legendre_dir(input) result(output)

Computes direct Legendre transformation.

Arguments

Type IntentOptional AttributesName
real, intent(in) :: input(2*mx,il)

Input field

Return Value real (2*mx,nx)

Output field

private function get_weights() result(w)

Compute Gaussian weights for direct Legendre transform

Arguments

None

Return Value real (iy)

Weights in gaussian quadrature (sum should equal 1.0)

private function get_legendre_poly(j) result(poly)

Compute associated Legendre polynomials at given latitude.

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: j

The latitude to compute the polynomials at

Return Value real (mx,nx)

The Legendre polynomials


Subroutines

public subroutine initialize_legendre()

Initializes Legendre transforms and constants used for other subroutines that manipulate spherical harmonics.

Arguments

None