TreeMig Code
Loading...
Searching...
No Matches
Allometries.f90
Go to the documentation of this file.
1
!==============================================================================
2
!
3
! Module Allometries.f90!
4
! Remarks: contains the functions BiomassFromDBH, DBHFromHeight, LAFromDBH
5
!
6
!==============================================================================
7
8
!==============================================================================
23
!===============================================================
24
REAL
FUNCTION
biomassfromdbh
(dbh, tb, stn)
!,bm )
25
use
all_par
,
only
:
a1
,
a2
,
c1
26
27
IMPLICIT NONE
28
! Passed variables>--------------------------------------------------------------------------------
29
real
,
intent(in)
:: dbh
! tmp var to calculate diameters [=diam/nextDiam]
30
integer
,
intent(in)
:: tb, stn
! tree species types [=diam/nextDiam]
31
! real, intent(out) :: bm ! calculated biomas [=BioMassAtHeight(..)]
32
33
! Local variables>---------------------------------------------------------------------------------
34
real
:: bm
! calculated biomass [=BioMassAtHeight(..)]
35
real
:: lndiam, &
! tmp var to calculate LA [=rLnDiam]
36
stmvol
, &
! Stem volume [=stemvol]
37
stmwgt, &
! Stem weight [=stemW]
38
folwgt
! Foliage weight [=folW]
39
40
! Here the subroutine starts>**********************************************************************
41
if
(dbh .le. 0.0)
then
42
lndiam = 0.0
43
folwgt = 0.0
44
stmvol
= 0.0
45
else
46
lndiam = log(dbh*100.0)
47
folwgt =
c1
(tb) *
a1
(stn) * exp(lndiam *
a2
(stn))
48
stmvol
= 0.12*exp(lndiam*2.4)
49
end if
50
51
!NZ: if output should only be stem volume (timber harvesting), comment next 2 lines out
52
! and set bm = stmvol instead
53
stmwgt = 0.5*
stmvol
54
bm = stmwgt + folwgt
55
biomassfromdbh
= bm
56
return
57
end FUNCTION
biomassfromdbh
58
59
!==============================================================================
72
!===============================================================
73
REAL
FUNCTION
dbhfromheight
(height, birthheigth, maxheigth, maxdiam)
74
IMPLICIT NONE
75
REAL
,
intent(IN)
:: height,birthheigth, maxheigth, maxdiam
76
REAL
:: argmt
77
argmt = min(max(1.0 - ((height - birthheigth)/(real(maxheigth) - birthheigth)), 0.0), 1.0)
78
dbhfromheight
= maxdiam * (1.0 - sqrt(argmt)) + 0.0127
79
return
80
END FUNCTION
dbhfromheight
81
82
!==============================================================================
97
!===============================================================
98
REAL
FUNCTION
lafromdbh
(dbh, tb, stn)
99
Use
all_par
,
only
:
a1
,
a2
,
c2
100
IMPLICIT NONE
101
REAL
,
intent(IN)
:: dbh
102
INTEGER
,
intent(IN)
:: tb, stn
103
REAL
:: lndia
104
if
(dbh > 0.0)
then
105
lndia = log(dbh * 100.0)
106
else
107
lndia = 0
108
end if
109
lafromdbh
=
c2
(tb) *
a1
(stn) * exp( lndia *
a2
(stn) )
110
return
111
END FUNCTION
lafromdbh
112
!==============================================================================
dbhfromheight
real function dbhfromheight(height, birthheigth, maxheigth, maxdiam)
DBHFromHeight.
Definition
Allometries.f90:74
lafromdbh
real function lafromdbh(dbh, tb, stn)
LAFromDBH.
Definition
Allometries.f90:99
biomassfromdbh
real function biomassfromdbh(dbh, tb, stn)
BiomassFromDBH.
Definition
Allometries.f90:25
all_par
Definition
All_par.f90:20
all_par::a2
real, dimension(5) a2
Definition
All_par.f90:131
all_par::stmvol
real stmvol
Definition
All_par.f90:157
all_par::c1
real, dimension(2) c1
Definition
All_par.f90:132
all_par::a1
real, dimension(5) a1
Definition
All_par.f90:130
all_par::c2
real, dimension(2) c2
Definition
All_par.f90:133
sourceTMFFT
Allometries.f90
Generated on Wed Mar 27 2024 13:24:05 for TreeMig Code by
1.10.0