60SUBROUTINE lfcalc(nspc, heightcl, LAIsum, LAIsqsum, numin0)
69 INTEGER,
INTENT(in) :: heightcl, &
71 REAL,
INTENT(in) :: numin0(0:maxhc, 1:maxspc)
72 REAL,
INTENT(inout) :: LAIsqsum, &
89 byspecies:
do i = 1, nspc
91 ntinh = numin0(heightcl, i)
93 if (ntinh /= 0.0)
then
96 newla2 = ntinh*treelai**2
97 laisum = laisum + newla
98 laisqsum = laisqsum + newla2
107 if ((
facvar <= 0.0) .or. (laisqsum < 1.
e-7))
then
110 sigma = sqrt(laisqsum)*
facvar
115 if (abs(laisum) < 1.
e-10)
then
126 sum = sum + 1 -
value
127 call normdist(
value, laisum, sigma,
la(maxlc - 1))
132 byltcls1:
do lightcl = maxlc - 1, 2, -1
133 call normdist(
value, laisum, sigma,
la(lightcl - 1))
134 disbot(lightcl) =
value
135 ltfrq(lightcl) = disbot(lightcl) - distop
136 sum = sum +
ltfrq(lightcl)
137 distop = disbot(lightcl)
143 if (abs(sum) < 1.
e-20)
then
153 byltcls2:
do lightcl = maxlc - 1, 1, -1
subroutine lfcalc(nspc, heightcl, laisum, laisqsum, numin0)
Lfcalc: light distributions.
subroutine normdist(val, mu, s, x)
NormDist.
real, dimension(0:maxhc, maxlc) ltprf
type(specpropertiesincl), dimension(maxspc) speccl
character(len=:), allocatable e
real, dimension(maxlc) la
real, dimension(maxlc) ltfrq
real, dimension(maxlc) ltcum
integer, parameter maxspc