forked from ARVE-Research/makesoil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsoilpropertiesmod.f90
113 lines (75 loc) · 2.45 KB
/
soilpropertiesmod.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
module soilpropertiesmod
use parametersmod, only : i1,sp
implicit none
type layerinfo
real(sp) :: zpos ! depth of layer midpoint from soil surface (cm)
real(sp) :: dz ! soil layer thickness (cm)
real(sp) :: sand ! mass fraction
real(sp) :: silt ! mass fraction
real(sp) :: clay ! mass fraction
real(sp) :: cfvo ! coarse fragment content (volume fraction)
real(sp) :: orgm ! organic matter content (mass fraction)
real(sp) :: bulk ! bulk density (g m-3)
real(sp) :: Tsat ! porosity (fraction)
real(sp) :: T33 ! water content at -33 KPa tension (fraction)
real(sp) :: T1500 ! water content at -1500 KPa tension (fraction)
real(sp) :: whc ! water holding capacity defined as -33 - -1500 KPa tension (fraction)
real(sp) :: Ksat ! saturated hydraulic conductivity (mm h-1)
end type layerinfo
type soildata
integer(i1) :: WRB ! WRB 2006 subgroup (code)
integer(i1) :: USDA ! WRB 2006 subgroup (code)
type(layerinfo), allocatable, dimension(:) :: layer
end type soildata
real(sp), parameter :: omcf = 1.724 ! conversion factor from organic carbon to organic matter
contains
! ---------------------------------------------------------------------------
subroutine soilproperties(soil)
use parametersmod, only : sp
use pedotransfermod, only : fDp,fDb,fTsat,fT33,fT1500,fKsat
implicit none
! argument
type(soildata), intent(inout) :: soil
! local variables
integer :: usda
real(sp) :: zpos
real(sp) :: sand
real(sp) :: clay
real(sp) :: orgm
real(sp) :: cfvo
real(sp) :: Db
real(sp) :: Dp
real(sp) :: Tsat
real(sp) :: T33
real(sp) :: T1500
real(sp) :: Ksat
integer :: nl
integer :: l
! ----------
nl = size(soil%layer)
usda = soil%usda
do l = 1,nl
zpos = soil%layer(l)%zpos
sand = soil%layer(l)%sand
clay = soil%layer(l)%clay
orgm = soil%layer(l)%orgm
cfvo = soil%layer(l)%cfvo
! ---
Dp = fDp(orgm,cfvo)
Db = fDb(usda,clay,cfvo,zpos,orgm,Dp)
Tsat = fTsat(Dp,Db)
T33 = fT33(Tsat,clay,sand,orgm)
T1500 = fT1500(T33,clay)
! Ksat = fKsat(Dp,Db,sand) * 10. ! convert to mm h-1
Ksat = fKsat(sand,clay,orgm,Db,Tsat,T33,T1500)
! ---
soil%layer(l)%bulk = Db
soil%layer(l)%Tsat = Tsat
soil%layer(l)%T33 = T33
soil%layer(l)%T1500 = T1500
soil%layer(l)%whc = T33 - T1500
soil%layer(l)%Ksat = Ksat
end do
end subroutine soilproperties
! ---------------------------------------------------------------------------
end module soilpropertiesmod