71 INTEGER,
INTENT(in) :: nspc
72 REAL,
INTENT(in) :: ddegs, &
102 tdep(i) =
max(0.0, 1.0 - exp((1.386/
spec(i)%kddmax)*(
spec(i)%kddmin - ddegs)))
104 drdep(i) = (
max(1.0 - drstr/
spec(i)%kdrt, 0.0)**0.5)
108 spec(i)%envdep = tdep(i)*drdep(i)*ndep(i)
111 do_etab:
do i = 1, nspc
112 env_etab:
if ((wtemp <
real(
spec(i)%kwit)) .OR. (ddegs <
real(
spec(i)%kddmin)))
then
118 brwetb = 1.0 - (
real(
spec(i)%kbrow - 1)*brwpr/30.0)
120 germdrdep =
max( 1.0 - germdrought /
spec(i)%kGermDrSens, 0.0) ** 0.5
122 spec(i)%enveta = envetb * brwetb * germdrdep
134 byspcs2:
do i = 1, nspc
135 byhtcls2:
do htcl =
spec(i)%maxhtc, 1, -1
136 envdpg =
spec(i)%envdep**0.333333
137 diams =
speccl(i)%diain(htcl)
138 truht =
speccl(i)%htmin(htcl)
140 alloc2 = -alloc1/2.0/
spec(i)%maxdhm
141 if (htcl <=
spec(i)%maxhtc)
then
142 grofac = (envdpg*
spec(i)%maxgro*diams*(1.0 - (truht/
real(
spec(i)%khmax))))/ &
143 (2.74 + (((3.0*alloc1) + (4.0*alloc2*diams))*diams))
148 hcgrow = (grofac*(alloc1 + (2.0*alloc2*diams)))
150 byltcls2:
do ltcl = 1,
maxlc
155 lidep =
speccl(i)%lightDepA(ltcl)
156 speccl(i)%envVitality(htcl, ltcl) = lidep*envdpg
157 speccl(i)%hlgro(htcl, ltcl) = lidep*hcgrow
158 speccl(i)%growthVitality(htcl, ltcl) = lidep*grofac
164 byltcls4:
do ltcl = 1,
maxlc
171 lidep =
speccl(i)%lightDepE(ltcl)
172 speccl(i)%envVitality(0, ltcl) = lidep*envdpg
174 speccl(i)%hlgro(0, ltcl) = lidep*hcgrow
175 speccl(i)%growthVitality(0, ltcl) = lidep*grofac
179 speccl(i)%envVitality(0, ltcl) =
speccl(i)%envVitality(1, ltcl)
180 speccl(i)%growthVitality(0, ltcl) =
speccl(i)%growthVitality(1, ltcl)
185 resthtcls2:
do htcl =
spec(i)%maxhtc + 1,
maxhc
186 byltcls3:
do ltcl = 1,
maxlc
187 speccl(i)%hlgro(htcl, ltcl) = 0.0
188 speccl(i)%envVitality(htcl, ltcl) = 0.0
189 speccl(i)%growthVitality(htcl, ltcl) = 0.0
224 INTEGER,
INTENT(in) :: shade_sens_class
225 REAL,
INTENT(in) :: light
226 REAL,
INTENT(out) :: lidep
229 REAL :: gl1, gl1old, &
237 contstep1 = eps*(1 - exp(-((light/0.05)**steepness)))
238 contstep9 = eps*(1 - exp(-((light/0.08)**steepness)))
239 gl1old = 1.0 - exp(-4.64*(light - 0.05))
240 gl1 = max(gl1old + eps, 0.0) + contstep1
241 gl9old = 2.24*(1.0 - exp(-1.136*(light - 0.08)))
242 gl9 = max(gl9old + eps, 0.0) + contstep9
243 lidep = (gl1 + ((shade_sens_class - 1.0)*(gl9 - gl1)/8.0))
244 if ((lidep < 0.0) .OR. (lidep > 2))
then
247 write (
logmessage,
"(9A8)")
"light",
"contstep1",
"contstep9",
"gl1old",
"gl9old",
"gl1",
"gl9",
"shade_sens_class",
"lidep"
249 write (
logmessage,
"(7F8.3,I8,F8.3)") light, contstep1, contstep9, gl1old, gl9old, gl1, gl9, shade_sens_class, lidep
253 lidep = max(lidep, 0.0)**0.333333
subroutine calccurrentdepfunctsincell(nspc, ddegs, wtemp, drstr, avnit, brwpr, germdrought)
CalcCurrentDepFunctsInCell