TreeMig Code
Loading...
Searching...
No Matches
AllocateAreasAndKernels.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine allocateareas
 AllocateAreas.
 
subroutine allocatekernel (rad, vartxt)
 AllocateKernel.
 
subroutine allocatespeckernel (rad, ispec)
 AllocateSpecKernel.
 
subroutine allocatespectransformedkernel (ispec)
 AllocateSpecTransformedKernel.
 
subroutine checkalloc (alloc_st, errormsg, txt)
 CheckAlloc.
 

Function/Subroutine Documentation

◆ allocateareas()

subroutine allocateareas

AllocateAreas.


Allocates the arrays over the simulation domain for various states and help variables, and initializes some of them to zero: the grid cells (i.e. the states), and all kind of spatial changing variables.

  • USE: LoggerModule, All_par
  • IN:
    • from ALL_par:
      • maxspc: INTEGER, parameter :: 70 !>> MAX # of species
      • maxlat, maxlon: INTEGER maxlat, maxlon !>> chosen number of rows and colums of simulation domain
  • OUT:
    • via ALL_par:
      • NewSeedsInCell, BIOCLIMDATA: TYPE CurrStateInCell: structured types for state, seed input and bioclimate
      • stateGrid: TYPE(CurrStateInCell), dimension(:, :), allocatable : current state in each cell (the entire grid)
      • oldBioClim, newBioClim: TYPE(BIOCLIMDATA) : bioclimdata for one year
      • seedrain: TYPE(NewSeedsInCell), dimension(:, : ), allocatable :arriving seeds in each cell (the entire grid)
      • stockability, landcoverfilter: REAL, dimension(:,:), allocatable :stockability original and changed (not used anymore)
      • stocksum, stocksumcum: REAL, dimension(:), allocatable :stockability summed over lons, used for load balancing in parallel processing
      • avbio: REAL, dimension(:, :, :, :), allocatable !>>(:,:,1:maxspc,0:3)
  • CALLS support routines:
    • CheckAlloc in AllocaterAreasAndKernels.f90
    • LogInfo in LoggerModule
  • CALLED FROM:

Definition at line 27 of file AllocateAreasAndKernels.f90.

◆ allocatekernel()

subroutine allocatekernel ( integer, intent(in) rad,
character*10, intent(in) vartxt )

AllocateKernel.


allocates the array for a dispersal kernel initializes it of to zero

  • USE: LoggerModule, All_par
  • IN:
    • Parameters
      rad:radius of kernel (in number of cells)
      vartxt: string identifying which kernel it is
    • from ALL_par:
      • REAL, allocatable :: kernel(:, :), kernelFine(:, :), kernel1(:, :), kernel2(:, :)
    • from LoggerModule:
      • LogWarning
  • CALLS:
    • CheckAlloc in AllocaterAreasAndKernels.f90
    • LogWarning in LoggerModule
  • CALLED FROM:

Definition at line 94 of file AllocateAreasAndKernels.f90.

◆ allocatespeckernel()

subroutine allocatespeckernel ( integer, intent(in) rad,
integer, intent(in) ispec )

AllocateSpecKernel.



  • allocates the array for the dispersal kernel in the spec structure
  • initializes it to zero

USE: All_par

  • IN:
    • Parameters
      rad: radius of kernel (in number of cells)
      ispec: species index
      from ALL_par:
      • spec(maxspc): TYPE(SpecProperties) : Structured TYPE ; species properties
  • CALLS support routines:
    • CheckAlloc in AllocaterAreasAndKernels.f90
    • LogWarning in LoggerModule
  • CALLED FROM:

Definition at line 149 of file AllocateAreasAndKernels.f90.

◆ allocatespectransformedkernel()

subroutine allocatespectransformedkernel ( integer, intent(in) ispec)

AllocateSpecTransformedKernel.


allocates the array for the fourier transformed dispersal kernel in the spec structure and initializes it of to zero

  • USE: All_par
  • IN:
    • Parameters
      ispecspecies index
    • from ALL_par:
      • TYPE(SpecProperties) : spec(maxspc) : Structured TYPE ; species properties
  • CALLS support routines:
    • CheckAlloc in AllocaterAreasAndKernels.f90
  • CALLED FROM:

Definition at line 181 of file AllocateAreasAndKernels.f90.

◆ checkalloc()

subroutine checkalloc ( integer, intent(in) alloc_st,
character(len=*), intent(in) errormsg,
character(len=*), intent(in) txt )

CheckAlloc.


Checks whether the allocation of an array worked, and if not logs an error and stops

  • USE: LoggerModule
  • IN:
    • Parameters
      alloc_st: index for the status of the allocation; 0 means "ok" @parame errormsg : error message coming from the allocate command
      txt: txt identifying the object do be allocated
  • CALLS support functions :
  • CALLED FROM:
    • AllocateSpecTransformedKernel, AllocateSpecKernel, AllocateKernel, AllocateAreas in AllocateAreasAndKernels.f90
    • PrepareNetcdfOutput, InitNCVar

Definition at line 213 of file AllocateAreasAndKernels.f90.