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

Go to the source code of this file.

Functions/Subroutines

subroutine spatialdynonetimestep (year, currlatstart, currlatend, currlonstart, currlonend, nspc, dodispersal, dofft)
 SpatialDynOneTimeStep, spatial dynamics in one time step.
 
subroutine localdynonetimestep (year, lat, lon, nspc, ddegs, wtemp, drstr, avnit, brwpr, disturb, germdrought, dodispersal, dofft)
 LocalDynOneTimeStep, local dynamics in one time step and one cell.
 
subroutine killalltreesandseeds (nspc, thiscell)
 KillAllTreesAndSeeds, local dynamics in one time step and one cell.
 

Function/Subroutine Documentation

◆ killalltreesandseeds()

subroutine killalltreesandseeds ( integer, intent(in) nspc,
type(currstateincell), intent(inout) thiscell )

KillAllTreesAndSeeds, local dynamics in one time step and one cell.


If cell is not stockable, all trees and seeds are set to zero

  • USE: All_par
  • IN:
    • Parameters
      nspcnumber of species
      thiscellcurrent state of current cell

OUT:

  • via All_par:
    • CurrStateInCell: TYPE

CALLED FROM:

Definition at line 193 of file SpatialDynOneTimeStep.f90.

◆ localdynonetimestep()

subroutine localdynonetimestep ( integer, intent(in) year,
integer, intent(in) lat,
integer, intent(in) lon,
integer, intent(in) nspc,
real, intent(in) ddegs,
real, intent(in) wtemp,
real, intent(in) drstr,
real, intent(in) avnit,
real, intent(in) brwpr,
real, intent(in) disturb,
real, intent(in) germdrought,
logical, intent(in) dodispersal,
logical, intent(in) dofft )

LocalDynOneTimeStep, local dynamics in one time step and one cell.


For (i.e.) standard and parallel TreeMig

  1. if cell is not stockable, state variables are set to zero
  2. if cell is stockable )
    1. the environmental dependencies are determined based ont environmental factors (dd, wiT,drstr)
    2. the current state is fetched and stored to thiscell (remainder of the parallel implementation)
    3. the local forest dynamics is calculated
    4. seeds ared dispersed (if brute force and dispersal is on)
  3. the current results for this cell are written out

USE: All_par

  • IN:
    • Parameters
      nspcnumber of species
      yearcurrent year (relative years)
      lat,lon(relative) coordinates of current grid cell
      ddegs,wtemp,drstr,avnit,brwpr,disturb,germDrought: environmental conditions now in this grid cell
      doDispersal: flag,simulate dispersal ?
      doFFTflag, dispersal by fast fourier transform?
      thiscellcurrent state of current cell
    • from All_par:
      • stockability: REAL, dimension(:, :), allocatable, grid of stockable cells (0,1)
      • CurrStateInCell: TYPE
      • maxlat, maxlon: INTEGER, maximum dimension of simulation area (relative)
  • CALLS:
  • CALLS support routines
    • LogError, LogMessage in LoggerModule
  • CALLED FROM:

Definition at line 129 of file SpatialDynOneTimeStep.f90.

◆ spatialdynonetimestep()

subroutine spatialdynonetimestep ( integer, intent(in) year,
integer, intent(in) currlatstart,
integer, intent(in) currlatend,
integer, intent(in) currlonstart,
integer, intent(in) currlonend,
integer, intent(in) nspc,
logical, intent(in) dodispersal,
logical, intent(in) dofft )

SpatialDynOneTimeStep, spatial dynamics in one time step.


For non parallel (i.e.) standard TreeMig

  1. Loops over the simulation area, for each cell
    1. gets the environmental factors (dd, wiT,drstr)
    2. does the local dynamics
  2. adds the result to netcdf output, if netcdf wished
  3. updates the seeds!>???
  4. does the FFT dispersal, if FFT wished

IN:

  • Parameters
    nspcnumber of species
    yearcurrent year (relative years)
    currLatStart,currLatEnd,currLonStart,currLonEndpart of total simulation area currently simulated, e.g. for spin-up. Is not subarea of parallelisation!>
    ncallSpatSimu: which call of TimeLoop: 1st (inoculation) or 2nd (migration simulation)
    doDispersal: flags,simulate dispersal ?
    doFFTflag, dispersal by fast fourier transform?

CALLS:

CALLED FROM:

Definition at line 46 of file SpatialDynOneTimeStep.f90.