-
Notifications
You must be signed in to change notification settings - Fork 3
/
filtw.f
151 lines (141 loc) · 8.03 KB
/
filtw.f
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
subroutine filtw
!! ~ ~ ~ PURPOSE ~ ~ ~
!! this subroutine calculates the reduction of pollutants in surface runoff
!! due to an edge of field filter or buffer strip
!! ~ ~ ~ INCOMING VARIABLES ~ ~ ~
!! name |units |definition
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! bactrolp |# colonies/ha |less persistent bacteria transported to main
!! |channel with surface runoff
!! bactrop |# colonies/ha |persistent bacteria transported to main
!! |channel with surface runoff
!! bactsedlp |# colonies/ha |less persistent bacteria transported with
!! |sediment in surface runoff
!! bactsedp |# colonies/ha |persistent bacteria transported with
!! |sediment in surface runoff
!! curyr |none |current year of simulation
!! fsred(:) |none |reduction in bacteria loading from filter
!! |strip
!! hru_dafr(:) |none |fraction of watershed area in HRU
!! hrupest(:) |none |pesticide use flag:
!! | 0: no pesticides used in HRU
!! | 1: pesticides used in HRU
!! ihru |none |HRU number
!! npmx |none |number of different pesticides used in
!! |the simulation
!! nyskip |none |number of years to skip output summarization
!! |and printing
!! pst_sed(:,:)|kg/ha |pesticide loading from HRU sorbed onto
!! |sediment
!! pst_surq(:,:)|kg/ha |amount of pesticide type lost in surface
!! |runoff on current day in HRU
!! sbactrolp |# colonies/ha |average annual number of less persistent
!! |bacteria transported to main channel
!! |with surface runoff in solution
!! sbactrop |# colonies/ha |average annual number of persistent bacteria
!! |transported to main channel with surface
!! |runoff in solution
!! sbactsedlp |# colonies/ha |average annual number of less persistent
!! |bacteria transported with sediment in
!! |surface runoff
!! sbactsedp |# colonies/ha |average annual number of persistent bacteria
!! |transported with sediment in surface runoff
!! sedminpa(:) |kg P/ha |amount of active mineral phosphorus sorbed to
!! |sediment in surface runoff in HRU for day
!! sedminps(:) |kg P/ha |amount of stable mineral phosphorus sorbed to
!! |sediment in surface runoff in HRU for day
!! sedorgn(:) |kg N/ha |amount of organic nitrogen in surface runoff
!! |in HRU for the day
!! sedorgp(:) |kg P/ha |amount of organic phosphorus in surface runoff
!! |in HRU for the day
!! sedyld(:) |metric tons |daily soil loss caused by water erosion
!! surqno3(:) |kg N/ha |amount of NO3-N in surface runoff in HRU for
!! |the day
!! surqsolp(:) |kg P/ha |amount of soluble phosphorus in surface runoff
!! |in HRU for the day
!! trapeff(:) |none |filter strip trapping efficiency (used for
!! |everything but bacteria)
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! ~ ~ ~ OUTGOING VARIABLES ~ ~ ~
!! name |units |definition
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! bactrolp |# colonies/ha |less persistent bacteria transported to main
!! |channel with surface runoff
!! bactrop |# colonies/ha |persistent bacteria transported to main
!! |channel with surface runoff
!! bactsedlp |# colonies/ha |less persistent bacteria transported with
!! |sediment in surface runoff
!! bactsedp |# colonies/ha |persistent bacteria transported with
!! |sediment in surface runoff
!! pst_sed(:,:)|kg/ha |pesticide loading from HRU sorbed onto
!! |sediment
!! pst_surq(:,:)|kg/ha |amount of pesticide type lost in surface
!! |runoff on current day in HRU
!! sbactrolp |# colonies/ha |average annual number of less persistent
!! |bacteria transported to main channel
!! |with surface runoff in solution
!! sbactrop |# colonies/ha |average annual number of persistent bacteria
!! |transported to main channel with surface
!! |runoff in solution
!! sbactsedlp |# colonies/ha |average annual number of less persistent
!! |bacteria transported with sediment in
!! |surface runoff
!! sbactsedp |# colonies/ha |average annual number of persistent bacteria
!! |transported with sediment in surface runoff
!! sedminpa(:) |kg P/ha |amount of active mineral phosphorus sorbed to
!! |sediment in surface runoff in HRU for day
!! sedminps(:) |kg P/ha |amount of stable mineral phosphorus sorbed to
!! |sediment in surface runoff in HRU for day
!! sedorgn(:) |kg N/ha |amount of organic nitrogen in surface runoff
!! |in HRU for the day
!! sedorgp(:) |kg P/ha |amount of organic phosphorus in surface runoff
!! |in HRU for the day
!! sedyld(:) |metric tons |daily soil loss caused by water erosion
!! surqno3(:) |kg N/ha |amount of NO3-N in surface runoff in HRU for
!! |the day
!! surqsolp(:) |kg P/ha |amount of soluble phosphorus in surface runoff
!! |in HRU for the day
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! ~ ~ ~ LOCAL DEFINITIONS ~ ~ ~
!! name |units |definition
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! j |none |HRU number
!! k |none |counter
!! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
!! ~ ~ ~ ~ ~ ~ END SPECIFICATIONS ~ ~ ~ ~ ~ ~
use parm
integer :: j, k
j = 0
j = ihru
!! compute filter strip reduction
bactrop = bactrop * fsred(j)
bactrolp = bactrolp * fsred(j)
bactsedp = bactsedp * fsred(j)
bactsedlp = bactsedlp * fsred(j)
sedorgn(j) = sedorgn(j) * (1. - trapeff(j))
surqno3(j) = surqno3(j) * (1. - trapeff(j))
sedorgp(j) = sedorgp(j) * (1. - trapeff(j))
sedminpa(j) = sedminpa(j) * (1. - trapeff(j))
sedminps(j) = sedminps(j) * (1. - trapeff(j))
surqsolp(j) = surqsolp(j) * (1. - trapeff(j))
sedyld(j) = sedyld(j) * (1. - trapeff(j))
sanyld(j) = sanyld(j) * (1. - trapeff(j))
silyld(j) = silyld(j) * (1. - trapeff(j))
clayld(j) = clayld(j) * (1. - trapeff(j))
sagyld(j) = sagyld(j) * (1. - trapeff(j))
lagyld(j) = lagyld(j) * (1. - trapeff(j))
if (hrupest(j) == 1) then
do k = 1, npmx
pst_surq(k,j) = pst_surq(k,j) * (1. - trapeff(j))
pst_sed(k,j) = pst_sed(k,j) * (1. - trapeff(j))
end do
end if
!! summary calculations
if (curyr > nyskip) then
sbactrop = sbactrop + bactrop * hru_dafr(j)
sbactrolp = sbactrolp + bactrolp * hru_dafr(j)
sbactsedp = sbactsedp + bactsedp * hru_dafr(j)
sbactsedlp = sbactsedlp + bactsedlp * hru_dafr(j)
end if
return
end