For computing direct and inverse Fourier transforms.
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.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| 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 |
| procedure, public :: initialize => ModFourier_initialize | |
| procedure, public :: delete => ModFourier_delete | |
| procedure, public :: fourier => ModFourier_fourier | |
| procedure, public :: fourier_inv => ModFourier_fourier_inv |
Transforms Fourier coefficients to grid-point data.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| 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) |
Output field
Transforms grid-point data to Fourier coefficients.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModFourier_t), | intent(in) | :: | this | |||
| real(kind=p), | intent(in) | :: | input(ix,il) | Input field |
Output field
Initializes the ModFourier instance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModFourier_t), | intent(inout) | :: | this | |||
| class(ModGeometry_t), | intent(in), | target | :: | mod_geometry |
Delete the Fourier instance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModFourier_t), | intent(inout) | :: | this |