TreeMig Code
Loading...
Searching...
No Matches
Regen.f90
Go to the documentation of this file.
1!==============================================================================
2!
3! Name : Regen
4!
5! Purpose: "Regen" determines the germination of seeds
6! "ContinuousLightDepGerm" determines a continuous light
7! dependence of germination
8!
9! Remarks: contains the SUBROUTINEs
10!
11! Regen (<LocalDynOneTimeStep<LocalDynOneTimeStep<DistrLocalDynThisTime<
12! TimeLoop<TreeMig)
13! ContinuousLightDepGerm (not used at the moment)
14!
15!==============================================================================
16! design : H. Lischke, N. Zimmermann
17! author(s) : H. Lischke, N. Zimmermann
18! implementation : H. Lischke, N. Zimmermann
19! cleaner : T.J. Loeffler
20! copyright : (c) 1999, 03 by H. Lischke
21!==============================================================================
22!=====================================================================
63!===============================================================
64SUBROUTINE regen(nspc, stock, doDispersal, thiscell)
65
66 ! <CALL modules for TYPE definitions and +- fixed variables>---------------------------------------------------------------
67 use all_par, only: maxlc, pltsiz, &
68 spec, &
73 use loggermodule, only: logwarning
74 ! Use control, species and stand parameters
75 IMPLICIT NONE
76
77 ! <Passed variables>--------------------------------------------------------------------------------
78 INTEGER, INTENT(in) :: nspc ! number of species [=spec]
79 REAL, INTENT(in) :: stock ! number of species [=spec]
80 Logical, INTENT(in) :: doDispersal
81
82 ! <Local variables>---------------------------------------------------------------------------------
83 INTEGER :: ilstart, & ! Integer val. of inlt [=ilstart]
84 i, ltcl, & ! looping variable for species and light
85 threshold
86 REAL :: newborn, & ! # newborn trees in htcl=1 [=birthTo0]
87 inlt, & ! Index of light [=RealIndOfLight(..)]
88 lidep, ld, & ! light dependent growth [=lidep]
89 lih, allgerms, alldeps, ndeps, &
90 relNewB(1:70), &
91 maxseedlnr, estabFrac, seedlcrownarea
92 TYPE(currstateincell):: thiscell
93
94 ! <Here the SUBROUTINE starts>**********************************************************************
95 allgerms = 0.0
96 alldeps = 0.0
97 ndeps = 0.0
98
99 !----- seedlcrowndiamInCm = 10
100 estabfrac = stock
101 seedlcrownarea = 3.141592654*((seedlcrowndiamincm/2.0)*0.01)**2 ! convert to area (m2)
102
103 byspecies: do i = 1, nspc
104 ! if (thiscell%sp(i)%there ) then
105 !----- Determine in which light class the critical threshold for establishment of this species falls
106 inlt = (sqrt(spec(i)%lthres*real(maxlc*(maxlc + 1)) + 0.25) - 0.5)
107 ilstart = int(inlt)
108
109 !----- Determine the proportion of the stand in which light at the bottom is equal or brighter than this threshold
110 lidep = ltcum(ilstart + 1)
111
112 !----- If the seeds stem from dispersal, the newborn seedlings germinate from the seedBank, depending
113 !----- on light and other environment
114 if (dodispersal) then
115 !----- Here a test for a continuous light dependence function of germination
116 if (contlightdepgerm) then
117 lidep = 0.0
118 do ltcl = 1, maxlc
119 lih = ltval(ltcl)
120 threshold = spec(i)%klighs
121 call contlightdep(lih, threshold, ld) ! kind of an interpolation between different light classes
122 lidep = lidep + ld*ltfrq(ltcl)
123 end do
124 end if !------ contLightDepGerm
125
126 !----- If light dependence works on 0th height class, light dep. of germination is 1
127 thiscell%sp(i)%sb = thiscell%sp(i)%seedBank
128 !----- the newborns are calculated from the seedBank depending on environment, light , and germination rate
129 newborn = thiscell%sp(i)%seedBank*lidep*spec(i)%enveta*spec(i)%seedGerm
130
131 !----- seedbank dynamics: if wished seeds stay in the calcSeedBank depending on mortality and germination rates
132 if (calcseedbank) then !----- seedbank dynamics
133 thiscell%sp(i)%seedBank = (thiscell%sp(i)%seedBank - newborn)*spec(i)%seedSurv*(1.0 - spec(i)%seedLoss)
134 else
135 thiscell%sp(i)%seedBank = 0.0
136 end if
137 !----- newborns enter 0th height class (0-1.37 m)
138 !----- nur fuer freq test raus
139 !-----> thiscell%sp(i)numin(0,lat,lon)=thiscell%sp(i)numin(0,lat,lon)+newborn
140 relnewb(i) = newborn
141 allgerms = allgerms + newborn
142 alldeps = alldeps + lidep*spec(i)%enveta
143 ndeps = ndeps + 1.0
144 else !----- not idisp, i.e. constant seed inflow
145 !----- Otherwise, the newborn saplings germinate from a constant sapling pool (birth),
146 !----- depending on light and other environment...
147 newborn = spec(i)%birth*pltsiz*lidep*spec(i)%enveta/833.0
148
149! if (thiscell%sp(i)%there) then ! only in overall allowed region for constant seed supply
150! newborn = spec(i)%birth*pltsiz*lidep*spec(i)%enveta/833.0
151! else
152! newborn = 0.
153! end if
154
155 !----- ... and enter first height class (> 1.37 m)
156 thiscell%sp(i)%numin(1) = thiscell%sp(i)%numin(1) + newborn
157 thiscell%sp(i)%ingrowth = newborn
158 end if !----- doDispersal
159
160 end do byspecies
161
162 !----- frequency dependence, the available area - converted to total possible number of seedlings - is given to the species proportionally to their newborn numbers
163 if (dodispersal) then
164 if (allgerms > 0.0) then
165 maxseedlnr = pltsiz*estabfrac/seedlcrownarea
166 do i = 1, nspc
167 if (thiscell%sp(i)%numin(0) < 0) then
168 call logwarning("Negative seedlings in SUBROUTINE Regen!")
169 end if
170 !-----> thiscell%sp(i)%sb = allgerms * maxseedlnr / (allgerms + maxseedlnr) * (relNewB(i) / allgerms) ! only for output
171 thiscell%sp(i)%numin(0) = thiscell%sp(i)%numin(0) + &
172 allgerms*maxseedlnr/(allgerms + maxseedlnr)*(relnewb(i)/allgerms)
173 !-----> thiscell%sp(i)%sb = thiscell%sp(i)%numin(0 ) ! only for output
174 !-----> thiscell%sp(i)%sb = relNewB(i) ! only for output
175 end do !----- i=1,nspc
176 end if !----- (allgerms > 0.0)
177 end if !----- (doDispersal)
178
179end SUBROUTINE regen
180!****<Here the SUBROUTINE ends>********************************************************************
181
182!****<Here the SUBROUTINE ContinuousLightDepGerm starts>*******************************************
183!SUBROUTINE ContinuousLightDepGerm(threshold, lidep)
184
185! <CALL modules for TYPE definitions and +- fixed variables>---------------------------------------------------------------
186!use All_par, only: ltval, ltfrq, maxlc
187
188!IMPLICIT NONE
189
190! <Passed variables>--------------------------------------------------------------------------------
191!REAL, INTENT(in) :: threshold ! species specific threshold of light dependence
192!REAL, INTENT(out) :: lidep ! light dependence value (summed over all light classes)
193
194! <Local variables>---------------------------------------------------------------------------------
195!INTEGER :: ltcl
196!REAL :: ld,lih ! light dependent growth [=lidep]
197!
198! <Here the SUBROUTINE starts>**********************************************************************
199! lidep = 0.0
200! do ltcl=1,maxlc
201! lih = ltval(ltcl)
202! call ContLightDep (lih, threshold, ld)
203! lidep = lidep + ld * ltfrq(ltcl)
204! end do
205!
206! end SUBROUTINE ContinuousLightDepGerm
207!****<Here the SUBROUTINE ends>********************************************************************
208!done
subroutine contlightdep(light, shade_sens_class, lidep)
ContLightDep.
subroutine regen(nspc, stock, dodispersal, thiscell)
Regen: calculates regeneration.
Definition Regen.f90:65
real pltsiz
Definition All_par.f90:125
real, dimension(maxlc) ltval
Definition All_par.f90:370
real seedlcrowndiamincm
Definition All_par.f90:127
type(specproperties), dimension(maxspc) spec
Definition All_par.f90:345
logical calcseedbank
Definition All_par.f90:75
logical contlightdepgerm
Definition All_par.f90:91
integer, parameter maxlc
Definition All_par.f90:100
integer real
Definition All_par.f90:27
real, dimension(maxlc) ltfrq
Definition All_par.f90:367
real, dimension(maxlc) ltcum
Definition All_par.f90:368
LoggerModule.
subroutine logwarning(msg)
LogError