Go to the source code of this file.
◆ calculatekerneltransformation()
| subroutine calculatekerneltransformation |
( |
integer, intent(in) | isp | ) |
|
CalculateKernelTransformation.
Prepares and performs the FFT of the dispersal kernel of one species
- calculates the dimensions for the kernel arrays
- allocates the kernel arrays
- shifts the kernels so that the kernel dimensions are even
- does the GFT transformation of the shifted kernel
- stores the kernel in frequency domain in spec(isp)kernel_FT
USE: GFT, All_par
- IN:
- Parameters
-
- FROM All_par
- spec(maxspc) : TYPE(SpecProperties) : species properties, here to get the intermediate and large area dimensions for fft maxlatEvenext, maxlonEvenext, maxlatExt, maxlonExt for this species
- maxlatExt, maxlonExt, INTEGER : dimensions of intermediate area (next power of 2 of original area plus a buffer)
- maxlatEvenext,maxlonEvenext : dimensions of large area (next power of 2)
- FROM GFT
- GFT_Prec : INTEGER : precision of the GFT calculations
- OUT:
- via All_par
- spec(isp)kernel_FT, TYPE(SpecProperties),REAL, allocatable, species properties, allocated in AllocateSpecKernel in AllocateAreasAndKernels.f90
- CALLED FROM:
- CALLS:
Definition at line 200 of file GFT_Interact.f90.
◆ printmatrixasxy2file()
| subroutine printmatrixasxy2file |
( |
real(kind=gft_prec), dimension(dimystart:dimyend,dimxstart:dimxend), intent(in) | array, |
|
|
integer, intent(in) | dimystart, |
|
|
integer, intent(in) | dimyend, |
|
|
integer, intent(in) | dimxstart, |
|
|
integer, intent(in) | dimxend, |
|
|
character(*), intent(in) | varname ) |
PrintMatrixASXY2File.
Writes out intermediate files of FFT-arrays as y, x, z, files with y,x relative spatial indices
- USE: GFT
- IN:
- Parameters
-
| dimystart,dimyend,dimxstart,dimxend | dimensions of array |
| array | : to be written out
|
| varname | : variable name of the array to be written out |
- FROM GFT
- GFT_Prec : INTEGER : precision of the GFT calculations
- OUT: only output file in folder AreaOutputs with varname.txt
- CALLED FROM:
Definition at line 147 of file GFT_Interact.f90.
◆ seedrainbyfft()
| subroutine seedrainbyfft |
( |
integer, intent(in) | nspc, |
|
|
integer, intent(in) | year ) |
SeedRainByFFT
Calculates the seedrain by FFT for each species. The FFT version only works in the non-parallel setting
- IN:
- Parameters
-
| nspc | : number of species |
| year | : relative simulation year (0 to simulation duration)
|
- CALLS:
- CALLED FROM:
Definition at line 14 of file GFT_Interact.f90.
◆ seedrainbyfftforthisspec()
| subroutine seedrainbyfftforthisspec |
( |
integer, intent(in) | isp, |
|
|
integer, intent(in) | year ) |
SeedRainByFFTForThisSpec.
Calculates the seedrain by FFT for one species and filters with stockability
- stores seed production to the small extended area, just for giving it to the convolution subprogram
- stores the dispersal kernel, just for giving it to the convolution subprogram
- does the GFT convolution between seed production and dispersal kernel
- cleans noise in the calculated seedrain, i.e. sets very low values to 0
- stores back the calculated seedrain to the smaller area
- masks out by stockability, i.e. sets to zero where stockability is 0
USE: All_par, GFT
- IN:
- Parameters
-
| isp | : species index |
| year | relative simulation year |
- FROM All_par
- spec(maxspc) : TYPE(SpecProperties) : species properties, here to get the intermediate and large area dimensions for fft maxlatEvenext, maxlonEvenext, maxlatExt, maxlonExt for this species
- maxlat, maxlon : INTEGER, : dimensions of simulation area
- seednumberthresh : REAL, parameter,=0. : threshold for reasonable amount of seeds, [1/ha]
- epsKernel : REAL : threshold for cut-off of kernel
- stockability : REAL, dimension(:, :), allocatable : : spatial mask to filter out the non-stockable areas in the seed rain
- stateGrid : TYPE(CurrStateInCell), dimension(:, :), allocatable : current state in each cell (the entire grid)
- OUT:
- CALLS:
- CALLED FROM:
Definition at line 57 of file GFT_Interact.f90.