ModFourier_t Derived Type

type, public, extends(ModLegendre_t) :: ModFourier_t

Fourier module object Although the ModLegendre_t is not need it, we make it a base class to allow the ModSpectral to inherit that class too when the ModFourier module is inherited. This needs to be done since Fortran does not suppoert multiple inheritance.


Inherits

type~~modfourier_t~~InheritsGraph type~modfourier_t ModFourier_t ModLegendre_t ModLegendre_t type~modfourier_t->ModLegendre_t

Contents


Components

TypeVisibility AttributesNameInitial
logical, private :: mod_fourier_initialized =.false.
real(kind=p), private, allocatable, dimension(:):: work

Work array required by FFTPACK. Contains trigonometric functions etc.

integer, private, allocatable, dimension(:):: ifac

Work array required by FFTPACK. Contains prime factors


Type-Bound Procedures

procedure, public :: initialize => ModFourier_initialize

  • public subroutine ModFourier_initialize(this, mod_geometry)

    Initializes the ModFourier instance.

    Arguments

    Type IntentOptional AttributesName
    class(ModFourier_t), intent(inout) :: this
    class(ModGeometry_t), intent(in), target:: mod_geometry

procedure, public :: delete => ModFourier_delete

  • public subroutine ModFourier_delete(this)

    Delete the Fourier instance

    Arguments

    Type IntentOptional AttributesName
    class(ModFourier_t), intent(inout) :: this

procedure, public :: fourier => ModFourier_fourier

  • private function ModFourier_fourier(this, input) result(output)

    Transforms grid-point data to Fourier coefficients.

    Arguments

    Type IntentOptional AttributesName
    class(ModFourier_t), intent(in) :: this
    real(kind=p), intent(in) :: input(ix,il)

    Input field

    Return Value real(kind=p) (2*mx,il)

    Output field

procedure, public :: fourier_inv => ModFourier_fourier_inv

  • private function ModFourier_fourier_inv(this, input, kcos) result(output)

    Transforms Fourier coefficients to grid-point data.

    Arguments

    Type IntentOptional AttributesName
    class(ModFourier_t), intent(in) :: this
    real(kind=p), intent(in) :: input(2*mx,il)

    Input field

    integer, intent(in) :: kcos

    Scale output by cos(lat) (1) or not (0)

    Return Value real(kind=p) (ix,il)

    Output field