| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | private | :: | spectral_mod_initialized_flag | = | .false. | ||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | el2 | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | elm2 | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | el4 | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | trfilt | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | gradym | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | gradyp | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | uvdx | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | uvdym | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | uvdyp | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | vddym | |||
| real(kind=p), | private, | allocatable, dimension(:, :) | :: | vddyp | |||
| real(kind=p), | private, | allocatable, dimension(:) | :: | gradx |
Initialize the spectral module instance
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(inout) | :: | this | |||
| class(ModGeometry_t), | intent(in), | target | :: | mod_geometry |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| complex(kind=p), | intent(in) | :: | vorm(mx,nx) | |||
| integer, | intent(in) | :: | kcos |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| real(kind=p), | intent(in) | :: | vorg(ix,il) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| complex(kind=p), | intent(inout), | dimension(mx, nx) | :: | psi | ||
| complex(kind=p), | intent(inout), | dimension(mx, nx) | :: | psdx | ||
| complex(kind=p), | intent(inout), | dimension(mx, nx) | :: | psdy |
Compute the Vorticity and Divergenge from a wind field (U,V). All the fields are in the spectral space.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| complex(kind=p), | dimension(mx, nx) | :: | ucosm | |||
| complex(kind=p), | dimension(mx, nx) | :: | vcosm | |||
| complex(kind=p), | intent(inout), | dimension(mx, nx) | :: | vorm | ||
| complex(kind=p), | intent(inout), | dimension(mx, nx) | :: | divm |
Compute the U and V winds from the Vorticity and Divergenge fields. All the fields are in the spectral space.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| complex(kind=p), | intent(in), | dimension(mx, nx) | :: | vorm | ||
| complex(kind=p), | intent(in), | dimension(mx, nx) | :: | divm | ||
| complex(kind=p), | intent(inout), | dimension(mx, nx) | :: | ucosm | ||
| complex(kind=p), | intent(inout), | dimension(mx, nx) | :: | vcosm |
Convert u and v in the grid space to Vorticity and Divergence in the spectral space.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| real(kind=p), | intent(in) | :: | ug(ix,il) | |||
| real(kind=p), | intent(in) | :: | vg(ix,il) | |||
| complex(kind=p), | intent(out) | :: | vorm(mx,nx) | |||
| complex(kind=p), | intent(out) | :: | divm(mx,nx) | |||
| integer, | intent(in) | :: | kcos |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| complex(kind=p), | intent(inout) | :: | vor(mx,nx) |
Compute a spectrally-filtered grid-point field.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| real(kind=p), | intent(inout) | :: | fg1(ix,il) | Original grid-point field |
||
| real(kind=p), | intent(inout) | :: | fg2(ix,il) | Filtered grid-point field |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| complex(kind=p), | intent(in) | :: | input(mx,nx) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ModSpectral_t), | intent(in) | :: | this | |||
| complex(kind=p), | intent(in) | :: | input(mx,nx) |
type, extends(ModFourier_t) :: ModSpectral_t
logical :: spectral_mod_initialized_flag = .false.
real(p), allocatable, dimension(:, :) :: el2, elm2, el4, trfilt
real(p), allocatable, dimension(:, :) :: gradym, gradyp
real(p), allocatable, dimension(:, :) :: uvdx, uvdym, uvdyp
real(p), allocatable, dimension(:, :) :: vddym, vddyp
real(p), allocatable, dimension(:) :: gradx
contains
procedure :: initialize => ModSpectral_initialize
procedure :: delete => ModSpectral_delete
procedure :: spec2grid => ModSpectral_spec2grid
procedure :: grid2spec => ModSpectral_grid2spec
procedure :: gradient => ModSpectral_gradient
procedure :: vel2vort => ModSpectral_vel2vort
procedure :: vort2vel => ModSpectral_vort2vel
procedure :: grid_vel2vort => ModSpectral_grid_vel2vort
procedure :: truncate => ModSpectral_truncate
procedure :: grid_filter => ModSpectral_grid_filter
procedure :: laplacian => ModSpectral_laplacian
procedure :: laplacian_inv => ModSpectral_laplacian_inv
end type ModSpectral_t