2 !This version of SSiB land-surface model includes a multi-layer snow scheme
3 !For better results, please use the SSiB vegetation map (geog_data_res in WPS)
4 !References for the SSiB:
5 !Xue et al. 1991, J. Climate, 4, 345-364.
6 !Sun and Xue, 2001, Adv. in Atmos. Sci, 18, 335-354.
7 !Xue et al., 2003, J. Geophy. Res. 108, D22, doi: 10.1029/2002JD003174.
8 !Coding by Fernando De Sales and Zhengxin Liu (2011)
10 REAL, PARAMETER :: CPAIR = 1004.6 &
11 ,STEFAN = 5.669 * 10E-9 &
15 ,TIMCON = PIE/86400. &
16 ,CLAI = 4.2 * 1000. * 0.2 &
17 ,CW = 4.2 * 1000. * 1000. &
21 ,SNOMEL = 370518.5 * 1000.
22 INTEGER, PARAMETER :: ITRUNK = 3
25 REAL, PARAMETER :: SSISNOW = 0.04 &
36 INTEGER, PARAMETER :: N = 3 &
40 !ssib vegetation parameters
41 REAL, DIMENSION (13,2,3,2) :: tran0,ref0
42 REAL, DIMENSION (13,12,2) :: green0,vcover0,zlt0
43 REAL, DIMENSION (13,2,3) :: rstpar0
44 REAL, DIMENSION (13,12) :: z000,d0,z20,z10,rdc0,rbc0
45 REAL, DIMENSION (13,3) :: depth0,soref0
46 REAL, DIMENSION (13,2) :: chil0,topt0,tl0,tu0,defac0,ph10,ph20,rootd0
47 REAL, DIMENSION (13) :: bee0,phsat0,poros0,satco0,slope0
50 0.5000000E-01, 0.5000000E-01, 0.5000000E-01, 0.5000000E-01, &
51 0.5000000E-01, 0.5000000E-01, 0.7000000E-01, 0.5000000E-01, &
52 0.5000000E-01, 0.5000000E-01, 0.1000000E-02, 0.5000000E-01, &
54 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
55 0.1000000E-02, 0.7000000E-01, 0.1000000E-02, 0.7000000E-01, &
56 0.1000000E-02, 0.7000000E-01, 0.1000000E-02, 0.7000000E-01, &
58 0.2500000E+00, 0.2500000E+00, 0.1500000E+00, 0.1000000E+00, &
59 0.1000000E+00, 0.2500000E+00, 0.2475000E+00, 0.2500000E+00, &
60 0.2500000E+00, 0.2500000E+00, 0.1000000E-02, 0.2500000E+00, &
62 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
63 0.1000000E-02, 0.2475000E+00, 0.1000000E-02, 0.2475000E+00, &
64 0.1000000E-02, 0.2475000E+00, 0.1000000E-02, 0.2475000E+00, &
66 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
67 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
68 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
70 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
71 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
72 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
74 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
75 0.1000000E-02, 0.1000000E-02, 0.2200000E+00, 0.1000000E-02, &
76 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
78 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
79 0.1000000E-02, 0.2200000E+00, 0.1000000E-02, 0.2200000E+00, &
80 0.1000000E-02, 0.2200000E+00, 0.1000000E-02, 0.2200000E+00, &
82 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
83 0.1000000E-02, 0.1000000E-02, 0.3750000E+00, 0.1000000E-02, &
84 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
86 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
87 0.1000000E-02, 0.3750000E+00, 0.1000000E-02, 0.3750000E+00, &
88 0.1000000E-02, 0.3750000E+00, 0.1000000E-02, 0.3750000E+00, &
90 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
91 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
92 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
94 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
95 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
96 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
99 0.1000000E+00, 0.1000000E+00, 0.7000000E-01, 0.7000000E-01, &
100 0.7000000E-01, 0.1000000E+00, 0.1050000E+00, 0.1000000E+00, &
101 0.1000000E+00, 0.1000000E+00, 0.1000000E-02, 0.1000000E+00, &
103 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
104 0.1000000E-02, 0.1050000E+00, 0.1000000E-02, 0.1050000E+00, &
105 0.1000000E-02, 0.1050000E+00, 0.1000000E-02, 0.1050000E+00, &
107 0.4500000E+00, 0.4500000E+00, 0.4000000E+00, 0.3500000E+00, &
108 0.3500000E+00, 0.4500000E+00, 0.5775000E+00, 0.4500000E+00, &
109 0.4500000E+00, 0.4500000E+00, 0.1000000E-02, 0.4500000E+00, &
111 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
112 0.1000000E-02, 0.5775000E+00, 0.1000000E-02, 0.5775000E+00, &
113 0.1000000E-02, 0.5775000E+00, 0.1000000E-02, 0.5775000E+00, &
115 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
116 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
117 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
119 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
120 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
121 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
123 0.1600000E+00, 0.1600000E+00, 0.1600000E+00, 0.1600000E+00, &
124 0.1600000E+00, 0.1600000E+00, 0.3600000E+00, 0.1600000E+00, &
125 0.1600000E+00, 0.1600000E+00, 0.1000000E-02, 0.1600000E+00, &
127 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
128 0.1000000E-02, 0.3600000E+00, 0.1000000E-02, 0.3600000E+00, &
129 0.1000000E-02, 0.3600000E+00, 0.1000000E-02, 0.3600000E+00, &
131 0.3900000E+00, 0.3900000E+00, 0.3900000E+00, 0.3900000E+00, &
132 0.3900000E+00, 0.3900000E+00, 0.5775000E+00, 0.3900000E+00, &
133 0.3900000E+00, 0.3900000E+00, 0.1000000E-02, 0.3900000E+00, &
135 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, 0.1000000E-02, &
136 0.1000000E-02, 0.5775000E+00, 0.1000000E-02, 0.5775000E+00, &
137 0.1000000E-02, 0.5775000E+00, 0.1000000E-02, 0.5775000E+00, &
139 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
140 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
141 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
143 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
144 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
145 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
148 0.9050000E+00, 0.2564000E-01, 0.8680600E+00, 0.9132400E+00, &
149 0.2475200E+00, 0.6319100E+00, 0.5681800E+00, 0.7978700E+00, &
150 0.8364300E+00, 0.4512600E+00, 0.1000000E-03, 0.2083300E+00, &
152 0.9050000E+00, 0.2564000E-01, 0.8717700E+00, 0.9170300E+00, &
153 0.2475200E+00, 0.6566600E+00, 0.6218900E+00, 0.5319100E+00, &
154 0.7172100E+00, 0.4512600E+00, 0.1000000E-03, 0.2083300E+00, &
156 0.9050000E+00, 0.4153800E+00, 0.8847300E+00, 0.9226600E+00, &
157 0.2475200E+00, 0.5176000E+00, 0.6637200E+00, 0.3623200E+00, &
158 0.2577300E+00, 0.4512600E+00, 0.1000000E-03, 0.4411800E+00, &
160 0.9050000E+00, 0.7594900E+00, 0.9061000E+00, 0.9247000E+00, &
161 0.6637200E+00, 0.6527400E+00, 0.6972100E+00, 0.5681800E+00, &
162 0.7246400E+00, 0.4512600E+00, 0.1000000E-03, 0.7594900E+00, &
164 0.9050000E+00, 0.8875700E+00, 0.9164200E+00, 0.9266400E+00, &
165 0.8104700E+00, 0.6527400E+00, 0.8104700E+00, 0.5681800E+00, &
166 0.1736100E+00, 0.4512600E+00, 0.1000000E-03, 0.8875700E+00, &
168 0.9050000E+00, 0.9252000E+00, 0.9259300E+00, 0.9045800E+00, &
169 0.8680600E+00, 0.7246400E+00, 0.9079900E+00, 0.5681800E+00, &
170 0.5681800E+00, 0.6218900E+00, 0.1000000E-03, 0.9252000E+00, &
172 0.9050000E+00, 0.8364300E+00, 0.9293700E+00, 0.9021600E+00, &
173 0.6040900E+00, 0.8712500E+00, 0.8132000E+00, 0.5681800E+00, &
174 0.5681800E+00, 0.9200800E+00, 0.1000000E-03, 0.8364300E+00, &
176 0.9050000E+00, 0.6967200E+00, 0.8209400E+00, 0.9126500E+00, &
177 0.5854000E+00, 0.7966000E+00, 0.3943200E+00, 0.8680600E+00, &
178 0.7246400E+00, 0.6970300E+00, 0.1000000E-03, 0.6967200E+00, &
180 0.9050000E+00, 0.3306900E+00, 0.7123000E+00, 0.8982800E+00, &
181 0.4990000E+00, 0.7654600E+00, 0.4434600E+00, 0.6505600E+00, &
182 0.8403400E+00, 0.7567000E-01, 0.1000000E-03, 0.3439200E+00, &
184 0.9050000E+00, 0.1656400E+00, 0.6145700E+00, 0.8548200E+00, &
185 0.3834400E+00, 0.6146100E+00, 0.5434800E+00, 0.5154600E+00, &
186 0.8680600E+00, 0.4512600E+00, 0.1000000E-03, 0.1785700E+00, &
188 0.9050000E+00, 0.1538000E-01, 0.8599500E+00, 0.8733600E+00, &
189 0.2487600E+00, 0.5086500E+00, 0.5531000E+00, 0.6302500E+00, &
190 0.8875700E+00, 0.4512600E+00, 0.1000000E-03, 0.1470600E+00, &
192 0.9050000E+00, 0.2564000E-01, 0.8599500E+00, 0.9132400E+00, &
193 0.1984100E+00, 0.7898900E+00, 0.4975100E+00, 0.7978700E+00, &
194 0.9132400E+00, 0.4512600E+00, 0.1000000E-03, 0.2083300E+00, &
196 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
197 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
198 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
200 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
201 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
202 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
204 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
205 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
206 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
208 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
209 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
210 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
212 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
213 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
214 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
216 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
217 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
218 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
220 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
221 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
222 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
224 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
225 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
226 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
228 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
229 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
230 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
232 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
233 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
234 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
236 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
237 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
238 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
240 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
241 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
242 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
245 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
246 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
247 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
249 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
250 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
251 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
253 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
254 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
255 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
257 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
258 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
259 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
261 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
262 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
263 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
265 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
266 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
267 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
269 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
270 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
271 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
273 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
274 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
275 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
277 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
278 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
279 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
281 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
282 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
283 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
285 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
286 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
287 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
289 0.9800000E+00, 0.7500000E+00, 0.7500000E+00, 0.7500000E+00, &
290 0.5000000E+00, 0.3000000E+00, 0.9000000E+00, 0.1000000E+00, &
291 0.1000000E+00, 0.3000000E+00, 0.1000000E-04, 0.7500000E-01, &
293 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
294 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
295 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
297 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
298 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
299 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
301 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
302 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
303 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
305 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
306 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
307 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
309 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
310 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
311 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
313 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
314 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
315 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
317 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
318 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
319 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
321 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
322 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
323 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
325 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
326 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
327 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
329 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
330 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
331 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
333 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
334 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
335 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
337 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
338 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
339 0.1000000E-03, 0.1000000E-03, 0.1000000E-04, 0.1000000E-03, &
342 0.1000000E+00, 0.2500000E+00, 0.1300000E+00, 0.1000000E-01, &
343 0.1000000E-01, 0.1000000E-01, -0.3000000E+00, 0.1000000E-01, &
344 0.1000000E-01, 0.2000000E+00, 0.1000000E-01, -0.2000000E-01, &
346 0.1000000E+00, 0.2500000E+00, 0.1300000E+00, 0.1000000E-01, &
347 0.1000000E-01, -0.3000000E+00, -0.3000000E+00, -0.3000000E+00, &
348 0.1000000E-01, 0.2000000E+00, 0.1000000E-01, -0.2000000E-01, &
351 0.2335900E+04, 0.9802230E+04, 0.6335955E+04, 0.2869680E+04, &
352 0.2869680E+04, 0.5665121E+05, 0.2582010E+04, 0.9398942E+05, &
353 0.9398942E+05, 0.9802230E+04, 0.1000000E+04, 0.7459000E+04, &
355 0.2335900E+04, 0.9802230E+04, 0.6335955E+04, 0.2869680E+04, &
356 0.2869680E+04, 0.2582010E+04, 0.2582010E+04, 0.2582010E+04, &
357 0.1000000E+01, 0.2582010E+04, 0.1000000E+04, 0.7459000E+04, &
359 0.1450000E-01, 0.1055000E+02, 0.7120000E+01, 0.3690000E+01, &
360 0.3690000E+01, 0.1083000E+02, 0.1090000E+01, 0.1000000E-01, &
361 0.1000000E-01, 0.1055000E+02, 0.1000000E+04, 0.5700000E+01, &
363 0.1450000E-01, 0.1055000E+02, 0.7120000E+01, 0.3690000E+01, &
364 0.3690000E+01, 0.1090000E+01, 0.1090000E+01, 0.1090000E+01, &
365 0.1000000E+01, 0.1090000E+01, 0.1000000E+04, 0.5700000E+01, &
367 0.1534900E+03, 0.1800000E+03, 0.2065000E+03, 0.2330000E+03, &
368 0.2330000E+03, 0.1650000E+03, 0.1100000E+03, 0.8550000E+03, &
369 0.8550000E+03, 0.1800000E+03, 0.1000000E+04, 0.2520000E+02, &
371 0.1534900E+03, 0.1800000E+03, 0.2065000E+03, 0.2330000E+03, &
372 0.2330000E+03, 0.1100000E+03, 0.1100000E+03, 0.1100000E+03, &
373 0.1000000E+01, 0.1100000E+03, 0.1000000E+04, 0.2520000E+02, &
376 0.3030000E+03, 0.3000000E+03, 0.2940000E+03, 0.2880000E+03, &
377 0.2880000E+03, 0.2970000E+03, 0.3130000E+03, 0.3150000E+03, &
378 0.3150000E+03, 0.3000000E+03, 0.3100000E+03, 0.3000000E+03, &
380 0.3030000E+03, 0.3000000E+03, 0.2940000E+03, 0.2880000E+03, &
381 0.2880000E+03, 0.3120000E+03, 0.3130000E+03, 0.3130000E+03, &
382 0.3150000E+03, 0.2890000E+03, 0.3100000E+03, 0.3000000E+03, &
385 0.2730000E+03, 0.2730000E+03, 0.2700000E+03, 0.2680000E+03, &
386 0.2680000E+03, 0.2730000E+03, 0.2830000E+03, 0.2830000E+03, &
387 0.2830000E+03, 0.2730000E+03, 0.3000000E+03, 0.2730000E+03, &
389 0.2730000E+03, 0.2730000E+03, 0.2700000E+03, 0.2680000E+03, &
390 0.2680000E+03, 0.2730000E+03, 0.2830000E+03, 0.2830000E+03, &
391 0.2830000E+03, 0.2730000E+03, 0.3000000E+03, 0.2730000E+03, &
394 0.3180000E+03, 0.3180000E+03, 0.3150000E+03, 0.3130000E+03, &
395 0.3130000E+03, 0.3230000E+03, 0.3280000E+03, 0.3230000E+03, &
396 0.3230000E+03, 0.3230000E+03, 0.3200000E+03, 0.3180000E+03, &
398 0.3180000E+03, 0.3180000E+03, 0.3150000E+03, 0.3130000E+03, &
399 0.3130000E+03, 0.3230000E+03, 0.3280000E+03, 0.3280000E+03, &
400 0.3230000E+03, 0.3090000E+03, 0.3200000E+03, 0.3150000E+03, &
403 0.2730000E-01, 0.3570000E-01, 0.3400000E-01, 0.3100000E-01, &
404 0.3100000E-01, 0.3570000E-01, 0.2380000E-01, 0.2750000E-01, &
405 0.2750000E-01, 0.2750000E-01, 0.0000000E+00, 0.0000000E+00, &
407 0.2730000E-01, 0.3570000E-01, 0.3400000E-01, 0.3100000E-01, &
408 0.3100000E-01, 0.2380000E-01, 0.2380000E-01, 0.2380000E-01, &
409 0.2380000E-01, 0.2380000E-01, 0.0000000E+00, 0.0000000E+00, &
412 0.1200000E+01, 0.5350000E+01, 0.1920000E+01, 0.3700000E+01, &
413 0.7800000E+01, 0.1800000E+01, 0.1730000E+01, 0.1920000E+01, &
414 0.1390000E+01, 0.9600000E+00, 0.3000000E+01, 0.1800000E+01, &
416 0.1200000E+01, 0.5350000E+01, 0.1920000E+01, 0.3700000E+01, &
417 0.7800000E+01, 0.1800000E+01, 0.1730000E+01, 0.1920000E+01, &
418 0.1390000E+01, 0.9600000E+00, 0.3000000E+01, 0.1800000E+01, &
421 0.6250000E+01, 0.5570000E+01, 0.5730000E+01, 0.5530000E+01, &
422 0.5660000E+01, 0.5670000E+01, 0.5800000E+01, 0.5610000E+01, &
423 0.6370000E+01, 0.5370000E+01, 0.6000000E+01, 0.5670000E+01, &
425 0.6250000E+01, 0.5570000E+01, 0.5730000E+01, 0.5530000E+01, &
426 0.5660000E+01, 0.5670000E+01, 0.5800000E+01, 0.5610000E+01, &
427 0.6370000E+01, 0.5370000E+01, 0.6000000E+01, 0.5670000E+01, &
430 0.5014160E+01, 0.3900000E+00, 0.3456000E+01, 0.6570000E+01, &
431 0.4040000E+00, 0.1766000E+01, 0.7040000E+00, 0.5780000E+00, &
432 0.1076000E+01, 0.3776000E+00, 0.1000000E-03, 0.4800000E-01, &
434 0.5014160E+01, 0.3900000E+00, 0.3556000E+01, 0.6870000E+01, &
435 0.4040000E+00, 0.1546000E+01, 0.8040000E+00, 0.5780000E+00, &
436 0.9760000E+00, 0.3776000E+00, 0.1000000E-03, 0.4800000E-01, &
438 0.5014160E+01, 0.6500000E+00, 0.3956000E+01, 0.7370000E+01, &
439 0.4040000E+00, 0.1416000E+01, 0.9040000E+00, 0.4480000E+00, &
440 0.7760000E+00, 0.3776000E+00, 0.1000000E-03, 0.6800000E-01, &
442 0.5014160E+01, 0.1580000E+01, 0.4856000E+01, 0.7570000E+01, &
443 0.9040000E+00, 0.1216000E+01, 0.1004000E+01, 0.2880000E+00, &
444 0.2760000E+00, 0.3776000E+00, 0.1000000E-03, 0.1580000E+00, &
446 0.5014160E+01, 0.3380000E+01, 0.5456000E+01, 0.7770000E+01, &
447 0.1604000E+01, 0.1186000E+01, 0.1604000E+01, 0.2580000E+00, &
448 0.5760000E+00, 0.3776000E+00, 0.1000000E-03, 0.3380000E+00, &
450 0.5014160E+01, 0.5080000E+01, 0.6156000E+01, 0.8070000E+01, &
451 0.2304000E+01, 0.1416000E+01, 0.3304000E+01, 0.2580000E+00, &
452 0.1760000E+00, 0.5076000E+00, 0.1000000E-03, 0.5080000E+00, &
454 0.5014160E+01, 0.5380000E+01, 0.6456000E+01, 0.7870000E+01, &
455 0.4304000E+01, 0.2606000E+01, 0.4304000E+01, 0.2580000E+00, &
456 0.1760000E+00, 0.1737600E+01, 0.1000000E-03, 0.5380000E+00, &
458 0.5014160E+01, 0.4880000E+01, 0.6456000E+01, 0.7670000E+01, &
459 0.2904000E+01, 0.5206000E+01, 0.3804000E+01, 0.8080000E+00, &
460 0.2760000E+00, 0.1937600E+01, 0.1000000E-03, 0.4880000E+00, &
462 0.5014160E+01, 0.3780000E+01, 0.5756000E+01, 0.7570000E+01, &
463 0.2004000E+01, 0.4556000E+01, 0.1804000E+01, 0.1508000E+01, &
464 0.4760000E+00, 0.1477600E+01, 0.1000000E-03, 0.3780000E+00, &
466 0.5014160E+01, 0.1630000E+01, 0.4556000E+01, 0.7370000E+01, &
467 0.1304000E+01, 0.3816000E+01, 0.1104000E+01, 0.1148000E+01, &
468 0.5760000E+00, 0.3776000E+00, 0.1000000E-03, 0.1680000E+00, &
470 0.5014160E+01, 0.6500000E+00, 0.3256000E+01, 0.6870000E+01, &
471 0.8040000E+00, 0.2806000E+01, 0.9040000E+00, 0.7480000E+00, &
472 0.6760000E+00, 0.3776000E+00, 0.1000000E-03, 0.6800000E-01, &
474 0.5014160E+01, 0.3900000E+00, 0.3256000E+01, 0.6570000E+01, &
475 0.5040000E+00, 0.1866000E+01, 0.8040000E+00, 0.5780000E+00, &
476 0.8760000E+00, 0.3776000E+00, 0.1000000E-03, 0.4800000E-01, &
478 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
479 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
480 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
482 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
483 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
484 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
486 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
487 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
488 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
490 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
491 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
492 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
494 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
495 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
496 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
498 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
499 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
500 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
502 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
503 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
504 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
506 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
507 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
508 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
510 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
511 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
512 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
514 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
515 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
516 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
518 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
519 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
520 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
522 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
523 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
524 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, 0.1000000E-03, &
527 0.2652970E+01, 0.5201000E+00, 0.5706300E+00, 0.1112210E+01, &
528 0.6414000E+00, 0.8427100E+00, 0.7771000E-01, 0.2446700E+00, &
529 0.6559000E-01, 0.7524000E-01, 0.1118000E-01, 0.1448500E+00, &
531 0.2652970E+01, 0.5201000E+00, 0.5696600E+00, 0.1102780E+01, &
532 0.6414000E+00, 0.8087800E+00, 0.7779000E-01, 0.2446700E+00, &
533 0.6549000E-01, 0.7524000E-01, 0.1118000E-01, 0.1448500E+00, &
535 0.2652970E+01, 0.6664900E+00, 0.5656600E+00, 0.1087660E+01, &
536 0.6414000E+00, 0.7875000E+00, 0.7785000E-01, 0.2272100E+00, &
537 0.6521000E-01, 0.7524000E-01, 0.1118000E-01, 0.1752100E+00, &
539 0.2652970E+01, 0.9105300E+00, 0.5654400E+00, 0.1081830E+01, &
540 0.8633500E+00, 0.7284100E+00, 0.7788000E-01, 0.1998800E+00, &
541 0.6360000E-01, 0.7524000E-01, 0.1118000E-01, 0.2871900E+00, &
543 0.2652970E+01, 0.1031200E+01, 0.5592300E+00, 0.1076120E+01, &
544 0.9728300E+00, 0.7284100E+00, 0.7779000E-01, 0.1998800E+00, &
545 0.6480000E-01, 0.7524000E-01, 0.1118000E-01, 0.4302000E+00, &
547 0.2652970E+01, 0.1043680E+01, 0.5524400E+00, 0.1067790E+01, &
548 0.1005600E+01, 0.7875000E+00, 0.7712000E-01, 0.1998800E+00, &
549 0.6331000E-01, 0.7575000E-01, 0.1118000E-01, 0.5087600E+00, &
551 0.2652970E+01, 0.1041940E+01, 0.5497000E+00, 0.1073310E+01, &
552 0.9967700E+00, 0.9266800E+00, 0.7594000E-01, 0.1998800E+00, &
553 0.6331000E-01, 0.7767000E-01, 0.1118000E-01, 0.5200300E+00, &
555 0.2652970E+01, 0.1037530E+01, 0.5497000E+00, 0.1078960E+01, &
556 0.1011190E+01, 0.9715300E+00, 0.7658000E-01, 0.2674000E+00, &
557 0.6360000E-01, 0.7782000E-01, 0.1118000E-01, 0.5009500E+00, &
559 0.2652970E+01, 0.1036510E+01, 0.5562600E+00, 0.1081830E+01, &
560 0.9965000E+00, 0.9658800E+00, 0.7776000E-01, 0.2923300E+00, &
561 0.6446000E-01, 0.7745000E-01, 0.1118000E-01, 0.4503800E+00, &
563 0.2652970E+01, 0.9170700E+00, 0.5686600E+00, 0.1087660E+01, &
564 0.9386100E+00, 0.9555100E+00, 0.7790000E-01, 0.2803400E+00, &
565 0.6480000E-01, 0.7524000E-01, 0.1118000E-01, 0.2973700E+00, &
567 0.2652970E+01, 0.6664900E+00, 0.5725100E+00, 0.1102780E+01, &
568 0.8346400E+00, 0.9204000E+00, 0.7785000E-01, 0.2580600E+00, &
569 0.6510000E-01, 0.7524000E-01, 0.1118000E-01, 0.1752100E+00, &
571 0.2652970E+01, 0.5201000E+00, 0.5725100E+00, 0.1112210E+01, &
572 0.7049800E+00, 0.8427100E+00, 0.7779000E-01, 0.2446700E+00, &
573 0.6537000E-01, 0.7524000E-01, 0.1118000E-01, 0.1448500E+00, &
576 0.2737261E+02, 0.1366377E+02, 0.1813464E+02, 0.1376361E+02, &
577 0.9193320E+01, 0.1390777E+02, 0.2185200E+00, 0.2812600E+01, &
578 0.1638000E+00, 0.1062900E+00, 0.6000000E-04, 0.6314240E+01, &
580 0.2737261E+02, 0.1366377E+02, 0.1814677E+02, 0.1380041E+02, &
581 0.9193320E+01, 0.1376090E+02, 0.2265800E+00, 0.2812600E+01, &
582 0.1548100E+00, 0.1062900E+00, 0.6000000E-04, 0.6314240E+01, &
584 0.2737261E+02, 0.1461883E+02, 0.1819051E+02, 0.1385740E+02, &
585 0.9193320E+01, 0.1367074E+02, 0.2332800E+00, 0.2662290E+01, &
586 0.1343400E+00, 0.1062900E+00, 0.6000000E-04, 0.7639520E+01, &
588 0.2737261E+02, 0.1569677E+02, 0.1825890E+02, 0.1387880E+02, &
589 0.9903400E+01, 0.1344527E+02, 0.2389500E+00, 0.2390910E+01, &
590 0.6191000E-01, 0.1062900E+00, 0.6000000E-04, 0.1070958E+02, &
592 0.2737261E+02, 0.1632865E+02, 0.1829956E+02, 0.1389946E+02, &
593 0.1030010E+02, 0.1344527E+02, 0.2605400E+00, 0.2390910E+01, &
594 0.1096800E+00, 0.1062900E+00, 0.6000000E-04, 0.1278272E+02, &
596 0.2737261E+02, 0.1662263E+02, 0.1833903E+02, 0.1392915E+02, &
597 0.1053455E+02, 0.1367074E+02, 0.2988000E+00, 0.2390910E+01, &
598 0.5103000E-01, 0.1229900E+00, 0.6000000E-04, 0.1356813E+02, &
600 0.2737261E+02, 0.1666297E+02, 0.1835387E+02, 0.1390953E+02, &
601 0.1091967E+02, 0.1425275E+02, 0.3251800E+00, 0.2390910E+01, &
602 0.5103000E-01, 0.2152100E+00, 0.6000000E-04, 0.1366182E+02, &
604 0.2737261E+02, 0.1660123E+02, 0.1835387E+02, 0.1388922E+02, &
605 0.1068047E+02, 0.1459719E+02, 0.3130700E+00, 0.2974600E+01, &
606 0.6191000E-01, 0.2289700E+00, 0.6000000E-04, 0.1349985E+02, &
608 0.2737261E+02, 0.1641343E+02, 0.1831739E+02, 0.1387880E+02, &
609 0.1044517E+02, 0.1452246E+02, 0.2649800E+00, 0.3137710E+01, &
610 0.9547000E-01, 0.1996100E+00, 0.6000000E-04, 0.1301951E+02, &
612 0.2737261E+02, 0.1572679E+02, 0.1823553E+02, 0.1385740E+02, &
613 0.1016423E+02, 0.1443002E+02, 0.2438100E+00, 0.3062460E+01, &
614 0.1096800E+00, 0.1062900E+00, 0.6000000E-04, 0.1090759E+02, &
616 0.2737261E+02, 0.1461883E+02, 0.1810866E+02, 0.1380041E+02, &
617 0.9814290E+01, 0.1422050E+02, 0.2332800E+00, 0.2907360E+01, &
618 0.1225000E+00, 0.1062900E+00, 0.6000000E-04, 0.7639520E+01, &
620 0.2737261E+02, 0.1366377E+02, 0.1810866E+02, 0.1376361E+02, &
621 0.9417390E+01, 0.1390777E+02, 0.2265800E+00, 0.2812600E+01, &
622 0.1450200E+00, 0.1062900E+00, 0.6000000E-04, 0.6314240E+01, &
625 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
626 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
627 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
629 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
630 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
631 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
633 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
634 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
635 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
637 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
638 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
639 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
641 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
642 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
643 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
645 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
646 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
647 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
649 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
650 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
651 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
653 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
654 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
655 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
657 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
658 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
659 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
661 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
662 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
663 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
665 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
666 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
667 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
669 0.1000000E+01, 0.1150000E+02, 0.1600000E+02, 0.8500000E+01, &
670 0.7000000E+01, 0.1000000E+02, 0.1000000E+00, 0.2000000E+01, &
671 0.1000000E+00, 0.1000000E+00, 0.1000000E-01, 0.1150000E+02, &
674 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
675 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
676 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
678 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
679 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
680 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
682 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
683 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
684 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
686 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
687 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
688 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
690 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
691 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
692 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
694 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
695 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
696 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
698 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
699 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
700 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
702 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
703 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
704 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
706 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
707 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
708 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
710 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
711 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
712 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
714 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
715 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
716 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
718 0.3500000E+02, 0.2000000E+02, 0.2000000E+02, 0.1700000E+02, &
719 0.1400000E+02, 0.1800000E+02, 0.6000000E+00, 0.5000000E+01, &
720 0.5000000E+00, 0.6000000E+00, 0.1000000E+00, 0.2000000E+02, &
723 0.2858700E+03, 0.2113200E+03, 0.2985200E+03, 0.5654100E+03, &
724 0.1852000E+03, 0.2301300E+03, 0.2443000E+02, 0.1036000E+03, &
725 0.2311000E+02, 0.2286000E+02, 0.2376000E+02, 0.1949000E+03, &
727 0.2858700E+03, 0.2113200E+03, 0.3013500E+03, 0.5870500E+03, &
728 0.1852000E+03, 0.2244200E+03, 0.2463000E+02, 0.1036000E+03, &
729 0.2294000E+02, 0.2286000E+02, 0.2376000E+02, 0.1949000E+03, &
731 0.2858700E+03, 0.2187800E+03, 0.3124600E+03, 0.6234600E+03, &
732 0.1852000E+03, 0.2215700E+03, 0.2480000E+02, 0.1023500E+03, &
733 0.2262000E+02, 0.2286000E+02, 0.2376000E+02, 0.1964400E+03, &
735 0.2858700E+03, 0.2434000E+03, 0.3312300E+03, 0.6381300E+03, &
736 0.2048700E+03, 0.2164100E+03, 0.2496000E+02, 0.1007200E+03, &
737 0.2189000E+02, 0.2286000E+02, 0.2376000E+02, 0.2014400E+03, &
739 0.2858700E+03, 0.2948700E+03, 0.3458300E+03, 0.6528600E+03, &
740 0.2330100E+03, 0.2164100E+03, 0.2572000E+02, 0.1007200E+03, &
741 0.2230000E+02, 0.2286000E+02, 0.2376000E+02, 0.2071300E+03, &
743 0.2858700E+03, 0.3459000E+03, 0.3619400E+03, 0.6750500E+03, &
744 0.2620800E+03, 0.2215700E+03, 0.2774000E+02, 0.1007200E+03, &
745 0.2182000E+02, 0.2301000E+02, 0.2376000E+02, 0.2107900E+03, &
747 0.2858700E+03, 0.3551800E+03, 0.3685400E+03, 0.6602400E+03, &
748 0.3443100E+03, 0.2500700E+03, 0.3006000E+02, 0.1007200E+03, &
749 0.2182000E+02, 0.2436000E+02, 0.2376000E+02, 0.2113100E+03, &
751 0.2858700E+03, 0.3418400E+03, 0.3685400E+03, 0.6454900E+03, &
752 0.2870900E+03, 0.2885700E+03, 0.2886000E+02, 0.1053000E+03, &
753 0.2189000E+02, 0.2469000E+02, 0.2376000E+02, 0.2104200E+03, &
755 0.2858700E+03, 0.3072200E+03, 0.3528500E+03, 0.6381300E+03, &
756 0.2495800E+03, 0.2780300E+03, 0.2590000E+02, 0.1079400E+03, &
757 0.2216000E+02, 0.2404000E+02, 0.2376000E+02, 0.2081500E+03, &
759 0.2858700E+03, 0.2448400E+03, 0.3236500E+03, 0.6231300E+03, &
760 0.2211200E+03, 0.2668400E+03, 0.2511000E+02, 0.1065900E+03, &
761 0.2230000E+02, 0.2286000E+02, 0.2376000E+02, 0.2018800E+03, &
763 0.2858700E+03, 0.2187800E+03, 0.2927900E+03, 0.5870500E+03, &
764 0.2008900E+03, 0.2475700E+03, 0.2480000E+02, 0.1044900E+03, &
765 0.2244000E+02, 0.2286000E+02, 0.2376000E+02, 0.1964400E+03, &
767 0.2858700E+03, 0.2113200E+03, 0.2927900E+03, 0.5654100E+03, &
768 0.1892600E+03, 0.2301300E+03, 0.2464000E+02, 0.1036000E+03, &
769 0.2277000E+02, 0.2286000E+02, 0.2376000E+02, 0.1949000E+03, &
772 0.5430000E+01, 0.6936000E+02, 0.8590000E+01, 0.8800000E+00, &
773 0.7850000E+01, 0.2661000E+02, 0.2207000E+02, 0.2188000E+02, &
774 0.1761000E+02, 0.4351000E+02, 0.3592951E+05, 0.5600000E+03, &
776 0.5430000E+01, 0.6936000E+02, 0.8450000E+01, 0.8600000E+00, &
777 0.7850000E+01, 0.3044000E+02, 0.2053000E+02, 0.2188000E+02, &
778 0.1942000E+02, 0.4351000E+02, 0.3592951E+05, 0.5600000E+03, &
780 0.5430000E+01, 0.4257000E+02, 0.7980000E+01, 0.8400000E+00, &
781 0.7850000E+01, 0.3295000E+02, 0.1934000E+02, 0.2673000E+02, &
782 0.2446000E+02, 0.4351000E+02, 0.3592951E+05, 0.4019700E+03, &
784 0.5430000E+01, 0.1897000E+02, 0.7180000E+01, 0.8300000E+00, &
785 0.3810000E+01, 0.4003000E+02, 0.1838000E+02, 0.3712000E+02, &
786 0.6928000E+02, 0.4351000E+02, 0.3592951E+05, 0.1855200E+03, &
788 0.5430000E+01, 0.1035000E+02, 0.6810000E+01, 0.8200000E+00, &
789 0.2400000E+01, 0.4003000E+02, 0.1516000E+02, 0.3712000E+02, &
790 0.3303000E+02, 0.4351000E+02, 0.3592951E+05, 0.9801000E+02, &
792 0.5430000E+01, 0.7880000E+01, 0.6480000E+01, 0.8100000E+00, &
793 0.1860000E+01, 0.3295000E+02, 0.1068000E+02, 0.3712000E+02, &
794 0.8702000E+02, 0.3568000E+02, 0.3592951E+05, 0.7224000E+02, &
796 0.5430000E+01, 0.7610000E+01, 0.6360000E+01, 0.8200000E+00, &
797 0.1290000E+01, 0.1870000E+02, 0.8300000E+01, 0.3712000E+02, &
798 0.8702000E+02, 0.1449000E+02, 0.3592951E+05, 0.6938000E+02, &
800 0.5430000E+01, 0.8090000E+01, 0.6360000E+01, 0.8300000E+00, &
801 0.1600000E+01, 0.1318000E+02, 0.9330000E+01, 0.1722000E+02, &
802 0.6928000E+02, 0.1281000E+02, 0.3592951E+05, 0.7434000E+02, &
804 0.5430000E+01, 0.9570000E+01, 0.6660000E+01, 0.8300000E+00, &
805 0.2040000E+01, 0.1420000E+02, 0.1457000E+02, 0.1317000E+02, &
806 0.4003000E+02, 0.1669000E+02, 0.3592951E+05, 0.8988000E+02, &
808 0.5430000E+01, 0.1847000E+02, 0.7400000E+01, 0.8400000E+00, &
809 0.2820000E+01, 0.1559000E+02, 0.1760000E+02, 0.1497000E+02, &
810 0.3303000E+02, 0.4351000E+02, 0.3592951E+05, 0.1757600E+03, &
812 0.5430000E+01, 0.4257000E+02, 0.8880000E+01, 0.8600000E+00, &
813 0.4210000E+01, 0.1933000E+02, 0.1934000E+02, 0.1906000E+02, &
814 0.2810000E+02, 0.4351000E+02, 0.3592951E+05, 0.4019700E+03, &
816 0.5430000E+01, 0.6936000E+02, 0.8880000E+01, 0.8800000E+00, &
817 0.6400000E+01, 0.2661000E+02, 0.2053000E+02, 0.2188000E+02, &
818 0.2165000E+02, 0.4351000E+02, 0.3592951E+05, 0.5600000E+03, &
821 0.1000000E+01, 0.1000000E+01, 0.1000000E+01, 0.5000000E+00, &
822 0.5000000E+00, 0.5000000E+00, 0.5000000E+00, 0.5000000E+00, &
823 0.5000000E+00, 0.2000000E+00, 0.1000000E+00, 0.1000000E+01, &
825 0.1000000E+01, 0.1000000E+01, 0.1000000E+01, 0.5000000E+00, &
826 0.5000000E+00, 0.5000000E+00, 0.5000000E+00, 0.5000000E+00, &
827 0.5000000E+00, 0.2000000E+00, 0.1000000E+00, 0.1000000E+01, &
830 0.1100000E+00, 0.1100000E+00, 0.1100000E+00, 0.1100000E+00, &
831 0.1100000E+00, 0.1100000E+00, 0.1000000E+00, 0.1000000E+00, &
832 0.3000000E+00, 0.1000000E+00, 0.3000000E+00, 0.1000000E+00, &
834 0.2250000E+00, 0.2250000E+00, 0.2250000E+00, 0.2250000E+00, &
835 0.2250000E+00, 0.2250000E+00, 0.2000000E+00, 0.2000000E+00, &
836 0.3500000E+00, 0.2000000E+00, 0.3500000E+00, 0.1500000E+00, &
838 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
839 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
840 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, 0.0000000E+00, &
843 0.7120000E+01, 0.7120000E+01, 0.7120000E+01, 0.7120000E+01, &
844 0.7120000E+01, 0.7120000E+01, 0.7120000E+01, 0.4050000E+01, &
845 0.4050000E+01, 0.7120000E+01, 0.4050000E+01, 0.7797000E+01, &
848 -0.8600000E-01, -0.8600000E-01, -0.8600000E-01, -0.8600000E-01, &
849 -0.8600000E-01, -0.8600000E-01, -0.8600000E-01, -0.3500000E-01, &
850 -0.3500000E-01, -0.8600000E-01, -0.3500000E-01, -0.1980000E+00, &
853 0.4200000E+00, 0.4200000E+00, 0.4200000E+00, 0.4200000E+00, &
854 0.4200000E+00, 0.4200000E+00, 0.4200000E+00, 0.4352000E+00, &
855 0.4352000E+00, 0.4200000E+00, 0.4352000E+00, 0.4577000E+00, &
858 0.2000000E-04, 0.2000000E-04, 0.2000000E-04, 0.2000000E-04, &
859 0.2000000E-04, 0.2000000E-04, 0.2000000E-04, 0.1760000E-03, &
860 0.1760000E-03, 0.2000000E-04, 0.1760000E-03, 0.3500000E-05, &
863 0.1736000E+00, 0.1736000E+00, 0.1736000E+00, 0.1736000E+00, &
864 0.1736000E+00, 0.1736000E+00, 0.1736000E+00, 0.8720000E-01, &
865 0.8720000E-01, 0.1736000E+00, 0.8720000E-01, 0.3420000E+00, &
868 0.2000000E-01, 0.2000000E-01, 0.2000000E-01, 0.2000000E-01, &
869 0.2000000E-01, 0.2000000E-01, 0.2000000E-01, 0.2000000E-01, &
870 0.2000000E-01, 0.2000000E-01, 0.2000000E-01, 0.2000000E-01, &
872 0.1480000E+01, 0.1480000E+01, 0.1480000E+01, 0.1480000E+01, &
873 0.1480000E+01, 0.1480000E+01, 0.4700000E+00, 0.4700000E+00, &
874 0.4700000E+00, 0.1700000E+00, 0.1700000E+00, 0.1480000E+01, &
876 0.2000000E+01, 0.2000000E+01, 0.2000000E+01, 0.2000000E+01, &
877 0.2000000E+01, 0.2000000E+01, 0.1000000E+01, 0.1000000E+01, &
878 0.1000000E+01, 0.1000000E+01, 0.3000000E+00, 0.2000000E+01, &
880 !------------------------------------------------------------------------
883 !-----------------------------------------------------------------------
884 !**********************************************
885 SUBROUTINE SSIB( IX, JX, DDTT, ITIME, ZLAT, SUNANGLE, &
886 PPL, PPC, RLWDOWN, ZWIND2, &
893 SALB11, SALB12, SALB21, SALB22, &
894 RADFRAC11, RADFRAC12, RADFRAC21, RADFRAC22, &
895 XHSFLX, ELATEN, GHTFLX, XHLFLX, TGEFF, &
896 USTAR, RIB, FM, FH, CM, &
897 XLHF, XSHF, XGHF, XEGS, XECI, XECT, & ! output
898 XEGI, XEGT, XSDN, XSUP, XLDN, XLUP, & ! output
899 XWAT, XHCX, XHGX, XZLT, XVCF, XXZ0, & ! output
900 XVEG, XDD, & ! output
901 ISNOW,SWE,SNOWDEN,SNOWDEPTH,TKAIR, & ! snow
902 DZO1,WO1,TSSN1,TSSNO1,BWO1,BTO1,CTO1,FIO1,FLO1,BIO1,BLO1,HO1, & ! snow
903 DZO2,WO2,TSSN2,TSSNO2,BWO2,BTO2,CTO2,FIO2,FLO2,BIO2,BLO2,HO2, & ! snow
904 DZO3,WO3,TSSN3,TSSNO3,BWO3,BTO3,CTO3,FIO3,FLO3,BIO3,BLO3,HO3, & ! snow
905 DZO4,WO4,TSSN4,TSSNO4,BWO4,BTO4,CTO4,FIO4,FLO4,BIO4,BLO4,HO4, & ! snow
906 DAY, CLOUD, Q2M, TA, BEDO, UV10, & ! add uv10 (01/2014)
909 !**********************************************
910 !-----------------------------------------------------------------------
911 ! THERE ARE A MAIN SSIB PROGRAM AND 12 SUBROUTINE FILES, WHICH ARE:
924 !-----------------------------------------------------------------------
926 ! DDTT: TIME INTERVAL
927 ! SUNANGLE: SOLAR ZENITH ANGLE
928 ! SWDOWN: SHORT WAVE DOWN(W/M*M);
929 ! RADFRAC: SHORT WAVE COMPONENTS (visible and near IR; direct and diffuse)
930 ! RLWDOWN: LONG WAVE DOWN(W/M*M);
931 ! PPL, PPC: LARGE SCALE AND CONVECTIVE PRECIPITATIONS AT THE TIME STEP (mm)
932 ! TM: TEMPERETURE AT LOWEST MODEL LAYER (K)
933 ! UMM,VMM: ZONAL AND MERIDIONAL WINDS AT LOWEST MODEL LAYER (m/S)
934 ! QM: WATER VAPOR AT LOWEST MODEL LAYER;
935 ! PSURF: SURFACE PRESSURE (mb)
936 ! ZWIND: HEIGHT (m) OF LOWEST MODEL LAYER
937 ! ITYPE: VEGETATION TYPE
938 ! ZLAT: LATITUDE, SOUTH POLE IS -90 DEGREE AND NORTH POLE IS 90 DEGREE
943 ! ETMASS: EVAPORATION (mm/step)
944 ! ELATEN: LATENT HEAT FLUX (w/m*m)
945 ! EVAPSOIL,EVAPWC,EVAPDC,EVAPSN: LATENT HEAT FROM (SOIL, INTERCEPTION,
946 ! TRANSPIRATION, AND SNOW SURFACE)
947 ! HFLUX: SENSIBLE HEAT FLUX(w/m*m)
948 ! GHTFLX: GROUND HEAT FLUX(w/m*m) = CHF+SHF
949 ! USTAR: FRICTION VELOCITY (m/s)
950 ! DRAG: MOMENTUM FLUX (kg/m/s**2)
951 ! DRAGU: U COMPONENT OF MOMENTUM FLUX (kg/m/s**2)
952 ! DRAGV: V COMPONENT OF MOMENTUM FLUX (kg/m/s**2)
953 ! TGEFF: RADIATIVE TEMPERATURE (K)
955 ! SALB: ALBEDO FOR 4 COMPONENTS
956 ! RADT: NET RADIATION AT CANOPY AND GROUND LEVELS
957 ! TGS: SOIL SURFACE TEMPERATURE (K)
958 ! TC: CANOPY TEMPERATURE (K)
959 ! TD: DEEP SOIL TEMPERATURE (K)
960 ! TA: TEMPERATURE AT CANOPY AIR SPACE (K)
961 ! CAPAC: INTERCEPTION AT CANOPY (1) and SNOW DEPTH (2)
963 ! SOILM: TOTAL SOIL WATER CONTENT
966 !----------------------------------------------------------------------
968 INTEGER, DIMENSION (12) :: IDAYS
970 REAL, DIMENSION (2) :: CAPAC, SATCAP, GREEN, VCOVER, ZLT, CHIL, TOPT, TL, &
971 TU, DEFAC, PH1, PH2, RST, ROOTD, RADT, PAR, PD
972 REAL, DIMENSION (3) :: WWW, SOREF, ZDEPTH, ROOTP, PHSOIL, YMATT, YMATQ
973 REAL, DIMENSION (2,2) :: RADFRAC, SALB
974 REAL, DIMENSION (2,3) :: RSTPAR
975 REAL, DIMENSION (2,4) :: RSTFAC
976 REAL, DIMENSION (3,2) :: RADN
977 REAL, DIMENSION (2,3,2) :: TRAN, REF, ALBEDO, EXTK
978 REAL, DIMENSION (2,2,2) :: RADFAC
980 INTEGER, DIMENSION (24) :: IVUSGS
981 INTEGER, DIMENSION (20) :: IVMODIS
982 REAL, DIMENSION (13) :: TD_DEPTH
983 INTEGER :: sw_physics !choice of SW radiation scheme
984 CHARACTER(LEN=*), INTENT(IN ) :: MMINLU !type of landuse/vegetation map
985 CHARACTER*256 :: message
987 REAL, DIMENSION (N2) :: SS,SSO,POROSITY,H,HO,BI,BIO,DZ,DZO,BW,BWO,BL
988 REAL, DIMENSION (N2) :: BLO,TSSN,TSSNO,W,WO,WF,FI,FIO, FL,FLO,DMLT
989 REAL, DIMENSION (N2) :: DMLTO,BT,BTO,S,SO,CT,CTO,DLIQVOL,DICEVOL
990 REAL, DIMENSION (N2) :: QK,PDZDTC,DMASS,DSOL,DHP,THK
993 DATA IDAYS/31,59,90,120,151,181,212,243,273,304,334,366/
995 ! Deep soil temperature depth by vegetation type --------------------
996 DATA TD_DEPTH/1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.0, 1.0, 1.0 &
997 & , 0.5, 0.5, 1.5, 1.5/
999 ! Check vegetation/land use map choice
1000 ! USGS-SSIB vegetation type conversion
1001 DATA IVUSGS / 7, 12, 12, 12, 12, 12, 7, 9, &
1002 8, 6, 2, 5, 1, 4, 3, 0, &
1003 10, 3, 11, 10, 10, 10, 10, 13/
1004 ! MODIS-SSIB vegetation type conversion (fds Jan/2015)
1005 DATA IVMODIS / 4, 1, 5, 2, 3, 8, 9, 6, &
1006 6, 7, 7, 12, 11, 12, 13, 11, &
1008 ! Converts vegetation/land use types
1009 IF(MMINLU.EQ.'SSIB') THEN
1011 ELSEIF(MMINLU.EQ.'USGS') THEN
1012 ITYPE=IVUSGS(IVGTYP)
1013 ELSEIF(MMINLU.EQ.'MODIS') THEN
1014 ITYPE=IVMODIS(IVGTYP)
1015 ELSE IF (MMINLU .EQ. 'MODIFIED_IGBP_MODIS_NOAH') THEN
1016 ITYPE=IVMODIS(IVGTYP)
1018 CALL wrf_error_fatal ( 'SSIB LSM only works with SSIB or USGS vegetation (landuse) map' )
1021 ! Check for error in vegetation map
1022 if(itype.le.0.or.itype.gt.13) then
1023 !Make sure the correct vegetation map is being used!
1024 print *,"veg type: ",itype
1025 CALL wrf_error_fatal ( 'module_sf_ssib: ERROR in vegetation/landuse map' )
1033 !------------------------------------------------
1034 ZWIND=ZWIND2*0.5 ! TM & UM are on the middle lowest model layer
1035 !------------------------------------------------
1036 ! set DAY in year and current month MON_COR
1037 !------------------------------------------------
1041 IF(IDAY.LE.IDAYS(I)) THEN
1046 !crr correction for southern hemisphere (reverse months) Ratko, Oct 28, 2005
1047 IF(ZLAT.LT.0.0) THEN
1049 IF(MON_COR.GT.12) MON_COR=MON_COR-12
1053 !------------------------------------------------
1054 IF (ITIME.EQ.1) TA=TC
1057 DTT =DDTT*FLOAT(INTG)
1058 !------------------------------------------------
1059 ! ** Read in vegetation parameters
1060 CALL VEGOUT(TRAN,REF,GREEN,VCOVER,CHIL, &
1061 RSTPAR,TOPT,TL,TU,DEFAC,PH1,PH2, &
1062 ZLT,Z0,XDD,Z2,Z1,RDC,RBC,ROOTD,SOREF, &
1063 BEE, PHSAT, POROS, SATCO,SLOPE, &
1064 ZDEPTH,MON_COR,ITYPE)
1067 IF (ITYPE.EQ.12) CALL CROPS(ZLAT,DAY,CHIL, &
1068 ZLT,GREEN,VCOVER,RSTPAR,TOPT,TL,TU,DEFAC,PH2,PH1)
1070 !crr ------------ STC initialization ------------------------------------
1071 IF (ITIME.EQ.1) THEN
1072 STLEV1=0.05 ! half of 10cm layer
1073 STLEV2=1.05 ! half of second + first layer
1075 DEPTH = TD_DEPTH(ITYPE)
1077 IF (DEPTH.GT.STLEV1.AND.DEPTH.LE.STLEV2)THEN ! interp.
1078 TD = ( (STLEV2-DEPTH)*TGS + (DEPTH-STLEV1)*TD ) &
1080 ELSE IF(DEPTH.GT.STLEV2)THEN ! extrap.
1081 TD = ( (DEPTH-STLEV1)*TD - (DEPTH-STLEV2)*TGS) &
1086 !------------------------------------------------------------------------
1087 WWW(1) = WWW1 / POROS
1088 WWW(2) = WWW2 / POROS
1089 WWW(3) = WWW3 / POROS
1090 !------------------------------------------------
1091 !cfds Convert WEASD (kg/m2) to meter
1094 !------------------------------------------------
1097 DZO1,WO1,TSSN1,TSSNO1,BWO1,BTO1,CTO1,FIO1,FLO1,BIO1,BLO1,HO1, &
1098 DZO2,WO2,TSSN2,TSSNO2,BWO2,BTO2,CTO2,FIO2,FLO2,BIO2,BLO2,HO2, &
1099 DZO3,WO3,TSSN3,TSSNO3,BWO3,BTO3,CTO3,FIO3,FLO3,BIO3,BLO3,HO3, &
1100 DZO4,WO4,TSSN4,TSSNO4,BWO4,BTO4,CTO4,FIO4,FLO4,BIO4,BLO4,HO4, &
1101 DZO, WO, TSSN, TSSNO, BWO, BTO, CTO, FIO, FLO, BIO, BLO, HO )
1104 IF (ITIME.EQ.1) THEN
1108 SNOWDEPTH = SWE * SNOWDEN
1109 TGG=AMIN1(273.15,TGS)
1110 !fds temp IF (SNOWDEPTH.gt.SNODEP_CR) THEN
1112 !fds temp CALL LAYERN (TGG,SWE,SNOWDEPTH, DZO,BWO,WO,BTO,CTO &
1113 !fds temp ,FLO,FIO,HO,BLO,BIO,DLIQVOL,DICEVOL,TSSNO,DMLTO)
1120 IF (ITIME.EQ.1) THEN
1121 IF (SNOA.GT.0.) THEN
1122 !cxx IF (SNOA.GT.5.) THEN
1123 CAPAC(1) = ZLT(1) * 0.0001
1124 TC = AMIN1(TC ,TF-0.01)
1125 TGS = AMIN1(TGS,TF-0.01)
1129 UM=SQRT(UMM**2+VMM**2)
1130 RHOAIR=100./GASR*(PSURF+0.01*PM)/(TM+TA)
1132 BPS =1.0 / EXP ( AKAPPA * ALOG (0.01*PM/PSURF) )
1133 ! BPS0 =1.0 / EXP ( AKAPPA * ALOG (PSURF/1000.) )
1134 ! BPS1 =1.0 / EXP ( AKAPPA * ALOG (0.01*PM/1000.) )
1135 !Cl 2001,2,2 added the following line
1136 IF (ISNOW.EQ.0) THEN
1141 IF(TM.ge.TF) IPTYPE=1
1145 ! CONVERT TO VAPOR PRES. TO MB
1146 EM=(PSURF*QM)/0.6220
1147 IF (ITIME.EQ.1) EA=EM
1149 SUNANG=AMAX1(SUNANGLE,0.01746)
1150 ! By Zhenxin 2011-06-20
1151 ! IF (sw_physics.eq.3) THEN
1152 IF (sw_physics.eq.3 .or. sw_physics.eq.4) THEN
1153 ! End By Zhenxin 2011-06-20
1154 !**********************************************
1155 !fds - RADFRAC from radiation scheme 3 (06/2010)
1156 !fds - Otherwise use cloud cover to calculate radfrac
1157 radfrac11 = amax1(radfrac11,0.025)
1158 radfrac12 = amax1(radfrac12,0.025)
1159 radfrac21 = amax1(radfrac21,0.025)
1160 radfrac22 = amax1(radfrac22,0.025)
1161 swdown = radfrac11 + radfrac12 + radfrac21 + radfrac22
1162 RADFRAC(1,1) = radfrac11/swdown
1163 RADFRAC(1,2) = radfrac12/swdown
1164 RADFRAC(2,1) = radfrac21/swdown
1165 RADFRAC(2,2) = radfrac22/swdown
1167 !**********************************************
1168 ! ** CALCULATE THE CLOUD COVER USING AN EMPIRICAL EQUATION
1169 ! ONLY USE THIS PART WHEN IT IS NEEDED
1171 swdown = amax1(swdown1,0.1)
1172 CLOUD = AMAX1(CLOUD,0.0)
1173 CLOUD = AMIN1(CLOUD,1.0)
1174 CLOUD = AMAX1(0.58,CLOUD)
1176 DIFRAT = 0.0604 / ( SUNANG-0.0223 ) + 0.0683
1177 IF ( DIFRAT .LT. 0.0 ) DIFRAT = 0.0
1178 IF ( DIFRAT .GT. 1.0 ) DIFRAT = 1.0
1180 DIFRAT = DIFRAT + ( 1.0 - DIFRAT ) * CLOUD
1181 VNRAT = ( 580.0 - CLOUD*464.0 ) / ( ( 580.0-CLOUD*499.0) &
1182 & + ( 580.0 - CLOUD*464.0 ) )
1184 RADFRAC(1,1) = (1.0-DIFRAT)*VNRAT
1185 RADFRAC(1,2) = DIFRAT*VNRAT
1186 RADFRAC(2,1) = (1.0-DIFRAT)*(1.0-VNRAT)
1187 RADFRAC(2,2) = DIFRAT*(1.0-VNRAT)
1188 !**********************************************
1191 RADN(1,1) = RADFRAC(1,1) * SWDOWN
1192 RADN(1,2) = RADFRAC(1,2) * SWDOWN
1193 RADN(2,1) = RADFRAC(2,1) * SWDOWN
1194 RADN(2,2) = RADFRAC(2,2) * SWDOWN
1198 ! END OF EMPIRICAL EQUATIONS
1199 ! *********************************************************
1201 CALL RADAB (TRAN,REF,GREEN,VCOVER,CHIL,ZLT,Z2,Z1,SOREF,TC, &
1202 TGS,SATCAP,EXTK,RADFAC,THERMK,RADT,PAR,PD,ALBEDO,SALB, &
1203 TGEFF,SUNANG,XADJ,CAPAC,RADN,ZLWUP,RADFRAC, &
1204 ISNOW,SNOWDEN,SNOWDEPTH,SWDOWN,BEDO,SNOCV,0, &
1205 fsdown,fldown,fsup,flup)
1207 CALL ROOT1(PHSAT,BEE,WWW,PHSOIL)
1209 CALL STOMA1(GREEN,VCOVER,CHIL,ZLT,PAR,PD,EXTK,SUNANG,RST, &
1214 !***************************************************************************************
1215 ! For water balance check later
1216 TOTWB = WWW(1) * POROS * ZDEPTH(1) &
1217 + WWW(2) * POROS * ZDEPTH(2) &
1218 + WWW(3) * POROS * ZDEPTH(3) &
1219 + CAPAC(1) + CAPAC(2)
1220 !***************************************************************************************
1222 CALL INTERCS (DTT,VCOVER,ZLT,TM,TC,TGS,CAPAC,WWW,PPC,PPL, &
1223 ROFF,ZDEPTH,POROS,CCX,CG,SATCO,SATCAP,SPWET, &
1224 EXTK,ISNOW,P0,CSOIL,dzsoil,CHISL,SMELT)
1226 CALL SET0(TSSNO,BWO,BLO,BIO,HO,FLO,FIO,WO,DZO, &
1227 SSO,CTO,BTO,DMLTO,WF,DHP)
1229 !***************************************************************************************
1230 IF (ISNOW.EQ.0) THEN ! MULTI-LAYER SNOW
1231 !***************************************************************************************
1234 CALL GETMET(IPTYPE,PRCP,TKAIR, &
1235 PRCPS,PRCPW,FIFALL,FLFALL,BIFALL,BLFALL)
1236 !c ** aerodynamic resistance and flux calculations
1239 DO 1100 IWAVE = 1, 2
1241 SOLAR=SOLAR+RADFAC(IVEG,IWAVE,IRAD)*RADN(IWAVE,IRAD)
1243 CALL SNOW_1ST (DTT,TM,SOLAR,PRCPW,PRCPS,BIO,BLO,DICEVOL, &
1244 DLIQVOL,TSSNO,PDZDTC,POROSITY,SO,SSO,WF,DHP,DZO,WO, &
1245 BWO,BTO,CTO,DMASS,DSOL,SNROFF,HROFF,SNOWDEPTH,SOLSOIL, &
1246 FLO,FIO,DMLTO,HO,BIFALL,BLFALL,FLFALL)
1248 CALL TEMRS2(DTT,TC,TGS,TD,TA,TM,QM,EM,PSUR,WWW,CAPAC,SATCAP, &
1249 DTC,DTG,RA,RST,ZDEPTH,BEE,PHSAT,POROS,XDD,Z0,RDC,RBC,VCOVER, &
1250 Z2,ZLT,DEFAC,TU,TL,TOPT,RSTFAC,NROOT,ROOTD,PHSOIL,ROOTP, &
1251 PH1,PH2,ECT,ECI,EGT,EGI,EGS,HC,HG,EC,EG,EA,RADT,CHF,SHF, &
1252 ALBEDO,ZLWUP,THERMK,RHOAIR,ZWIND,UM,USTAR,DRAG,CCX,CG, &
1253 ISNOW,CHISL,TSOIL,SOLSOIL,CSOIL,WFSOIL,POROSITY, &
1254 DZ,DZO,W,WO,WF,TSSN,TSSNO,BW,BWO,CT,CTO,FI,FIO,FL,FLO, &
1255 BL,BLO,BI,BIO,BT,BTO,DMLT,DMLTO,H,HO,S,SO,SS,SSO,DSOL,DHP, &
1256 DICEVOL,DLIQVOL,THK,QK,SWE,SNOWDEN,SNOWDEPTH,TKAIR,SNROFF, &
1257 DZSOIL,BPS,rib,CU,XCT,flup,UV10)
1259 CALL OLD(TSSN,BW,BL,BI,H,FL,FI,W,DZ,SS,CT,BT,DMLT, &
1260 TSSNO,BWO,BLO,BIO,HO,FLO,FIO,WO,DZO,SSO,CTO,BTO,DMLTO)
1262 !***************************************************************************************
1263 ELSE ! SINGLE-LAYER SNOW
1264 !***************************************************************************************
1266 CALL TEMRS1(DTT,TC,TGS,TD,TA,TM,QM,EM,PSUR,WWW,CAPAC,SATCAP, &
1267 DTC,DTG,RA,RST,ZDEPTH,BEE,PHSAT,POROS,XDD,Z0,RDC,RBC,VCOVER,Z2, &
1268 ZLT,DEFAC,TU,TL,TOPT,RSTFAC,NROOT,ROOTD,PHSOIL,ROOTP,PH1,PH2, &
1269 ECT,ECI,EGT,EGI,EGS,HC,HG,EC,EG,EA,RADT,CHF,SHF,ALBEDO,ZLWUP, &
1270 THERMK,RHOAIR,ZWIND,UM,USTAR,DRAG,CCX,CG, ISNOW,SNOWDEN, &
1271 BPS,rib,CU,XCT,flup,UV10)
1274 SNOWDEPTH=SWE*SNOWDEN
1278 !***************************************************************************************
1280 CALL UPDAT1(DTT,TC,TGS,TD,CAPAC,DTC,DTG,ECT,ECI,EGT,EGI, &
1281 EGS,EG,HC,HG,HFLUX,ETMASS,ROFF, &
1282 1,ROOTD,ROOTP,POROS,BEE,SATCO,SLOPE, &
1283 PHSAT,ZDEPTH,WWW,CCX,CG,CHF,SHF, ISNOW,WFSOIL,SWE,SNROFF,SMELT)
1285 IF (ISNOW.EQ.0) THEN
1287 IF (SNOWDEPTH.LT.SNODEP_CR) THEN
1289 CALL LAYER1 (CSOIL,TGS,DZSOIL,H,W,SNOWDEPTH,SWE,STEMP,N2)
1292 CALL MODNODE(SNOWDEPTH,DZO,WO,HO,TSSNO,BWO,BIO, &
1293 BLO,BTO,FIO,FLO,CTO,DLIQVOL,DICEVOL)
1295 ELSE IF(ISNOW.GT.0) THEN
1296 IF (CAPAC(2)*SNOWDEN.GT.SNODEP_CR) THEN
1298 SNOWDEPTH=CAPAC(2)*SNOWDEN
1300 CALL LAYERN (TGS,SWE,SNOWDEPTH, DZO,BWO,WO,BTO,CTO,FLO,FIO, &
1301 HO,BLO,BIO,DLIQVOL,DICEVOL,TSSNO,DMLTO)
1309 !***************************************************************************************
1310 ! Check water and energy balances (fds Jan/2015)
1311 ENDWB = WWW(1) * POROS * ZDEPTH(1) &
1312 + WWW(2) * POROS * ZDEPTH(2) &
1313 + WWW(3) * POROS * ZDEPTH(3) &
1314 + CAPAC(1) + CAPAC(2) - (PPC+PPL)/1000. + ETMASS/1000. + ROFF
1315 ERRW = TOTWB - ENDWB
1316 IF(ABS(ERRW) .GT. 0.0001) THEN
1317 WRITE(message,*) 'SSIB WATER BALANCE WARNING: ',ERRW
1318 CALL wrf_message ( message )
1321 ZLHS = RADT(1) + RADT(2) - CHF - SHF
1322 ZRHS = HFLUX + (ECT + ECI + EGT + EGI + EGS)/DTT
1324 IF(ABS(ERRH) .GT. 1.) THEN
1325 WRITE(message,*) 'SSIB ENERGY BALANCE WARNING: ',ERRH
1326 CALL wrf_message ( message )
1328 !***************************************************************************************
1331 !------------------------------------------------------------------------
1332 SOILM=(WWW(1)*ZDEPTH(1)+WWW(2)*ZDEPTH(2)+WWW(3)*ZDEPTH(3))*POROS
1333 !------------------------------------------------------------------------
1334 UMOM=RHOAIR*CU*USTAR*UMM
1335 VMOM=RHOAIR*CU*USTAR*VMM
1336 HLFLX= ETMASS/RHOAIR/DTT
1337 HSFLX= HFLUX/CPAIR/RHOAIR/DTT
1338 ULWSF1=TGEFF*TGEFF*TGEFF*TGEFF*STEFAN
1339 Q2M=0.622*EA/(PSURF-EA)
1341 CM=(USTAR*USTAR)/(UM*UM)
1353 ELATEN=EVAPSOIL+EVAPWC+EVAPDC+EVAPSN+EVAPGX
1356 !=====================================================================
1358 !=====================================================================
1361 DZO1,WO1,TSSN1,TSSNO1,BWO1,BTO1,CTO1,FIO1,FLO1,BIO1,BLO1,HO1, &
1362 DZO2,WO2,TSSN2,TSSNO2,BWO2,BTO2,CTO2,FIO2,FLO2,BIO2,BLO2,HO2, &
1363 DZO3,WO3,TSSN3,TSSNO3,BWO3,BTO3,CTO3,FIO3,FLO3,BIO3,BLO3,HO3, &
1364 DZO4,WO4,TSSN4,TSSNO4,BWO4,BTO4,CTO4,FIO4,FLO4,BIO4,BLO4,HO4, &
1365 DZO, WO, TSSN, TSSNO, BWO, BTO, CTO, FIO, FLO, BIO, BLO, HO )
1372 !------------------------------------------------
1373 !cfds Convert WEASD back to kg/m2
1376 !------------------------------------------------
1404 !------------------------------------------------------
1406 !------------------------------------------------------
1408 !-----------------------------------------------------------------------
1409 !**********************************************
1410 SUBROUTINE SSIB_SEAICE &
1411 ( IX, JX, DDTT, ITIME, ZLAT, SUNANGLE, &
1412 PPL, PPC, RLWDOWN, ZWIND2, &
1419 SALB11, SALB12, SALB21, SALB22, &
1420 RADFRAC11, RADFRAC12, RADFRAC21, RADFRAC22, &
1421 XHSFLX, ELATEN, GHTFLX, XHLFLX, TGEFF, &
1422 USTAR, RIB, FM, FH, CM, &
1423 XLHF, XSHF, XGHF, & ! output
1424 XSDN, XSUP, XLDN, XLUP, & ! output
1425 XWAT, XXZ0, & ! output
1427 DAY, CLOUD, Q2M, TA, BEDO, UV10, &
1428 sw_physics,ice_threshold &
1430 !**********************************************
1431 !-----------------------------------------------------------------------
1432 ! THERE ARE A MAIN SSIB PROGRAM AND 12 SUBROUTINE FILES, WHICH ARE:
1445 !-----------------------------------------------------------------------
1447 ! DDTT: TIME INTERVAL
1448 ! SUNANGLE: SOLAR ZENITH ANGLE
1449 ! SWDOWN: SHORT WAVE DOWN(W/M*M);
1450 ! RADFRAC: SHORT WAVE COMPONENTS (visible and near IR; direct and diffuse)
1451 ! RLWDOWN: LONG WAVE DOWN(W/M*M);
1452 ! PPL, PPC: LARGE SCALE AND CONVECTIVE PRECIPITATIONS AT THE TIME STEP (mm)
1453 ! TM: TEMPERETURE AT LOWEST MODEL LAYER (K)
1454 ! UMM,VMM: ZONAL AND MERIDIONAL WINDS AT LOWEST MODEL LAYER (m/S)
1455 ! QM: WATER VAPOR AT LOWEST MODEL LAYER;
1456 ! PSURF: SURFACE PRESSURE (mb)
1457 ! ZWIND: HEIGHT (m) OF LOWEST MODEL LAYER
1458 ! ITYPE: VEGETATION TYPE
1459 ! ZLAT: LATITUDE, SOUTH POLE IS -90 DEGREE AND NORTH POLE IS 90 DEGREE
1461 ! DAY: CALENDER DATE
1464 ! ETMASS: EVAPORATION (mm/step)
1465 ! ELATEN: LATENT HEAT FLUX (w/m*m)
1466 ! EVAPSOIL,EVAPWC,EVAPDC,EVAPSN: LATENT HEAT FROM (SOIL, INTERCEPTION,
1467 ! TRANSPIRATION, AND SNOW SURFACE)
1468 ! HFLUX: SENSIBLE HEAT FLUX(w/m*m)
1469 ! GHTFLX: GROUND HEAT FLUX(w/m*m) = CHF+SHF
1470 ! USTAR: FRICTION VELOCITY (m/s)
1471 ! DRAG: MOMENTUM FLUX (kg/m/s**2)
1472 ! DRAGU: U COMPONENT OF MOMENTUM FLUX (kg/m/s**2)
1473 ! DRAGV: V COMPONENT OF MOMENTUM FLUX (kg/m/s**2)
1474 ! TGEFF: RADIATIVE TEMPERATURE (K)
1475 ! BEDO: TOTAL ALBEDO
1476 ! SALB: ALBEDO FOR 4 COMPONENTS
1477 ! RADT: NET RADIATION AT CANOPY AND GROUND LEVELS
1478 ! TGS: SOIL SURFACE TEMPERATURE (K)
1479 ! TC: CANOPY TEMPERATURE (K)
1480 ! TD: DEEP SOIL TEMPERATURE (K)
1481 ! TA: TEMPERATURE AT CANOPY AIR SPACE (K)
1482 ! CAPAC: INTERCEPTION AT CANOPY (1) and SNOW DEPTH (2)
1483 ! WWW: SOIL MOISTURE
1484 ! SOILM: TOTAL SOIL WATER CONTENT
1487 !----------------------------------------------------------------------
1489 INTEGER, DIMENSION (12) :: IDAYS
1491 REAL, DIMENSION (2) :: CAPAC, SATCAP, GREEN, VCOVER, ZLT, CHIL, TOPT, TL, &
1492 TU, DEFAC, PH1, PH2, RST, ROOTD, RADT, PAR, PD
1493 REAL, DIMENSION (3) :: WWW, SOREF, ZDEPTH, ROOTP, PHSOIL, YMATT, YMATQ
1494 REAL, DIMENSION (2,2) :: RADFRAC, SALB
1495 REAL, DIMENSION (2,3) :: RSTPAR
1496 REAL, DIMENSION (2,4) :: RSTFAC
1497 REAL, DIMENSION (3,2) :: RADN
1498 REAL, DIMENSION (2,3,2) :: TRAN, REF, ALBEDO, EXTK
1500 REAL, DIMENSION (13) :: TD_DEPTH
1501 REAL :: ice_threshold
1502 INTEGER :: sw_physics !choice of SW radiation scheme
1504 DATA IDAYS/31,59,90,120,151,181,212,243,273,304,334,366/
1506 DATA TD_DEPTH/1.5, 1.5, 1.5, 1.5, 1.5, 1.5, 1.0, 1.0, 1.0 &
1507 & , 0.5, 0.5, 1.5, 1.5/
1508 !**********************************************
1509 ! The final albedo=original albedo+XADJ
1511 ! CTLPA controls stomatal resistance;
1512 ! Final stomatal resistance=ctlpa * stomatal resistance
1514 ! NROOT controls root distribution. nroot=1: root uniformly distributes
1515 ! in the soil layer;
1516 ! If NROOT not =1, root distribution is controled by rootp.
1518 ! INTG=? TIME INTEGRATION OF SURFACE PHYSICAL VARIABLE IS DONE
1519 ! INTG=2: LEAP-FROG IMPLICIT SCHEME. INTG=1 BACKWORD IMPLICIT SCHEME
1520 INTG=1 !!!!!! in MM5 version hardwired for INTG=1 !!!!!!!!!!!!!
1521 !------------------------------------------------
1524 !------------------------------------------------
1525 ! set DAY in year and current month MON_COR
1526 !------------------------------------------------
1530 IF(IDAY.LE.IDAYS(I)) THEN
1535 !crr correction for southern hemisphere (reverse months) Ratko, Oct 28, 2005
1536 IF(ZLAT.LT.0.0) THEN
1538 IF(MON_COR.GT.12) MON_COR=MON_COR-12
1542 !------------------------------------------------
1543 IF (ITIME.EQ.1) TA=TC
1546 DTT =DDTT*FLOAT(INTG)
1547 !------------------------------------------------
1548 ! ** Read in vegetation parameters
1549 CALL VEGOUT(TRAN,REF,GREEN,VCOVER,CHIL, &
1550 RSTPAR,TOPT,TL,TU,DEFAC,PH1,PH2, &
1551 ZLT,Z0,XDD,Z2,Z1,RDC,RBC,ROOTD,SOREF, &
1552 BEE, PHSAT, POROS, SATCO,SLOPE, &
1553 ZDEPTH,MON_COR,ITYPE)
1555 !crr ------------ STC initialization ------------------------------------
1556 IF (ITIME.EQ.1) THEN
1557 STLEV1=0.05 ! half of 10cm layer
1558 STLEV2=1.05 ! half of second + first layer
1560 DEPTH = TD_DEPTH(ITYPE)
1562 IF (DEPTH.GT.STLEV1.AND.DEPTH.LE.STLEV2)THEN ! interp.
1563 TD = ( (STLEV2-DEPTH)*TGS + (DEPTH-STLEV1)*TD ) &
1565 ELSE IF(DEPTH.GT.STLEV2)THEN ! extrap.
1566 TD = ( (DEPTH-STLEV1)*TD - (DEPTH-STLEV2)*TGS) &
1570 !------------------------------------------------------------------------
1574 !------------------------------------------------
1575 !cfds Convert WEASD (kg/m2) to meter
1578 !------------------------------------------------
1581 SNOWDEN = 3.75 ! mchen add for initialization
1583 IF (ITIME.EQ.1) THEN
1587 IF (SNOA.GT.0.) CAPAC(1) = ZLT(1) * 0.0001
1588 TC = AMIN1(TC ,273.15)
1589 TGS= AMIN1(TGS,273.15)
1590 TD = AMIN1(TD ,272.50)
1592 ! IF( YICE .LT. 0.5 ) THEN ! previous sea, now sea-ice
1593 IF( YICE .LT. ice_threshold ) THEN ! previously water, now sea-ice
1596 XADIA = EXP(GASR/CPAIR*LOG(PSUR/PM))
1597 XX = MIN(TM*XADIA,273.15)
1598 TC = MIN(TM*XADIA,273.15)
1599 TGS= MIN(TM*XADIA,273.15)
1600 IF(TD.EQ.0.) TD=272.5
1605 UM=SQRT(UMM**2+VMM**2)
1606 RHOAIR=100./GASR*(PSURF+0.01*PM)/(TM+TA)
1608 BPS =1.0 / EXP ( AKAPPA * ALOG (0.01*PM/PSURF) )
1610 ! CONVERT TO VAPOR PRES. TO MB
1611 EM=(PSURF*QM)/0.6220
1612 IF (ITIME.EQ.1) EA=EM
1614 SUNANG=AMAX1(SUNANGLE,0.01746)
1616 ! By Zhenxin 2011-06-20
1617 ! IF (sw_physics.eq.3) THEN
1618 IF (sw_physics.eq.3 .or. sw_physics.eq.4) THEN
1619 ! End by Zhenxin 2011-06-20
1621 !**********************************************
1622 !fds - RADFRAC from radiation scheme 3 (06/2010)
1623 !fds - Otherwise use cloud cover to calculate radfrac
1624 radfrac11 = amax1(radfrac11,0.025)
1625 radfrac12 = amax1(radfrac12,0.025)
1626 radfrac21 = amax1(radfrac21,0.025)
1627 radfrac22 = amax1(radfrac22,0.025)
1628 swdown = radfrac11 + radfrac12 + radfrac21 + radfrac22
1629 RADFRAC(1,1) = radfrac11/swdown
1630 RADFRAC(1,2) = radfrac12/swdown
1631 RADFRAC(2,1) = radfrac21/swdown
1632 RADFRAC(2,2) = radfrac22/swdown
1634 ! ** CALCULATE THE CLOUD COVER USING AN EMPIRICAL EQUATION
1635 ! ONLY USE THIS PART WHEN IT IS NEEDED
1636 ! ** ONLY USE THIS PART WHEN SW_PHYSICS = 1 IS USED ** By Zhenxin 2011-06
1637 swdown = amax1(swdown1,0.1)
1638 CLOUD = AMAX1(CLOUD,0.0)
1639 CLOUD = AMIN1(CLOUD,1.0)
1640 CLOUD = AMAX1(0.58,CLOUD)
1642 DIFRAT = 0.0604 / ( SUNANG-0.0223 ) + 0.0683
1643 IF ( DIFRAT .LT. 0.0 ) DIFRAT = 0.0
1644 IF ( DIFRAT .GT. 1.0 ) DIFRAT = 1.0
1646 DIFRAT = DIFRAT + ( 1.0 - DIFRAT ) * CLOUD
1647 VNRAT = ( 580.0 - CLOUD*464.0 ) / ( ( 580.0-CLOUD*499.0) &
1648 & + ( 580.0 - CLOUD*464.0 ) )
1650 RADFRAC(1,1) = (1.0-DIFRAT)*VNRAT
1651 RADFRAC(1,2) = DIFRAT*VNRAT
1652 RADFRAC(2,1) = (1.0-DIFRAT)*(1.0-VNRAT)
1653 RADFRAC(2,2) = DIFRAT*(1.0-VNRAT)
1654 !**********************************************
1657 RADN(1,1) = RADFRAC(1,1) * SWDOWN
1658 RADN(1,2) = RADFRAC(1,2) * SWDOWN
1659 RADN(2,1) = RADFRAC(2,1) * SWDOWN
1660 RADN(2,2) = RADFRAC(2,2) * SWDOWN
1664 ! END OF EMPIRICAL EQUATIONS
1665 ! *********************************************************
1667 CALL RADAB_ICE(TRAN,REF,GREEN,VCOVER,CHIL,ZLT,Z2,Z1,SOREF, &
1668 TC,TGS,SATCAP,EXTK,CLOSS,GLOSS,THERMK,P1F,P2F, &
1669 RADT,PAR,PD,SALB,ALBEDO,TGEFF,SUNANG,XADJ,CAPAC, &
1670 RADN,BEDO,ZLWUP,RADFRAC,SWDOWN,SNOCV,1, &
1671 fsdown,fldown,fsup,flup)
1673 CALL ROOT1(PHSAT,BEE,WWW,PHSOIL)
1675 CALL STOMA1(GREEN,VCOVER,CHIL,ZLT,PAR,PD,EXTK,SUNANG,RST, &
1682 CALL INTERC(DTT ,VCOVER,ZLT,TM,TC,TGS,CAPAC,WWW,PPC,PPL,ROFF, &
1683 ZDEPTH,POROS,CCX,CG,SATCO,SATCAP,SPWET,EXTK,RNOFFS,FILTR, &
1686 CALL TEMRS1(DTT,TC,TGS,TD,TA,TM,QM,EM,PSUR,WWW,CAPAC,SATCAP, &
1687 DTC,DTG,RA,RST,ZDEPTH,BEE,PHSAT,POROS,XDD,Z0,RDC,RBC,VCOVER,Z2, &
1688 ZLT,DEFAC,TU,TL,TOPT,RSTFAC,NROOT,ROOTD,PHSOIL,ROOTP,PH1,PH2, &
1689 ECT,ECI,EGT,EGI,EGS,HC,HG,EC,EG,EA,RADT,CHF,SHF,ALBEDO,ZLWUP, &
1690 THERMK,RHOAIR,ZWIND,UM,USTAR,DRAG,CCX,CG, ISNOW,SNOWDEN, &
1691 BPS,rib,CU,XCT,flup,UV10)
1693 CALL UPDAT1_ICE(DTT ,TC,TGS,TD,CAPAC,DTC,DTG,ECT,ECI,EGT,EGI, &
1694 EGS,EG,HC,HG,HFLUX,ETMASS,FILTR,SOILDIF,SOILDRA,ROFF, &
1695 RNOFFB,RNOFFS,NROOT,ROOTD,ROOTP,POROS,BEE,SATCO,SLOPE, &
1696 PHSAT,ZDEPTH,WWW,CCX,CG,CHF,SHF,SMELT)
1699 TD = AMIN1(TD ,273.15)
1700 TC = AMIN1(TC ,273.15)
1701 TGS = AMIN1(TGS,273.15)
1704 !------------------------------------------------------------------------
1705 SOILM=(WWW(1)*ZDEPTH(1)+WWW(2)*ZDEPTH(2)+WWW(3)*ZDEPTH(3))*POROS
1706 !------------------------------------------------------------------------
1707 UMOM=RHOAIR*CU*USTAR*UMM
1708 VMOM=RHOAIR*CU*USTAR*VMM
1709 HLFLX= ETMASS/RHOAIR/DTT
1710 HSFLX= HFLUX/CPAIR/RHOAIR/DTT
1711 ULWSF1=TGEFF*TGEFF*TGEFF*TGEFF*STEFAN
1712 Q2M=0.622*EA/(PSURF-EA)
1714 CM=(USTAR*USTAR)/(UM*UM)
1718 ! FH=VKC/CT !fds corrected (02/2012)
1725 !=====================================================================
1727 !=====================================================================
1752 !------------------------------------------------------
1753 END SUBROUTINE SSIB_SEAICE
1754 !------------------------------------------------------
1756 !=======================================================================
1758 SUBROUTINE CROPS(XLAT,DAY,CHIL,ZLT,GREEN,XCOVER &
1759 ,RSTPAR,TOPT,TL,TU,DEFAC,PH2,PH1)
1761 !=======================================================================
1763 ! A NEW CROP VERSION BY XUE. AUG., 1998
1765 ! XLAT IS FROM -90 TO 90 DEGREES FROM S. TO N.
1767 !----------------------------------------------------------------------
1769 REAL, DIMENSION (2) :: GREEN, XCOVER, CHIL, ZLT, TOPT, TL, TU, DEFAC, PH1, PH2
1770 REAL, DIMENSION (2,3) :: RSTPAR
1771 REAL, DIMENSION (9) :: PHENST, WLAI, WGRN
1774 !-----------------------------------------------------------------
1775 !** E J H SD R HRV CUT PRE-E E
1776 ! SAVE WLAI,WGRN,IHEAD,IEND,DEND,IWHEAT,SYR
1777 DATA WLAI/1.0, 2.0, 6.0, 4.0, 3.0, 1.0, 0.01, 0.01, 1.0/
1778 DATA WGRN/0.6, 0.9, 0.8, 0.5, 0.2, 0.1, 0.01, 0.01, 0.6/
1779 DATA IHEAD,IEND,DEND,IWHEAT/3,9,244.,12/,SYR/365.25E0/
1780 IF (XLAT.LT.0.) THEN
1782 IF (RDAY.GT.365) RDAY=RDAY-365
1786 JULDAY=INT(RDAY+0.2)
1789 IF (APHI.GT.55.) PHI=SIGN(55.,PHI)
1790 IF (APHI.LT.20.) PHI=SIGN(20.,PHI)
1794 ! ** DETERMINE WHEAT PHENOLOGY FOR LATITUDE AND JULIAN DAY
1795 PHENST(2) = 4.50 *ABS(PHI) - 64.0 + FLIP
1796 PHENST(3) = 4.74 *ABS(PHI) - 46.2 + FLIP
1797 PHENST(4) = 4.86 *ABS(PHI) - 30.8 + FLIP
1798 PHENST(5) = 4.55 *ABS(PHI) - 3.0 + FLIP
1799 PHENST(6) = 4.35 *ABS(PHI) + 11.5 + FLIP
1800 PHENST(7) = PHENST(6) + 3.0
1801 DEMG = ABS( 5.21 *ABS(PHI) - 0.3 )
1802 PHENST(1) = PHENST(2) - DEMG
1803 PHENST(9) = PHENST(1)
1804 PHENST(8) = PHENST(9) - 5.0
1807 IF(PHENST(NS) .LT. 0.0E0)PHENST(NS) = PHENST(NS) + 365.
1808 IF(PHENST(NS) .GT. 365. )PHENST(NS) = PHENST(NS) - 365.
1816 ! ** FIND GROWTH STAGE GIVEN LATITUDE AND DAY
1822 IF(RDAY.GE. BOT .AND. RDAY .LE. TOP ) GO TO 40
1823 IF(BOT .LT. TOP ) GO TO 50
1825 ! ** PHENOLOGY STAGES OVERLAP THE END OF YEAR?
1827 IF(RDAY .GE. BOT .AND. RDAY .LE. 365.) ICOND = 1
1828 IF(RDAY .GE. 0.0 .AND. RDAY .LE. TOP ) ICOND = 2
1830 IF(ICOND .EQ. 0)GO TO 50
1831 IF(ICOND .EQ. 2)GO TO 35
1832 DIFF1 = 365. - BOT + TOP
1837 DIFF1 = 365. - BOT + TOP
1838 DIFF2 = 365. - BOT + RDAY
1840 ! ** DATE FOUND IN PHENOLOGY STAGE
1842 IF ((RDAY.GT.PHENST(IHEAD)).AND.(RDAY.LE.DEND)) THEN
1847 IF ((RDAY.GT.DEND).AND.(RDAY.LE.PHENST(IEND))) THEN
1848 DIFF1=PHENST(IEND)-DEND
1851 TLAI = PERC*(WLAI(IEND)-WLAI(IHEAD)) + WLAI(IHEAD)
1852 GRLF = PERC*(WGRN(IEND)-WGRN(IHEAD)) + WGRN(IHEAD)
1856 TLAI = PERC*(WLAI(NS+1)-WLAI(NS)) + WLAI(NS)
1857 GRLF = PERC*(WGRN(NS+1)-WGRN(NS)) + WGRN(NS)
1862 XCOVER(1)=0.90*(1.0 - EXP(-TLAI))
1863 ZLTGMX = WLAI(IHEAD)
1864 ROOTGC = 2910.0 * (0.5 +0.5 *TLAI/ZLTGMX * GRLF)
1865 IF (NS.NE.1.AND.NS.NE.2) CHILW=-0.2
1871 !------------------------------------------------------
1872 END SUBROUTINE CROPS
1873 !------------------------------------------------------
1875 !=======================================================================
1877 SUBROUTINE ROOT1(PHSAT,BEE,WWW,PHSOIL)
1879 !=======================================================================
1881 ! CALCULATION OF SOIL MOISTURE POTENTIALS IN ROOT ZONE OF EACH
1882 ! VEGETATION LAYER AND SUMMED SOIL+ROOT RESISTANCE
1884 !-----------------------------------------------------------------------
1885 !----------------------------------------------------------------------
1886 REAL, DIMENSION (3) :: WWW, PHSOIL
1889 PHSOIL(IL) = PHSAT * AMAX1( 0.05, WWW(IL) ) ** ( - BEE )
1892 !-----------------------------------------------------------------------
1893 ! AVERAGE SOIL MOISTURE POTENTIAL IN ROOT ZONE USED FOR SOURCE
1894 !-----------------------------------------------------------------------
1897 ! PHROOT(1) = PHSOIL(1)-0.01
1900 !1200 PHROOT(1) = AMAX1( PHROOT(1), PHSOIL(I) )
1901 ! PHROOT(2) = PHROOT(1)
1904 !------------------------------------------------------
1905 END SUBROUTINE ROOT1
1906 !------------------------------------------------------
1908 !=======================================================================
1910 SUBROUTINE STOMA1(GREEN,VCOVER,CHIL,ZLT,PAR,PD,EXTK,SUNANG,RST, &
1913 !=======================================================================
1915 ! CALCULATION OF PAR-LIMITED STOMATAL RESISTANCE
1917 !-----------------------------------------------------------------------
1918 !----------------------------------------------------------------------
1920 REAL, DIMENSION (2) :: GREEN, VCOVER, ZLT, CHIL, PAR, PD, RST
1921 REAL, DIMENSION (2,3) :: RSTPAR
1922 REAL, DIMENSION (2,3,2) :: EXTK
1927 AT = ZLT(IVEG) / VCOVER(IVEG)
1929 IF (SUNANG .LE. 0.02) THEN
1930 XABC = RSTPAR(IVEG,1) / RSTPAR(IVEG,2) + RSTPAR(IVEG,3)
1931 RST(IVEG) = 0.5 / XABC * AT
1932 IF (RST(IVEG) .LT. 0.) RST(IVEG) = 0.00001
1936 GAMMA = ( RSTPAR(IVEG,1) + RSTPAR(IVEG,2) * RSTPAR(IVEG,3) ) / &
1939 POWER1 = AMIN1( 50., AT * EXTK(IVEG,1,1) )
1940 POWER2 = AMIN1( 50., AT * EXTK(IVEG,1,2) )
1942 !-----------------------------------------------------------------------
1943 ! ROSS INCLINATION FUNCTION
1944 !-----------------------------------------------------------------------
1946 AA = 0.5 - 0.633 * CHIL(IVEG)- 0.33 * CHIL(IVEG)* CHIL(IVEG)
1947 BB = 0.877 * ( 1. - 2. * AA )
1949 !-----------------------------------------------------------------------
1950 ! COMBINED ESTIMATE OF K-PAR USING WEIGHTS FOR DIFFERENT COMPONENTS
1951 !-----------------------------------------------------------------------
1953 ZAT = ALOG( ( EXP(-POWER1) + 1. )/2. ) * PD(IVEG) &
1955 ZAT = ZAT + ALOG( ( EXP(-POWER2) + 1. )/2. ) &
1956 * ( 1. - PD(IVEG) ) / ( POWER2/AT )
1958 POW1 = AMIN1( 50., (POWER1*ZAT/AT) )
1959 POW2 = AMIN1( 50., (POWER2*ZAT/AT) )
1961 ZK = 1. / ZAT * ALOG( PD(IVEG) * EXP ( POW1 ) &
1962 + ( 1. - PD(IVEG) ) * EXP ( POW2 ) )
1965 POW = AMIN1( 50., ZK*AT )
1968 AVFLUX = PAR(IVEG) * ( PD(IVEG) / SUNANG * ( AA + BB * SUNANG ) &
1969 + ( 1. - PD(IVEG) )*( BB / 3. + AA * 1.5 &
1972 RHO4 = GAMMA / AVFLUX
1974 RST(IVEG) = RSTPAR(IVEG,2)/GAMMA * ALOG(( RHO4 * EKAT + 1. ) / &
1976 RST(IVEG) = RST(IVEG) - ALOG (( RHO4 + 1. / EKAT ) / &
1978 RST(IVEG) = RST(IVEG) / ( ZK * RSTPAR(IVEG,3) )
1980 !----------------------------------------------------------------------
1981 ! MODIFICATIONS FOR GREEN FRACTION : RST UPRIGHT
1982 !----------------------------------------------------------------------
1984 1010 RST(IVEG) = 1. / ( RST(IVEG) * GREEN(IVEG) + 0.0000001)
1987 RST(1) = RST(1) * CTLPA
1989 !------------------------------------------------------
1990 END SUBROUTINE STOMA1
1991 !------------------------------------------------------
1993 !=======================================================================
1995 SUBROUTINE VEGOUT(XTRAN,XREF,XGREEN,XVCOVER,XCHIL, &
1996 XRSTPAR,XTOPT,XTL,XTU,XDEFAC,XPH1,XPH2, &
1997 XZLT,XZ0,XDD,XZ2,XZ1,XRDC,XRBC,XROOTD,XSOREF, &
1998 XBEE, XPHSAT, XPOROS, XSATCO,XSLOPE, &
2001 !=======================================================================
2003 ! ASSIGN VEGETATION PHYSIOLOGY
2005 ! SURFACE PARAMETERS ARE READ IN SAME ORDER AS IN GCM
2006 ! SUBROUTINE SIBINP. ONLY EXCEPTION IS THAT 1-D VERSION READS IN
2007 ! SITE SPECIFIC PARAMETERS CORB1 ... ZMET .
2009 ! VARIABLES THAT ENTER THROUGH COMSIB:
2010 ! SUBSCRIPTS (IV, IW, IL) :
2011 ! IV = VEGETATION STORY; 1 = TOP AND 2 = BOTTOM
2012 ! IW = RADIATION WAVELENGTH; 1 = VISIBLE, 2 = NEAR
2013 ! INFRARED AND 3 = THERMAL INFRARED
2014 ! IL = VEGETATION STATE; 1 = LIVE (GREEN) AND
2015 ! 2 = DEAD (STEMS AND TRUNK)
2017 ! TRAN(IV,IW,IL): LEAF TRANSMITTANCE
2018 ! REF (IV,IW,IL): LEAF REFLECTANCE
2019 ! RSTPAR(IV,IW) : PAR-DEPENDENT LEAF STOMATAL RESISTANCE COEFFICIENTS
2020 ! A =(J/M**3) B = 2(W/M**2) C = 3(S/M)
2021 ! SOREF(IW) : SOIL REFLECTANCE
2022 ! CHIL(IV) : LEAF ANGLE DISTRIBUTION FACTOR
2023 ! TOPT(IV) : OPTIMUM TEMPERATURE FOR STOMATAL FUNCTIONING
2024 ! TL(IV) : LOWER TEMPERATURE LIMIT FOR STOMATAL FUNCTIONING
2025 ! TU(IV) : UPPER TEMPERATURE LIMIT FOR STOMATAL FUNCTIONING
2026 ! DEFAC(IV) : VAPOR PRESSURE DEFICIT PARAMETER
2029 ! ROOTD(IV) : ROOTING DEPTH
2030 ! BEE : SOIL WETNESS EXPONENT
2031 ! PHSAT : SOIL TENSION AT SATURATION
2032 ! SATCO : HYDRAULIC CONDUCTIVITY AT SATURATION
2033 ! POROS : SOIL POROSITY
2034 ! ZDEPTH : DEPTH OF 3 SOIL MOISTURE LAYERS
2035 ! Z0 : ROUGHNESS LENGTH
2036 ! XDD : ZERO PLANE DISPLACEMENT
2037 ! ZLT(IV) : LEAF AREA INDEX
2038 ! GREEN(IV) : GREEN LEAF FRACTION
2039 ! VCOVER(IV) : VEGETATION COVER FRACTION
2041 ! VARIABLES ( SPECIFIC TO SIB 1-D VERSION ONLY ) FROM COMSIB
2043 ! ZWIND : REFERENCE HEIGHT FOR WIND MEASUREMENT
2044 ! ZMET : REFERENCE HEIGHT FOR TEMPERATURE, HUMIDITY MEASUREMENT
2045 ! THE ABOVE ARE GENERATED FROM SIBX + MOMOPT OUTPUT
2047 !----------------------------------------------------------------------
2048 !----------------------------------------------------------------------
2049 ! USE module_ssib_veg
2050 !----------------------------------------------------------------------
2052 REAL, DIMENSION (2) :: XGREEN, XVCOVER, XZLT, XCHIL, XTOPT, XTL, &
2053 XTU, XDEFAC, XPH1, XPH2, XROOTD
2054 REAL, DIMENSION (3) :: XSOREF, XDEPTH
2055 REAL, DIMENSION (2,3) :: XRSTPAR
2056 REAL, DIMENSION (2,3,2) :: XTRAN, XREF
2058 !-----------------------------------------------------------------------
2061 XTRAN(1,IW,1)=TRAN0(ITYPE,1,IW,1)
2062 XTRAN(1,IW,2)=TRAN0(ITYPE,1,IW,2)
2063 XTRAN(2,IW,1)=TRAN0(ITYPE,2,IW,1)
2064 XTRAN(2,IW,2)=TRAN0(ITYPE,2,IW,2)
2065 XREF (1,IW,1)= REF0(ITYPE,1,IW,1)
2066 XREF (1,IW,2)= REF0(ITYPE,1,IW,2)
2067 XREF (2,IW,1)= REF0(ITYPE,2,IW,1)
2068 XREF (2,IW,2)= REF0(ITYPE,2,IW,2)
2069 XRSTPAR(1,IW)=RSTPAR0(ITYPE,1,IW)
2070 XRSTPAR(2,IW)=RSTPAR0(ITYPE,2,IW)
2071 XSOREF (IW) =SOREF0(ITYPE,IW)
2074 XCHIL(IV)=CHIL0(ITYPE,IV)
2075 XTOPT(IV)=TOPT0(ITYPE,IV)
2076 XTL(IV)=TL0(ITYPE,IV)
2077 XTU(IV)=TU0(ITYPE,IV)
2078 XDEFAC(IV)=DEFAC0(ITYPE,IV)
2079 XPH1(IV)=PH10(ITYPE,IV)
2080 XPH2(IV)=PH20(ITYPE,IV)
2081 XROOTD(IV)=ROOTD0(ITYPE,IV)
2082 XZLT(IV)=ZLT0(ITYPE,MONTH,IV)
2083 XGREEN(IV)=GREEN0(ITYPE,MONTH,IV)
2084 XVCOVER(IV)=VCOVER0(ITYPE,MONTH,IV)
2087 XDEPTH(IDEP)=DEPTH0(ITYPE,IDEP)
2091 XPHSAT=PHSAT0(ITYPE)
2092 XSATCO=SATCO0(ITYPE)
2093 XPOROS=POROS0(ITYPE)
2094 XSLOPE=SLOPE0(ITYPE)
2095 XZ2=Z20(ITYPE,MONTH)
2096 XZ1=Z10(ITYPE,MONTH)
2097 XZ0= Z000(ITYPE,MONTH)
2098 XDD= D0(ITYPE,MONTH)
2099 XRBC=RBC0 (ITYPE,MONTH)
2100 XRDC=RDC0 (ITYPE,MONTH)
2102 !------------------------------------------------------
2103 END SUBROUTINE VEGOUT
2104 !------------------------------------------------------
2106 !=======================================================================
2108 SUBROUTINE COMBO (DDZ2,DZP,DZM,WP,WM,HP,HM,TP,TM,BWP,BWM,BIP, &
2109 BIM,BLP,BLM,BTP,BTM,FIP,FIM,FLP,FLM,CTP,CTM, &
2110 DLIQVOLP,DLIQVOLM,DICEVOLP,DICEVOLM)
2112 !=======================================================================
2118 bwp= wp*rhowater/dzp
2120 ctp= (1.9e6)*(bwp/920.0)
2121 dmlt=wp*rhowater*dlm
2122 if(hp.ge.(-1.0)*dmlt)then
2128 dliqvolp = blp/rhowater
2133 tp=(hp+dmlt)/(ctp*dzp)+273.16
2144 !------------------------------------------------------
2145 END SUBROUTINE COMBO
2146 !------------------------------------------------------
2148 !=======================================================================
2150 SUBROUTINE COMPACT(BI,T,BL,OVERBURDEN,PDZDT,SS,DICE)
2152 !=======================================================================
2153 !clwp 12/11/2000, change the subroutine back to NO DATE form.
2154 data c2,c3,c4,c5/23d-3,2.777d-6,0.04,2.0/
2157 if(bi .ge. dice .or. ss .ge. 1.) return
2159 ddz1=-c3*exp(-c4*(273.15-t))
2160 if(bi .gt. dm) ddz1=ddz1*exp(-46.0d-3*(bi-dm))
2162 if(bl .gt. 0.01) ddz1=ddz1*c5
2163 !cl compaction due to overburden
2164 ddz2=-overburden*exp(-0.08*(273.15-t)-c2*bi)/eta0
2165 !cl compaction occurring during melt has been taken into account in thermal.f
2167 pdzdt=ddz1+ddz2+ddz3
2169 !------------------------------------------------------
2170 END SUBROUTINE COMPACT
2171 !------------------------------------------------------
2173 !=======================================================================
2175 SUBROUTINE GETMET(IPTYPE,PRCP_TOTAL,TAIR, &
2176 PRCP_S,PRCP_W,FI_FALL,FL_FALL,BI_FALL,BL_FALL)
2178 !=======================================================================
2179 IF (PRCP_TOTAL.gt.0.) THEN
2183 ELSE IF(IPTYPE.EQ.1)THEN
2197 IF (IPTYPE.NE.1) THEN
2198 IF (TAIR .GT. 275.15) THEN
2200 ELSE IF (TAIR.GT.258.16)THEN
2201 BI_FALL=50+1.7*(TAIR-258.16)**1.5d0
2211 !------------------------------------------------------
2212 END SUBROUTINE GETMET
2213 !------------------------------------------------------
2215 !=======================================================================
2217 SUBROUTINE INTERCS (DTT,VCOVER,ZLAI,TM,TC,TGS,CAPAC,WWW,PPC,PPL, &
2218 ROFF,ZDEPTH,POROS,CCX,CG,SATCO,SATCAP,SPWET, &
2219 EXTK,ISNOW,P0,CSOIL,DZSOIL, &
2222 !=======================================================================
2224 ! CALCULATION OF (1) INTERCEPTION AND DRAINAGE OF RAINFALL AND SNOW
2225 ! (2) SPECIFIC HEAT TERMS FIXED FOR TIME STEP
2227 ! MODIFICATION 30 DEC 1985 : NON-UNIFORM PRECIPITATION
2228 ! ------------ CONVECTIVE PPN. IS DESCRIBED BY AREA-INTENSITY
2231 ! F(X) = A*EXP(-B*X)+C
2233 ! THROUGHFALL, INTERCEPTION AND INFILTRATION
2234 ! EXCESS ARE FUNCTIONAL ON THIS RELATIONSHIP
2235 ! AND PROPORTION OF LARGE-SCALE PPN.
2236 !----------------------------------------------------------------------
2238 DIMENSION CAPACP(2), SNOWP(2), PCOEFS(2,2)
2239 DATA PCOEFS(1,1)/ 20. /, PCOEFS(1,2)/ .206E-8 /, &
2240 PCOEFS(2,1)/ 0.0001 /, PCOEFS(2,2)/ 0.9999 /, BP /20. /
2241 DIMENSION VCOVER(2),ZLAI(2),WWW(3),CAPAC(2),SATCAP(2),EXTK(2,3,2)
2242 DIMENSION ZDEPTH(3),SNOWW(2)
2247 IF(TOTALP.LT.1.E-8)GO TO 6000
2248 AP = PPC/TOTALP * PCOEFS(1,1) + PPL/TOTALP * PCOEFS(2,1)
2249 CP = PPC/TOTALP * PCOEFS(1,2) + PPL/TOTALP * PCOEFS(2,2)
2255 !----------------------------------------------------------------------
2256 ! THERMAL CONDUCTIVITY OF THE SOIL, TAKING INTO ACCOUNT POROSITY
2257 !----------------------------------------------------------------------
2260 CHISL=( 9.8E-4+1.2E-3*THETA )/( 1.1-0.4*THETA )
2263 !----------------------------------------------------------------------
2264 ! THERMAL DIFFUSIVITY AND HEAT CAPACITY OF THE SOIL
2265 !----------------------------------------------------------------------
2270 D1 =SQRT(DIFSL*86400.0)
2271 CSOIL=ROCS*D1/SQRT(PIE)/2.0
2273 dzsoil=D1/SQRT(PIE)/2.0
2277 CSOIL=CSOIL*(1.0-THALAS)+10.E10*OCEANS+POLAR*3.6*4.2E4
2281 !----------------------------------------------------------------------
2282 ! INPUT PRECIPITATION IS GIVEN IN MM, CONVERTED TO M TO GIVE P0.
2283 !----------------------------------------------------------------------
2287 SPWET1 = AMIN1 ( 0.05, CAPAC(IVEG))*CW
2290 SPECHT = ZLAI(1) * CLAI
2291 IF ( IVEG .EQ. 1 ) GO TO 1100
2296 XSC = AMAX1(0., CAPAC(IVEG) - SATCAP(IVEG) )
2297 IF(IVEG.EQ.2 .AND. TS.LE.TF )GO TO 1170
2298 CAPAC(IVEG) = CAPAC(IVEG) - XSC
2304 IF( TS .GT. TF ) CAPACP(IVEG) = CAPAC(IVEG)
2305 IF( TS .LE. TF ) SNOWP(IVEG) = CAPAC(IVEG)
2306 CAPAC(IVEG) = CAPACP(IVEG)
2307 SNOWW(IVEG) = SNOWP(IVEG)
2308 ZLOAD = CAPAC(IVEG) + SNOWW(IVEG)
2310 FPI = ( 1.-EXP( - EXTK(IVEG,3,1) * ZLAI(IVEG)/VCOVER(IVEG) ) ) &
2312 TTI = P0 * ( 1.-FPI )
2314 !----------------------------------------------------------------------
2315 ! PROPORTIONAL SATURATED AREA (XS) AND LEAF DRAINAGE(TEX)
2316 !----------------------------------------------------------------------
2319 IF ( P0 .LT. 1.E-9 ) GO TO 1150
2320 ARG = ( SATCAP(IVEG)-ZLOAD )/( P0*FPI*AP ) -CP/AP
2321 IF ( ARG .LT. 1.E-9 ) GO TO 1150
2322 XS = -1./BP * ALOG( ARG )
2323 XS = AMIN1( XS, 1. )
2324 XS = AMAX1( XS, 0. )
2325 1150 TEX = P0*FPI * ( AP/BP*( 1.- EXP( -BP*XS )) + CP*XS ) - &
2326 ( SATCAP(IVEG) - ZLOAD ) * XS
2327 TEX = AMAX1( TEX, 0. )
2329 !----------------------------------------------------------------------
2330 ! TOTAL THROUGHFALL (THRU) AND STORE AUGMENTATION
2331 !----------------------------------------------------------------------
2334 IF(IVEG.EQ.2.AND.TGS.LE.TF)THRU = 0.
2337 IF( TM .GT. TF ) CAPAC(IVEG) = CAPAC(IVEG) + PINF
2338 IF( TM .LE. TF ) SNOWW(IVEG) = SNOWW(IVEG) + PINF
2340 IF( IVEG .EQ. 1 ) GO TO 1300
2341 IF( TM .GT. TF ) GO TO 1200
2342 SNOWW(IVEG) = SNOWP(IVEG) + P0
2346 !----------------------------------------------------------------------
2347 ! INSTANTANEOUS OVERLAND FLOW CONTRIBUTION ( ROFF )
2348 !----------------------------------------------------------------------
2350 1200 EQUDEP = SATCO * DTT
2353 IF ( THRU .LT. 1.E-9 ) GO TO 1250
2354 ARG = EQUDEP / ( THRU * AP ) -CP/AP
2355 IF ( ARG .LT. 1.E-9 ) GO TO 1250
2356 XS = -1./BP * ALOG( ARG )
2357 XS = AMIN1( XS, 1. )
2358 XS = AMAX1( XS, 0. )
2359 1250 ROFFO = THRU * ( AP/BP * ( 1.-EXP( -BP*XS )) + CP*XS ) &
2361 ROFFO = AMAX1 ( ROFFO, 0. )
2363 WWW(1) = WWW(1) + (THRU - ROFFO) / ( POROS*ZDEPTH(1) )
2366 !----------------------------------------------------------------------
2367 ! TEMPERATURE CHANGE DUE TO ADDITION OF PRECIPITATION
2368 !----------------------------------------------------------------------
2370 DIFF = ( CAPAC(IVEG)+SNOWW(IVEG) - CAPACP(IVEG)-SNOWP(IVEG) )*CW
2371 CCP = SPECHT + SPWET1
2372 CCT = SPECHT + SPWET1 + DIFF
2374 TSD = ( TS * CCP + TM * DIFF ) / CCT
2377 IF ( TS .GT. TF .AND. TM .GT. TF ) GO TO 2000
2378 IF ( TS .LE. TF .AND. TM .LE. TF ) GO TO 2000
2384 IF ( TSD .GT. TF ) GO TO 2100
2386 !----------------------------------------------------------------------
2387 ! FREEZING OF WATER ON CANOPY OR GROUND
2388 !----------------------------------------------------------------------
2390 CCC = CAPACP(IVEG) * SNOMEL
2391 IF ( TS .LT. TM ) CCC = DIFF * SNOMEL / CW
2392 TSD = ( TTA * CCA + TTB * CCB + CCC ) / CCT
2394 FREEZE = ( TF * CCT - ( TTA * CCA + TTB * CCB ) )
2395 FREEZE = (AMIN1 ( CCC, FREEZE )) / SNOMEL
2396 IF(TSD .GT. TF)TSD = TF - 0.1
2402 !----------------------------------------------------------------------
2403 ! MELTING OF SNOW ON CANOPY OR GROUND
2404 !----------------------------------------------------------------------
2406 CCC = - SNOWW(IVEG) * SNOMEL
2407 IF ( TS .GT. TM ) CCC = - DIFF * SNOMEL / CW
2409 TSD = ( TTA * CCA + TTB * CCB + CCC ) / CCT
2411 FREEZE = ( TF * CCT - ( TTA * CCA + TTB * CCB ) )
2412 FREEZE = (AMAX1( CCC, FREEZE )) / SNOMEL
2413 IF(TSD .LE. TF)TSD = TF - 0.1
2419 SNOWW(IVEG) = SNOWW(IVEG) + FREEZE
2420 CAPAC(IVEG) = CAPAC(IVEG) - FREEZE
2422 IF( IVEG .EQ. 1 ) TC = TSD
2423 IF( IVEG .EQ. 2 ) TGS = TSD
2424 IF( SNOWW(IVEG) .LT. 0.0000001 ) GO TO 3000
2425 ! modeified to force water into soil Xue Feb. 1994
2427 ! IF ( TD .GT. TF ) ZMELT = CAPAC(IVEG)
2428 ! IF ( TD .LE. TF ) ROFF = ROFF + CAPAC(IVEG)
2431 WWW(1) = WWW(1) + ZMELT / ( POROS * ZDEPTH(1) )
2435 CAPAC(IVEG) = CAPAC(IVEG) + SNOWW(IVEG)
2439 IF (ISNOW.eq.0) go to 1001
2442 !----------------------------------------------------------------------
2443 ! CALCULATION OF CANOPY AND GROUND HEAT CAPACITIES.
2444 ! N.B. THIS SPECIFICATION DOES NOT NECESSARILY CONSERVE ENERGY WHEN
2445 ! DEALING WITH VERY LATGE SNOWPACKS.
2446 !----------------------------------------------------------------------
2448 1001 CCX = ZLAI(1) * CLAI + CAPAC(1) * CW
2449 SPWET = AMIN1 ( 0.05, CAPAC(2)) * CW
2450 CG = (CSOIL + SPWET)
2452 !------------------------------------------------------
2453 END SUBROUTINE INTERCS
2454 !------------------------------------------------------
2455 !=======================================================================
2457 SUBROUTINE INTERC(DTT,VCOVER,ZLT,TM,TC,TGS,CAPAC,WWW,PPC,PPL,ROFF, &
2458 ZDEPTH,POROS,CCX,CG,SATCO,SATCAP,SPWET,EXTK,RNOFFS,FILTR,SMELT)
2460 !=======================================================================
2462 ! CALCULATION OF (1) INTERCEPTION AND DRAINAGE OF RAINFALL AND SNOW
2463 ! (2) SPECIFIC HEAT TERMS FIXED FOR TIME STEP
2465 ! MODIFICATION 30 DEC 1985 : NON-UNIFORM PRECIPITATION
2466 ! ------------ CONVECTIVE PPN. IS DESCRIBED BY AREA-INTENSITY
2469 ! F(X) = A*EXP(-B*X)+C
2471 ! THROUGHFALL, INTERCEPTION AND INFILTRATION
2472 ! EXCESS ARE FUNCTIONAL ON THIS RELATIONSHIP
2473 ! AND PROPORTION OF LARGE-SCALE PPN.
2474 !----------------------------------------------------------------------
2475 !----------------------------------------------------------------------
2477 REAL, DIMENSION (2) :: VCOVER, ZLT, CAPAC, SATCAP, SNOWW, CAPACP, SNOWP
2478 REAL, DIMENSION (3) :: WWW, ZDEPTH
2479 REAL, DIMENSION (2,2) :: PCOEFS
2480 REAL, DIMENSION (2,3,2) :: EXTK
2482 DATA PCOEFS(1,1)/ 20. /, PCOEFS(1,2)/ .206E-8 /, &
2483 PCOEFS(2,1)/ 0.0001 /, PCOEFS(2,2)/ 0.9999 /, BP /20. /
2488 IF(TOTALP.LT.1.E-8)GO TO 6000
2489 AP = PPC/TOTALP * PCOEFS(1,1) + PPL/TOTALP * PCOEFS(2,1)
2490 CP = PPC/TOTALP * PCOEFS(1,2) + PPL/TOTALP * PCOEFS(2,2)
2497 !----------------------------------------------------------------------
2498 ! THERMAL CONDUCTIVITY OF THE SOIL, TAKING INTO ACCOUNT POROSITY
2499 !----------------------------------------------------------------------
2502 CHISL=( 9.8E-4+1.2E-3*THETA )/( 1.1-0.4*THETA )
2506 !----------------------------------------------------------------------
2507 ! THERMAL DIFFUSIVITY AND HEAT CAPACITYOF THE SOIL
2508 !----------------------------------------------------------------------
2513 D1 =SQRT(DIFSL*86400.0)
2514 CSOIL=ROCS*D1/SQRT(PIE)/2.0
2518 CSOIL=CSOIL*(1.0-THALAS)+10.E10*OCEANS+POLAR*3.6*4.2E4
2522 !----------------------------------------------------------------------
2523 ! INPUT PRECIPITATION IS GIVEN IN MM, CONVERTED TO M TO GIVE P0.
2524 !----------------------------------------------------------------------
2528 SPWET1 = AMIN1 ( 0.05, CAPAC(IVEG))*CW
2531 SPECHT = ZLT(1) * CLAI
2532 IF ( IVEG .EQ. 1 ) GO TO 1100
2537 XSC = AMAX1(0., CAPAC(IVEG) - SATCAP(IVEG) )
2538 IF(IVEG.EQ.2 .AND. TS.LE.TF )GO TO 1170
2539 CAPAC(IVEG) = CAPAC(IVEG) - XSC
2541 RNOFFS = XSC*1000. + RNOFFS
2546 IF( TS .GT. TF ) CAPACP(IVEG) = CAPAC(IVEG)
2547 IF( TS .LE. TF ) SNOWP(IVEG) = CAPAC(IVEG)
2548 CAPAC(IVEG) = CAPACP(IVEG)
2549 SNOWW(IVEG) = SNOWP(IVEG)
2550 ZLOAD = CAPAC(IVEG) + SNOWW(IVEG)
2552 FPI = ( 1.-EXP( - EXTK(IVEG,3,1) * ZLT(IVEG)/VCOVER(IVEG) ) ) &
2554 TTI = P0 * ( 1.-FPI )
2556 !----------------------------------------------------------------------
2557 ! PROPORTIONAL SATURATED AREA (XS) AND LEAF DRAINAGE(TEX)
2558 !----------------------------------------------------------------------
2561 IF ( P0 .LT. 1.E-9 ) GO TO 1150
2562 ARG = ( SATCAP(IVEG)-ZLOAD )/( P0*FPI*AP ) -CP/AP
2563 IF ( ARG .LT. 1.E-9 ) GO TO 1150
2564 XS = -1./BP * ALOG( ARG )
2565 XS = AMIN1( XS, 1. )
2566 XS = AMAX1( XS, 0. )
2567 1150 TEX = P0*FPI * ( AP/BP*( 1.- EXP( -BP*XS )) + CP*XS ) - &
2568 ( SATCAP(IVEG) - ZLOAD ) * XS
2569 TEX = AMAX1( TEX, 0. )
2571 !----------------------------------------------------------------------
2572 ! TOTAL THROUGHFALL (THRU) AND STORE AUGMENTATION
2573 !----------------------------------------------------------------------
2576 IF(IVEG.EQ.2.AND.TGS.LE.TF)THRU = 0.
2579 IF( TM .GT. TF ) CAPAC(IVEG) = CAPAC(IVEG) + PINF
2580 IF( TM .LE. TF ) SNOWW(IVEG) = SNOWW(IVEG) + PINF
2582 IF( IVEG .EQ. 1 ) GO TO 1300
2583 IF( TM .GT. TF ) GO TO 1200
2584 SNOWW(IVEG) = SNOWP(IVEG) + P0
2588 !----------------------------------------------------------------------
2589 ! INSTANTANEOUS OVERLAND FLOW CONTRIBUTION ( ROFF )
2590 !----------------------------------------------------------------------
2592 1200 EQUDEP = SATCO * DTT
2595 IF ( THRU .LT. 1.E-9 ) GO TO 1250
2596 ARG = EQUDEP / ( THRU * AP ) -CP/AP
2597 IF ( ARG .LT. 1.E-9 ) GO TO 1250
2598 XS = -1./BP * ALOG( ARG )
2599 XS = AMIN1( XS, 1. )
2600 XS = AMAX1( XS, 0. )
2601 1250 ROFFO = THRU * ( AP/BP * ( 1.-EXP( -BP*XS )) + CP*XS ) &
2603 ROFFO = AMAX1 ( ROFFO, 0. )
2605 RNOFFS = RNOFFS + ROFFO*1000.
2606 FILTR = FILTR + (THRU - ROFFO)
2607 WWW(1) = WWW(1) + (THRU - ROFFO) / ( POROS*ZDEPTH(1) )
2610 !----------------------------------------------------------------------
2611 ! TEMPERATURE CHANGE DUE TO ADDITION OF PRECIPITATION
2612 !----------------------------------------------------------------------
2614 DIFF = ( CAPAC(IVEG)+SNOWW(IVEG) - CAPACP(IVEG)-SNOWP(IVEG) )*CW
2615 CCP = SPECHT + SPWET1
2616 CCT = SPECHT + SPWET1 + DIFF
2618 TSD = ( TS * CCP + TM * DIFF ) / CCT
2621 IF ( TS .GT. TF .AND. TM .GT. TF ) GO TO 2000
2622 IF ( TS .LE. TF .AND. TM .LE. TF ) GO TO 2000
2628 IF ( TSD .GT. TF ) GO TO 2100
2630 !----------------------------------------------------------------------
2631 ! FREEZING OF WATER ON CANOPY OR GROUND
2632 !----------------------------------------------------------------------
2634 CCC = CAPACP(IVEG) * SNOMEL
2635 IF ( TS .LT. TM ) CCC = DIFF * SNOMEL / CW
2636 TSD = ( TTA * CCA + TTB * CCB + CCC ) / CCT
2638 FREEZE = ( TF * CCT - ( TTA * CCA + TTB * CCB ) )
2639 FREEZE = (AMIN1 ( CCC, FREEZE )) / SNOMEL
2640 IF(TSD .GT. TF)TSD = TF - 0.1
2646 !----------------------------------------------------------------------
2647 ! MELTING OF SNOW ON CANOPY OR GROUND
2648 !----------------------------------------------------------------------
2650 CCC = - SNOWW(IVEG) * SNOMEL
2651 IF ( TS .GT. TM ) CCC = - DIFF * SNOMEL / CW
2653 TSD = ( TTA * CCA + TTB * CCB + CCC ) / CCT
2655 FREEZE = ( TF * CCT - ( TTA * CCA + TTB * CCB ) )
2656 FREEZE = (AMAX1( CCC, FREEZE )) / SNOMEL
2657 IF(TSD .LE. TF)TSD = TF - 0.1
2661 SNOWW(IVEG) = SNOWW(IVEG) + FREEZE
2662 CAPAC(IVEG) = CAPAC(IVEG) - FREEZE
2664 IF( IVEG .EQ. 1 ) TC = TSD
2665 IF( IVEG .EQ. 2 ) TGS = TSD
2666 IF( SNOWW(IVEG) .LT. 0.0000001 ) GO TO 3000
2668 ! modified to force water into soil. Xue Feb. 1994
2670 ! IF ( TD .GT. TF ) ZMELT = CAPAC(IVEG)
2671 ! IF ( TD .LE. TF ) ROFF = ROFF + CAPAC(IVEG)
2673 WWW(1) = WWW(1) + ZMELT / ( POROS * ZDEPTH(1) )
2674 FILTR = FILTR + ZMELT
2678 CAPAC(IVEG) = CAPAC(IVEG) + SNOWW(IVEG)
2681 ! **** LOAD PILPS PARAMETER
2683 ! if (freeze.lt.0) snm(istat)=snm(istat)-freeze
2690 !----------------------------------------------------------------------
2691 ! CALCULATION OF CANOPY AND GROUND HEAT CAPACITIES.
2692 ! N.B. THIS SPECIFICATION DOES NOT NECESSARILY CONSERVE ENERGY WHEN
2693 ! DEALING WITH VERY LATGE SNOWPACKS.
2694 !----------------------------------------------------------------------
2696 CCX = ZLT(1) * CLAI + CAPAC(1) * CW
2697 SPWET = AMIN1 ( 0.05, CAPAC(2))*CW
2698 CG = (CSOIL + SPWET)
2700 !------------------------------------------------------
2701 END SUBROUTINE INTERC
2702 !------------------------------------------------------
2703 !=======================================================================
2705 SUBROUTINE LAYER1 (CSOIL,TGS,DZSOIL,H,W,SNOWDEPTH,SWE,STEMP,ND)
2707 !=======================================================================
2708 parameter (dice=920.0, rhowater=1000.0,dlm=3.335d5)
2709 dimension h(nd),w(nd)
2712 snh=h(1)+h(2)+h(3)+csoil*(tgs-273.16)
2713 ! snh=h(1)+h(2)+h(3)+csoil*(tgs-273.16)*dzsoil
2714 dmlto=swe*dlm*rhowater
2715 scv=1.9e+6*(swe/snowdepth)/dice
2716 if (snh.gt.0.0) then
2718 stemp=snh/(swe*4.18*10**6.+csoil)+273.16
2719 ! stemp=snh/(swe*4.18*10**6.+csoil*dzsoil)+273.16
2720 else if (snh.gt.-dmlto) then
2724 stemp=(snh+dmlto)/(scv*snowdepth+csoil)+273.16
2725 ! stemp=(snh+dmlto)/(scv*snowdepth+csoil*dzsoil)+273.16
2728 !------------------------------------------------------
2729 END SUBROUTINE LAYER1
2730 !------------------------------------------------------
2732 !=======================================================================
2734 SUBROUTINE LAYERN (TG,SNOW_WE,SNOW_DEPTH, DZ0,BW0,W0,BT0,CT0, &
2735 FL0,FI0,H0,BL0,BI0,DLIQV0,DICEV0,TSSN0,DMLT0)
2737 !=======================================================================
2738 DIMENSION DZ0(4),W0(4),BW0(4),BT0(4),CT0(4),FL0(4),FI0(4),H0(4), &
2739 BL0(4),BI0(4),DLIQV0(4),DICEV0(4),TSSN0(4),DMLT0(4)
2740 ! ------------------------------------------------------------------7272
2741 IF(SNOW_DEPTH.GT.0.05.AND.SNOW_DEPTH.LE.0.06) THEN
2744 DZ0(3)=SNOW_DEPTH- DZ0(1)- DZ0(2)
2745 ELSE IF ( SNOW_DEPTH.GT.0.06.AND.SNOW_DEPTH.LE.0.08) THEN
2748 DZ0(1)=SNOW_DEPTH- DZ0(3)- DZ0(2)
2749 ELSE IF ( SNOW_DEPTH.GT.0.08.AND.SNOW_DEPTH.LE.0.62) THEN
2751 DZ0(2)=(SNOW_DEPTH- DZ0(3))*0.33333333
2752 DZ0(1)=(SNOW_DEPTH- DZ0(3))*0.66666667
2753 ELSE IF ( SNOW_DEPTH.GT.0.62) THEN
2756 DZ0(1)=SNOW_DEPTH- DZ0(3)- DZ0(2)
2760 BW0(I)=SNOW_WE*RHOWATER/SNOW_DEPTH
2762 !---------------------------------------------------------------------
2763 ! Next we will calculate the initial variables for time step going on
2764 !---------------------------------------------------------------------
2766 W0(I)=(BW0(I)*DZ0(I))/RHOWATER
2768 CT0(I)=(BW0(I)/920.0)*1.9e+6
2769 IF (TSSN0(I).EQ.273.16)THEN
2772 H0(I)=(-1.0)*W0(I)*FI0(I)*DLM*RHOWATER
2773 BL0(I)=BW0(I)*FL0(I)
2774 BI0(I)=BW0(I)*FI0(I)
2775 DLIQV0(I) = BL0(I)/RHOWATER
2776 DICEV0(I) = BI0(I)/DICE
2777 ELSE IF(TSSN0(I).LT.273.16) THEN
2780 DMLT0(I)=W0(I)*DLM*RHOWATER
2781 H0(I)=(TSSN0(I)-273.16)*CT0(I)*DZ0(I)-DMLT0(I)
2785 DICEV0(I) = BI0(I)/DICE
2789 !------------------------------------------------------
2790 END SUBROUTINE LAYERN
2791 !------------------------------------------------------
2793 !=======================================================================
2795 SUBROUTINE MODNODE(SNOWDEPTH,DZO,WO,HO,TSSNO,BWO,BIO, &
2796 BLO,BTO,FIO,FLO,CTO,DLIQVOL,DICEVOL)
2798 !=======================================================================
2799 DIMENSION DZO(N1),WO(N1),HO(N1),TSSNO(N1),BWO(N1),BIO(N1),BLO(N1), &
2800 BTO(N1),FIO(N1),FLO(N1),CTO(N1),DLIQVOL(N1),DICEVOL(N1)
2802 !clwp 10/30/2000, for the adjustment of layers 2,3
2803 IF (SNOWDEPTH.le.0.06) then
2806 DZ3=SNOWDEPTH-( DZ2+DZ1)
2807 ELSE IF (SNOWDEPTH.gt.0.06) then
2810 ! to get the expected change of top layer of snow
2812 ! to get the expected change of top layer of snow
2813 IF (DDZ3.GT.0.0) THEN
2814 DDZ3=MIN(DDZ3,dzo(2))
2815 CALL COMBO (DDZ3,dzo(3),dzo(2),wo(3),wo(2),ho(3),ho(2), &
2816 tssno(3),tssno(2),bwo(3),bwo(2),bio(3),bio(2),blo(3),blo(2), &
2817 bto(3),bto(2),fio(3),fio(2),flo(3),flo(2),cto(3),cto(2), &
2818 dliqvol(3),dliqvol(2),dicevol(3),dicevol(2))
2821 CALL COMBO (DDZ3,dzo(2),dzo(3),wo(2),wo(3),ho(2),ho(3), &
2822 tssno(2),tssno(3),bwo(2),bwo(3),bio(2),bio(3),blo(2),blo(3), &
2823 bto(2),bto(3),fio(2),fio(3),flo(2),flo(3),cto(2),cto(3), &
2824 dliqvol(2),dliqvol(3),dicevol(2),dicevol(3))
2826 !clwp 10/30/2000, for the adjustment of layers 1,2
2828 IF (SNOWDEPTH.le.0.06) THEN
2830 ELSE IF (SNOWDEPTH.gt.0.06.and.SNOWDEPTH.le.0.08) THEN
2832 ELSE IF (SNOWDEPTH.gt.0.08.and.SNOWDEPTH.le.0.62) THEN
2833 DZ2=0.33333333*SUM12
2834 ELSE IF (SNOWDEPTH.gt.0.62) THEN
2837 ! to get the expected change of middle layer of snow
2839 ! to get the expected change of middle layer of snow
2840 IF (DDZ2.GT.0.0) THEN
2841 CALL COMBO (DDZ2,dzo(2),dzo(1),wo(2),wo(1),ho(2),ho(1), &
2842 tssno(2),tssno(1),bwo(2),bwo(1),bio(2),bio(1),blo(2),blo(1), &
2843 bto(2),bto(1),fio(2),fio(1),flo(2),flo(1),cto(2),cto(1), &
2844 dliqvol(2),dliqvol(1),dicevol(2),dicevol(1))
2847 CALL COMBO (DDZ2,dzo(1),dzo(2),wo(1),wo(2),ho(1),ho(2), &
2848 tssno(1),tssno(2),bwo(1),bwo(2),bio(1),bio(2),blo(1),blo(2), &
2849 bto(1),bto(2),fio(1),fio(2),flo(1),flo(2),cto(1),cto(2), &
2850 dliqvol(1),dliqvol(2),dicevol(1),dicevol(2))
2852 SNOWDEPTH=dzo(1)+dzo(2)+dzo(3)
2854 !------------------------------------------------------
2855 END SUBROUTINE MODNODE
2856 !------------------------------------------------------
2858 !=======================================================================
2860 SUBROUTINE NEWSNOW(PRCP,BIFALL,BLFALL,FLFALL,TKAIR, &
2861 DZO,WO,BWO,CTO,HO,DMLTO,FIO,FLO,BIO,BLO,DLIQVOL,DICEVOL,TSSNO,WF)
2863 !=======================================================================
2864 ! ------------------------------------------------------------------7272
2865 !! calculate rate of change in element thickness due to snow falling
2866 !! Precip has just started or previous top node is full. Initiate a
2868 !clwp 12/08/2000, since this subroutine only deals with the top layer,
2869 !clwp change the original AA(n) to AA, in other words replace arrays.
2870 ! ------------------------------------------------------------------7272
2871 dzfall=prcp*rhowater/bifall
2874 bwo=(wo*rhowater)/dzo
2875 cto=1.9e+6*(bwo/920.0)
2876 dum=(tkair-273.16)*cto*dzfall &
2877 -(1.0-flfall)*(blfall+bifall)*dlm*dzfall
2879 dmlto=wo*rhowater*dlm
2880 if (ho.ge.-dmlto) then
2886 dliqvol=blo/rhowater
2889 !!!!! when snow temperature is below 273.16
2897 tssno=(ho+dmlto)/(cto*dzo)+273.16
2900 !------------------------------------------------------
2901 END SUBROUTINE NEWSNOW
2902 !------------------------------------------------------
2904 !=======================================================================
2906 SUBROUTINE NEWTON(A1,Y,FINC,NOX,NONPOS,IWOLK,L,ZINC,A2,Y1,ITER)
2908 !=======================================================================
2910 !-----------------------------------------------------------------------
2911 ! ** VERSION ACQUIRED FROM EROS 2/19/86.
2913 ! ** THE NEWTON RAPHSON ITERATIVE ROUTINE WILL BE USED TO GENERATE NEW
2914 ! ** VALUES OF A1 IF DABSOLUTE VALUE OF Y IS GREATER THAN ERTOL;
2915 ! ** A1 IS ESTIMATE, Y IS RESULTANT ERROR
2916 ! ** NEX IS EXIT CONDITION (0=NO EXIT) OR (1 WHEN DABS(Y) LT ERTOL)
2917 ! ** ERTOL IS THE DABSOLUTE VALUE OF Y NECESSARY TO OBTAIN AN EXIT
2918 ! ** FINC IS INITIAL INCREMENT SIZE FOR SECOND ESTIMATE OF A1
2919 ! ** NONPOS=0 IF QUANTITY TO BE MINIMIZED CAN BE LESS THAN ZERO;
2920 ! ** NONPOS=1 IF QUANTITY CAN ONLY BE POSITIVE
2921 ! ** L IDENTIFIES WHICH QUANTITY IS BEING CALCULATED.
2923 ! ** CONTROL VALUES: FINC,ERTOL,NOX,NONPOS,L:MUST BE SET BY USER
2924 !-----------------------------------------------------------------------
2926 !fds Changes according to Jack (Feb/2008)
2927 REAL, DIMENSION (3) :: IWALK, NEX, ITER
2928 REAL, DIMENSION (3) :: ZINC, A2, Y1
2930 !fds DIMENSION IWALK(3), NEX(3)
2931 !fds DIMENSION ZINC(3), A2(3), Y1(3),ITER3(3)
2938 IF ( ITER(L) .GE. 490 ) GO TO 160
2939 IF (ERTOL .LT. 0.00000001) ERTOL=0.000001
2940 IF (ABS(Y) .LE. ERTOL) GO TO 150
2941 IF((ABS(Y-Y1(L))).LE.0.01*ERTOL .AND. IWALK(L).EQ.0 ) GO TO 8
2943 IF(ABS(Y1(L)).GT.ERTOL) GO TO 1
2949 IF (IWALK(L) .EQ. 3) GO TO 101
2953 IF(ITER(L) .EQ. 10) IWALK(L)=1
2954 IF(IWALK(L) .NE. 0) GO TO 2
2955 IF(ABS(Y) .GT. ERTOL) GO TO 3
2958 3 A=A1-Y*(A1-A2(L))/(Y-Y1(L))
2959 IF(ABS(A-A1).GT.(10.0*FINC)) &
2960 A=A1+10.0*FINC*SIGN(CONS,(A-A1))
2965 2 IF(IWALK(L).EQ.2)GO TO 4
2966 IF(IWALK(L).EQ.3) GO TO 6
2967 IF(SIGN(CONS,Y).EQ.SIGN(CONS,Y1(L))) GO TO 3
2968 ZINC(L)=(A1-A2(L))/4.0
2973 4 IF(SIGN(CONS,Y) .EQ.SIGN(CONS,Y1(L))) GO TO 5
2974 ZINC(L)=-ZINC(L)/4.0
2985 6 IF(SIGN(CONS,Y).EQ.SIGN(CONS,Y1(L))) GO TO 7
2993 8 A1 = A1 + FINC*2.0
2997 900 FORMAT ( 3X,' FAILURE TO CONVERGE AFTER 490 ITERATIONS', &
2998 /, 3X,' Y = ',2G12.5,2X,I14)
3007 IF(NONPOS.EQ.1.AND.A1.LT.0.0) A1=A2(L)/2.0
3011 !------------------------------------------------------
3012 END SUBROUTINE NEWTON
3013 !------------------------------------------------------
3015 !=======================================================================
3017 SUBROUTINE OLD(TSSN,BW,BL,BI,H,FL,FI,W,DZ,SS,CT,BT,DMLT, &
3018 TSSNO,BWO,BLO,BIO,HO,FLO,FIO,WO,DZO,SSO,CTO,BTO,DMLTO)
3020 !=======================================================================
3021 DIMENSION TSSN(N1),BW(N1),BL(N1),BI(N1),H(N1),FL(N1),FI(N1), &
3022 W(N1),DZ(N1),SS(N1),CT(N1),BT(N1),DMLT(N1), TSSNO(N1), &
3023 BWO(N1),BLO(N1),BIO(N1),HO(N1),FLO(N1),FIO(N1), &
3024 WO(N1),DZO(N1),SSO(N1),CTO(N1),BTO(N1),DMLTO(N1)
3041 !------------------------------------------------------
3043 !------------------------------------------------------
3045 !=======================================================================
3047 SUBROUTINE RADAB (TRAN,REF,GREEN,VCOVER,CHIL,ZLAI,Z2,Z1,SOREF,TC, &
3048 TGS,SATCAP,EXTK,RADFAC,THERMK,RADT,PAR,PD,ALBEDO,SALB, &
3049 TGEFF,SUNANG,XADJ,CAPAC,RADN,ZLWUP,FRAC, &
3050 ISNOW,SNOWDEN,SNOWDEPTH,SWDOWN,XALBEDO,SCOV2,ISICE, &
3051 fsdown,fldown,fsup,flup)
3053 !=======================================================================
3055 ! CALCULATION OF ALBEDOS VIA TWO STREAM APPROXIMATION( DIRECT
3056 ! AND DIFFUSE ) AND PARTITION OF RADIANT ENERGY
3058 !cl CLOSS=2.*VCOVER(1)*(1.-THERMK)*STEFAN*TC**4
3059 !cl -VCOVER(1)*(1.-THERMK)*STEFAN*TGS**4
3060 !cl GLOSS=STEFAN*TGS**4 - VCOVER(1)*(1.-THERMK)*STEFAN*TC**4
3061 !-----------------------------------------------------------------------
3062 DIMENSION TRANC1(2), TRANC2(2), TRANC3(2)
3063 DIMENSION CAPAC(2), SATCAP(2), TRAN(2,3,2), REF(2,3,2), SOREF(3)
3064 DIMENSION GREEN(2), VCOVER(2), ZLAI(2), CHIL(2), RADN(3,2),RADT(2)
3065 DIMENSION RADFAC(2,2,2), RADSAV(12), PAR(2), PD(2), ALBEDO(2,3,2)
3066 DIMENSION SALB(2,2), EXTK(2,3,2), FRAC(2,2)
3069 ! dimension sibalbedo(12,31,24),sibswup(12,31,24)
3072 f=max(sunang,0.01746)
3073 !crr ratko, 08/03/2004
3079 !----------------------------------------------------------------------
3080 ! CALCULATION OF MAXIMUM WATER STORAGE VALUES.
3081 !----------------------------------------------------------------------
3084 IF ( ABS(TF-TGS) .LT. 0.5 ) FMELT = 0.6
3085 SATCAP(1) = ZLAI(1) * 0.0001
3086 SATCAP(2) = ZLAI(2) * 0.0001
3087 !CS------------------------- Sun change following DEPCOV 10/13/98
3088 IF (ISNOW.eq.0) THEN
3089 DEPCOV = AMAX1( 0., (SNOWDEPTH-Z1))
3091 DEPCOV = AMAX1( 0., (CAPAC(2)*SNOWDEN-Z1))
3093 !CS-----------------------------------------------------------10/13/98
3094 DEPCOV = AMIN1( DEPCOV, (Z2-Z1)*0.95 )
3095 SATCAP(1) = SATCAP(1) * ( 1. - DEPCOV / ( Z2 - Z1 ) )
3096 !crr - thermal part is in use in temrs1 & temrs2
3100 albedo(iveg,iwave,irad)=0.
3103 !----------------------------------------------------------------------
3105 DO 1000 IWAVE = 1, 2
3107 DO 2000 IVEG = 2, 1,-1
3108 !----------------------------------------------------------------------
3109 ! MODIFICATION FOR EFFECT OF SNOW ON UPPER STOREY ALBEDO
3110 ! SNOW REFLECTANCE = 0.80, 0.40 . MULTIPLY BY 0.6 IF MELTING
3111 ! SNOW TRANSMITTANCE = 0.20, 0.54
3112 !crr snow reflectance now 0.85, 0.65 (see xref1, xref2)
3114 !----------------------------------------------------------------------
3116 IF( IVEG .EQ. 2 ) GO TO 100
3117 IF( TC .LE. TF ) SCOV = AMIN1( 0.5, CAPAC(1) / SATCAP(1) )
3119 REFF1 = ( 1. - SCOV ) * REF(IVEG,IWAVE,1) + SCOV * ( xref1 - &
3120 IWAVE * xref2 ) * FMELT
3121 REFF2 = ( 1. - SCOV ) * REF(IVEG,IWAVE,2) + SCOV * ( xref1 - &
3122 IWAVE * xref2 ) * FMELT
3123 TRAN1 = TRAN(IVEG,IWAVE,1) * ( 1. - SCOV ) &
3124 + SCOV * ( 1.- ( xref1 - IWAVE * xref2 ) * FMELT ) &
3125 * TRAN(IVEG,IWAVE,1)
3126 TRAN2 = TRAN(IVEG,IWAVE,2) * ( 1. - SCOV ) &
3127 + SCOV * ( 1.- ( xref1 - IWAVE * xref2 ) * FMELT ) * 0.9 &
3128 * TRAN(IVEG,IWAVE,2)
3130 !----------------------------------------------------------------------
3132 SCAT = GREEN(IVEG)*( TRAN1 + REFF1 ) +( 1. - GREEN(IVEG) ) * &
3136 IF ( ABS(CHIV) .LE. 0.01 ) CHIV = 0.01
3137 AA = 0.5 - 0.633 * CHIV - 0.33 * CHIV * CHIV
3138 BB = 0.877 * ( 1. - 2. * AA )
3141 EXTKB = ( AA + BB * F ) / F
3142 ZMEW = 1. / BB * ( 1. - AA / BB * ALOG ( ( AA + BB ) / AA ) )
3143 ACSS = SCAT / 2. * PROJ / ( PROJ + F * BB )
3144 ACSS = ACSS * ( 1. - F * AA / ( PROJ + F * BB ) * ALOG ( ( PROJ &
3145 + F * BB + F * AA ) / ( F * AA ) ) )
3147 EXTK( IVEG, IWAVE, 1 ) = PROJ / F * SQRT( 1.-SCAT )
3148 EXTK( IVEG, IWAVE, 2 ) = 1. / ZMEW * SQRT( 1.-SCAT )
3149 EXTK( IVEG, 3, 1 ) = AA + BB
3150 EXTK( IVEG, 3, 2 ) = 1./ZMEW
3152 UPSCAT = GREEN(IVEG) * TRAN1 + ( 1. - GREEN(IVEG) ) * TRAN2
3153 UPSCAT = 0.5 * ( SCAT + ( SCAT - 2. * UPSCAT ) * &
3154 (( 1. - CHIV ) / 2. ) ** 2 )
3156 BETAO = ( 1. + ZMEW * EXTKB ) / ( SCAT * ZMEW * EXTKB ) * ACSS
3158 !----------------------------------------------------------------------
3160 ! DICKINSON'S VALUES
3162 BE = 1. - SCAT + UPSCAT
3164 BOT = ( ZMEW * EXTKB ) ** 2 + ( CE**2 - BE**2 )
3165 IF ( ABS(BOT) .GT. 1.E-10) GO TO 200
3167 BE = 1. - SCAT + UPSCAT
3168 BOT = ( ZMEW * EXTKB ) ** 2 + ( CE**2 - BE**2 )
3170 DE = SCAT * ZMEW * EXTKB * BETAO
3171 FE = SCAT * ZMEW * EXTKB * ( 1. - BETAO )
3172 !----------------------------------------------------------------------
3174 CCE = DE * BE - ZMEW * DE * EXTKB + CE * FE
3175 FFE = BE * FE + ZMEW * FE * EXTKB + CE * DE
3180 PSI = SQRT(BE**2 - CE**2)/ZMEW
3182 !----------------------------------------------------------------------
3183 ! REDUCTION IN EXPOSED HEIGHT OF UPPER STOREY AS SNOW ACCUMULATES
3185 !CS Sun Change following SDEP to SDEP=snowdepth on 10/13/98
3186 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
3187 IF (ISNOW.eq.0) THEN
3190 SDEP = CAPAC(2) *SNOWDEN
3193 FAC = ( SDEP - Z1 ) / ( Z2 - Z1 )
3194 FAC = AMAX1( 0., FAC )
3195 FAC = AMIN1( 0.99, FAC )
3197 ZAT = ZLAI(IVEG) / VCOVER(IVEG)
3198 IF ( IVEG .EQ. 1 ) ZAT = ZAT * (1.-FAC)
3200 POWER1 = AMIN1( PSI*ZAT, 50. )
3201 POWER2 = AMIN1( EXTKB*ZAT, 50. )
3202 EPSI = EXP( - POWER1 )
3203 EK = EXP ( - POWER2 )
3207 IF ( IVEG .EQ. 2 ) GO TO 300
3208 ROSB = ALBEDO(2,IWAVE,1)
3209 ROSD = ALBEDO(2,IWAVE,2)
3214 !-----------------------------------------------------------------------
3215 ! CALCULATION OF DIFFUSE ALBEDOS
3216 !-----------------------------------------------------------------------
3221 DEN = ( BE + ZP ) * ( F1 - ZP ) / EPSI - &
3222 ( BE - ZP ) * ( F1 + ZP ) * EPSI
3223 ALPHA = CE * ( F1 - ZP ) / EPSI / DEN
3224 BETA = -CE * ( F1 + ZP ) * EPSI / DEN
3226 DEN = ( F1 + ZP ) / EPSI - ( F1 - ZP ) * EPSI
3228 GAMMA = ( F1 + ZP ) / EPSI / DEN
3229 DELTA = - ( F1 - ZP ) * EPSI / DEN
3231 ALBEDO(IVEG,IWAVE,2) = ALPHA + BETA
3232 ! XQQ(IVEG,IWAVE,2) = ALBEDO(IVEG, IWAVE, 2)
3234 IF ( IVEG .EQ. 1 ) GO TO 400
3236 IF ( TGS .LE. TF ) SCOV2 = AMIN1( 1., CAPAC(2) / 0.004 )
3237 !crr CORRECTION FOR KEEPING ALBEDO HIGH OVER SNOW
3238 IF (ISICE.EQ.1) SCOV2=1.
3240 ALBEDO(2,IWAVE,2) = &
3241 ROSD * ( 1. - VCOVER(2) ) + ALBEDO(2,IWAVE,2) * VCOVER(2)
3242 ALBEDO(2,IWAVE,2) = &
3243 ( 1. - SCOV2 ) * ALBEDO(2,IWAVE,2) + SCOV2 * &
3244 ( xref1-IWAVE*xref2 ) * &
3248 TRANC2(IWAVE) = GAMMA * EPSI + DELTA / EPSI
3250 !-----------------------------------------------------------------------
3251 ! CALCULATION OF DIRECT ALBEDOS
3252 !-----------------------------------------------------------------------
3257 DEN = ( BE + ZP ) * ( F1 - ZP ) / EPSI - &
3258 ( BE - ZP ) * ( F1 + ZP ) * EPSI
3259 ALPHA = ( DE - TORE * ( BE + ZMK ) ) * ( F1 - ZP ) / EPSI - &
3260 ( BE - ZP ) * ( DE - CE*GE - TORE * ( F1 + ZMK ) ) * EK
3262 BETA = ( BE + ZP ) * (DE - CE*GE - TORE * ( F1 + ZMK ))* EK - &
3263 ( DE - TORE * ( BE + ZMK ) ) * ( F1 + ZP ) * EPSI
3266 DEN = ( F1 + ZP ) / EPSI - ( F1 - ZP ) * EPSI
3267 GAMMA = - SIGE * ( F1 + ZP ) / EPSI - &
3268 ( FE + CE * GE * ROSD + SIGE * ( ZMK - F1 ) ) * EK
3270 DELTA = ( CE * GE * ROSD + FE + SIGE * ( ZMK - F1 ) ) * EK &
3271 + SIGE * ( F1 - ZP ) * EPSI
3274 ALBEDO(IVEG,IWAVE,1) = TORE + ALPHA + BETA
3275 ! XQQ(IVEG,IWAVE,1) = ALBEDO(IVEG, IWAVE, 1)
3276 !----------------------------------------------------------------------
3278 IF( IVEG .EQ. 1 ) GO TO 500
3279 ALBEDO(2,IWAVE,1) = ROSB * ( 1. - VCOVER(2) ) &
3280 + ALBEDO(2,IWAVE,1) * VCOVER(2)
3281 ALBEDO(2,IWAVE,1) = ( 1. - SCOV2 ) * ALBEDO(2,IWAVE,1) + &
3282 SCOV2 * ( xref1-IWAVE*xref2 ) * FMELT
3287 TRANC3(IWAVE) = SIGE * EK + GAMMA * EPSI + DELTA / EPSI
3290 !----------------------------------------------------------------------
3291 ! CALCULATION OF TERMS WHICH MULTIPLY INCOMING SHORT WAVE FLUXES
3292 ! TO GIVE ABSORPTION OF RADIATION BY CANOPY AND GROUND
3293 !----------------------------------------------------------------------
3295 RADFAC(2,IWAVE,1) = ( 1.-VCOVER(1) ) * ( 1.-ALBEDO(2,IWAVE,1) ) &
3296 + VCOVER(1) * ( TRANC1(IWAVE) * ( 1.-ALBEDO(2,IWAVE,1) ) &
3297 + TRANC3(IWAVE) * ( 1.-ALBEDO(2,IWAVE,2) ) )
3299 RADFAC(2,IWAVE,2) = ( 1.-VCOVER(1) ) * ( 1.-ALBEDO(2,IWAVE,2) ) &
3300 + VCOVER(1) * TRANC2(IWAVE) * ( 1.-ALBEDO(2,IWAVE,2) )
3302 RADFAC(1,IWAVE,1) = VCOVER(1) * ( ( 1.-ALBEDO(1,IWAVE,1) ) &
3303 - TRANC1(IWAVE) * ( 1.-ALBEDO(2,IWAVE,1) ) &
3304 - TRANC3(IWAVE) * ( 1.-ALBEDO(2,IWAVE,2) ) )
3306 RADFAC(1,IWAVE,2) = VCOVER(1) * ( ( 1.-ALBEDO(1,IWAVE,2) ) &
3307 - TRANC2(IWAVE) * ( 1.-ALBEDO(2,IWAVE,2) ) )
3309 ! XQQ(1,IWAVE,1) = RADFAC(1,IWAVE,1)
3310 ! XQQ(1,IWAVE,2) = RADFAC(1,IWAVE,2)
3311 ! XQQ(2,IWAVE,1) = RADFAC(2,IWAVE,1)
3312 ! XQQ(2,IWAVE,2) = RADFAC(2,IWAVE,2)
3313 !----------------------------------------------------------------------
3314 ! CALCULATION OF TOTAL SURFACE ALBEDOS ( SALB )
3315 !----------------------------------------------------------------------
3318 SALB(IWAVE,IRAD) = ( 1.-VCOVER(1) ) * ALBEDO(2,IWAVE,IRAD) + &
3319 VCOVER(1) * ALBEDO(1,IWAVE,IRAD)
3321 !----------------------------------------------------------------------
3322 ! SAVING OF EXTINCTION COEFFICIENTS ( PAR ) FOR STOMAT CALCULATION
3323 !----------------------------------------------------------------------
3324 IF ( IWAVE .EQ. 2 ) GO TO 600
3325 RADSAV(1) = 1. - VCOVER(1) &
3326 + VCOVER(1) * ( TRANC1(IWAVE) + TRANC3(IWAVE) )
3327 RADSAV(2) = 1. - VCOVER(1) + VCOVER(1) * TRANC2(IWAVE)
3328 ! XQQ(1,1,1) = RADSAV(1)
3329 ! XQQ(1,2,1) = RADSAV(2)
3334 ! albedo adjustment ==============================================
3335 if (xadj.eq.0.) go to 730
3336 xx = radfac(1,1,2) + radsav(2)
3337 xy = radfac(1,1,1) + radsav(1)
3338 ssum = salb(1,1)*frac(1,1) + salb(1,2)*frac(1,2)+ &
3339 salb(2,1)*frac(2,1) + salb(2,2)*frac(2,2)
3340 ! for diffuse albedo
3342 salb(iwave,2) = salb(iwave,2) + xadj * salb(iwave,2) / ssum
3343 x0 = 1. - salb(iwave,2)
3344 x1 = radfac(1,iwave,2) + radfac(2,iwave,2)
3345 x2 = radfac(1,iwave,2) / x1
3346 x3 = radfac(2,iwave,2) / x1
3347 radfac(1,iwave,2) = x0 * x2
3348 radfac(2,iwave,2) = x0 * x3
3350 640 format(1x,'unrealistic value, dif',2i12,4e11.4)
3353 salb(iwave,1) = salb(iwave,1) + xadj * salb(iwave,1) / ssum
3354 x0 = 1. - salb(iwave,1)
3355 x1 = radfac(1,iwave,1) + radfac(2,iwave,1)
3356 x2 = radfac(1,iwave,1) / x1
3357 x3 = radfac(2,iwave,1) / x1
3358 radfac(1,iwave,1) = x0 * x2
3359 radfac(2,iwave,1) = x0 * x3
3360 radsav(1) = xy - radfac(1,1,1)
3361 radsav(2) = xx - radfac(1,1,2)
3363 740 format(1x,'unrealistic value',2i12,4e11.4)
3365 !--------------- end adjustment ------------------------------
3366 !cl 2001,1,26 remove the following lines
3367 ! sibswup(nmm,ndd,nhh) = radn(1,1)*salb(1,1) + radn(1,2)*salb(1,2)
3368 ! & + radn(2,1)*salb(2,1) + radn(2,2)*salb(2,2)
3369 ! if ((swdown.gt.0.1).and.(sibswup(nmm,ndd,nhh).gt.0.1)) then
3370 ! sibalbedo(nmm,ndd,nhh) = sibswup(nmm,ndd,nhh) / swdown
3371 ! if (sibalbedo(nmm,ndd,nhh).gt.1.) then
3372 ! sibswup(nmm,ndd,nhh) = 0.
3373 ! sibalbedo(nmm,ndd,nhh) = 999.
3374 ! write (6, *) 'albebo incorrect',nymdh,sibalbedo(nmm,ndd,nhh)
3377 ! sibswup(nmm,ndd,nhh) = 0.0
3378 ! sibalbedo(nmm,ndd,nhh) = 999.
3380 swup = radn(1,1)*salb(1,1) + radn(1,2)*salb(1,2) &
3381 + radn(2,1)*salb(2,1) + radn(2,2)*salb(2,2)
3382 if ((swdown.gt.0.01).and.(swup.gt.0.01)) then
3383 xalbedo = swup / swdown
3384 if (xalbedo.gt.1.) then
3387 write (6, *) 'albebo incorrect',xalbedo
3393 !----------------------------------------------------------------------
3394 ! CALCULATION OF LONG-WAVE FLUX TERMS FROM CANOPY AND GROUND
3395 !----------------------------------------------------------------------
3397 TC4 = TC * TC * TC * TC
3398 TG4 = TGS * TGS * TGS * TGS
3400 ZKAT = EXTK(1,3,2) * ZLAI(1) / VCOVER(1)
3401 ZKAT = AMIN1( 50. , ZKAT )
3402 ZKAT = AMAX1( 1.E-5, ZKAT )
3405 FAC1 = VCOVER(1) * ( 1.-THERMK )
3407 CLOSS = 2. * FAC1 * STEFAN * TC4
3408 CLOSS = CLOSS - FAC2 * FAC1 * STEFAN * TG4
3409 GLOSS = FAC2 * STEFAN * TG4
3410 GLOSS = GLOSS - FAC1 * FAC2 * STEFAN * TC4
3412 ZLWUP = FAC1 * STEFAN * TC4 + (1. - FAC1 ) * FAC2 * STEFAN * TG4
3413 TGEFF = SQRT( SQRT ( ( ZLWUP / STEFAN ) ) )
3415 RADSAV(3) = EXTK(1,1,1)
3416 RADSAV(4) = EXTK(1,1,2)
3417 RADSAV(5) = EXTK(2,1,1)
3418 RADSAV(6) = EXTK(2,1,2)
3420 RADSAV(8) = EXTK(1,3,1)
3421 RADSAV(9) = EXTK(2,3,1)
3425 !-----------------------------------------------------------------------
3427 !cl CALL LONGRN( TRANC1, TRANC2, TRANC3)
3428 !-----------------------------------------------------------------------
3431 !---------------------------- subroutine RADUSE -----------------------
3433 ! CALCULATION OF ABSORPTION OF RADIATION BY SURFACE
3434 !-----------------------------------------------------------------------
3437 !cl 2001,1,26, redundant to the above lines
3438 !cl EXTK(1,1,1) = RADSAV(3)
3439 ! EXTK(1,1,2) = RADSAV(4)
3440 ! EXTK(2,1,1) = RADSAV(5)
3441 ! EXTK(2,1,2) = RADSAV(6)
3442 ! THERMK = RADSAV(7)
3443 ! EXTK(1,3,1) = RADSAV(8)
3444 ! EXTK(2,3,1) = RADSAV(9)
3445 ! CLOSS = RADSAV(10)
3446 ! GLOSS = RADSAV(11)
3447 !cl TGEFF = RADSAV(12)
3448 !----------------------------------------------------------------------
3450 ! SUMMATION OF SHORT-WAVE RADIATION ABSORBED BY CANOPY AND GROUND
3451 !----------------------------------------------------------------------
3456 DO 7000 IWAVE = 1, 2
3459 RADT(IVEG) = RADT(IVEG)+RADFAC(IVEG,IWAVE,IRAD)*RADN(IWAVE,IRAD)
3462 !=========================================================================
3463 fsdown = radn(1,1)+radn(1,2)+radn(2,1)+radn(2,2)
3464 fsup = fsdown-radt(1)-radt(2)
3465 !=========================================================================
3469 RADT(1) = RADT(1) + RADN(3,2)*VCOVER(1)*(1.- THERMK) &
3471 RADT(2) = RADT(2) + RADN(3,2)*( 1.-VCOVER(1)*(1-THERMK) ) &
3473 !=========================================================================
3476 !=========================================================================
3478 PAR(1) = RADN(1,1) + RADN(1,2) + 0.001
3479 PD(1) = ( RADN(1,1) + 0.001 ) / PAR(1)
3480 P1 = P1F * RADN(1,1) + 0.001
3481 P2 = P2F * RADN(1,2)
3485 !------------------------------------------------------
3486 END SUBROUTINE RADAB
3487 !------------------------------------------------------
3488 !=======================================================================
3490 SUBROUTINE RADAB_ICE(TRAN,REF,GREEN,VCOVER,CHIL,ZLT,Z2,Z1,SOREF, &
3491 TC,TGS,SATCAP,EXTK,CLOSS,GLOSS,THERMK,P1F,P2F, &
3492 RADT,PAR,PD,SALB,ALBEDO,TGEFF,SUNANG,XADJ,CAPAC, &
3493 RADN,bedo,ZLWUP,RADFRAC,SWDOWN,SCOV2,ISICE, &
3494 fsdown,fldown,fsup,flup)
3496 !=======================================================================
3498 ! CALCULATION OF ALBEDOS VIA TWO STREAM APPROXIMATION( DIRECT
3499 ! AND DIFFUSE ) AND PARTITION OF RADIANT ENERGY
3501 !-----------------------------------------------------------------------
3502 !----------------------------------------------------------------------
3504 REAL, DIMENSION (2) :: TRANC1, TRANC2, TRANC3, CAPAC, SATCAP, &
3505 GREEN, VCOVER, ZLT, CHIL, RADT, PAR, PD
3506 REAL, DIMENSION (3) :: SOREF
3507 REAL, DIMENSION (2,2) :: RADFRAC, SALB
3508 REAL, DIMENSION (3,2) :: RADN
3509 REAL, DIMENSION (2,2,2) :: RADFAC
3510 REAL, DIMENSION (2,3,2) :: TRAN, REF, ALBEDO, EXTK
3511 REAL, DIMENSION (12) :: RADSAV
3513 f=max(sunang,0.01746)
3515 !----------------------------------------------------------------------
3516 ! CALCULATION OF MAXIMUM WATER STORAGE VALUES.
3517 !----------------------------------------------------------------------
3520 IF ( ABS(TF-TGS) .LT. 0.5 ) FMELT = 0.6
3521 SATCAP(1) = ZLT(1) * 0.0001
3522 SATCAP(2) = ZLT(2) * 0.0001
3523 DEPCOV = AMAX1( 0., (CAPAC(2)*5.-Z1) )
3524 DEPCOV = AMIN1( DEPCOV, (Z2-Z1)*0.95 )
3525 SATCAP(1) = SATCAP(1) * ( 1. - DEPCOV / ( Z2 - Z1 ) )
3526 !----------------------------------------------------------------------
3530 albedo(iveg,iwave,irad)=0.
3532 !----------------------------------------------------------------------
3536 IF ( IVDUM .EQ. 1 ) IVEG = 2
3537 IF ( IVDUM .EQ. 2 ) IVEG = 1
3538 !----------------------------------------------------------------------
3539 !----------------------------------------------------------------------
3540 ! MODIFICATION FOR EFFECT OF SNOW ON UPPER STOREY ALBEDO
3541 ! SNOW REFLECTANCE = 0.80, 0.40 . MULTIPLY BY 0.6 IF MELTING
3542 ! SNOW TRANSMITTANCE = 0.20, 0.54
3543 ! SNOW REFLECTANCE = 0.85, 0.65 . MULTIPLY BY 0.6 IF MELTING
3545 !----------------------------------------------------------------------
3547 IF( IVEG .EQ. 2 ) GO TO 100
3548 IF( TC .LE. TF ) SCOV = AMIN1( 0.5, CAPAC(1) / SATCAP(1) )
3550 REFF1 = ( 1. - SCOV ) * REF(IVEG,IWAVE,1) + SCOV * ( 1.2 - &
3551 IWAVE * 0.4 ) * FMELT
3552 REFF2 = ( 1. - SCOV ) * REF(IVEG,IWAVE,2) + SCOV * ( 1.2 - &
3553 IWAVE * 0.4 ) * FMELT
3554 TRAN1 = TRAN(IVEG,IWAVE,1) * ( 1. - SCOV ) &
3555 + SCOV * ( 1.- ( 1.2 - IWAVE * 0.4 ) * FMELT ) &
3556 * TRAN(IVEG,IWAVE,1)
3557 TRAN2 = TRAN(IVEG,IWAVE,2) * ( 1. - SCOV ) &
3558 + SCOV * ( 1.- ( 1.2 - IWAVE * 0.4 ) * FMELT ) * 0.9 &
3559 * TRAN(IVEG,IWAVE,2)
3561 !----------------------------------------------------------------------
3563 SCAT = GREEN(IVEG)*( TRAN1 + REFF1 ) +( 1. - GREEN(IVEG) ) * &
3567 IF ( ABS(CHIV) .LE. 0.01 ) CHIV = 0.01
3568 AA = 0.5 - 0.633 * CHIV - 0.33 * CHIV * CHIV
3569 BB = 0.877 * ( 1. - 2. * AA )
3572 EXTKB = ( AA + BB * F ) / F
3573 ZMEW = 1. / BB * ( 1. - AA / BB * ALOG ( ( AA + BB ) / AA ) )
3574 ACSS = SCAT / 2. * PROJ / ( PROJ + F * BB )
3575 ACSS = ACSS * ( 1. - F * AA / ( PROJ + F * BB ) * ALOG ( ( PROJ &
3576 + F * BB + F * AA ) / ( F * AA ) ) )
3578 EXTK( IVEG, IWAVE, 1 ) = PROJ / F * SQRT( 1.-SCAT )
3579 EXTK( IVEG, IWAVE, 2 ) = 1. / ZMEW * SQRT( 1.-SCAT )
3580 EXTK( IVEG, 3, 1 ) = AA + BB
3581 EXTK( IVEG, 3, 2 ) = 1./ZMEW
3583 UPSCAT = GREEN(IVEG) * TRAN1 + ( 1. - GREEN(IVEG) ) * TRAN2
3584 UPSCAT = 0.5 * ( SCAT + ( SCAT - 2. * UPSCAT ) * &
3585 (( 1. - CHIV ) / 2. ) ** 2 )
3587 BETAO = ( 1. + ZMEW * EXTKB ) / ( SCAT * ZMEW * EXTKB ) * ACSS
3589 !----------------------------------------------------------------------
3591 ! DICKINSON'S VALUES
3593 BE = 1. - SCAT + UPSCAT
3595 BOT = ( ZMEW * EXTKB ) ** 2 + ( CE**2 - BE**2 )
3596 IF ( ABS(BOT) .GT. 1.E-10) GO TO 200
3598 BE = 1. - SCAT + UPSCAT
3599 BOT = ( ZMEW * EXTKB ) ** 2 + ( CE**2 - BE**2 )
3601 DE = SCAT * ZMEW * EXTKB * BETAO
3602 FE = SCAT * ZMEW * EXTKB * ( 1. - BETAO )
3603 !----------------------------------------------------------------------
3605 CCE = DE * BE - ZMEW * DE * EXTKB + CE * FE
3606 FFE = BE * FE + ZMEW * FE * EXTKB + CE * DE
3611 PSI = SQRT(BE**2 - CE**2)/ZMEW
3613 !----------------------------------------------------------------------
3614 ! REDUCTION IN EXPOSED HEIGHT OF UPPER STOREY AS SNOW ACCUMULATES
3616 SDEP = CAPAC(2) * 5.
3617 FAC = ( SDEP - Z1 ) / ( Z2 - Z1 )
3618 FAC = AMAX1( 0., FAC )
3619 FAC = AMIN1( 0.99, FAC )
3621 ZAT = ZLT(IVEG) / VCOVER(IVEG)
3622 IF ( IVEG .EQ. 1 ) ZAT = ZAT * (1.-FAC)
3624 POWER1 = AMIN1( PSI*ZAT, 50. )
3625 POWER2 = AMIN1( EXTKB*ZAT, 50. )
3626 EPSI = EXP( - POWER1 )
3627 EK = EXP ( - POWER2 )
3631 IF ( IVEG .EQ. 2 ) GO TO 300
3632 ROSB = ALBEDO(2,IWAVE,1)
3633 ROSD = ALBEDO(2,IWAVE,2)
3638 !-----------------------------------------------------------------------
3639 ! CALCULATION OF DIFFUSE ALBEDOS
3640 !-----------------------------------------------------------------------
3645 DEN = ( BE + ZP ) * ( F1 - ZP ) / EPSI - &
3646 ( BE - ZP ) * ( F1 + ZP ) * EPSI
3647 ALPHA = CE * ( F1 - ZP ) / EPSI / DEN
3648 BETA = -CE * ( F1 + ZP ) * EPSI / DEN
3650 DEN = ( F1 + ZP ) / EPSI - ( F1 - ZP ) * EPSI
3652 GAMMA = ( F1 + ZP ) / EPSI / DEN
3653 DELTA = - ( F1 - ZP ) * EPSI / DEN
3655 ALBEDO(IVEG,IWAVE,2) = ALPHA + BETA
3657 IF ( IVEG .EQ. 1 ) GO TO 400
3659 !crr CORRECTION FOR KEEPING ALBEDO HIGH OVER SNOW
3660 IF (ISICE.EQ.1) SCOV2=1.
3662 IF ( TGS .LE. TF ) SCOV2 = AMIN1( 1., CAPAC(2) / 0.004 )
3663 ALBEDO(2,IWAVE,2)= ROSD * ( 1. - VCOVER(2) ) + ALBEDO(2,IWAVE,2) * VCOVER(2)
3664 ALBEDO(2,IWAVE,2) = &
3665 ( 1. - SCOV2 ) * ALBEDO(2,IWAVE,2) + SCOV2 * &
3666 ( 1.2-IWAVE*0.4 ) * FMELT
3669 TRANC2(IWAVE) = GAMMA * EPSI + DELTA / EPSI
3671 !-----------------------------------------------------------------------
3672 ! CALCULATION OF DIRECT ALBEDOS
3673 !-----------------------------------------------------------------------
3678 DEN = ( BE + ZP ) * ( F1 - ZP ) / EPSI - &
3679 ( BE - ZP ) * ( F1 + ZP ) * EPSI
3680 ALPHA = ( DE - TORE * ( BE + ZMK ) ) * ( F1 - ZP ) / EPSI - &
3681 ( BE - ZP ) * ( DE - CE*GE - TORE * ( F1 + ZMK ) ) * EK
3683 BETA = ( BE + ZP ) * (DE - CE*GE - TORE * ( F1 + ZMK ))* EK - &
3684 ( DE - TORE * ( BE + ZMK ) ) * ( F1 + ZP ) * EPSI
3687 DEN = ( F1 + ZP ) / EPSI - ( F1 - ZP ) * EPSI
3688 GAMMA = - SIGE * ( F1 + ZP ) / EPSI - &
3689 ( FE + CE * GE * ROSD + SIGE * ( ZMK - F1 ) ) * EK
3691 DELTA = ( CE * GE * ROSD + FE + SIGE * ( ZMK - F1 ) ) * EK &
3692 + SIGE * ( F1 - ZP ) * EPSI
3695 ALBEDO(IVEG,IWAVE,1) = TORE + ALPHA + BETA
3697 !----------------------------------------------------------------------
3699 IF( IVEG .EQ. 1 ) GO TO 500
3700 ALBEDO(2,IWAVE,1) = ROSB * ( 1. - VCOVER(2) ) &
3701 + ALBEDO(2,IWAVE,1) * VCOVER(2)
3702 ALBEDO(2,IWAVE,1) = ( 1. - SCOV2 ) * ALBEDO(2,IWAVE,1) + &
3703 SCOV2 * ( 1.2-IWAVE*0.4 ) * FMELT
3708 TRANC3(IWAVE) = SIGE * EK + GAMMA * EPSI + DELTA / EPSI
3712 !----------------------------------------------------------------------
3713 ! CALCULATION OF TERMS WHICH MULTIPLY INCOMING SHORT WAVE FLUXES
3714 ! TO GIVE ABSORPTION OF RADIATION BY CANOPY AND GROUND
3715 !----------------------------------------------------------------------
3717 RADFAC(2,IWAVE,1) = ( 1.-VCOVER(1) ) * ( 1.-ALBEDO(2,IWAVE,1) ) &
3718 + VCOVER(1) * ( TRANC1(IWAVE) * ( 1.-ALBEDO(2,IWAVE,1) ) &
3719 + TRANC3(IWAVE) * ( 1.-ALBEDO(2,IWAVE,2) ) )
3721 RADFAC(2,IWAVE,2) = ( 1.-VCOVER(1) ) * ( 1.-ALBEDO(2,IWAVE,2) ) &
3722 + VCOVER(1) * TRANC2(IWAVE) * ( 1.-ALBEDO(2,IWAVE,2) )
3724 RADFAC(1,IWAVE,1) = VCOVER(1) * ( ( 1.-ALBEDO(1,IWAVE,1) ) &
3725 - TRANC1(IWAVE) * ( 1.-ALBEDO(2,IWAVE,1) ) &
3726 - TRANC3(IWAVE) * ( 1.-ALBEDO(2,IWAVE,2) ) )
3728 RADFAC(1,IWAVE,2) = VCOVER(1) * ( ( 1.-ALBEDO(1,IWAVE,2) ) &
3729 - TRANC2(IWAVE) * ( 1.-ALBEDO(2,IWAVE,2) ) )
3731 ! XQQ(1,IWAVE,1) = RADFAC(1,IWAVE,1)
3732 ! XQQ(1,IWAVE,2) = RADFAC(1,IWAVE,2)
3733 ! XQQ(2,IWAVE,1) = RADFAC(2,IWAVE,1)
3734 ! XQQ(2,IWAVE,2) = RADFAC(2,IWAVE,2)
3736 !----------------------------------------------------------------------
3737 ! CALCULATION OF TOTAL SURFACE ALBEDOS ( SALB )
3740 SALB(IWAVE,IRAD) = ( 1.-VCOVER(1) ) * ALBEDO(2,IWAVE,IRAD) + &
3741 VCOVER(1) * ALBEDO(1,IWAVE,IRAD)
3744 !----------------------------------------------------------------------
3745 ! SAVING OF EXTINCTION COEFFICIENTS ( PAR ) FOR STOMAT CALCULATION
3746 !----------------------------------------------------------------------
3747 IF ( IWAVE .EQ. 2 ) GO TO 600
3748 RADSAV(1) = 1. - VCOVER(1) &
3749 + VCOVER(1) * ( TRANC1(IWAVE) + TRANC3(IWAVE) )
3750 RADSAV(2) = 1. - VCOVER(1) + VCOVER(1) * TRANC2(IWAVE)
3755 ! albedo adjustment ==============================================
3757 if (xadj.eq.0.) go to 730
3758 xx = radfac(1,1,2) + radsav(2)
3759 xy = radfac(1,1,1) + radsav(1)
3760 ssum = salb(1,1)*radfrac(1,1) + salb(1,2)*radfrac(1,2)+ &
3761 salb(2,1)*radfrac(2,1) + salb(2,2)*radfrac(2,2)
3762 ! for diffuse albedo
3764 salb(iwave,2) = salb(iwave,2) + xadj * salb(iwave,2) / ssum
3765 x0 = 1. - salb(iwave,2)
3766 x1 = radfac(1,iwave,2) + radfac(2,iwave,2)
3767 x2 = radfac(1,iwave,2) / x1
3768 x3 = radfac(2,iwave,2) / x1
3769 radfac(1,iwave,2) = x0 * x2
3770 radfac(2,iwave,2) = x0 * x3
3771 if (salb(iwave,2).gt.1..or.radfac(1,iwave,2).gt.1..or. &
3772 radfac(2,iwave,2).gt.1..or.salb(iwave,2).lt.0..or. &
3773 radfac(1,iwave,2).lt.0..or.radfac(2,iwave,2).lt.0.) then
3777 640 format(1x,'unrealistic value, dif',2i12,4e11.4)
3780 salb(iwave,1) = salb(iwave,1) + xadj * salb(iwave,1) / ssum
3781 x0 = 1. - salb(iwave,1)
3782 x1 = radfac(1,iwave,1) + radfac(2,iwave,1)
3783 x2 = radfac(1,iwave,1) / x1
3784 x3 = radfac(2,iwave,1) / x1
3785 radfac(1,iwave,1) = x0 * x2
3786 radfac(2,iwave,1) = x0 * x3
3787 radsav(1) = xy - radfac(1,1,1)
3788 radsav(2) = xx - radfac(1,1,2)
3789 if (salb(iwave,1).gt.1..or.radfac(1,iwave,1).gt.1..or. &
3790 radfac(2,iwave,1).gt.1..or.salb(iwave,1).lt.0..or. &
3791 radfac(1,iwave,1).lt.0..or.radfac(2,iwave,1).lt.0.) then
3792 write(7,740) nymdh,iwave,salb(iwave,1),radfac(1,iwave,1), &
3797 740 format(1x,'unrealistic value',2i12,4e11.4)
3799 !***************** end adjustment *******************************
3800 sibsu = radn(1,1)*salb(1,1) + radn(1,2)*salb(1,2) &
3801 + radn(2,1)*salb(2,1) + radn(2,2)*salb(2,2)
3802 if ((swdown.gt.0.01).and.(sibsu.gt.0.01)) then
3803 bedo = sibsu / swdown
3804 if (bedo.gt.1.) then
3807 ! print*,'albebo incorrect',ix,jx,bedo,sibsu,swdown, &
3808 ! radn(1,1),radn(1,2),radn(2,1),radn(2,2)
3814 !--------------------------------------------------------------------
3815 ! bedo = sibsu/swdown
3816 ! bedo = min(max(bedo,0.001),1.0)
3817 !--------------------------------------------------------------------
3819 ! CALCULATION OF LONG-WAVE FLUX TERMS FROM CANOPY AND GROUND
3821 !----------------------------------------------------------------------
3823 TC4 = TC * TC * TC * TC
3824 TG4 = TGS * TGS * TGS * TGS
3826 ZKAT = EXTK(1,3,2) * ZLT(1) / VCOVER(1)
3827 ZKAT = AMIN1( 50. , ZKAT )
3828 ZKAT = AMAX1( 1.E-5, ZKAT )
3831 FAC1 = VCOVER(1) * ( 1.-THERMK )
3833 CLOSS = 2. * FAC1 * STEFAN * TC4
3834 CLOSS = CLOSS - FAC2 * FAC1 * STEFAN * TG4
3835 GLOSS = FAC2 * STEFAN * TG4
3836 GLOSS = GLOSS - FAC1 * FAC2 * STEFAN * TC4
3838 ZLWUP = FAC1 * STEFAN * TC4 + (1. - FAC1 ) * FAC2 * STEFAN * TG4
3839 TGEFF = SQRT( SQRT ( ( ZLWUP / STEFAN ) ) )
3841 RADSAV(3) = EXTK(1,1,1)
3842 RADSAV(4) = EXTK(1,1,2)
3843 RADSAV(5) = EXTK(2,1,1)
3844 RADSAV(6) = EXTK(2,1,2)
3846 RADSAV(8) = EXTK(1,3,1)
3847 RADSAV(9) = EXTK(2,3,1)
3852 !-----------------------------------------------------------------------
3854 ! CALCULATION OF ABSORPTION OF RADIATION BY SURFACE
3856 !-----------------------------------------------------------------------
3860 EXTK(1,1,1) = RADSAV(3)
3861 EXTK(1,1,2) = RADSAV(4)
3862 EXTK(2,1,1) = RADSAV(5)
3863 EXTK(2,1,2) = RADSAV(6)
3865 EXTK(1,3,1) = RADSAV(8)
3866 EXTK(2,3,1) = RADSAV(9)
3871 !----------------------------------------------------------------------
3872 ! SUMMATION OF SHORT-WAVE RADIATION ABSORBED BY CANOPY AND GROUND
3873 !----------------------------------------------------------------------
3879 DO 7000 IWAVE = 1, 2
3882 RADT(IVEG) = RADT(IVEG)+RADFAC(IVEG,IWAVE,IRAD)*RADN(IWAVE,IRAD)
3885 !=========================================================================
3886 fsdown = radn(1,1)+radn(1,2)+radn(2,1)+radn(2,2)
3887 fsup = fsdown-radt(1)-radt(2)
3888 !=========================================================================
3893 RADT(1) = RADT(1) + RADN(3,2)*VCOVER(1)*(1.- THERMK) &
3895 RADT(2) = RADT(2) + RADN(3,2)*( 1.-VCOVER(1)*(1-THERMK) ) &
3897 !=========================================================================
3900 !=========================================================================
3902 PAR(1) = RADN(1,1) + RADN(1,2) + 0.001
3903 PD(1) = ( RADN(1,1) + 0.001 ) / PAR(1)
3904 P1 = P1F * RADN(1,1) + 0.001
3905 P2 = P2F * RADN(1,2)
3909 !------------------------------------------------------
3910 END SUBROUTINE RADAB_ICE
3911 !------------------------------------------------------
3912 !=======================================================================
3914 SUBROUTINE RASIT5(TRIB,CTNI,CUNI,RA,Z2,Z0,D,ZZWIND,UMM1, &
3915 RHOA,TMM,U2,USTAR,DRAG,TA,bps,rib,CU,CT,UV10)
3917 !=======================================================================
3919 ! CUU AND CTT ARE LINEAR (A SIMPLIFIED VERSION, XUE ET AL. 1991)
3925 ! CU AND CT ARE THE FRICTION AND HEAT TRANSFER COEFFICIENTS.
3926 ! CUN AND CTN ARE THE NEUTRAL FRICTION AND HEAT TRANSFER
3932 ZL = Z2 + 11.785 * Z0
3937 !cxx IF(ZWIND.LE.Z2) THEN
3938 !cxx ZWIND=Z2+20.0 ! if trees are higher than model level
3939 !cxx ! increase model level by 10m
3940 !cxx TM = TMM - (ZWIND - ZZWIND)*0.0065 ! adjust temp (lin.)
3941 !cxx UMM = UMM1 + USTAR/VKC * ALOG(ZWIND/ZZWIND) ! adjust wind (log.)
3943 !------------------------------------------------------------------------
3944 if(zwind.le.d.or.zl.le.d) d=min(zwind,zl)-0.1
3947 CUNI = ALOG((ZWIND-D)/Z0)/VKC
3948 IF (ZL.LT.ZWIND) THEN
3949 XCT1 = ALOG((ZWIND-D)/(ZL-D))
3950 XCT2 = ALOG((ZL-D)/(Z2-D))
3951 XCTU2 = ALOG((ZL-D)/(Z22-D))
3952 CTNI = (XCT1 + G3 * XCT2) / VKC
3954 XCT2 = ALOG((ZWIND-D)/(Z2-D))
3955 XCTU2 = ALOG((ZWIND-D)/(Z22-D))
3956 CTNI = G3 * XCT2 /VKC
3958 ! --------------- NEUTRAL VALUES OF USTAR AND VENTMF ------------
3962 VENTN =RHOA /CTNI*USTARN
3963 IF (ZL.LT.ZWIND) THEN
3964 U2 = UM - 1. / VKC * USTARN * (XCT1 + G2 * XCTU2)
3966 U2 = UM - 1. / VKC * USTARN * G2 * XCTU2
3969 if(u2.lt.0.01) u2=0.01
3972 ! STABILITY BRANCH BASED ON BULK RICHARDSON NUMBER.
3975 ! THVGM= TRIB*bps0-THM
3976 THM=TM*bps !fds (06/2010)
3978 IF (TA.EQ.0.) THVGM = 0.
3979 RIB = -THVGM*GRAV*(ZWIND-D) / (THM*(UM-U2)**2)
3980 RIB = MAX(-10.E0,RIB)
3981 RIB = MIN(0.1643E0,RIB)
3983 ! NON-NEUTRON CORRECTION (SEE XUE ET AL(1991))
3986 GRZL = +RIB*(ZL-D)/(ZWIND-D)
3987 GRZ2 = +RIB*(Z2-D)/(ZWIND-D)
3989 IF (ZL.LT.ZWIND) THEN
3990 FTT = FT(GRIB) + (G3-1.) * FT(GRZL) - G3 * FT(GRZ2)
3992 FTT = G3*(FT(GRIB) - FT(GRZ2))
3997 RZL = RIB/(ZWIND-D)*(ZL-D)
3998 RZ2 = RIB/(ZWIND-D)*(Z2-D)
4000 IF (ZL.LT.ZWIND) THEN
4001 FTT = FS(RIB) + (G3-1) * FS(RZL) - G3 * FS(RZ2)
4003 FTT = G3 * (FS(RIB) - FS(RZ2))
4005 312 CUI = CUNI + FVV
4011 ! CT=1./CTI !Correction 3/8/16
4014 IF (RAF.LT.0.80) THEN
4018 CT = 1./CTI !Correction 3/8/16
4023 DRAG = RHOA * UEST*UEST
4026 !fds Calculate 10m wind intensity (Jan/2014)
4027 CUNI10 = ALOG((z2+10-D)/Z0)/VKC
4028 UV10 = USTAR * (CUNI10+FVV)
4030 !------------------------------------------------------
4031 END SUBROUTINE RASIT5
4032 !------------------------------------------------------
4034 !=======================================================================
4036 SUBROUTINE SDSOL(DSOL,DMASS,N,SOLAR,SOLSOIL)
4038 !=======================================================================
4040 !clwp 12/08/2000, to change nd=20 to nd=4 to keep consistent
4041 !cl parameter(nd = 20)
4043 real dsol(nd),dmass(nd),fext(nd)
4056 tmass=tmass+dmass(j)
4057 if(tmass.gt.depth) goto 30
4058 fext(j)=exp(-cv*dmass(j)/sqrt(gsize))
4059 if(j .eq. n) fext(n)=exp(-bext*2d-3)*fext(n)
4064 if(tsolt .le. 0d0)then
4075 !------------------------------------------------------
4076 END SUBROUTINE SDSOL
4077 !------------------------------------------------------
4079 !=======================================================================
4081 SUBROUTINE SET0(TSSNO,BWO,BLO,BIO,HO,FLO,FIO,WO,DZO, &
4082 SSO,CTO,BTO,DMLTO,WF,DHP)
4084 !=======================================================================
4086 DIMENSION WF(N1),DHP(N1),TSSNO(N1),BWO(N1),BLO(N1),BIO(N1),HO(N1), &
4087 FLO(N1),FIO(N1),WO(N1),DZO(N1),SSO(N1),CTO(N1),BTO(N1),DMLTO(N1)
4088 !clwp do 100 i=n+1,nd
4109 !------------------------------------------------------
4111 !------------------------------------------------------
4113 !=======================================================================
4115 SUBROUTINE SNOW_1ST (DTT,TM,SOLAR,PRCPW,PRCPS,BIO,BLO,DICEVOL, &
4116 DLIQVOL,TSSNO,PDZDTC,POROSITY,SO,SSO,WF,DHP,DZO,WO, &
4117 BWO,BTO,CTO,DMASS,DSOL,SNROFF,HROFF,SNOWDEPTH,SOLSOIL, &
4118 FLO,FIO,DMLTO,HO,BIFALL,BLFALL,FLFALL)
4120 !=======================================================================
4122 DIMENSION BIO(N1),BLO(N1),DICEVOL(N1),DLIQVOL(N1),TSSNO(N1), &
4123 PDZDTC(N1),POROSITY(N1),SO(N1),SSO(N1),WF(N1),DHP(N1), &
4124 DZO(N1),WO(N1),BWO(N1),BTO(N1),CTO(N1),DMASS(N1), &
4125 DSOL(N1),FLO(N1),FIO(N1),DMLTO(N1),HO(N1)
4126 ! ------------------------------------------------------------------7272
4132 !....................... rain
4133 if(prcpw.gt.0.0)then
4134 wf(n+1)=amin1(prcpw, dksatsnow*dtt)
4135 dhp(n+1)=(wf(n+1)/dtt)*cl*rhowater*(tkair-273.16)
4136 snroff =snroff+(prcpw-wf(n+1))
4137 hroff=hroff+(prcpw-wf(n+1))*cl*rhowater*(tkair-273.16)
4138 else if(prcps.gt.0.0)then
4139 !...................... snow, add new nodes
4142 !cl 12/08/2000, the following subroutine just deals with top snow layer.
4143 CALL NEWSNOW(PRCP,BIFALL,BLFALL,FLFALL,TKAIR, &
4144 DZO(N),WO(N),BWO(N),CTO(N),HO(N),DMLTO(N),FIO(N),FLO(N), &
4145 BIO(N),BLO(N),DLIQVOL(N),DICEVOL(N),TSSNO(N),WF(N))
4147 !---------------------------------
4148 ! Compaction rate for snow
4149 !---------------------------------
4151 dicevol(i) = bio(i)/dice
4152 dliqvol(i) = blo(i)/rhowater
4153 porosity(i)=1.0-dicevol(i)
4154 porosity(i)=amin1(porosity(i),1.0)
4155 porosity(i)=amax1(porosity(i),0.0)
4157 if(porosity(i).ne.0.0) so(i)=dliqvol(i)/porosity(i)
4158 sso(i)=(so(i)-ssisnow)/(1.0-ssisnow)
4162 overburden=overburden+ wo(i)*rhowater
4163 call COMPACT(BIO(I),TSSNO(I),BLO(I),OVERBURDEN,PDZDTC(I), &
4167 !---------------------------------------------**
4168 ! Calculate some variables after new snowfall
4169 !---------------------------------------------**
4171 if((sso(i).lt.1.0.and.porosity(i).gt.0.0))then
4172 dzot=dzo(i)*(1d0+pdzdtc(i)*dtt)
4173 dzo(i)=amax1(dzot,dzmin)
4175 if(wo(i).gt.womin)then
4176 bwo(i)=(wo(i)*rhowater)/dzo(i)
4177 if (bwo(i).gt.920.0) then
4179 dzo(i)=(wo(i)*rhowater)/bwo(i)
4183 blo(i)=bwo(i)*flo(i)
4184 bio(i)=bwo(i)*fio(i)
4188 dicevol(i) = bio(i)/dice
4189 dliqvol(i) = blo(i)/rhowater
4190 dummy = dliqvol(i) + dicevol(i)
4191 if(dummy.gt.1.0)then
4192 dliqvol(i) = 1.0 - dicevol(i)
4193 blo(i) = dliqvol(i)*rhowater
4194 bwo(i) = blo(i) + bio(i)
4195 dzo(i)=(wo(i)*rhowater)/bwo(i)
4197 cto(i)=(bwo(i)/920.0)*1.9e+6
4199 porosity(i)=1.0-dicevol(i)
4200 if(porosity(i) .gt. 1.0)porosity(i)=1.0
4201 if(porosity(i) .lt. 0.0)porosity(i)=0.0
4203 if(porosity(i).gt.0.0)then
4204 so(i)=dliqvol(i)/porosity(i)
4209 if(so(i).gt.ssisnow)then
4210 sso(i)=(so(i)-ssisnow)/(1.0-ssisnow)
4214 !!!!!! dmass is for using to calculate dsol in sdsol.f
4215 dmass(i)=bto(i)*dzo(i)
4217 SNOWDEPTH=dzo(1)+dzo(2)+dzo(3)
4218 !---------------------------------------------
4219 ! Optical parameters and solar extinction
4220 !---------------------------------------------
4221 IF (solar .gt. 0d0 ) THEN
4222 call sdsol(dsol,dmass,n,solar,solsoil)
4230 !------------------------------------------------------
4231 END SUBROUTINE SNOW_1ST
4232 !------------------------------------------------------
4234 !=======================================================================
4236 SUBROUTINE SNRESULT(DTT,I,ICASE,WFSOIL,TSOIL,B1,B2,FFF,DELTH,WWW, &
4237 ZDEPTH,POROS,BI,BIO,DZ,DZO,W,BW,BWO,H,HO,QK,BL,BT,CT, &
4238 FI,FL,WF,TSSN,DLIQVOL,DICEVOL,SNROFF,HROFF,QSOIL)
4240 !=======================================================================
4242 DIMENSION BIO(N1),DZO(N1),W(N1),BWO(N1),HO(N1), &
4243 DZ(N1),BI(N1),BW(N1),BL(N1),BT(N1),CT(N1),FI(N1),FL(N1), &
4244 WF(N1),H(N1),TSSN(N1),DLIQVOL(N1),DICEVOL(N1),QK(N1), &
4249 IF (ICASE.EQ.1) THEN
4253 bw(i)=(w(i)*rhowater)/dz(i)
4254 if((w(i)/dz(i)).lt.0.05.or.(w(i)/dz(i)) &
4255 .gt.(dice/1000.0))then
4257 dz(i) = (w(i)*rhowater)/bw(i)
4263 if (i.eq.1) wfsoil=0.0
4265 dicevol(i)=bi(i)/dice
4266 ct(i)=(bw(i)/920.0)*1.9e+6
4268 h(i)=ct(i)*dz(i)*(tssn(i)-273.16)-rhowater*dlm*w(n)*fi(n)
4270 tssn(i) = ( ho(i) + ct(i)*dz(i)*273.16 + b1*dtt &
4271 + rhowater*dlm*w(i) ) &
4272 / ( ct(i)*dz(i) - b2*dtt )
4273 h(i) = ho(i) + (b1+b2*tssn(i))*dtt
4275 if(tssn(i).gt.273.16) then
4276 WRITE( message,* ) 'Warning: Snow Temp above freezing',i,tssn(i)
4278 CALL wrf_message ( message )
4280 ! ------------------------------------------------------------------7272
4281 ELSE IF (ICASE.EQ.2) THEN
4282 ! when snow temperature equals 273.16
4286 If(bwo(i).ge.bwe) Then
4287 if(fl(i).gt.flmin)then
4288 wf(i) = w(i)-(fi(i)/(1.0-flmin))*w(i)
4289 w(i) = (fi(i)/(1.0-flmin))*w(i)
4295 !.................................................
4296 flm = flmin+(flmax-flmin)*((bwe-bwo(i))/bwe)
4297 if(fl(i).gt.flm)then
4298 wf(i) = w(i)-(fi(i)/(1.0-flm))*w(i)
4299 w(i) = (fi(i)/(1.0-flm))*w(i)
4305 !.................................................
4306 If( wf(i).gt.0.0) Then
4308 wf(i)=amin1(dum, dksatsnow*dtt)
4309 snroff = snroff + (dum - wf(i))
4310 hroff=hroff+(dum-wf(i))*cl*rhowater*(tssn(i)-273.16)
4313 if(www(1).ge.1.0) then
4314 snroff = snroff + wf(i)
4317 slwet=www(1)*poros*zdepth(1)
4318 www(1)=(slwet+wf(i))/(poros*zdepth(1))
4319 if(www(1).gt.1.0) then
4320 snroff = snroff + (www(1)-1.0)*poros*zdepth(1)
4325 hroff=hroff + wf(i)*cl*rhowater*(tssn(i)-273.16)
4328 !cccccc next concerning compaction occurring during melt
4329 xnodalmelt=bio(i)*dzo(i)-w(i)*rhowater*fi(i)
4330 If(xnodalmelt.gt.0.0.and.bio(i)*dzo(i).gt.0.0 &
4331 .and.(bio(i).lt.250.0.or.(i.eq.n.and. &
4332 bio(i).lt.400.0))) Then
4333 ddz3=-xnodalmelt/(bio(i)*dzo(i))
4334 dz(i)=dzo(i)*(1.0+ddz3)
4338 bw(i)=(w(i)*rhowater)/dz(i)
4339 !.............................................
4340 If((w(i)/dz(i)).lt.0.05.or.(w(i)/dz(i)) &
4341 .gt.(dice/1000.0)) Then
4343 dz(i) = (w(i)*rhowater)/bw(i)
4348 ct(i)=(bw(i)/920.0)*1.9e+6
4349 dliqvol(i)=bl(i)/rhowater
4350 dicevol(i)=bi(i)/dice
4351 h(i)=(-1.0)*w(i)*fi(i)*dlm*rhowater
4352 !cc---------------------------------------------**
4353 ELSE IF (ICASE.EQ.3) THEN
4355 ! else if(fff.le.0.0) then
4356 !cccccc next calculate ponding condition.
4369 ct(i)=(bw(i)/920.0)*1.9e+6
4375 hx=(-1.0)*w(i)*fff*dlm*rhowater/dtt
4379 wf(i)=amin1(dum, dksatsnow*dtt)
4380 snroff = snroff + (dum - wf(i))
4381 hroff=hroff+(dum-wf(i))*cl*rhowater*(tssn(i)-273.16)
4382 delth(n-1) = (-1.0)*w(i)*fff*dlm*rhowater/dtt
4386 hx = ho(i)/dtt + b1+b2*tssn(i)
4388 if(www(1).ge.1.0) then
4389 snroff = snroff + wf(i)
4392 slwet=www(1)*poros*zdepth(1)
4393 www(1)=(slwet+wf(i))/(poros*zdepth(1))
4394 if(www(1).gt.1.0) then
4395 snroff = snroff + (www(1)-1.0)*poros*zdepth(1)
4401 wf(i)=amin1(dum, dksatsnow*dtt)
4402 snroff = snroff + (dum - wf(i))
4403 hroff=hroff+(dum-wf(i))*cl*rhowater*(tssn(i)-273.16)
4404 delth(i-1) = ho(i)/dtt + b1+b2*tssn(i)
4408 !cS Calculate the heat flux into the soil: qsoil on 10/13/98.
4409 !cS qsoil : downward is positive [ W/m**2]
4410 if (i.eq.1) qsoil = qk(1)*(tssn(1) - tsoil) + hx
4413 !------------------------------------------------------
4414 END SUBROUTINE SNRESULT
4415 !------------------------------------------------------
4417 !=======================================================================
4419 SUBROUTINE STRES1 (IFIRST,RSTM,ROOTP, &
4420 RSTFAC,RST,TC,ETC,RB,TGS,ETGS,RD,TU,TL,TOPT,EA, &
4421 DEFAC,PH1,PH2,NROOT,ZDEPTH,PHSOIL,ROOTD,VCOVER,DROP)
4423 !=======================================================================
4425 !======================================================================
4427 ! CALCULATION OF ADJUSTMENT TO LIGHT DEPENDENT STOMATAL RESISTANCE
4428 ! BY TEMPERATURE, HUMIDITY AND STRESS FACTORS
4429 ! SIMPLIFIED SEE XUE ET AL(1991)
4431 ! RSTFAC(IVEG,1) = FD
4432 ! RSTFAC(IVEG,2) = FP
4433 ! RSTFAC(IVEG,3) = FT
4434 ! RSTFAC(IVEG,4) = FTPD
4436 !----------------------------------------------------------------------
4437 DIMENSION TOPT(2), TL(2), TU(2), DEFAC(2), VCOVER(2)
4438 DIMENSION PH1(2), PH2(2), RST(2), RSTFAC(2,4),XDRR(3)
4439 DIMENSION ROOTD(2),ROOTP(3),ZDEPTH(3),PHSOIL(3), RSTM(2), DEP(3)
4440 !----------------------------------------------------------------------
4441 ! HUMIDITY, TEMPERATURE AND TRANSPIRATION FACTORS
4442 !----------------------------------------------------------------------
4449 IF ( IVEG .EQ. 1 ) GO TO 100
4455 TV = AMIN1 ( ( TU(IVEG) - 0.1 ), TV )
4456 TV = AMAX1 ( ( TL(IVEG) + 0.1 ), TV )
4458 IF( IFIRST .EQ. 0 ) GO TO 200
4459 RSTM(IVEG) = RST(IVEG)
4460 D2 = ( TU(IVEG) - TOPT(IVEG) ) / ( TOPT(IVEG) - TL(IVEG) )
4461 D1 = 1. /(( TOPT(IVEG) - TL(IVEG) )* &
4462 EXP( ALOG( TU(IVEG) - TOPT(IVEG))*D2))
4463 RSTFAC(IVEG,3) = D1*( TV-TL(IVEG)) * EXP(ALOG(TU(IVEG)-TV)*D2)
4465 IF (RSTFAC(IVEG,3).LT.0.) RSTFAC(IVEG,3) = 0.
4466 IF (RSTFAC(IVEG,3).GT.1.) RSTFAC(IVEG,3) = 1.
4468 !----------------------------------------------------------------------
4469 ! SIMPLIFIED CALCULATION OF LEAF WATER POTENTIAL FACTOR , FP
4470 !----------------------------------------------------------------------
4472 !---------new add------------
4476 IF(XDRR(1).le.0.001) XDRR(1)=0.001
4477 IF(XDRR(2).le.0.001) XDRR(2)=0.001
4478 IF(XDRR(3).le.0.001) XDRR(3)=0.001
4479 XDRR(1)=ALOG(XDRR(1))
4480 XDRR(2)=ALOG(XDRR(2))
4481 XDRR(3)=ALOG(XDRR(3))
4482 !------------------------------
4484 IF (NROOT.EQ.1) THEN
4489 DEP(I) = AMIN1(ZDEPTH(I), XROT)
4490 XROT = XROT - ZDEPTH(I)
4491 IF (XROT.LE.0.) GO TO 7410
4494 ! XDR = (PHSOIL(1) * DEP(1) + PHSOIL(2) * DEP(2) &
4495 ! +PHSOIL(3) * DEP(3)) /ROOTD(1)
4496 XDR=(XDRR(1)*DEP(1)+XDRR(2)*DEP(2)+XDRR(3)*DEP(3))/ROOTD(1)
4499 ! XDR = PHSOIL(1) * ROOTP(1) + PHSOIL(2) * ROOTP(2) &
4500 ! +PHSOIL(3) * ROOTP(3)
4501 XDR=XDRR(1)*ROOTP(1)+XDRR(2)*ROOTP(2)+XDRR(3)*ROOTP(3)
4504 ! IF (XDR .LE. 0.001) XDR = 0.001
4506 !cl 2001,1,09 changed the following two lines back to the original ones.
4507 !cl EXPONENT = AMAX1(-86.0, (- PH1(IVEG) * (PH2(IVEG) - XDR)) )
4508 !cl RSTFAC(IVEG,2) = 1. - EXP(EXPONENT)
4509 RSTFAC(IVEG,2) = 1. - EXP(- PH1(IVEG) * (PH2(IVEG) - XDR))
4510 IF (RSTFAC(IVEG,2).GT.1.) RSTFAC(IVEG,2) = 1.
4511 IF (RSTFAC(IVEG,2).LT.0.) RSTFAC(IVEG,2) = 0.
4513 200 RST(IVEG) = RSTM(IVEG)
4516 EPOT = AMAX1(0.0001,(ETV-EA))
4518 ! ---** PJS mod 10/9/92 ---**
4519 ! ---** based on Verma FIFE-87 function for C4 grasses ---**
4521 RSTFAC(IVEG,1) = 1./ ( 1 + DEFAC(IVEG)*DROP )
4523 IF (RSTFAC(IVEG,1).LT.0.) RSTFAC(IVEG,1) = 0.
4524 IF (RSTFAC(IVEG,1).GT.1.) RSTFAC(IVEG,1) = 1.
4525 !----------------------------------------------------------------------
4527 !----------------------------------------------------------------------
4529 300 FTPD = RSTFAC(IVEG,1) * RSTFAC(IVEG,2) * RSTFAC(IVEG,3)
4530 RSTFAC(IVEG,4) = AMAX1( FTPD, 0.00001 )
4531 !----------------------------------------------------------------------
4533 RST(IVEG) = RST(IVEG) / RSTFAC(IVEG,4) / VCOVER(IVEG)
4535 RST(IVEG) = AMIN1( RST(IVEG), 100000. )
4538 !------------------------------------------------------
4539 END SUBROUTINE STRES1
4540 !------------------------------------------------------
4542 !=======================================================================
4545 (DTT,TC,TGS,TD,TA,TM,QM,EM,PSURF,WWW,CAPAC,SATCAP, &
4546 DTC,DTG,RA,RST,ZDEPTH,BEE,PHSAT,POROS,D,Z0,RDC,RBC,VCOVER,Z2, &
4547 ZLAI,DEFAC,TU,TL,TOPT,RSTFAC,NROOT,ROOTD,PHSOIL,ROOTP,PH1,PH2, &
4548 ECT,ECI,EGT,EGI,EGS,HC,HG,EC,EG,EA,RADT,CHF,SHF,ALBEDO,ZLWUP, &
4549 THERMK,RHOAIR,ZWIND,UM,USTAR,DRAG,CCX,CG, ISNOW,SNOWDEN, &
4550 BPS,rib,CU,XCT,flup,UV10)
4552 !=======================================================================
4553 ! ------------------------------------------------------------------7272
4554 ! A SIMPLIFIED VERSION (XUE ET AL. 1991)
4555 ! CORE ROUTINE: CALCULATION OF CANOPY AND GROUND TEMPERATURE
4556 ! INCREMENTS OVER TIME STEP, FLUXES DERIVED.
4557 !-----------------------------------------------------------------------
4558 ! SUBROUTINES IN THIS BLOCK : TEMRS1,DELRN,DELHF,DELEF,STRES1
4559 !-----------------------------------------------------------------------
4560 REAL ZINC(3), A2(3), Y1(3), ITEX(3),RSTM(2)
4561 !cl add the following arrays after common block "comsib3" was removed
4562 DIMENSION WWW(3), CAPAC(2), SATCAP(2), ZDEPTH(3)
4563 DIMENSION VCOVER(2), ZLAI(2), RADT(2),ALBEDO(2,3,2)
4564 DIMENSION TOPT(2), TL(2), TU(2), DEFAC(2)
4565 DIMENSION PH1(2), PH2(2), RST(2), RSTFAC(2,4)
4566 DIMENSION ROOTD(2), ROOTP(3), PHSOIL(3)
4568 !----------------------------------------------------------------------
4569 ! E(X) IS VAPOUR PRESSURE IN MBARS AS A FUNCTION OF TEMPERATURE
4570 ! GE(X) IS D E(X) / D ( TEMP )
4571 !----------------------------------------------------------------------
4573 E(X) = EXP( 21.18123 - 5418. / X ) / .622
4574 GE(X) = EXP( 21.18123 - 5418. / X ) * 5418. &
4581 !crr HLAT = ( 3150.19 - 2.378 * TM ) * 1000.
4582 !crr PSY = CPAIR / HLAT * PSUR / .622
4583 PSY = CPAIR / HLAT * PSURF/100. / .622
4584 RCP = RHOAIR * CPAIR
4586 WC = AMIN1( 1., CAPAC(1)/SATCAP(1) )
4587 WG = AMIN1( 1., CAPAC(2)/SATCAP(2) )
4588 !----------------------------------------------------------------------
4589 ! RSOIL FUNCTION FROM FIT TO CAMILLO AND GURNEY (1984) DATA.
4590 ! WETNESS OF UPPER 0.5 CM OF SOIL CALCULATED FROM APPROXIMATION
4591 ! TO MILLY FLOW EQUATION WITH REDUCED (1/50 ) CONDUCTIVITY IN
4593 !----------------------------------------------------------------------
4595 ! WT = WWW(1) + 0.75 * ZDEPTH(1) / ( ZDEPTH(1) + ZDEPTH(2) )
4596 ! & * (WWW(1) - (WWW(2)**2)/WWW(1) ) / 2. * 50.
4597 ! FAC = AMIN1( WT, 0.99 )
4598 ! FAC = AMAX1( FAC, WWW(1) * 0.1 )
4600 !------------------------------------------------------------
4601 ! --- soil resistance calculation alteration Y.K. Xue Feb. 1994**
4602 !------------------------------------------------------------
4603 FAC = AMIN1( www(1), 0.99 )
4604 FAC = AMAX1( FAC, 0.02 )
4605 RSOIL = 101840. * (1. - FAC ** 0.0027)
4607 PSIT = PHSAT * FAC ** (- BEE )
4608 ARGG = AMAX1(-10.,(PSIT*GRAV/461.5/TGS))
4610 !cl 2001,1,10 added the following line according to Xue, 2000 August
4612 !----------------------------------------------------------------------
4613 ! ALTERATION OF AERODYNAMIC TRANSFER PROPERTIES IN CASE OF SNOW
4615 !----------------------------------------------------------------------
4623 IF ( TGS .GT. TF ) GO TO 100
4625 SDEP = CAPAC(2) *SNOWDEN
4626 SDEP = AMIN1( SDEP, (Z2*0.95) )
4627 D = Z2 - ( Z2-D ) / Z2 * ( Z2 - SDEP )
4628 Z0 = Z0 / ( Z2-RESD ) * ( Z2-D )
4629 RDC = RDC * ( Z2-SDEP ) / Z2
4630 RBC = RBC * Z2 / ( Z2-SDEP )
4632 WG = AMIN1( 1., CAPAC(2) / 0.004 )
4635 !----------------------------------------------------------------------
4637 ! CALCULATION OF EA, TA, RA, RB, RD AND SOIL MOISTURE STRESS
4638 ! FOR THE BEGINNING OF THE TIME STEP
4640 !----------------------------------------------------------------------
4647 !-- 2001,1,11 changed the following line according to Xue,August,2000(TA=TM)
4655 CALL RASIT5(TRIB,CTNI,CUNI,RA,Z2,Z0,D,ZWIND,UM, &
4656 RHOAIR,TM,U2,USTAR,DRAG,TA,bps,rib,CU,XCT,UV10)
4657 !cl ------------IF ( IFIRST .EQ. 1 ) CALL RBRD1 ------------
4658 IF ( IFIRST .EQ. 1 ) THEN
4660 RB = 1.0/(SQRT(U2)/RBC+ZLAI(1)*.004)
4663 TEMDIF = ( TGTA + SQRT(TGTA*TGTA) ) / 2. + 0.1
4664 FIH = SQRT( 1. + 9. * GRAV *TEMDIF * Z2 / TGS / ( U2*U2) )
4667 !cl ------------ END OF RBRD1 ---------------
4668 D1 = 1./RA + 1./RB + 1./RD
4669 TA = ( TGS/RD + TC/RB + TM/RA *bps) / D1
4670 HT = ( TA - TM ) * RCP / RA
4671 RCC = RST(1)*FC + 2. * RB
4672 COC = (1.-WC)/RCC + WC/(2.*RB)
4675 COG1 = VCOVER(2)*(1.-WG)/(RG+RD)+(1.-VCOVER(2))/(RSURF+RD)*HR &
4676 + VCOVER(2)/(RSURF+RD+44.)*HR
4677 COG2 = VCOVER(2)*(1.-WG)/(RG+RD)+(1.-VCOVER(2))/(RSURF+RD) &
4678 + VCOVER(2)/(RSURF+RD+44.)
4679 COG1 = COG1 + WG/RD * VCOVER(2)
4680 COG2 = COG2 + WG/RD * VCOVER(2)
4681 D2 = 1./RA + COC + COG2
4682 TOP = COC * ETC + COG1 * ETGS + EM / RA
4684 DROP = AMAX1( 0., (E(TA)-EA) )
4685 !----------------------------------------------------------------------
4686 !cl CALL STRES1 ( IFIRST , RSTM)
4687 CALL STRES1 (IFIRST, RSTM,ROOTP, &
4688 RSTFAC,RST,TC,ETC,RB,TGS,ETGS,RD,TU,TL,TOPT,EA, &
4689 DEFAC,PH1,PH2,NROOT,ZDEPTH,PHSOIL,ROOTD,VCOVER,DROP)
4690 !----------------------------------------------------------------------
4695 IF ( ICOUNT .LE. 4 ) GO TO 1000
4696 !======================================================================
4697 !cl CALL DELRN ( RNCDTC, RNCDTG, RNGDTG, RNGDTC )
4698 ! PARTIAL DERIVATIVES OF RADIATIVE AND SENSIBLE HEAT FLUXES
4700 TG3 = TGS * TGS * TGS
4701 FAC1 = ( 1. - ALBEDO(1,3,2) ) * ( 1.-THERMK ) * VCOVER(1)
4702 FAC2 = 1. - ALBEDO(2,3,2)
4703 RNCDTC = - 2. * 4. * FAC1 * STEFAN * TC3
4704 RNCDTG = 4. * FAC1 * FAC2 * STEFAN * TG3
4705 RNGDTG = - 4. * FAC2 * STEFAN * TG3
4706 RNGDTC = 4. * FAC1 * FAC2 * STEFAN * TC3
4707 !----------------------------------------------------------------------
4709 ! DEW CALCULATION : DEW CONDITION IS SET AT BEGINNING OF TIME STEP.
4710 ! IF SURFACE CHANGES STATE DURING TIME STEP, LATENT HEAT FLUX IS
4713 !----------------------------------------------------------------------
4714 IF ( EA .GT. ETC ) FC = 0.
4715 IF ( EA .GT. ETGS) FG = 0.
4717 !----------------------------------------------------------------------
4719 ! WET FRACTION EXHAUSTION TEST : IF CAPAC(X) IS EXHAUSTED IN
4720 ! A TIME STEP, INTERCEPTION LOSS IS LIMITED TO CAPAC(X).
4722 !----------------------------------------------------------------------
4723 ! START OF NON-NEUTRAL RESISTANCE CALCULATION LOOP
4724 !----------------------------------------------------------------------
4726 ! ----- INITIALIZE NEWTON-RAPHSON ITERATIVE ROUTINE FOR RASIT 3,5,8
4737 CALL RASIT5(TRIB,CTNI,CUNI,RA,Z2,Z0,D,ZWIND,UM, &
4738 RHOAIR,TM,U2,USTAR,DRAG,TA,bps,rib,CU,XCT,UV10)
4739 !======================================================================
4740 !cl CALL DELHF ( HCDTC, HCDTG, HGDTG, HGDTC )
4741 ! PARTIAL DERIVATIVES OF SENSIBLE HEAT FLUXES
4743 RCP = RHOAIR * CPAIR
4744 D1 = 1./RA + 1./RB + 1./RD
4745 TA = ( TGS/RD + TC/RB + TM/RA *bps) / D1
4747 HC = RCP * ( TC - TA ) / RB * DTT
4748 HG = RCP * ( TGS - TA ) / RD * DTT
4749 !----------------------------------------------------------------------
4750 ! N.B. FLUXES EXPRESSED IN JOULES M-2
4751 !----------------------------------------------------------------------
4753 HCDTC = RCP / RB * ( 1./RA + 1./RD ) / D1
4754 HCDTG = - RCP / ( RB * RD ) / D1
4756 HCDTM = - RCP / ( RB * RA ) / D1 * BPS
4758 HGDTG = RCP / RD * ( 1./RA + 1./RB ) / D1
4759 HGDTC = - RCP / ( RD * RB ) / D1
4761 HGDTM = - RCP / ( RD * RA ) / D1 *BPS
4762 !======================================================================
4763 ! CALL DELEF ( ECDTC, ECDTG, EGDTG, EGDTC, DEADTC, DEADTG, EC, EG ,
4764 ! & WC, WG, FC, FG, HR,MDLSNO,ISNOW )
4765 !======================================================================
4766 ! PARTIAL DERIVATIVES OF LATENT HEAT FLUXES
4767 ! MODIFICATION FOR SOIL DRYNESS : HR = REL. HUMIDITY IN TOP LAYER
4768 !----------------------------------------------------------------------
4771 IF ( FG .LT. .5 ) HRR = 1.
4773 RCC = RST(1)*FC + 2. * RB
4774 COC = (1.-WC)/RCC + WC/(2.*RB)
4776 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
4777 IF (ISNOW.eq.0) THEN
4782 COG1 = VCOVER(2)*(1.-WG)/(RG+RD)+(1.-VCOVER(2))/(RSURF+RD)*HRR &
4783 + VCOVER(2)/(RSURF+RD+44.)*HRR
4784 COG2 = VCOVER(2)*(1.-WG)/(RG+RD)+(1.-VCOVER(2))/(RSURF+RD) &
4785 + VCOVER(2)/(RSURF+RD+44.)
4786 COG1 = COG1 + WG/RD * VCOVER(2)
4787 COG2 = COG2 + WG/RD * VCOVER(2)
4789 D2 = 1./RA + COC + COG2
4790 TOP = COC * ETC + COG1 * ETGS + EM/RA
4792 EC = ( ETC - EA ) * COC * RCP/PSY * DTT
4793 EG = ( ETGS*COG1 - EA*COG2 ) * RCP/PSY * DTT
4794 DEADTC = GETC * COC / D2
4795 DEADTG = GETGS * COG1 / D2
4797 ECDTC = ( GETC - DEADTC ) * COC * RCP / PSY
4798 ECDTG = - DEADTG * COC * RCP / PSY
4800 EGDTG = ( GETGS*COG1 - DEADTG*COG2 ) * RCP / PSY
4801 EGDTC = - DEADTC * COG2 * RCP / PSY
4804 DEADQM = 0.622 * PSURF /( (0.622+QM)**2 * RA * D2 )
4805 ECDQM = -DEADQM * COC * RCP / PSY
4806 EGDQM = -DEADQM * COG2 * RCP / PSY
4807 ! FOR YPDATING TM AND QM
4809 AH = 1/ (HLAT*RHOAIR)
4811 !----------------------------------------------------------------------
4812 ! CALCULATION OF COEFFICIENTS OF TEMPERATURE TENDENCY EQUATIONS
4815 !----------------------------------------------------------------------
4817 CCODTC = CCX / DTT - RNCDTC + HCDTC + ECDTC
4818 CCODTG = - RNCDTG + HCDTG + ECDTG
4819 CCORHS = RADT(1) - ( HC + EC ) / DTT
4820 !----------------------------------------------------------------------
4822 GCODTG = CG / DTT + TIMCON*CG*2. - RNGDTG + HGDTG + EGDTG
4823 GCODTC = - RNGDTC + HGDTC + EGDTC
4824 GCORHS = RADT(2) - TIMCON*CG*2. * ( TGS -TD ) - ( HG + EG ) / DTT
4826 DENOM = CCODTC * GCODTG - CCODTG * GCODTC
4827 DTC = ( CCORHS * GCODTG - CCODTG * GCORHS ) / DENOM
4828 DTG = ( CCODTC * GCORHS - CCORHS * GCODTC ) / DENOM
4829 !----------------------------------------------------------------------
4830 ! CHECK IF INTERCEPTION LOSS TERM HAS EXCEEDED CANOPY STORAGE
4831 !----------------------------------------------------------------------
4833 ECPOT = ( (ETC - EA) + (GETC - DEADTC)*DTC - DEADTG*DTG )
4834 ECI = ECPOT * WC /(2.*RB) * RCP/PSY * DTT
4835 ECIDIF=AMAX1(0.0,(ECI-CAPAC(1)*1.E3*HLAT))
4836 ECI =AMIN1(ECI,( CAPAC(1)*1.E3*HLAT))
4838 EGPOT = ( (ETGS - EA) + (GETGS - DEADTG)*DTG - DEADTC*DTC )
4839 EGI = EGPOT * VCOVER(2) * WG/RD * RCP/PSY * DTT
4840 EGIDIF=AMAX1(0.0,(EGI-CAPAC(2)*1.E3*HLAT))
4841 EGI =AMIN1(EGI,( CAPAC(2)*1.E3*HLAT))
4842 !----------------------------------------------------------------------
4845 D1 = 1./RA + 1./RB + 1./RD
4846 TAEN = ( TGEN / RD + TCEN / RB + TM / RA *bps) / D1
4848 HEND = ( TAEN - TM ) * RCP / RA + (ECIDIF + EGIDIF)/DTT
4852 IF ( I .GT. 20 ) GO TO 200
4853 !cl IF ( I .GT. ITRUNK ) GO TO 200
4855 CALL NEWTON(TRIB,Y,FINC,NOX,NONPOS,IWALK,LX,ZINC,A2,Y1,ITEX)
4856 IF(NOX.NE.1)GO TO 2000
4859 ! IF (I.GT.10) IQIN1 = IQIN1 + 1
4861 !----------------------------------------------------------------------
4862 ! EXIT FROM NON-NEUTRAL CALCULATION
4863 ! EVAPOTRANSPIRATION FLUXES CALCULATED FIRST ( J M-2 )
4864 !----------------------------------------------------------------------
4866 IF ( FG .LT. .5 ) HRR = 1.
4870 COGT = VCOVER(2) * (1.-WG)/( RG + RD )
4871 COGS1 = (1.-VCOVER(2)) / ( RD + RSURF ) * HRR &
4872 + VCOVER(2) / ( RD + RSURF + 44.) * HRR
4875 ECT = ECPOT * COCT * RCP/PSY * DTT
4877 EGT = EGPOT * COGT * RCP/PSY * DTT
4878 EGS = (ETGS + GETGS*DTG ) * COGS1 &
4879 - ( EA + DEADTG*DTG + DEADTC*DTC ) * COGS2
4880 EGS = EGS * RCP/PSY * DTT
4881 EGSMAX = WWW(1) / 2. * ZDEPTH(1) * POROS * HLAT * 1000.
4882 EGIADD = AMAX1( 0., EGS - EGSMAX )
4883 EGS = AMIN1 ( EGS, EGSMAX )
4884 EGIDIF = EGIDIF + EGIADD
4886 !----------------------------------------------------------------------
4887 ! SENSIBLE HEAT FLUX CALCULATED WITH LATENT HEAT FLUX CORRECTION
4888 !----------------------------------------------------------------------
4889 HC = HC + (HCDTC*DTC + HCDTG*DTG)*DTT + ECIDIF
4890 HG = HG + (HGDTC*DTC + HGDTG*DTG)*DTT + EGIDIF
4891 !----------------------------------------------------------------------
4892 ! TEST OF DEW CONDITION. LATENT HEAT FLUXES SET TO ZERO IF SIGN
4893 ! OF FLUX CHANGES OVER TIME STEP.EXCESS ENERGY DONATED TO SENSIBLE
4895 !----------------------------------------------------------------------
4896 ECF = SIGN( 1., ECPOT )
4897 EGF = SIGN( 1., EGPOT )
4901 IF(DEWC*ECF.GT.0.0) GO TO 300
4905 300 IF(DEWG*EGF.GT.0.0) GO TO 400
4906 HG = HG + EGS + EGI + EGT
4913 EG = EGT + EGS + EGI
4915 !----------------------------------------------------------------------
4916 ! ADJUSTMENT OF TEMPERATURES AND VAPOR PRESSURE , CALCULATION OF
4917 ! SENSIBLE HEAT FLUXES.
4918 !----------------------------------------------------------------------
4923 EA = EA + DEADTC*DTC + DEADTG*DTG
4925 RADT(1) = RADT(1) + RNCDTC*DTC + RNCDTG*DTG
4926 RADT(2) = RADT(2) + RNGDTC*DTC + RNGDTG*DTG
4927 !========================================================================
4928 FLUP = FLUP - (RNCDTC+RNGDTC)*DTC - (RNCDTG+RNGDTG)*DTG
4929 !========================================================================
4931 ! ** simulated net all-wave radiation **
4932 ! sibnet(nmm,ndd,nhh) = RADT(1) + RADT(2)
4934 CHF = CCX / DTT * DTC
4935 SHF = CG / DTT * DTG + TIMCON*CG*2. * ( TGS - TD )
4937 ZLWUP = ZLWUP - RNCDTC * DTC / 2. &
4938 - RNGDTG * DTG * (1.-VCOVER(1)*(1.-THERMK) )
4940 IF ( TGS .GT. TF ) GO TO 500
4949 !------------------------------------------------------
4950 END SUBROUTINE TEMRS1
4951 !------------------------------------------------------
4953 !=======================================================================
4956 (DTT,TC,TGS,TD,TA,TM,QM,EM,PSURF,WWW,CAPAC,SATCAP, &
4957 DTC,DTG,RA,RST,ZDEPTH,BEE,PHSAT,POROS,D,Z0,RDC,RBC,VCOVER, &
4958 Z2,ZLAI,DEFAC,TU,TL,TOPT,RSTFAC,NROOT,ROOTD,PHSOIL,ROOTP, &
4959 PH1,PH2,ECT,ECI,EGT,EGI,EGS,HC,HG,EC,EG,EA,RADT,CHF,SHF, &
4960 ALBEDO,ZLWUP,THERMK,RHOAIR,ZWIND,UM,USTAR,DRAG,CCX,CG, &
4961 ISNOW,CHISL,TSOIL,SOLSOIL,CSOIL,WFSOIL,POROSITY, &
4962 DZ,DZO,W,WO,WF,TSSN,TSSNO,BW,BWO,CT,CTO,FI,FIO,FL,FLO, &
4963 BL,BLO,BI,BIO,BT,BTO,DMLT,DMLTO,H,HO,S,SO,SS,SSO,DSOL,DHP, &
4964 DICEVOL,DLIQVOL,THK,QK,SWE,SNOWDEN,SNOWDEPTH,TKAIR,SNROFF, &
4965 DZSOIL,BPS,rib,CU,XCT,flup,UV10)
4967 !=======================================================================
4968 ! ------------------------------------------------------------------7272
4969 ! SUBROUTINES IN THIS BLOCK : RASIT5(RBRD1), STRES1,DELRN,TPROPTY,
4970 ! ------------------------- DELHF,DELEF,NEWTON,SNRESULT
4971 !CS------------------ sun Adds Local variables 10/13/98 ----------------
4972 !clwp 12/13/2000, change the dimensions of delth to a certain number > N
4973 REAL WORK(N1),WORK1(N1),DELTH(20)
4975 REAL ZINC(3), A2(3), Y1(3), ITEX(3),RSTM(2)
4976 DIMENSION SSO(N1),POROSITY(N1),H(N1),HO(N1),DZ(N1),DZO(N1),CT(N1), &
4977 BI(N1),BIO(N1),BW(N1),BWO(N1),BL(N1),BLO(N1),CTO(N1), &
4978 TSSN(N1),TSSNO(N1),DLIQVOL(N1),DICEVOL(N1),DSOL(N1), &
4979 W(N1),WO(N1),WF(N1),FI(N1),FIO(N1),FL(N1),FLO(N1), &
4980 DMLT(N1),DMLTO(N1),BT(N1),BTO(N1),S(N1),SO(N1),SS(N1), &
4981 PDZDTC(N1),DMASS(N1),THK(N1),DHP(N1),QK(N1)
4982 DIMENSION WWW(3),CAPAC(2),SATCAP(2),ZDEPTH(3),VCOVER(2),ZLAI(2), &
4983 RADT(2),ALBEDO(2,3,2),TOPT(2),TL(2),TU(2),DEFAC(2), &
4984 PH1(2),PH2(2),RST(2),RSTFAC(2,4), &
4985 ROOTD(2),ROOTP(3),PHSOIL(3)
4986 ! ------------------------------------------------------------------7272
4987 ! E(X) IS VAPOUR PRESSURE IN MBARS AS A FUNCTION OF TEMPERATURE
4988 ! GE(X) IS D E(X) / D ( TEMP )
4989 ! ------------------------------------------------------------------7272
4991 E(X) = EXP( 21.18123 - 5418. / X ) / .622
4992 GE(X) = EXP( 21.18123 - 5418. / X ) * 5418. &
4999 !crr HLAT = ( 3150.19 - 2.378 * TM ) * 1000.
5000 PSY = CPAIR / HLAT * PSURF/ 100. / .622
5001 RCP = RHOAIR * CPAIR
5003 WC = AMIN1( 1., CAPAC(1)/SATCAP(1) )
5004 !CS SUN CHANGE foolowing statement to one new 10/13/98
5005 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5006 IF (ISNOW.eq.0) THEN
5009 WG = AMIN1( 1., CAPAC(2)/SATCAP(2) )
5012 !----------------------------------------------------------------------
5013 ! RSOIL FUNCTION FROM FIT TO CAMILLO AND GURNEY (1984) DATA.
5014 ! WETNESS OF UPPER 0.5 CM OF SOIL CALCULATED FROM APPROXIMATION
5015 ! TO MILLY FLOW EQUATION WITH REDUCED (1/50 ) CONDUCTIVITY IN
5017 !----------------------------------------------------------------------
5019 ! WT = WWW(1) + 0.75 * ZDEPTH(1) / ( ZDEPTH(1) + ZDEPTH(2) )
5020 ! & * (WWW(1) - (WWW(2)**2)/WWW(1) ) / 2. * 50.
5021 ! FAC = AMIN1( WT, 0.99 )
5022 ! FAC = AMAX1( FAC, WWW(1) * 0.1 )
5024 !------------------------------------------------------------
5025 ! --- soil resistance calculation alteration Y.K. Xue Feb. 1994**
5026 !------------------------------------------------------------
5027 FAC = AMIN1( www(1), 0.99 )
5028 FAC = AMAX1( FAC, 0.02 )
5029 !CS Sun fixed following RSOIL equation as equal to 10/13/98
5030 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5031 IF (ISNOW.eq.0) THEN
5034 RSOIL = 101840. * (1. - FAC ** 0.0027)
5037 !------------------------------------------------------------
5039 PSIT = PHSAT * FAC ** (- BEE )
5040 ARGG = AMAX1(-10.,(PSIT*GRAV/461.5/TGS))
5042 !CL 2001,1,10 added the following line according to Xue, August 2000
5044 !----------------------------------------------------------------------
5045 ! ALTERATION OF AERODYNAMIC TRANSFER PROPERTIES IN CASE OF SNOW
5047 !----------------------------------------------------------------------
5054 IF ( TGS .GT. TF ) GO TO 100
5055 !CS Sun Change following statement into another one: SDEP=snowdepth 10/13/98
5056 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5057 IF (ISNOW.eq.0) THEN
5060 SDEP = CAPAC(2) * SNOWDEN
5063 SDEP = AMIN1( SDEP, (Z2*0.95) )
5064 D = Z2 - ( Z2-D ) / Z2 * ( Z2 - SDEP )
5065 Z0 = Z0 / ( Z2-RESD ) * ( Z2-D )
5066 RDC = RDC * ( Z2-SDEP ) / Z2
5067 RBC = RBC * Z2 / ( Z2-SDEP )
5069 !CS Sun added the following IF,change the WG to WG=1.0 10/13/98
5070 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5071 IF (ISNOW.eq.0) THEN
5074 WG = AMIN1( 1., CAPAC(2) / 0.004 )
5078 !----------------------------------------------------------------------
5080 ! CALCULATION OF EA, TA, RA, RB, RD AND SOIL MOISTURE STRESS
5081 ! FOR THE BEGINNING OF THE TIME STEP
5083 !----------------------------------------------------------------------
5097 CALL RASIT5(TRIB,CTNI,CUNI,RA,Z2,Z0,D,ZWIND,UM, &
5098 RHOAIR,TM,U2,USTAR,DRAG,TA,bps,rib,CU,XCT,UV10)
5099 !cl ------------IF ( IFIRST .EQ. 1 ) CALL RBRD1 ------------
5100 IF ( IFIRST .EQ. 1 ) THEN
5102 RB = 1.0/(SQRT(U2)/RBC+ZLAI(1)*.004)
5105 TEMDIF = ( TGTA + SQRT(TGTA*TGTA) ) / 2. + 0.1
5106 FIH = SQRT( 1. + 9. * GRAV *TEMDIF * Z2 / TGS / ( U2*U2) )
5109 !cl ------------ END OF RBRD1 ---------------
5110 D1 = 1./RA + 1./RB + 1./RD
5111 TA = ( TGS/RD + TC/RB + TM/RA *bps) / D1
5112 HT = ( TA - TM ) * RCP / RA
5113 RCC = RST(1)*FC + 2. * RB
5114 COC = (1.-WC)/RCC + WC/(2.*RB)
5116 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5117 IF (ISNOW.eq.0) THEN
5122 COG1 = VCOVER(2)*(1.-WG)/(RG+RD)+(1.-VCOVER(2))/(RSURF+RD)*HR &
5123 + VCOVER(2)/(RSURF+RD+44.)*HR
5124 COG2 = VCOVER(2)*(1.-WG)/(RG+RD)+(1.-VCOVER(2))/(RSURF+RD) &
5125 + VCOVER(2)/(RSURF+RD+44.)
5126 COG1 = COG1 + WG/RD * VCOVER(2)
5127 COG2 = COG2 + WG/RD * VCOVER(2)
5128 D2 = 1./RA + COC + COG2
5129 TOP = COC * ETC + COG1 * ETGS + EM / RA
5131 DROP = AMAX1( 0., (E(TA)-EA) )
5133 !----------------------------------------------------------------------
5134 CALL STRES1 (IFIRST, RSTM,ROOTP, &
5135 RSTFAC,RST,TC,ETC,RB,TGS,ETGS,RD,TU,TL,TOPT,EA, &
5136 DEFAC,PH1,PH2,NROOT,ZDEPTH,PHSOIL,ROOTD,VCOVER,DROP)
5137 !----------------------------------------------------------------------
5143 IF ( ICOUNT .LE. 4 ) GO TO 1000
5144 !======================================================================
5145 !cl CALL DELRN ( RNCDTC, RNCDTG, RNGDTG, RNGDTC )
5146 ! PARTIAL DERIVATIVES OF RADIATIVE AND SENSIBLE HEAT FLUXES
5148 TG3 = TGS * TGS * TGS
5149 FAC1 = ( 1. - ALBEDO(1,3,2) ) * ( 1.-THERMK ) * VCOVER(1)
5150 FAC2 = 1. - ALBEDO(2,3,2)
5151 RNCDTC = - 2. * 4. * FAC1 * STEFAN * TC3
5152 RNCDTG = 4. * FAC1 * FAC2 * STEFAN * TG3
5153 RNGDTG = - 4. * FAC2 * STEFAN * TG3
5154 RNGDTC = 4. * FAC1 * FAC2 * STEFAN * TC3
5155 !----------------------------------------------------------------------
5157 ! DEW CALCULATION : DEW CONDITION IS SET AT BEGINNING OF TIME STEP.
5158 ! IF SURFACE CHANGES STATE DURING TIME STEP, LATENT HEAT FLUX IS
5161 !----------------------------------------------------------------------
5163 IF ( EA .GT. ETC ) FC = 0.
5164 IF ( EA .GT. ETGS) FG = 0.
5166 !----------------------------------------------------------------------
5168 ! WET FRACTION EXHAUSTION TEST : IF CAPAC(X) IS EXHAUSTED IN
5169 ! A TIME STEP, INTERCEPTION LOSS IS LIMITED TO CAPAC(X).
5171 !----------------------------------------------------------------------
5172 ! START OF NON-NEUTRAL RESISTANCE CALCULATION LOOP
5173 !----------------------------------------------------------------------
5177 ! ----- INITIALIZE NEWTON-RAPHSON ITERATIVE ROUTINE FOR RASIT 3,5,8
5187 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5188 IF (ISNOW.eq.0) THEN
5189 !---------------------------------------------------------
5190 ! Next loop, we calculate the thermal conductivities
5192 !---------------------------------------------------------
5193 CALL TPROPTY(CHISL,BWO,DZO,TKAIR,DZSOIL, THK,QK)
5194 !------------------------------------------------------------
5195 ! Next we calculate the balances of energy and water
5196 !------------------------------------------------------------
5198 !------------------------------------------------------------
5202 work1(i) = dliqvol(i)
5210 RADDWN=RADDWN+dsol(1)+dsol(2)
5211 RNG = RADT(2) - RADDWN
5213 do 57 ik = NK , 1 , -1
5214 !cccc Next calculate snow layers temperatures and densities
5215 IF (ISNOW.ne.0) go to 2000
5216 If((sso(ik).lt.1d0.and.porosity(ik).gt.0d0))then
5217 udum0 = dzo(ik)*(porosity(ik) -work1(ik))
5218 if(udum0.lt.0.0) then
5219 print*,' udum0 is WRONG in thermal.f'
5222 if(wf(ik+1).gt.udum0)then
5224 snroff = snroff + (wf(ik+1)-udum0)
5225 hroff=hroff+(wf(ik+1)-udum0)*cl*rhowater*(tssn(ik+1)-273.16)
5229 dhp(ik+1)=(uuu*cl*rhowater*(tssn(ik+1)-273.16))/dtt
5231 bwo(ik)=rhowater*w(ik)/dzo(ik)
5232 cto(ik)=(bwo(ik)/920.0)*1.9e+6
5233 dmlto(ik)=w(ik)*dlm*rhowater
5234 if (ho(ik).lt.-dmlto(ik)) then
5237 tssno(ik)=( ho(ik)+dmlto(ik))/(cto(ik)*dzo(ik))+273.16
5238 ! ------------------------------------------------------------------7272
5241 fio(ik)=-ho(ik)/dmlto(ik)
5244 blo(ik)=bwo(ik)*flo(ik)
5245 bio(ik)=bwo(ik)*fio(ik)
5246 dliqvol(ik)=blo(ik)/rhowater
5247 dicevol(ik)=bio(ik)/dice
5250 snroff = snroff +wf(ik+1)
5251 hroff=hroff+wf(ik+1)*cl*rhowater*(tssn(ik+1)-273.16)
5254 !cs Sun add. It is important because tssno(n) is changed here on 1/25/99 .
5257 !------------------------------------------------------------*
5261 b1 = dsol(ik) + delth(ik) &
5262 + qk(ik+1)*(tssn(ik+1)-tssno(ik)) + qk(ik)*work(ik-1)
5264 b1 = dsol(ik) + delth(ik) &
5265 + qk(ik+1)*(tssn(ik+1)-tssno(ik)) + qk(ik)*tsoil
5269 ! Important: delth(ik) must be initialized after using.
5272 dmlt(ik)=w(ik)*dlm*rhowater
5273 If (ik.lt.NK.and.ik.ge.1) Then
5274 fff = -( ho(ik) + (b1+b2*273.16)*dtt ) &
5275 / ( rhowater*dlm*w(ik) )
5276 ! when snow temperature equals 273.16
5278 if(fff.gt.0.0.and.fff.le.1.0) then
5281 else if (fff.gt.1.0) then
5283 else if (fff.le.0.0) then
5287 If (ik.lt.NK) go to 3000
5289 !CS Sun add above paragraph on 10/13/98
5292 CALL RASIT5(TRIB,CTNI,CUNI,RA,Z2,Z0,D,ZWIND,UM, &
5293 RHOAIR,TM,U2,USTAR,DRAG,TA,bps,rib,CU,XCT,UV10)
5294 !----------------------------------------------------------------------
5295 !cl CALL DELHF ( HCDTC, HCDTG, HGDTG, HGDTC )
5296 ! PARTIAL DERIVATIVES OF SENSIBLE HEAT FLUXES
5298 RCP = RHOAIR * CPAIR
5299 D1 = 1./RA + 1./RB + 1./RD
5300 TA = ( TGS/RD + TC/RB + TM/RA *bps) / D1
5302 HC = RCP * ( TC - TA ) / RB * DTT
5303 HG = RCP * ( TGS - TA ) / RD * DTT
5304 !----------------------------------------------------------------------
5305 ! N.B. FLUXES EXPRESSED IN JOULES M-2
5306 !----------------------------------------------------------------------
5308 HCDTC = RCP / RB * ( 1./RA + 1./RD ) / D1
5309 HCDTG = - RCP / ( RB * RD ) / D1
5311 HCDTM = - RCP / ( RB * RA ) / D1 * BPS
5313 HGDTG = RCP / RD * ( 1./RA + 1./RB ) / D1
5314 HGDTC = - RCP / ( RD * RB ) / D1
5316 HGDTM = - RCP / ( RD * RA ) / D1 *BPS
5317 !======================================================================
5318 ! CALL DELEF ( ECDTC, ECDTG, EGDTG, EGDTC, DEADTC, DEADTG, EC, EG ,
5319 ! & WC, WG, FC, FG, HR,MDLSNO,ISNOW )
5321 ! PARTIAL DERIVATIVES OF LATENT HEAT FLUXES
5322 ! MODIFICATION FOR SOIL DRYNESS : HR = REL. HUMIDITY IN TOP LAYER
5323 !----------------------------------------------------------------------
5326 IF ( FG .LT. .5 ) HRR = 1.
5328 RCC = RST(1)*FC + 2. * RB
5329 COC = (1.-WC)/RCC + WC/(2.*RB)
5331 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5332 IF (ISNOW.eq.0) THEN
5337 COG1 = VCOVER(2)*(1.-WG)/(RG+RD)+(1.-VCOVER(2))/(RSURF+RD)*HRR &
5338 + VCOVER(2)/(RSURF+RD+44.)*HRR
5339 COG2 = VCOVER(2)*(1.-WG)/(RG+RD)+(1.-VCOVER(2))/(RSURF+RD) &
5340 + VCOVER(2)/(RSURF+RD+44.)
5341 COG1 = COG1 + WG/RD * VCOVER(2)
5342 COG2 = COG2 + WG/RD * VCOVER(2)
5344 D2 = 1./RA + COC + COG2
5345 TOP = COC * ETC + COG1 * ETGS + EM/RA
5347 EC = ( ETC - EA ) * COC * RCP/PSY * DTT
5348 EG = ( ETGS*COG1 - EA*COG2 ) * RCP/PSY * DTT
5349 DEADTC = GETC * COC / D2
5350 DEADTG = GETGS * COG1 / D2
5352 ECDTC = ( GETC - DEADTC ) * COC * RCP / PSY
5353 ECDTG = - DEADTG * COC * RCP / PSY
5355 EGDTG = ( GETGS*COG1 - DEADTG*COG2 ) * RCP / PSY
5356 EGDTC = - DEADTC * COG2 * RCP / PSY
5359 DEADQM = 0.622 * PSURF /( (0.622+QM)**2 * RA * D2 )
5360 ECDQM = -DEADQM * COC * RCP / PSY
5361 EGDQM = -DEADQM * COG2 * RCP / PSY
5362 ! FOR YPDATING TM AND QM
5364 AH = 1/ (HLAT*RHOAIR)
5366 !----------------------------------------------------------------------
5368 ! CALCULATION OF COEFFICIENTS OF TEMPERATURE TENDENCY EQUATIONS
5369 ! C - CANOPY, G - GROUND
5371 !----------------------------------------------------------------------
5373 CCODTC = CCX / DTT - RNCDTC + HCDTC + ECDTC
5374 CCODTG = - RNCDTG + HCDTG + ECDTG
5375 CCORHS = RADT(1) - ( HC + EC ) / DTT
5377 !----------------------------------------------------------------------
5378 !CS Sun Change following original GCODCG into new one 10/13/98
5379 IF (ISNOW.eq.0) THEN
5380 GCODTG= cto(n)*dzo(n)/DTT - RNGDTG + HGDTG + EGDTG + qk(n)
5382 GCODTG = CG / DTT + TIMCON*CG*2. - RNGDTG + HGDTG + EGDTG
5384 GCODTC = - RNGDTC + HGDTC + EGDTC
5385 !CS From NOW ON WE REALLY GET INTO SNOW PART !!!!. ON 10/13/98
5386 !cl IF (MDLSNO.ne.0.or.ISNOW.ne.0) THEN
5387 IF (ISNOW.ne.0) THEN
5388 GCORHS = RADT(2)-TIMCON*CG*2.*( TGS -TD )-( HG + EG )/ DTT
5391 GCORHS1 = ho(n)/DTT+RNG - ( HG + EG ) / DTT +dhp(n+1) &
5392 - qk(n)*(TGS -tssno(n-1))-cto(n)*dzo(n)*(tssno(n)-273.16)/DTT
5393 GCORHS = GCORHS1+ rhowater*dlm*w(n)*fi(n)/DTT
5396 DENOM = CCODTC * GCODTG - CCODTG * GCODTC
5398 DTC = ( CCORHS * GCODTG - CCODTG * GCORHS ) / DENOM
5399 DTG = ( CCODTC * GCORHS - CCORHS * GCODTC ) / DENOM
5400 !CS Sun add following part here for inserting snow routing on 10/13/98
5401 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5402 IF (ISNOW.eq.0) THEN
5403 If ((TGS+DTG).le.273.16) Then
5406 !cs Sun debug on 1998/12/14 end
5407 ! ------------------------------------------------------------------7272
5408 h(NK)=( TGSNEW-273.16)*cto(n)*dzo(n)-fi(NK)*w(NK)*dlm*rhowater
5409 Dh_DTT_DTG=(h(NK)-ho(NK))/DTT
5414 DTC= (CCORHS - CCODTG*DTG)/CCODTC
5415 fi(NK)=(GCODTC*DTC+GCODTG*DTG-GCORHS1)/(rhowater*dlm*w(n))*DTT
5416 if (fi(NK).ge.0.0.and.fi(NK).le.1.0) then
5417 h(NK)=-fi(n)*w(n)*dlm*rhowater
5418 Dh_DTT_DTG=(h(NK)-ho(NK))/DTT
5422 else if (fi(NK).lt.0.)then
5423 h(NK)= -fi(NK)*w(NK)*dlm*rhowater
5424 Dh_DTT_DTG=(h(NK)-ho(NK))/DTT
5433 !----------------------------------------------------------------------
5434 ! CHECK IF INTERCEPTION LOSS TERM HAS EXCEEDED CANOPY STORAGE
5435 !----------------------------------------------------------------------
5437 ECPOT = ( (ETC - EA) + (GETC - DEADTC)*DTC - DEADTG*DTG )
5438 ECI = ECPOT * WC /(2.*RB) * RCP/PSY * DTT
5439 ECIDIF=AMAX1(0.0,(ECI-CAPAC(1)*1.E3*HLAT))
5440 ECI =AMIN1(ECI,( CAPAC(1)*1.E3*HLAT))
5442 EGPOT = ( (ETGS - EA) + (GETGS - DEADTG)*DTG - DEADTC*DTC )
5443 EGI = EGPOT * VCOVER(2) * WG/RD * RCP/PSY * DTT
5444 EGIDIF=AMAX1(0.0,(EGI-CAPAC(2)*1.E3*HLAT))
5445 EGI =AMIN1(EGI,( CAPAC(2)*1.E3*HLAT))
5447 !----------------------------------------------------------------------
5450 D1 = 1./RA + 1./RB + 1./RD
5451 TAEN = ( TGEN / RD + TCEN / RB + TM / RA *bps) / D1
5453 HEND = ( TAEN - TM ) * RCP / RA + (ECIDIF + EGIDIF)/DTT
5457 IF ( II .GT. 20 ) GO TO 200
5458 !CL IF ( II .GT. ITRUNK ) GO TO 200
5460 !CL CALL NEWTON(TRIB,Y,FINC,NOX,NONPOS,IWALK,LX)
5461 CALL NEWTON(TRIB,Y,FINC,NOX,NONPOS,IWALK,LX,ZINC,A2,Y1,ITEX)
5463 IF(NOX.NE.1)GO TO 2000
5465 !CS Sun add following part here for inserting snow routing on 10/13/98
5466 !cl 3000 IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5467 3000 IF (ISNOW.eq.0) THEN
5468 IF (ICASE.eq.1.and.ik.eq.NK) THEN
5472 SNOFAC = HLAT / (HLAT + SNOMEL /1000.)
5473 egidw = EGI*SNOFAC /HLAT/1000.
5474 ! egidw= EGI/HLAT/1000.
5478 dzo(n)=dzo(n)-egidw*rhowater/bwo(n)
5479 !cs sun: following way to correct h(n) may lead to unballance of energy.
5480 ho(n)=ho(n)*dzo(n)/dzold
5483 CALL SNRESULT(DTT,IK,ICASE,WFSOIL,TSOIL,B1,B2,FFF,DELTH,WWW, &
5484 ZDEPTH,POROS,BI,BIO,DZ,DZO,W,BW,BWO,H,HO,QK,BL,BT,CT, &
5485 FI,FL,WF,TSSN,DLIQVOL,DICEVOL,SNROFF,HROFF,QSOIL)
5488 ! ------------------------------------------------------------------7272
5489 !clwp 11/17/2000, Li add following sentence to recalculate the snowdepth
5490 SNOWDEPTH=DZO(1)+DZO(2)+DZO(3)
5491 !clwp 11/17/2000, Li add above sentence to recalculate the snowdepth
5492 !CS sun add following parts on 12/5/98 start
5493 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5494 IF (ISNOW.eq.0) THEN
5497 IF((DZ(1)+DZ(2)+DZ(3)).NE.0.0) THEN
5498 SNOWDEN=(BW(1)*DZ(1)+BW(2)*DZ(2)+BW(3)*DZ(3)) &
5499 /(DZ(1)+DZ(2)+DZ(3))
5500 SNOWDEN=1000./SNOWDEN
5503 !CS sun add above parts on 12/5/98 end
5504 !----------------------------------------------------------------------
5505 ! EXIT FROM NON-NEUTRAL CALCULATION
5507 ! EVAPOTRANSPIRATION FLUXES CALCULATED FIRST ( J M-2 )
5508 !----------------------------------------------------------------------
5510 IF ( FG .LT. .5 ) HRR = 1.
5511 !cs SUn change RSURF = RSOIL*FG into followings: 02/03/99 start
5512 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5513 IF (ISNOW.eq.0) THEN
5518 !cs sun 03/02/99 end
5521 COGT = VCOVER(2) * (1.-WG)/( RG + RD )
5522 COGS1 = (1.-VCOVER(2)) / ( RD + RSURF ) * HRR &
5523 + VCOVER(2) / ( RD + RSURF + 44.) * HRR
5526 ECT = ECPOT * COCT * RCP/PSY * DTT
5528 EGT = EGPOT * COGT * RCP/PSY * DTT
5529 EGS = (ETGS + GETGS*DTG ) * COGS1 &
5530 - ( EA + DEADTG*DTG + DEADTC*DTC ) * COGS2
5531 EGS = EGS * RCP/PSY * DTT
5532 !CS Sun add following IF statement on 10/13/98
5533 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) EGS=0.0
5534 IF (ISNOW.eq.0) EGS=0.0
5535 EGSMAX = WWW(1) / 2. * ZDEPTH(1) * POROS * HLAT * 1000.
5536 EGIADD = AMAX1( 0., EGS - EGSMAX )
5537 EGS = AMIN1 ( EGS, EGSMAX )
5538 EGIDIF = EGIDIF + EGIADD
5540 !----------------------------------------------------------------------
5541 ! SENSIBLE HEAT FLUX CALCULATED WITH LATENT HEAT FLUX CORRECTION
5542 !----------------------------------------------------------------------
5543 HC = HC + (HCDTC*DTC + HCDTG*DTG)*DTT + ECIDIF
5544 HG = HG + (HGDTC*DTC + HGDTG*DTG)*DTT + EGIDIF
5545 !----------------------------------------------------------------------
5547 ! TEST OF DEW CONDITION. LATENT HEAT FLUXES SET TO ZERO IF SIGN
5548 ! OF FLUX CHANGES OVER TIME STEP.EXCESS ENERGY DONATED TO SENSIBLE
5550 !----------------------------------------------------------------------
5552 !cs Sun add following one statement IF (ISNOW.eq.0.and.MDLSNO.eq.0) go to
5553 !cs 401 CONTINUE to skip folloing statements from
5554 !CS ECF = SIGN( 1., ECPOT ) to 400 CONTINUE
5555 !cl IF (ISNOW.eq.0.and.MDLSNO.eq.0) go to 401
5556 IF (ISNOW.eq.0) go to 401
5557 ECF = SIGN( 1., ECPOT )
5558 EGF = SIGN( 1., EGPOT )
5562 IF(DEWC*ECF.GT.0.0) GO TO 300
5566 300 IF(DEWG*EGF.GT.0.0) GO TO 400
5567 HG = HG + EGS + EGI + EGT
5575 EG = EGT + EGS + EGI
5577 !----------------------------------------------------------------------
5578 ! ADJUSTMENT OF TEMPERATURES AND VAPOR PRESSURE , CALCULATION OF
5579 ! SENSIBLE HEAT FLUXES.
5580 !----------------------------------------------------------------------
5582 !cs sun add following new statement 02/04/99
5587 !CS Sun add following statement: 10/13/98
5588 IF (ISNOW.eq.0) tssn(n)=TGS
5591 EA = EA + DEADTC*DTC + DEADTG*DTG
5593 RADT(1) = RADT(1) + RNCDTC*DTC + RNCDTG*DTG
5594 RADT(2) = RADT(2) + RNGDTC*DTC + RNGDTG*DTG
5595 !========================================================================
5596 FLUP = FLUP - (RNCDTC+RNGDTC)*DTC - (RNCDTG+RNGDTG)*DTG
5597 !========================================================================
5599 ! ** simulated net all-wave radiation **
5600 ! sibnet(nmm,ndd,nhh) = RADT(1) + RADT(2)
5602 CHF = CCX / DTT * DTC
5603 !cs sun change the original statement: on 12/14/98
5604 !cs SHF = CG / DTT * DTG + TIMCON*CG*2. * ( TGS - TD)
5605 !cs into following part where CG / DTT * DTG is replaced by Dh_DTT_DTG
5606 IF (ISNOW.eq.0) THEN
5607 SHF= Dh_DTT_DTG - dhp(n+1)+ qkn*(TGSOLD-tonm1) &
5610 SHF = CG / DTT * DTG + TIMCON*CG*2. * ( TGS - TD )
5613 ZLWUP = ZLWUP - RNCDTC * DTC / 2. &
5614 - RNGDTG * DTG * (1.-VCOVER(1)*(1.-THERMK) )
5616 IF ( TGS .GT. TF ) GO TO 500
5626 !CS Sun add next paragrapg to get soil surface temperature TGS 10/13/98
5627 !cl IF (MDLSNO.eq.0.and.ISNOW.eq.0) THEN
5628 IF (ISNOW.eq.0) THEN
5630 ATMP= (QSOIL+SOLSOIL)/CSOIL
5631 BTMP=2.*3.1416/86400.
5632 CTMP=CSOIL*BTMP/CSOIL/(365.*3.1416)**0.5
5633 TGS=(TSOIL+ATMP*DTT+BTMP*DTT*TD/(1.+CTMP*DTT))/ &
5634 (1.+BTMP*DTT*(1.-CTMP*DTT/(1.+CTMP*DTT)))
5635 TD=(CTMP*DTT*TGS+TD)/(1.+CTMP*DTT)
5637 !------------------------------------------------------
5638 END SUBROUTINE TEMRS2
5639 !------------------------------------------------------
5641 !=======================================================================
5643 SUBROUTINE TPROPTY(THKSOIL,BWO,DZO,TKAIR,DZSOIL, THK,QK)
5645 !=======================================================================
5646 DIMENSION BWO(N1),DZO(N1),THK(N1),QK(N1)
5647 !!!!! this is thermal conductivity for snow from R.Jordan(1991)(2.4)
5651 thk(i) = thkair+(7.75d-5 *bwo(i)+ 1.105d-6* &
5652 bwo(i)*bwo(i))*(thkice -thkair)+0.1
5654 !!!!! calculate the ratio of thermal conductivity
5655 !!!!! at the ineterface between two layers(2.7)
5657 qk(i)=2.0*thk(i)*thk(i-1)/(thk(i)*dzo(i-1)+thk(i-1)*dzo(i))
5659 ! YX2002 (test2) but do nothing at this stage
5660 qk(1)= 2.0*thk(1)*thksoil/(thk(1)*dzsoil+thksoil*dzo(1))
5662 !------------------------------------------------------
5663 END SUBROUTINE TPROPTY
5664 !------------------------------------------------------
5666 !=======================================================================
5668 SUBROUTINE UPDAT1(DTT,TC,TGS,TD,CAPAC,DTC,DTG,ECT,ECI,EGT,EGI, &
5669 EGS,EG,HC,HG,HFLUX,ETMASS,ROFF, &
5670 NROOT,ROOTD,ROOTP,POROS,BEE,SATCO,SLOPE, &
5671 PHSAT,ZDEPTH,WWW,CCX,CG,CHF,SHF,ISNOW,WFSOIL,SWE,SNROFF,smelt)
5673 !=======================================================================
5674 !CS ------------------------------------------------------------------**
5676 ! UPDATING OF SOIL MOISTURE STORES AND INTERCEPTION CAPACITY
5677 !-----------------------------------------------------------------------
5679 !cl 2001,1,09 the following array were added after common blocks removed
5680 DIMENSION WWW(3), CAPAC(2),SNOWW(2),ROOTD(2), ZDEPTH(3), ROOTP(3)
5681 DIMENSION TEMW(3),TEMWP(3),TEMWPP(3),AAA(2),BBB(2),CCC(2),QQQ(2)
5683 !----------------------------------------------------------------------
5684 ! EVAPORATION LOSSES ARE EXPRESSED IN J M-2 : WHEN DIVIDED BY
5685 ! ( HLAT*1000.) LOSS IS IN M M-2
5686 ! MASS TERMS ARE IN KG M-2 DT-1
5687 !----------------------------------------------------------------------
5689 SNOFAC = HLAT / ( HLAT + SNOMEL /1000. )
5691 IF ( (TC-DTC) .LE. TF ) FACKS = SNOFAC
5692 IF ( (ECT+ECI) .GT. 0.) GO TO 100
5696 100 CAPAC(1)=CAPAC(1) - ECI*FACKS/HLAT/1000.
5698 ECMASS = ( ECT + ECI * FACKS ) / HLAT
5700 !cs Sun add following statement IF (ISNOW.EQ.0) go to 201 on 12/5/98
5701 IF (ISNOW.eq.0) FACKS = SNOFAC
5702 IF (ISNOW.EQ.0) go to 201
5704 IF ( (TGS-DTG) .LE. TF ) FACKS = SNOFAC
5705 IF ( (EGT+EGI) .GT. 0. ) GO TO 200
5709 200 CAPAC(2)=CAPAC(2) - EGI*FACKS/HLAT/1000.
5711 201 EGMASS = ( EGT + EGS + EGI * FACKS ) / HLAT
5713 ETMASS = ECMASS + EGMASS
5715 HFLUX = ( HC + HG ) / DTT
5716 !----------------------------------------------------------------------
5717 ! DUMPING OF SMALL CAPAC VALUES ONTO SOIL SURFACE STORE
5718 !----------------------------------------------------------------------
5721 IF ( CAPAC(IVEG) .GT. 0.000001 ) GO TO 1000
5722 !cl Xue added the following line in August,2000
5723 !cl FILTR = FILTR + CAPAC(IVEG)
5724 WWW(1) = WWW(1) + CAPAC(IVEG) / ( POROS*ZDEPTH(1) )
5727 !----------------------------------------------------------------------
5728 ! SNOWMELT / REFREEZE CALCULATION
5729 !----------------------------------------------------------------------
5730 !CS Sun Change following CALL SNOWM to SNOWM (ISNOW,wfsoil,swe)
5732 !cl CALL SNOWM (MDLSNO,ISNOW,WFSOIL,SWE)
5734 !=======================================================================
5736 ! CALCULATION OF SNOWMELT AND MODIFICATION OF TEMPERATURES
5737 ! N.B. THIS VERSION DEALS WITH REFREEZING OF WATER
5739 !-----------------------------------------------------------------------
5743 !CS Sun Add following part for snow melting and water flux to soil(wfsoil)
5744 !CS is greater zero 10/13/98
5745 IF (ISNOW.EQ.0.and.IVEG.EQ.2) THEN
5747 WWW(1) = WWW(1) + ZMELT / ( POROS * ZDEPTH(1) )
5756 IF ( IVEG .EQ. 1 ) GO TO 110
5760 FLUX = CCT * DTG / DTT
5766 IF ( TTA .LE. TF ) SNOWW(IVEG) = CAPAC(IVEG)
5767 CAPAC(IVEG) = CAPAC(IVEG) - SNOWW(IVEG)
5768 IF ( TTA .GT. TF .AND. TTB .GT. TF ) GO TO 120
5769 IF ( TTA .LE. TF .AND. TTB .LE. TF ) GO TO 120
5772 DTIME1 = CCT * DTF / FLUX
5773 HF = FLUX*(DTT-DTIME1)
5774 FCAP = - CAPAC(IVEG) * SNOMEL
5775 SPWET = AMIN1( 5. , SNOWW(IVEG) )
5776 IF ( DTS .GT. 0. ) FCAP = SPWET * SNOMEL
5777 DTIME2 = FCAP / FLUX
5778 DTF2 = FLUX * (DTT-DTIME1-DTIME2)/CCT
5781 IF (ABS(HF) .GE.ABS(FCAP) ) TS = TN
5783 IF (ABS(CHANGE) .GE.ABS(FCAP) ) CHANGE = FCAP
5785 CHANGE = CHANGE / SNOMEL
5787 IF (CHANGE.GT.0.0) SMELT=CHANGE+SMELT
5789 SNOWW(IVEG) = SNOWW(IVEG) - CHANGE
5790 CAPAC(IVEG) = CAPAC(IVEG) + CHANGE
5792 IF ( IVEG .EQ. 1 ) TC = TS
5793 IF ( IVEG .EQ. 2 ) TGS = TS
5794 IF ( SNOWW(IVEG) .LT. 0.00001 ) GO TO 120
5796 ! modified to force water into soil. Xue Feb. 1994
5798 ! IF ( TD .GT. TF ) ZMELT = CAPAC(IVEG)
5799 !crr FILTR = FILTR+ ZMELT
5800 WWW(1) = WWW(1) + ZMELT / ( POROS * ZDEPTH(1) )
5801 ! IF ( TD .LE. TF ) ROFF = ROFF + CAPAC(IVEG)
5805 CAPAC(IVEG) = CAPAC(IVEG) + SNOWW(IVEG)
5807 ! ------------------------------------------------------------
5808 !CS Sun changes following statatement which is alwayes functioned
5809 !CS in Xue's code 10/13/98
5810 IF (ISNOW.NE.0) THEN
5811 FLUXEF = SHF - CCT*DTG/DTT
5812 TD = TD + FLUXEF / ( CG * 2. * SQRT ( PIE*365. ) ) * DTT
5814 !CS ------------------------------------------------------------
5816 ! --- LOAD PILPS DATA
5818 ! if (change .gt. 0) snm(istat)=snm(istat)+(change*1000.)
5820 !----------------------------------------------------------------------
5821 ! BARE SOIL EVAPORATION LOSS
5822 !----------------------------------------------------------------------
5823 !cl 2001,1,11 added the following line according to Xue, August 2000
5824 !cl FILTR = FILTR - EGS / HLAT / 1000.
5825 WWW(1) = WWW(1) - EGS / HLAT / 1000. / ( POROS * ZDEPTH(1) )
5827 !----------------------------------------------------------------------
5828 ! EXTRACTION OF TRANSPIRATION LOSS FROM ROOT ZONE
5829 !----------------------------------------------------------------------
5833 IF ( IVEG .EQ. 1 ) ABSOIL = ECT / HLAT / 1000.
5834 IF ( IVEG .EQ. 2 ) ABSOIL = EGT / HLAT / 1000.
5835 !cl 2001,1,09 added the following IF according to Xue, Aug 2000
5836 IF (NROOT.EQ.1) THEN
5842 TOTDEP = TOTDEP + ZDEPTH(IL)
5844 ! DIV = AMAX1 ( 1., ( PHSOIL(IL) - PHL(IVEG) ) )
5846 IF ( ROOTD(IVEG) .LT. TOTDEP ) GO TO 400
5848 EF(IL) = ZDEPTH(IL) / ROOTD(IVEG)
5852 EF(IL) = ROOTD(IVEG) - TOTDEP + ZDEPTH(IL)
5853 EF(IL) = EF(IL) / ROOTD(IVEG)
5858 600 EFT = EF(2) + EF(3)
5859 EFT = MAX(EFT,0.1E-5)
5863 WWW(IL) = WWW(IL) - ABSOIL * EF(IL) / ( POROS * ZDEPTH(IL) )
5870 WWW(IL) = WWW(IL) - ABSOIL * EF(IL) / ( POROS * ZDEPTH(IL) )
5875 !----------------------------------------------------------------------
5877 ! CALCULATION OF INTERFLOW, INFILTRATION EXCESS AND LOSS TO
5878 ! GROUNDWATER . ALL LOSSES ARE ASSIGNED TO VARIABLE 'ROFF' .
5880 !----------------------------------------------------------------------
5883 IF ( WWW(IL) .GT. 0. ) GO TO 5000
5884 WWW(IL+1) = WWW(IL+1) + WWW(IL) * ZDEPTH(IL)/ZDEPTH(IL+1)
5887 ! IF ( TD .LT. TF ) GO TO 800
5888 !=======================================================================
5890 !cl 2001,1,09 substitute subroutine RUN2 by its full code
5891 ! calculation of interflow, infiltration excess and loss to
5892 ! groundwater . all losses are assigned to variable 'roff' .
5893 !=======================================================================
5895 TEMW(I) = AMAX1( 0.03, WWW(I) )
5896 TEMWP(I) = TEMW(I) ** ( -BEE )
5897 TEMWPP(I) = AMIN1( 1., TEMW(I)) ** ( 2.*BEE+ 3. )
5899 !-----------------------------------------------------------------------
5901 ! calculation of gravitationally driven drainage from w(3) : taken
5902 ! as an integral of time varying conductivity.addition of liston
5903 ! baseflow term to original q3g to insure flow in
5904 ! dry season. modified liston baseflow constant scaled
5905 ! by available water.
5907 ! q3g (q3) : equation (62) , SE-86
5909 !-----------------------------------------------------------------------
5911 Q3G = TEMW(3)**(-POWS) + SATCO/ZDEPTH(3)/POROS*SLOPE*POWS*DTT
5912 Q3G = Q3G ** ( 1. / POWS )
5913 Q3G = - ( 1. / Q3G - WWW(3) ) * POROS * ZDEPTH(3) / DTT
5914 Q3G = AMAX1( 0., Q3G )
5915 Q3G = AMIN1( Q3G, WWW(3)*POROS*ZDEPTH(3)/DTT )
5917 Q3G = Q3G + 0.002*POROS*ZDEPTH(3)*0.5 / 86400. * WWW(3)
5919 !----------------------------------------------------------------------
5921 ! calculation of inter-layer exchanges of water due to gravitation
5922 ! and hydraulic gradient. the values of w(x) + dw(x) are used to
5923 ! calculate the potential gradients between layers.
5924 ! modified calculation of mean conductivities follows ME-82 ),
5925 ! reduces recharge flux to top layer.
5927 ! dpdw : estimated derivative of soil moisture potential
5928 ! with respect to soil wetness. assumption of
5929 ! gravitational drainage used to estimate likely
5930 ! minimum wetness over the time step.
5932 ! qqq (q ) : equation (61) , SE-86
5935 ! avk (k ) : equation (4.14) , ME-82
5938 !----------------------------------------------------------------------
5940 WMAX = AMAX1( WWW(1), WWW(2), WWW(3), 0.05 )
5941 WMAX = AMIN1( WMAX, 1. )
5943 WMIN = (PMAX-2./( PHSAT*(ZDEPTH(1)+2.*ZDEPTH(2)+ZDEPTH(3)))) &
5945 WMIN = AMIN1( WWW(1), WWW(2), WWW(3), WMIN )
5946 WMIN = AMAX1( WMIN, 0.02 )
5948 DPDW = PHSAT*( PMAX-PMIN )/( WMAX-WMIN )
5953 AVK = TEMWP(I)*TEMWPP(I) - TEMWP(I+1)*TEMWPP(I+1)
5954 DIV = TEMWP(I+1) - TEMWP(I)
5955 IF ( ABS(DIV) .LT. 1.E-6 ) RSAME = 1.
5956 AVK = SATCO*AVK / ( ( 1. + 3./BEE ) * DIV + RSAME )
5957 AVKMIN = SATCO * AMIN1( TEMWPP(I), TEMWPP(I+1) )
5958 AVKMAX = SATCO * AMAX1( TEMWPP(I), TEMWPP(I+1) )*1.01
5959 AVK = AMAX1( AVK, AVKMIN )
5960 AVK = AMIN1( AVK, AVKMAX )
5961 !-----------------------------------------------------------------------
5962 ! conductivities and base flow reduced when temperature drops below
5964 !-----------------------------------------------------------------------
5966 TSNOW = AMIN1 ( TF-0.01, TGS )
5967 AREAS = AMIN1 (0.999,13.2*SNOWW(2))
5968 TGG = TSNOW*AREAS + TGS*(1.-AREAS)
5969 TS = TGG*(2-I) + TD*(I-1)
5970 PROPS = ( TS-(TF-10.) ) / 10.
5971 ! props = 1.+5*(ts-tf)
5972 PROPS = AMAX1( 0.05, AMIN1( 1.0, PROPS ) )
5976 !-----------------------------------------------------------------------
5977 ! backward implicit calculation of flows between soil layers.
5978 !-----------------------------------------------------------------------
5980 DPDWDZ = DPDW * 2./( ZDEPTH(I) + ZDEPTH(I+1) )
5981 AAA(I) = 1. + AVK*DPDWDZ*( 1./ZDEPTH(I)+1./ZDEPTH(I+1) ) &
5983 BBB(I) =-AVK * DPDWDZ * 1./ZDEPTH(2)*DTT/POROS
5984 CCC(I) = AVK * ( DPDWDZ * ( WWW(I)-WWW(I+1) ) + 1. + &
5985 (I-1)*DPDWDZ*Q3G*1./ZDEPTH(3)*DTT/POROS )
5988 DENOM = ( AAA(1)*AAA(2) - BBB(1)*BBB(2) )
5990 IF ( ABS(DENOM) .LT. 1.E-6 ) RDENOM = 1.
5991 RDENOM = ( 1.-RDENOM)/( DENOM + RDENOM )
5992 QQQ(1) = ( AAA(2)*CCC(1) - BBB(1)*CCC(2) ) * RDENOM
5993 QQQ(2) = ( AAA(1)*CCC(2) - BBB(2)*CCC(1) ) * RDENOM
5995 !-----------------------------------------------------------------------
5996 ! update wetness of each soil moisture layer due to layer interflow
5998 !-----------------------------------------------------------------------
6000 WWW(3) = WWW(3) - Q3G*DTT/(POROS*ZDEPTH(3))
6001 ROFF = ROFF + Q3G * DTT
6005 QMAX = WWW(I) * (POROS*ZDEPTH(I) /DTT)
6006 QMIN = -WWW(I+1) * (POROS*ZDEPTH(I+1)/DTT)
6007 QQQ(I) = AMIN1( QQQ(I),QMAX)
6008 QQQ(I) = AMAX1( QQQ(I),QMIN)
6009 WWW(I) = WWW(I) - QQQ(I)/(POROS*ZDEPTH(I) /DTT)
6010 WWW(I+1) = WWW(I+1) + QQQ(I)/(POROS*ZDEPTH(I+1)/DTT)
6013 ! --- LOAD water flow & root-zone drainage PILPS DATA
6014 !crr SOILDIF=SOILDIF+ QQQ(1)* DTT *1000.
6015 !crr SOILDRA=SOILDRA+ Q3G* DTT *1000.
6018 EXCESS = AMAX1(0.,(WWW(I) - 1.))
6019 WWW(I) = WWW(I) - EXCESS
6020 ROFF = ROFF + EXCESS * POROS*ZDEPTH(I)
6022 ! --- LOAD IN as root-drainage for PILPS
6023 !crr IF (I.LT.2) THEN
6024 !crr RNOFFS= RNOFFS+ 1000.*EXCESS*POROS*ZDEPTH(I)
6026 !crr RNOFFB= RNOFFB+ 1000.*EXCESS*POROS*ZDEPTH(I)
6029 !-----------------------------------------------------------------------
6030 ! prevent negative values of www(i)
6031 !-----------------------------------------------------------------------
6034 DEFICIT = AMAX1 (0.,(1.E-12 - WWW(I)))
6035 !crr IF (I.EQ.1) SOILDIF=SOILDIF-DEFICIT * ZDEPTH(1) * POROS
6036 WWW (I) = WWW(I) + DEFICIT
6037 WWW (I+1) = WWW(I+1) - DEFICIT * ZDEPTH(I) / ZDEPTH (I+1)
6039 WWW(3) = AMAX1 (WWW(3),1.E-12)
6040 ! --------------------------------- end of subroutine RUN2 ------
6043 IF (WWW(1) .GT.1.) THEN
6044 WWW(2) = WWW(2) + (WWW(1)-1.) * ZDEPTH(1) / ZDEPTH(2)
6045 !crr SOILDIF=SOILDIF+(WWW(1)-1.)* ZDEPTH(1) * POROS *1000.
6048 If (WWW(2) .GT.1.) THEN
6049 WWW(3) = WWW(3) + (WWW(2)-1.) * ZDEPTH(2) / ZDEPTH(3)
6051 ! --- LOAD IN AS PILP ROOT DRAINAGE
6054 IF (WWW(3) .GT.1.) THEN
6055 ROFF = ROFF + (WWW(3)-1.)* ZDEPTH(3) * POROS
6056 !crr RNOFFB=RNOFFB + (WWW(3)-1.)* ZDEPTH(3) * POROS *1000.
6060 !------------------------------------------------------
6061 END SUBROUTINE UPDAT1
6062 !------------------------------------------------------
6064 !=======================================================================
6066 SUBROUTINE UPDAT1_ICE(DTT,TC,TGS,TD,CAPAC,DTC,DTG,ECT,ECI,EGT,EGI, &
6067 EGS,EG,HC,HG,HFLUX,ETMASS,FILTR,SOILDIF,SOILDRA,ROFF, &
6068 RNOFFB,RNOFFS,NROOT,ROOTD,ROOTP,POROS,BEE,SATCO,SLOPE, &
6069 PHSAT,ZDEPTH,WWW,CCX,CG,CHF,SHF,SMELT)
6071 !=======================================================================
6073 ! UPDATING OF SOIL MOISTURE STORES AND INTERCEPTION CAPACITY
6075 !-----------------------------------------------------------------------
6076 !----------------------------------------------------------------------
6078 REAL, DIMENSION (2) :: CAPAC, SNOWW, ROOTD, aaa, bbb, ccc, qqq
6079 REAL, DIMENSION (3) :: WWW, EF, ZDEPTH, ROOTP, temw, temwp, temwpp
6082 !----------------------------------------------------------------------
6083 ! EVAPORATION LOSSES ARE EXPRESSED IN J M-2 : WHEN DIVIDED BY
6084 ! ( HLAT*1000.) LOSS IS IN M M-2
6085 ! MASS TERMS ARE IN KG M-2 DT-1
6086 !----------------------------------------------------------------------
6088 SNOFAC = HLAT / ( HLAT + SNOMEL /1000. )
6090 IF ( (TC-DTC) .LE. TF ) FACKS = SNOFAC
6091 IF ( (ECT+ECI) .GT. 0.) GO TO 100
6095 100 CAPAC(1)=CAPAC(1) - ECI*FACKS/HLAT/1000.
6097 ECMASS = ( ECT + ECI * FACKS ) / HLAT
6100 IF ( (TGS-DTG) .LE. TF ) FACKS = SNOFAC
6101 IF ( (EGT+EGI) .GT. 0. ) GO TO 200
6105 200 CAPAC(2)=CAPAC(2) - EGI*FACKS/HLAT/1000.
6107 EGMASS = ( EGT + EGS + EGI * FACKS ) / HLAT
6109 ETMASS = ECMASS + EGMASS
6113 !----------------------------------------------------------------------
6114 ! DUMPING OF SMALL CAPAC VALUES ONTO SOIL SURFACE STORE
6115 !----------------------------------------------------------------------
6118 IF ( CAPAC(IVEG) .GT. 0.000001 ) GO TO 300
6119 FILTR = FILTR + CAPAC(IVEG)
6120 WWW(1) = WWW(1) + CAPAC(IVEG) / ( POROS*ZDEPTH(1) )
6124 !----------------------------------------------------------------------
6125 ! SNOWMELT / REFREEZE CALCULATION
6126 !----------------------------------------------------------------------
6128 ! CALCULATION OF SNOWMELT AND MODIFICATION OF TEMPERATURES
6129 ! N.B. THIS VERSION DEALS WITH REFREEZING OF WATER
6131 !-----------------------------------------------------------------------
6139 IF ( IVEG .EQ. 1 ) GO TO 7100
6143 FLUX = CCT * DTG / DTT
6150 IF ( TTA .LE. TF ) SNOWW(IVEG) = CAPAC(IVEG)
6151 CAPAC(IVEG) = CAPAC(IVEG) - SNOWW(IVEG)
6152 IF ( TTA .GT. TF .AND. TTB .GT. TF ) GO TO 7200
6153 IF ( TTA .LE. TF .AND. TTB .LE. TF ) GO TO 7200
6156 DTIME1 = CCT * DTF / FLUX
6157 HF = FLUX*(DTT-DTIME1)
6158 FCAP = - CAPAC(IVEG) * SNOMEL
6159 SPWET = AMIN1( 5. , SNOWW(IVEG) )
6160 IF ( DTS .GT. 0. ) FCAP = SPWET * SNOMEL
6161 DTIME2 = FCAP / FLUX
6162 DTF2 = FLUX * (DTT-DTIME1-DTIME2)/CCT
6165 IF (ABS(HF) .GE.ABS(FCAP) ) TS = TN
6167 IF (ABS(CHANGE) .GE.ABS(FCAP) ) CHANGE = FCAP
6169 CHANGE = CHANGE / SNOMEL
6171 IF (CHANGE.GT.0.0) SMELT=CHANGE+SMELT
6173 SNOWW(IVEG) = SNOWW(IVEG) - CHANGE
6174 CAPAC(IVEG) = CAPAC(IVEG) + CHANGE
6176 IF ( IVEG .EQ. 1 ) TC = TS
6177 IF ( IVEG .EQ. 2 ) TGS = TS
6178 IF ( SNOWW(IVEG) .LT. 0.00001 ) GO TO 7200
6180 ! modified to force water into soil. Xue Feb. 1994
6182 FILTR = FILTR+ ZMELT
6183 WWW(1) = WWW(1) + ZMELT / ( POROS * ZDEPTH(1) )
6187 CAPAC(IVEG) = CAPAC(IVEG) + SNOWW(IVEG)
6191 FLUXEF = SHF - CCT*DTG/DTT
6192 TD = TD + FLUXEF / ( CG * 2. * SQRT ( PIE*365. ) ) * DTT
6196 !----------------------------------------------------------------------
6197 ! BARE SOIL EVAPORATION LOSS
6198 !----------------------------------------------------------------------
6200 FILTR = FILTR - EGS / HLAT / 1000.
6201 WWW(1) = WWW(1) - EGS / HLAT / 1000. / ( POROS * ZDEPTH(1) )
6203 !----------------------------------------------------------------------
6204 ! EXTRACTION OF TRANSPIRATION LOSS FROM ROOT ZONE
6205 !----------------------------------------------------------------------
6209 IF ( IVEG .EQ. 1 ) ABSOIL = ECT / HLAT / 1000.
6210 IF ( IVEG .EQ. 2 ) ABSOIL = EGT / HLAT / 1000.
6212 IF (NROOT.EQ.1) THEN
6218 TOTDEP = TOTDEP + ZDEPTH(IL)
6220 IF ( ROOTD(IVEG) .LT. TOTDEP ) GO TO 400
6222 EF(IL) = ZDEPTH(IL) / ROOTD(IVEG)
6226 EF(IL) = ROOTD(IVEG) - TOTDEP + ZDEPTH(IL)
6227 EF(IL) = EF(IL) / ROOTD(IVEG)
6233 600 EFT = EF(2) + EF(3)
6235 EFT = MAX(EFT,0.1E-5)
6241 WWW(IL) = WWW(IL) - ABSOIL * EF(IL) / ( POROS * ZDEPTH(IL) )
6248 WWW(IL) = WWW(IL) - ABSOIL * EF(IL) / ( POROS * ZDEPTH(IL) )
6254 !----------------------------------------------------------------------
6256 ! CALCULATION OF INTERFLOW, INFILTRATION EXCESS AND LOSS TO
6257 ! GROUNDWATER . ALL LOSSES ARE ASSIGNED TO VARIABLE 'ROFF' .
6259 !----------------------------------------------------------------------
6262 IF ( WWW(IL) .GT. 0. ) GO TO 700
6263 WWW(IL+1) = WWW(IL+1) + WWW(IL) * ZDEPTH(IL)/ZDEPTH(IL+1)
6268 !=======================================================================
6269 ! calculation of interflow, infiltration excess and loss to
6270 ! groundwater . all losses are assigned to variable 'roff' .
6271 !----------------------------------------------------------------------
6275 TEMW(I) = AMAX1( 0.03, WWW(I) )
6276 TEMWP(I) = TEMW(I) ** ( -BEE )
6277 TEMWPP(I) = AMIN1( 1., TEMW(I)) ** ( 2.*BEE+ 3. )
6280 !-----------------------------------------------------------------------
6282 ! calculation of gravitationally driven drainage from w(3) : taken
6283 ! as an integral of time varying conductivity.addition of liston
6284 ! baseflow term to original q3g to insure flow in
6285 ! dry season. modified liston baseflow constant scaled
6286 ! by available water.
6288 ! q3g (q3) : equation (62) , SE-86
6290 !-----------------------------------------------------------------------
6293 Q3G = TEMW(3)**(-POWS) + SATCO/ZDEPTH(3)/POROS*SLOPE*POWS*DTT
6294 Q3G = Q3G ** ( 1. / POWS )
6295 Q3G = - ( 1. / Q3G - WWW(3) ) * POROS * ZDEPTH(3) / DTT
6296 Q3G = AMAX1( 0., Q3G )
6297 Q3G = AMIN1( Q3G, WWW(3)*POROS*ZDEPTH(3)/DTT )
6299 Q3G = Q3G + 0.002*POROS*ZDEPTH(3)*0.5 / 86400. * WWW(3)
6301 !----------------------------------------------------------------------
6303 ! calculation of inter-layer exchanges of water due to gravitation
6304 ! and hydraulic gradient. the values of w(x) + dw(x) are used to
6305 ! calculate the potential gradients between layers.
6306 ! modified calculation of mean conductivities follows ME-82 ),
6307 ! reduces recharge flux to top layer.
6309 ! dpdw : estimated derivative of soil moisture potential
6310 ! with respect to soil wetness. assumption of
6311 ! gravitational drainage used to estimate likely
6312 ! minimum wetness over the time step.
6314 ! qqq (q ) : equation (61) , SE-86
6317 ! avk (k ) : equation (4.14) , ME-82
6320 !----------------------------------------------------------------------
6322 WMAX = AMAX1( WWW(1), WWW(2), WWW(3), 0.05 )
6323 WMAX = AMIN1( WMAX, 1. )
6325 WMIN = (PMAX-2./( PHSAT*(ZDEPTH(1)+2.*ZDEPTH(2)+ZDEPTH(3)))) &
6327 WMIN = AMIN1( WWW(1), WWW(2), WWW(3), WMIN )
6328 WMIN = AMAX1( WMIN, 0.02 )
6330 DPDW = PHSAT*( PMAX-PMIN )/( WMAX-WMIN )
6335 AVK = TEMWP(I)*TEMWPP(I) - TEMWP(I+1)*TEMWPP(I+1)
6336 DIV = TEMWP(I+1) - TEMWP(I)
6337 IF ( ABS(DIV) .LT. 1.E-6 ) RSAME = 1.
6338 AVK = SATCO*AVK / ( ( 1. + 3./BEE ) * DIV + RSAME )
6339 AVKMIN = SATCO * AMIN1( TEMWPP(I), TEMWPP(I+1) )
6340 AVKMAX = SATCO * AMAX1( TEMWPP(I), TEMWPP(I+1) )*1.01
6341 AVK = AMAX1( AVK, AVKMIN )
6342 AVK = AMIN1( AVK, AVKMAX )
6344 !-----------------------------------------------------------------------
6345 ! conductivities and base flow reduced when temperature drops below
6347 !-----------------------------------------------------------------------
6349 TSNOW = AMIN1 ( TF-0.01, TGS )
6350 AREAS = AMIN1 (0.999,13.2*SNOWW(2))
6351 TGG = TSNOW*AREAS + TGS*(1.-AREAS)
6352 TS = TGG*(2-I) + TD*(I-1)
6353 PROPS = ( TS-(TF-10.) ) / 10.
6354 PROPS = AMAX1( 0.05, AMIN1( 1.0, PROPS ) )
6358 !-----------------------------------------------------------------------
6359 ! backward implicit calculation of flows between soil layers.
6360 !-----------------------------------------------------------------------
6362 DPDWDZ = DPDW * 2./( ZDEPTH(I) + ZDEPTH(I+1) )
6363 AAA(I) = 1. + AVK*DPDWDZ*( 1./ZDEPTH(I)+1./ZDEPTH(I+1) ) &
6365 BBB(I) =-AVK * DPDWDZ * 1./ZDEPTH(2)*DTT/POROS
6366 CCC(I) = AVK * ( DPDWDZ * ( WWW(I)-WWW(I+1) ) + 1. + &
6367 (I-1)*DPDWDZ*Q3G*1./ZDEPTH(3)*DTT/POROS )
6370 DENOM = ( AAA(1)*AAA(2) - BBB(1)*BBB(2) )
6372 IF ( ABS(DENOM) .LT. 1.E-6 ) RDENOM = 1.
6373 RDENOM = ( 1.-RDENOM)/( DENOM + RDENOM )
6374 QQQ(1) = ( AAA(2)*CCC(1) - BBB(1)*CCC(2) ) * RDENOM
6375 QQQ(2) = ( AAA(1)*CCC(2) - BBB(2)*CCC(1) ) * RDENOM
6377 !-----------------------------------------------------------------------
6378 ! update wetness of each soil moisture layer due to layer interflow
6380 !-----------------------------------------------------------------------
6382 WWW(3) = WWW(3) - Q3G*DTT/(POROS*ZDEPTH(3))
6383 ROFF = ROFF + Q3G * DTT
6387 QMAX = WWW(I) * (POROS*ZDEPTH(I) /DTT)
6388 QMIN = -WWW(I+1) * (POROS*ZDEPTH(I+1)/DTT)
6389 QQQ(I) = AMIN1( QQQ(I),QMAX)
6390 QQQ(I) = AMAX1( QQQ(I),QMIN)
6391 WWW(I) = WWW(I) - QQQ(I)/(POROS*ZDEPTH(I) /DTT)
6392 WWW(I+1) = WWW(I+1) + QQQ(I)/(POROS*ZDEPTH(I+1)/DTT)
6395 ! *** LOAD water flow & root-zone drainage PILPS DATA
6396 SOILDIF=SOILDIF+QQQ(1)*DTT*1000.
6397 SOILDRA=SOILDRA+Q3G*DTT*1000.
6400 EXCESS = AMAX1(0.,(WWW(I) - 1.))
6401 WWW(I) = WWW(I) - EXCESS
6402 ROFF = ROFF + EXCESS * POROS*ZDEPTH(I)
6404 ! *** LOAD IN as root-drainage for PILPS
6406 RNOFFS= RNOFFS+ 1000.*EXCESS*POROS*ZDEPTH(I)
6408 RNOFFB= RNOFFB+ 1000.*EXCESS*POROS*ZDEPTH(I)
6412 !-----------------------------------------------------------------------
6413 ! prevent negative values of www(i)
6414 !-----------------------------------------------------------------------
6417 DEFICIT = AMAX1 (0.,(1.E-12 - WWW(I)))
6418 IF (I.EQ.1) SOILDIF=SOILDIF-DEFICIT* &
6420 WWW (I) = WWW(I) + DEFICIT
6421 WWW (I+1) = WWW(I+1) - DEFICIT * ZDEPTH(I) / ZDEPTH (I+1)
6423 WWW(3) = AMAX1 (WWW(3),1.E-12)
6427 IF (WWW(1) .GT.1.) THEN
6428 WWW(2) = WWW(2) + (WWW(1)-1.) * ZDEPTH(1)/ &
6430 SOILDIF=SOILDIF+(WWW(1)-1.)*ZDEPTH(1) &
6434 If (WWW(2) .GT.1.) WWW(3) = WWW(3) + (WWW(2)-1.) * &
6435 ZDEPTH(2) / ZDEPTH(3)
6437 ! *** LOAD IN AS PILP ROOT DRAINAGE
6438 IF (WWW(2) .GT.1.) WWW(2) = 1.
6439 IF (WWW(3) .GT.1.) THEN
6440 ROFF = ROFF + (WWW(3)-1.)*POROS*ZDEPTH(3)
6441 RNOFFB=RNOFFB+((WWW(3)-1.)*ZDEPTH(3)* &
6446 !------------------------------------------------------
6447 END SUBROUTINE UPDAT1_ICE
6448 !------------------------------------------------------
6450 !=======================================================================
6452 SUBROUTINE CONVDIM(IOFLAG, &
6453 DZO1,WO1,TSSN1,TSSNO1,BWO1,BTO1,CTO1,FIO1,FLO1,BIO1,BLO1,HO1, &
6454 DZO2,WO2,TSSN2,TSSNO2,BWO2,BTO2,CTO2,FIO2,FLO2,BIO2,BLO2,HO2, &
6455 DZO3,WO3,TSSN3,TSSNO3,BWO3,BTO3,CTO3,FIO3,FLO3,BIO3,BLO3,HO3, &
6456 DZO4,WO4,TSSN4,TSSNO4,BWO4,BTO4,CTO4,FIO4,FLO4,BIO4,BLO4,HO4, &
6457 DZO, WO, TSSN, TSSNO, BWO, BTO, CTO, FIO, FLO, BIO, BLO, HO )
6459 !=======================================================================
6461 !----------------------------------------------------------------------
6463 REAL, DIMENSION (4) :: DZO,WO,TSSN,TSSNO,BWO,BTO,CTO,FIO,FLO,BIO,BLO,HO
6465 IF (IOFLAG.EQ.0) THEN ! variable to array
6519 ELSEIF (IOFLAG.EQ.1) THEN ! array to variable
6574 print*,'something wrong in CONVDIM',IOFLAG
6577 !------------------------------------------------------
6578 END SUBROUTINE CONVDIM
6579 !------------------------------------------------------
6581 END MODULE module_sf_ssib