TreeMig Code
Loading...
Searching...
No Matches
All_par.f90
Go to the documentation of this file.
1!!==============================================================================
2!!
3! Name : All_par
4!
5! Remarks: contains the global parameters
6!
7!==============================================================================
8! design : H. Lischke, N. Zimmermann
9! author(s) : H. Lischke, N. Zimmermann
10! implementation : H. Lischke, N. Zimmermann
11! cleaner : T.J. Loeffler
12! copyright : (c) 1999, 03 by H. Lischke
13!==============================================================================
20module all_par
21
22!****************** CONTROL PARAMETERS ***************************************!
23!----- Important values are read in ReadControlPars from file control.pars
24
25 !----- Basic setup for simulation
26 INTEGER numyrs
28 INTEGER, parameter:: climatestartyear = 0
29 INTEGER, dimension (10, 3) :: reportintervals
31 INTEGER :: stateoutputdist
32 INTEGER, dimension (10) :: stateoutputyears
33 ! INTEGER, parameter :: maxArraylat = 2001! 1800 ! 500! 220 ! 1001! 1132 !2201 !> maximal number of rows, only for declarations
34 ! INTEGER, parameter :: maxArraylon = 2001! 1800 ! 500! 180! 1834 !> maximal number of colums, only for declarations
35
36 INTEGER, parameter :: maxcctimes = 1
37 INTEGER, parameter :: maximmigrationsperspec = 1
38 ! INTEGER, parameter :: maxKernelDimFine = 150!1024! 1024 !1601! 300 !150 ! 600 !200! 1601 !> maximal dimension of coarse kernel
39 ! INTEGER, parameter :: maxKernelDim = 150! 512! 512! 600 !25 ! 600 !200! 1601 !> maximal dimension of coarse kernel
40 ! INTEGER, parameter :: maxSeededCells = (2*maxKernelDim+1)**2 !> max. number of cells which receive seeds
41 ! INTEGER, parameter :: maxSeededCells = (2*maxKernelDim*maxArrayLon) !> max. number of cells which receive seeds
42 INTEGER, parameter :: nmeasuredtimes = 200
43 INTEGER, parameter :: maxnumbprocs = 64
44! ! INTEGER :: requests(maxArraylat*maxArraylon)
45 INTEGER maxlat
46 INTEGER maxlon
47 ! INTEGER maxlatEven, maxlonEven !> chosen number of colums, if necessary made even
48! INTEGER maxlatExt, maxlonExt !> extended chosen number of colums
49! INTEGER:: maxlatEvenext, maxlonEvenext !> next larger power of 2
51 INTEGER ncctimes
56 LOGICAL readstatefile !! read initial state from file statefile?
57 REAL, parameter :: biothreshold = 0.1
58 LOGICAL includeenv
60
61 INTEGER, parameter :: edge = 0
65 REAL, parameter:: seednumberthresh = 0.0000
66 INTEGER kerneltype
67 LOGICAL, parameter :: dodispersal = .true.
68 LOGICAL active
73 LOGICAL dofft
84 LOGICAL immigration
85 INTEGER immiperiod
90 LOGICAL :: estabeqhc0
92
93 character(len=:), allocatable :: boundaries
94 INTEGER :: outerseeds
96 !----- Basic model setup
97! LOGICAL, parameter :: slow = .FALSE. !> slowing down initial growth (yes/no)
98 INTEGER, parameter :: maxspc = 70
99 INTEGER, parameter :: maxhc = 15
100 INTEGER, parameter :: maxlc = 10
101 character(len=:), allocatable:: specfilename
102 character(len=:), allocatable:: immifilename
103 character(len=:), allocatable:: bioclimfilename
104 character(len=:), allocatable:: stockareafilename, landcoverfilterfilename
105 character(len=:), allocatable:: experimentid
106 INTEGER :: ndrivers
107 character(len=30) :: columnnamesofdrivers (1:50)
108 INTEGER, parameter :: nalloweddrivernames=10
109 character(len=30), dimension(nallowedDrivernames),parameter :: alloweddrivernames=&
110 ["lon ","lat ","year ",&
111 "DD ","WiT ","DrStr ", &
112 "Distu ","browsPress ","germDrought","nutrients "]
113 INTEGER, dimension(nallowedDrivernames):: columnlocations
114 ! REAL, dimension(nallowedDrivernames), parameter :: driverDefault=[0,0,0,0,0,0,0,8,0,100] !> default values for the drivers, if no explicit values are read in. The defaults should be read in
115 REAL, dimension(nallowedDrivernames) :: driverdefault
116 ! character(len=:), allocatable,dimension(7),parameter :: allowedDriverNames = &
117! ["lon ","lat ","year ","DD ","WiT ","DrStr","Distu"] !> Names of allowed drivers, x, y, year, bioclim., + optional drivers
118 !----- Basic parameters
119 REAL, parameter :: pi = 3.141592654
120 REAL, parameter :: birht = 1.37
121 REAL, parameter :: toplt = 1.0
125 REAL :: pltsiz
126 REAL, parameter :: potbirth = 0.5
128
129 !----- Basic variables
130 REAL :: a1(5)
131 REAL :: a2(5)
132 REAL :: c1(2)
133 REAL :: c2(2)
134 REAL :: kn1(3)
135 REAL :: kn2(3)
136
137
139 LOGICAL :: biomass, number, seeds, antagonists, hstruct, pollen, lai, basalarea, &
140 npp, ingrowth, biodiv, light, netcdf
141 end TYPE wroutp
142
144
145 !----- Overall result variables
148 REAL :: biocrit(10)
149 ! REAL :: specAppearance(10, maxspc, maxArraylat, maxArraylon)
150 ! REAL :: specMigSpeed(10, maxspc, maxArraylat, maxArraylon)
152 INTEGER :: domspec80(3), domspec160(3), domspec240(3), domspec500(3), domspeceq(3)
153 ! REAL :: kernel(-maxKernelDim:maxKernelDim,-maxKernelDim:maxKernelDim)
154 REAL, allocatable :: kernel(:, :), kernelfine(:, :), kernel1(:, :), kernel2(:, :)
155
156 !natalie:
157 REAL :: stmvol
158
159!****************** SPECIES TYPES AND PARAMETERS ***************************************!
160!****************** User: do NOT TOUCH!> ***************************************!
161 TYPE idata
162 INTEGER :: year
163 REAL :: rellat
164 REAL :: rellon
165 end TYPE idata
166
168 INTEGER :: n
170 end TYPE immigrationdata
171
172 TYPE specproperties ! scalar species properties, and kernels
173 INTEGER :: nb
174 INTEGER :: stn
175 INTEGER :: kdmax
176 INTEGER :: khmax
177 INTEGER :: kamax
178 INTEGER :: kg
179 INTEGER :: kddmin
180 INTEGER :: kddmax
181 INTEGER :: kwit
182 INTEGER :: kntol
183 INTEGER :: kbrow
184 INTEGER :: klighs
185 INTEGER :: kligha
186 INTEGER :: klq
187 INTEGER :: kimm
188 INTEGER :: resld
189 INTEGER :: ploto
190 INTEGER :: par0
191 INTEGER :: par1
192 INTEGER :: par2
193 INTEGER :: par3
194 INTEGER :: par4
195 INTEGER :: par5
196 INTEGER :: red
197 INTEGER :: green
198 INTEGER :: blue
199 INTEGER :: par9
200 INTEGER :: tb
201 INTEGER :: maxhtc
202 INTEGER :: mxseed
203 INTEGER :: rad
204 INTEGER :: maxlatext
205 INTEGER :: maxlonext
206 INTEGER :: maxlatevenext
207 INTEGER :: maxlonevenext
208! INTEGER :: kdimi_FT, kdimj_FT !> even dimension of kernel
209 REAL :: kdrt
210 REAL :: kgermdrsens
211 REAL :: par6
212 REAL :: par7
213 REAL :: par8
214 REAL :: maxdhm
215 REAL :: maxgro
216 REAL :: cmort
217 REAL :: seedgerm
218 REAL :: seedsurv
219 REAL :: seedloss
220 REAL :: lthres
221 REAL :: envdep
222 REAL :: enveta
223 REAL :: minmat
224 REAL :: maxseed
225 REAL :: dispfac
226 REAL :: alfa1
227 REAL :: alfa2
228 REAL :: birth
229 REAL :: period
230 REAL :: mathcp
231 REAL :: repfac
232 REAL :: sumtimebio
233 ! REAL :: kernel(-maxKernelDim:maxKernelDim,-maxKernelDim:maxKernelDim)
234 REAL, allocatable :: kernel(:, :)
235 complex, allocatable :: kernel_ft(:, :)
236 character(len=:), allocatable :: nl
237 character(len=:), allocatable :: ns
238 character(1) :: stb
239 TYPE(immigrationdata) :: immi
240 end TYPE specproperties
241
243 REAL :: htmin(0:maxhc + 1)
244 REAL :: diain(0:maxhc)
245 REAL :: lain(0:maxhc)
246 REAL :: bioin(0:maxhc)
247 REAL :: hlgro(0:maxhc, maxlc)
248 REAL :: envvitality(0:maxhc, maxlc)
249 REAL :: growthvitality(0:maxhc, maxlc)
250 REAL :: seedprod(0:maxhc)
251 REAL :: lightdepa(1:maxlc)
252 REAL :: lightdepe(1:maxlc)
253 end TYPE specpropertiesincl
254
256 REAL :: sb = 0
257 REAL :: producedseeds = 0
258! REAL :: caches !> cache site area (areaper grid-cell area) [=..] !>DSP
259 REAL :: htmps
260 REAL :: htdmp
261 REAL :: antagonist
262 REAL :: newseeds
263 REAL :: verynewseeds = 0
264 REAL :: seedbank
265 REAL :: ingrowth = 0
266 REAL :: spectotalbiomass = 0
267 REAL :: npp
268 REAL :: numin(0:maxhc)
269 REAL :: seeds(0:maxhc) = 0
270! LOGICAL :: there !> LOGICAL array -> seeds arehere? [~immiYear]
271 end TYPE specstate
272
274 INTEGER :: lat
275 INTEGER :: lon
276 REAL :: seeds = 0
277 end TYPE seedcspec
278
279 TYPE seedc
280 TYPE(seedcspec) ::sp(maxspc)
281 end TYPE seedc
282
284 REAL :: newseeds = 0
285 REAL :: verynewseeds = 0
286 end TYPE seedsspec
287
289 TYPE(seedsspec) ::sp(maxspc)
290 end TYPE seedspecarr
291
295
297 REAL :: mudd, stddd, muwit, stdwit, prop0drstr, mudrstr, stddrstr, disturb, avnit, brwpr, germdrought
298 end TYPE biocliminonecell
299
301 INTEGER :: cctime
302 TYPE(biocliminonecell), dimension(:, :), allocatable:: bc
303 end TYPE bioclimdata
304
305 ! TYPE BIOCLIMDATA
306 ! INTEGER :: cctime
307 ! TYPE(BioClimInOneCell) :: bc(1:maxArraylat,1:maxArraylon)
308 ! end TYPE BIOCLIMDATA
309
311 TYPE(specstate) :: sp(maxspc)
312 INTEGER :: lat, lon
313 INTEGER :: maxcarpetlength
314 REAL :: ddegs, wtemp, drstr, avnit, brwpr, disturb, germdrought
315 end TYPE currstateincell
316
318 REAL :: ddegs, wtemp, drstr, avnit, brwpr
319 end TYPE currenvincell
320
322 TYPE(seedsspec) :: sp(maxspc)
323 end TYPE newseedsincell
324
326 INTEGER :: year
327 REAL :: facvar
328 Logical :: dodispersal
329 end TYPE yearcharacteristics
330
332 INTEGER :: iam, lat, lon, year
333 REAL :: num(maxspc)
334 REAL :: sum
335 end TYPE outputline
336
338
339 ! TYPE(CurrStateInCell):: stateGrid(1:maxArraylat,1:maxArraylon)
340 TYPE(currstateincell), dimension(:, :), allocatable :: stategrid
341
342 TYPE(newseedsincell), dimension(:, :), allocatable:: seedrain
343
344
348
350
352
353 ! REAL :: stockability(1:maxArraylat,1:maxArraylon), landcoverfilter(1:maxArraylat,1:maxArraylon)
354 ! REAL :: stocksum(1:maxArraylat ) , stocksumcum(1:maxArraylat ) !> summed over lons, used for load balancing
355 REAL, dimension(:, :), allocatable :: stockability, landcoverfilter
356 REAL, dimension(:), allocatable :: stocksum, stocksumcum
357 REAL :: hcwidth
358 INTEGER :: htmax
359 ! REAL :: avbio(1:maxArraylat,1:maxArraylon,1:maxspc,0:3)
360 REAL, allocatable, dimension(:, :, :, :) :: avbio
361
362 double precision, dimension(nmeasuredtimes):: oldtime, sumtime
363 double precision:: measuredinoculationtime
364!****************** STAND TYPES AND PARAMETERS ***************************************!
365!****************** User: do NOT TOUCH!> ***************************************!
366
367 REAL :: ltfrq(maxlc)
368 REAL :: ltcum(maxlc)
369 REAL :: ltprf(0:maxhc, maxlc)
370 REAL :: ltval(maxlc)
371 REAL :: la(maxlc)
372
373 INTEGER :: htcl
374 INTEGER :: ltcl
375
376end module all_par
subroutine seedprod(ispec, htcl, ntinh, year, thiscell)
Seedprod.
Definition Seedprod.f90:51
character(len=:), allocatable experimentid
Definition All_par.f90:105
real latrealend
Definition All_par.f90:50
integer, dimension(3) domspec80
Definition All_par.f90:152
real pltsiz
Definition All_par.f90:125
integer stateoutputdist
Definition All_par.f90:31
type(currstateincell) thiscell
Definition All_par.f90:337
integer, parameter climatestartyear
Definition All_par.f90:28
real seedantamort
Definition All_par.f90:80
real lonrealstart
Definition All_par.f90:50
real, dimension(:, :), allocatable landcoverfilter
Definition All_par.f90:355
integer kerneltype
Definition All_par.f90:66
real, dimension(:, :), allocatable stockability
Definition All_par.f90:53
integer simustartyear
Definition All_par.f90:27
logical estabeqhc0
Definition All_par.f90:90
integer startlatend
Definition All_par.f90:52
integer, dimension(3) domspec500
Definition All_par.f90:152
integer, parameter nmeasuredtimes
Definition All_par.f90:42
character(len=30), dimension(nalloweddrivernames), parameter alloweddrivernames
Definition All_par.f90:109
real, dimension(0:maxhc, maxlc) ltprf
Definition All_par.f90:369
logical envfromfile
Definition All_par.f90:59
logical includeenv
Definition All_par.f90:58
real seedantaeff
Definition All_par.f90:79
integer, dimension(10, 3) reportintervals
Definition All_par.f90:29
integer, parameter maxhc
Definition All_par.f90:99
integer, dimension(nalloweddrivernames), parameter year
Definition All_par.f90:27
real, dimension(maxlc) ltval
Definition All_par.f90:370
real seedlcrowndiamincm
Definition All_par.f90:127
real seedantarain
Definition All_par.f90:81
real cellsidelength
Definition All_par.f90:63
logical withseedantagonists
Definition All_par.f90:77
real unitofspatialdata
Definition All_par.f90:53
real avdiversityeq
Definition All_par.f90:147
integer ncctimes
Definition All_par.f90:51
real, dimension(:, :), allocatable kernel2
Definition All_par.f90:154
real hcwidth
Definition All_par.f90:357
real, dimension(:,:, 1:maxspc, 0:3), allocatable avbio
Definition All_par.f90:360
character(len=:), allocatable landcoverfilterfilename
Definition All_par.f90:104
real, dimension(3) kn2
Definition All_par.f90:135
real disturbprob
Definition All_par.f90:87
type(specpropertiesincl), dimension(maxspc) speccl
Definition All_par.f90:346
logical cellnotyetallocated
Definition All_par.f90:95
real antagonists
Definition All_par.f90:78
logical, parameter light
Definition All_par.f90:90
type(specproperties), dimension(maxspc) spec
Definition All_par.f90:345
double precision, dimension(nmeasuredtimes) oldtime
Definition All_par.f90:362
real sumdiversity
Definition All_par.f90:146
logical calcseedbank
Definition All_par.f90:75
real, dimension(5) a2
Definition All_par.f90:131
logical readstatefile
Definition All_par.f90:56
logical withseedcarrcap
Definition All_par.f90:82
type(currstateincell), dimension(:, :), allocatable stategrid
Definition All_par.f90:340
logical dispersaldifferent
Definition All_par.f90:72
integer htcl
Definition All_par.f90:373
integer immiperiod
Definition All_par.f90:85
real disturbintensity
Definition All_par.f90:88
type(yearcharacteristics) thisyear
Definition All_par.f90:347
character(len=30), dimension(1:50) columnnamesofdrivers
Definition All_par.f90:107
real lonrealend
Definition All_par.f90:50
real seedantagraz
Definition All_par.f90:78
integer startlonend
Definition All_par.f90:52
double precision measuredinoculationtime
Definition All_par.f90:363
logical contlightdepgerm
Definition All_par.f90:91
type(wroutp) writeoutput
Definition All_par.f90:143
real avdiversity160
Definition All_par.f90:147
real stmvol
Definition All_par.f90:157
logical disturbances
Definition All_par.f90:86
real, parameter toplt
Definition All_par.f90:121
integer numyrs
Definition All_par.f90:26
integer, parameter maxlc
Definition All_par.f90:100
integer, parameter maximmigrationsperspec
Definition All_par.f90:37
real, dimension(nalloweddrivernames) driverdefault
Definition All_par.f90:115
real, dimension(:, :), allocatable, parameter seeds
Definition All_par.f90:65
integer nonzerospecseq
Definition All_par.f90:151
type(wroutp) true
Definition All_par.f90:143
real unitofspatialdata2
Definition All_par.f90:54
real fcvardyn
Definition All_par.f90:124
real, dimension(2) c1
Definition All_par.f90:132
character(len=:), allocatable bioclimfilename
Definition All_par.f90:103
integer period
Definition All_par.f90:85
real, dimension(5) a1
Definition All_par.f90:130
real latrealstart
Definition All_par.f90:50
real, dimension(:, :), allocatable kernel1
Definition All_par.f90:154
character(len=:), allocatable specfilename
Definition All_par.f90:101
real, dimension(maxlc) la
Definition All_par.f90:130
integer, dimension(10) stateoutputyears
Definition All_par.f90:32
logical seedsdifferent
Definition All_par.f90:70
integer, parameter maxcctimes
Definition All_par.f90:36
real ltcl
Definition All_par.f90:371
integer maxlon
Definition All_par.f90:46
real, parameter birht
Definition All_par.f90:120
logical, parameter dodispersal
Definition All_par.f90:67
logical mastseeding
Definition All_par.f90:74
real, dimension(2) c2
Definition All_par.f90:133
integer, parameter maxnumbprocs
Definition All_par.f90:43
integer startlatstart
Definition All_par.f90:52
integer, dimension(3) domspec160
Definition All_par.f90:152
integer nreportintervals
Definition All_par.f90:30
integer, parameter number
Definition All_par.f90:26
real n
Definition All_par.f90:134
integer, parameter edge
Definition All_par.f90:61
real, parameter biomass
Definition All_par.f90:57
type(bioclimdata) newbioclim
Definition All_par.f90:351
integer nonzerospecs240
Definition All_par.f90:151
integer nonzerospecs80
Definition All_par.f90:151
real, dimension(maxlc) ltfrq
Definition All_par.f90:367
character(len=:), allocatable stockareafilename
Definition All_par.f90:104
real, dimension(:, :), allocatable kernel
Definition All_par.f90:62
integer outerseeds
Definition All_par.f90:94
real, dimension(maxlc) ltcum
Definition All_par.f90:368
real seedcarrcap
Definition All_par.f90:83
type(newseedsincell), dimension(:, :), allocatable seedrain
Definition All_par.f90:342
integer, dimension(3) domspeceq
Definition All_par.f90:152
character(len=:), allocatable boundaries
Definition All_par.f90:93
logical tabsepoutput
Definition All_par.f90:89
real epskernel
Definition All_par.f90:64
integer htmax
Definition All_par.f90:358
real, dimension(t/ha), parameter biothreshold
Definition All_par.f90:57
real avdiversity240
Definition All_par.f90:147
real, dimension(:), allocatable stocksumcum
Definition All_par.f90:356
integer, parameter nalloweddrivernames
Definition All_par.f90:108
logical dofft
Definition All_par.f90:73
integer nonzerospecs160
Definition All_par.f90:151
logical mathgtdifferent
Definition All_par.f90:71
integer, dimension(3) domspec240
Definition All_par.f90:152
real, dimension(3) kn1
Definition All_par.f90:134
real, dimension(:, :), allocatable kernelfine
Definition All_par.f90:154
real facvar
Definition All_par.f90:122
integer, dimension(nalloweddrivernames) columnlocations
Definition All_par.f90:113
real, dimension(10) biocrit
Definition All_par.f90:148
type(outputline) outputl
Definition All_par.f90:349
integer, parameter maxspc
Definition All_par.f90:98
type(bioclimdata) oldbioclim
Definition All_par.f90:351
real, parameter potbirth
Definition All_par.f90:126
character(len=:), allocatable immifilename
Definition All_par.f90:102
integer ndrivers
Definition All_par.f90:106
real avdiversity80
Definition All_par.f90:147
integer, allocatable, parameter immigration
Definition All_par.f90:37
real, parameter seednumberthresh
Definition All_par.f90:65
real avdiversity500
Definition All_par.f90:147
integer inoculationtime
Definition All_par.f90:55
logical dostochseeddisp
Definition All_par.f90:69
double precision, dimension(nmeasuredtimes) sumtime
Definition All_par.f90:362
real alpha_all
Definition All_par.f90:62
real fcvarinit
Definition All_par.f90:123
logical readdispersalkernel
Definition All_par.f90:76
integer startlonstart
Definition All_par.f90:52
real, parameter birth
Definition All_par.f90:120
real, dimension(:), allocatable stocksum
Definition All_par.f90:356
integer nonzerospecs500
Definition All_par.f90:151
logical active
Definition All_par.f90:68
integer maxlat
Definition All_par.f90:45
real, parameter pi
Definition All_par.f90:119