UPP (develop)
Loading...
Searching...
No Matches
CANRES.f
1 SUBROUTINE canres(SOLAR,SFCTMP,Q2,SFCPRS,SMC, &
2 & GC,RC,IVEG,ISOIL, &
3 & RSMIN,NROOTS,SMCWLT,SMCREF, &
4 & RCS,RCQ,RCT,RCSOIL,SLDPTH)
5!
6! ######################################################################
7! SUBROUTINE CANRES
8! -----------------
9! THIS ROUTINE CALCULATES THE CANOPY RESISTANCE WHICH DEPENDS ON
10! INCOMING SOLAR RADIATION, AIR TEMPERATURE, ATMOSPHERIC WATER
11! VAPOR PRESSURE DEFICIT AT THE LOWEST MODEL LEVEL, AND SOIL
12! MOISTURE (PREFERABLY UNFROZEN SOIL MOISTURE RATHER THAN TOTAL)
13! ----------------------------------------------------------------------
14! SOURCE: JARVIS (1976), JACQUEMIN AND NOILHAN (1990 BLM)
15! ----------------------------------------------------------------------
16! PROGRAM HISTORY LOG:
17! 03-01-17 M EK AND H CHUANG - LIFTED IT FROM MODEL FOR POST
18! 03-11-21 Bo Cui - improve local arrays memory
19! ----------------------------------------------------------------------
20! INPUT: SOLAR: INCOMING SOLAR RADIATION
21! CH: SURFACE EXCHANGE COEFFICIENT FOR HEAT AND MOISTURE
22! SFCTMP: AIR TEMPERATURE AT 1ST LEVEL ABOVE GROUND
23! Q2: AIR HUMIDITY AT 1ST LEVEL ABOVE GROUND
24! Q2SAT: SATURATION AIR HUMIDITY AT 1ST LEVEL ABOVE GROUND
25! SFCPRS: SURFACE PRESSURE
26! SMC: VOLUMETRIC SOIL MOISTURE
27! ZSOIL: SOIL DEPTH (NEGATIVE SIGN, AS IT IS BELOW GROUND)
28! NSOIL: NO. OF SOIL LAYERS
29! IROOT: NO. OF SOIL LAYERS IN ROOT ZONE (1<=NROOT<=NSOIL)
30! XLAI: LEAF AREA INDEX
31! SMCWLT: WILTING POINT
32! SMCREF: REFERENCE SOIL MOISTURE
33! (WHERE SOIL WATER DEFICIT STRESS SETS IN)
34!
35! RSMIN, RSMAX, TOPT, RGL, HS: CANOPY STRESS PARAMETERS SET IN
36! SUBROUTINE REDPRM
37!
38! (SEE EQNS 12-14 AND TABLE 2 OF SEC. 3.1.2 OF
39! CHEN ET AL., 1996, JGR, VOL 101(D3), 7251-7268)
40!
41! OUTPUT: PC: PLANT COEFFICIENT
42! RC: CANOPY RESISTANCE
43! GC: CANOPY CONDUCTANCE
44! ----------------------------------------------------------------------
45! ######################################################################
46
47 use params_mod, only: xlai, pq0, a2, a3, a4
48 use ctlblk_mod, only: novegtype, nsoil, ivegsrc
49!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
50 implicit none
51!
52! integer,parameter :: nosoiltype=19,novegtype=27
53 integer,parameter :: nosoiltype=19
54 integer n,k
55 INTEGER, allocatable:: IROOT(:)
56 INTEGER,intent(in) :: IVEG,ISOIL
57 INTEGER,intent(out) :: NROOTS
58
59 real,intent(in) :: SOLAR,SFCTMP,Q2,SFCPRS
60 real,dimension(NSOIL),intent(in) :: SMC,SLDPTH
61 real,intent(out) :: RCT,RCS,RCQ,RCSOIL,GC,RC,SMCWLT,SMCREF, &
62 rsmin
63
64 REAL CH
65 REAL ZSOIL(NSOIL), PART(NSOIL)
66 REAL, allocatable :: RSMN(:),RGL(:),HS(:)
67 REAL SMWLT(nosoiltype),SMREF(nosoiltype) &
68 & ,q2sat
69 REAL TOPT,RSMAX,FF
70 REAL P,QS,GX,TAIR4,ST1,SLVCP,RR,DELTA,TBLO, &
71 RCMIN,RCMAX
72
73 DATA rsmax /5000./
74 DATA topt /298.0/
75
76! DATA IROOT /1,3,3,3,3,3,3,3,3,3,4,4,4,4,4,0,2,2,1,3, &
77! & 3,3,2,1,1,1,1/
78
79! SSIB VEGETATION TYPES (DORMAN AND SELLERS, 1989; JAM)
80!
81! 1 Urban and Built-Up Land
82! 2 Dryland Cropland and Pasture
83! 3 Irrigated Cropland and Pasture
84! 4 Mixed Dryland/Irrigated Cropland and Pasture
85! 5 Cropland/Grassland Mosaic
86! 6 Cropland/Woodland Mosaic
87! 7 Grassland
88! 8 Shrubland
89! 9 Mixed Shrubland/Grassland
90! 10 Savanna
91! 11 Deciduous Broadleaf Forest
92! 12 Deciduous Needleleaf Forest
93! 13 Evergreen Broadleaf Forest
94! 14 Evergreen Needleleaf Forest
95! 15 Mixed Forest
96! 16 Water Bodies
97! 17 Herbaceous Wetland
98! 18 Wooded Wetland
99! 19 Barren or Sparsely Vegetated
100! 20 Herbaceous Tundra
101! 21 Wooded Tundra
102! 22 Mixed Tundra
103! 23 Bare Ground Tundra
104! 24 Snow or Ice
105! 25 Playa
106! 26 Lava
107! 27 White Sand
108!
109! DATA RSMN /200.0, 70.0, 70.0, 70.0, 70.0, 70.0, &
110! & 70.0, 300.0, 170.0, 70.0, 100.0, 150.0, &
111! MEK MAY 2007
112! increase evergreen forest and mixed forest
113! & 150.0, 125.0, 125.0, 100.0, 40.0, 100.0,
114! & 150.0, 250.0, 150.0, 100.0, 40.0, 100.0, &
115! & 300.0, 150.0, 150.0, 150.0, 200.0, 200.0, &
116! & 40.0, 100.0, 300.0/
117!
118! DATA RGL /100.0, 100.0, 100.0, 100.0, 100.0, 65.0, &
119! & 100.0, 100.0, 100.0, 65.0, 30.0, 30.0, &
120! & 30.0, 30.0, 30.0, 30.0, 100.0, 30.0, &
121! & 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, &
122! & 100.0, 100.0, 100.0/
123!
124! DATA HS /42.00, 36.25, 36.25, 36.25, 36.25, 44.14, &
125! & 36.35, 42.00, 39.18, 54.53, 54.53, 47.35, &
126! & 41.69, 47.35, 51.93, 51.75, 60.00, 51.93, &
127! & 42.00, 42.00, 42.00, 42.00, 42.00, 42.00, &
128! & 36.25, 42.00, 42.00/
129!
130! SOIL TYPES ZOBLER (1986) COSBY ET AL (1984) (quartz cont.(1))
131! ---- -------
132! 1 SAND
133! 2 LOAMY SAND
134! 3 SANDY LOAM
135! 4 SILT LOAM
136! 5 SILT
137! 6 LOAM
138! 7 SANDY CLAY LOAM
139! 8 SILTY CLAY LOAM
140! 9 CLAY LOAM
141! 10 SANDY CLAY
142! 11 SILTY CLAY
143! 12 CLAY
144! 13 ORGANIC MATERIAL
145! 14 WATER
146! 15 BEDROCK
147! 16 OTHER(land-ice)
148! 17 PLAYA
149! 18 LAVA
150! 19 WHITE SAND
151
152! DATA SMREF /0.196, 0.248, 0.282, 0.332, 0.332, 0.301,
153! & 0.293, 0.368, 0.361, 0.320, 0.388, 0.389,
154! & 0.319, 0.000, 0.116, 0.248, 0.389, 0.116,
155! & 0.196/
156! MEK MAY 2007
157 DATA smref /0.236, 0.283, 0.312, 0.360, 0.360, 0.329, &
158 & 0.315, 0.387, 0.382, 0.338, 0.404, 0.403, &
159 & 0.348, 0.000, 0.133, 0.283, 0.403, 0.133, &
160 & 0.236/
161!
162 DATA smwlt /0.023, 0.028, 0.047, 0.084, 0.084, 0.066, &
163 & 0.069, 0.120, 0.103, 0.100, 0.126, 0.135, &
164 & 0.069, 0.000, 0.012, 0.028, 0.135, 0.012, &
165 & 0.023/
166
167
168
169! ----------------------------------------------------------------------
170! INITIALIZE CANOPY CONDUCTANCE TERMS
171! ----------------------------------------------------------------------
172! allocate data for IROOT RSMN RGL HS
173 allocate(iroot(novegtype))
174 allocate(rsmn(novegtype))
175 allocate(rgl(novegtype))
176 allocate(hs(novegtype))
177 if(ivegsrc==1)then !IGBP veg type
178 iroot=(/4,4,4,4,4,3,3,3,3,3,3,3,1,3,2,3,0,3,3,2/)
179 rsmn=(/300.0, 300.0, 300.0, 175.0, 175.0, 225.0, &
180 225.0, 70.0, 70.0, 70.0, 40.0, 70.0, &
181 400.0, 70.0, 200.0, 400.0, 100.0, 225.0, &
182 150.0, 200.0/)
183 rgl=(/30.0, 30.0, 30.0, 30.0, 30.0, 100.0, &
184 & 100.0, 65.0, 65.0, 100.0, 100.0, 100.0, &
185 & 100.0, 100.0, 100.0, 100.0, 30.0, 100.0, &
186 & 100.0, 100.0/)
187 hs=(/47.35, 41.69, 47.35, 54.53, 51.93, 42.00, &
188 & 42.00, 42.00, 42.00, 36.35, 60.00, 36.25, &
189 & 42.00, 36.25, 42.00, 42.00, 51.75, 42.00, &
190 & 42.00, 42.00/)
191 else ! asuume the other type is USGS veg type
192 iroot=(/1,3,3,3,3,3,3,3,3,3,4,4,4,4,4,0,2,2,1,3, &
193 3,3,2,1/)
194 rsmn=(/200.0, 70.0, 70.0, 70.0, 70.0, 70.0, &
195 & 70.0, 300.0, 170.0, 70.0, 100.0, 150.0, &
196! MEK MAY 2007
197! increase evergreen forest and mixed forest
198! & 150.0, 125.0, 125.0, 100.0, 40.0, 100.0,
199 & 150.0, 250.0, 150.0, 100.0, 40.0, 100.0, &
200 & 300.0, 150.0, 150.0, 150.0, 200.0, 200.0/)
201 rgl=(/100.0, 100.0, 100.0, 100.0, 100.0, 65.0, &
202 & 100.0, 100.0, 100.0, 65.0, 30.0, 30.0, &
203 & 30.0, 30.0, 30.0, 30.0, 100.0, 30.0, &
204 & 100.0, 100.0, 100.0, 100.0, 100.0, 100.0/)
205 hs=(/42.00, 36.25, 36.25, 36.25, 36.25, 44.14, &
206 & 36.35, 42.00, 39.18, 54.53, 54.53, 47.35, &
207 & 41.69, 47.35, 51.93, 51.75, 60.00, 51.93, &
208 & 42.00, 42.00, 42.00, 42.00, 42.00, 42.00/)
209 end if
210
211 rcs = 0.0
212 rct = 0.0
213 rcq = 0.0
214 rcsoil = 0.0
215 rc = 0.0
216
217! ZSOIL(1)=-0.1
218! ZSOIL(2)=-0.4
219! ZSOIL(3)=-1.0
220! ZSOIL(4)=-2.0
221
222 DO n=1,nsoil
223 IF(n==1)THEN
224 zsoil(n)=-1.0*sldpth(n)
225 ELSE
226 zsoil(n)=zsoil(n-1)-sldpth(n)
227 END IF
228 END DO
229! ----------------------------------------------------------------------
230! SET SMCWLT, SMCREF, RSMIN, NROOTS VALUES
231! ----------------------------------------------------------------------
232 smcwlt = smwlt(isoil)
233 smcref = smref(isoil)
234 rsmin = rsmn(iveg)
235 nroots = iroot(iveg)
236
237! ----------------------------------------------------------------------
238! CONTRIBUTION DUE TO INCOMING SOLAR RADIATION
239! ----------------------------------------------------------------------
240
241 ff = 0.55*2.0*solar/(rgl(iveg)*xlai)
242 rcs = (ff + rsmin/rsmax) / (1.0 + ff)
243
244 rcs = max(rcs,0.0001)
245 rcs = min(rcs,1.0)
246
247! ----------------------------------------------------------------------
248! CONTRIBUTION DUE TO AIR TEMPERATURE AT FIRST MODEL LEVEL ABOVE GROUND
249! ----------------------------------------------------------------------
250
251 rct = 1.0 - 0.0016*((topt-sfctmp)**2.0)
252
253 rct = max(rct,0.0001)
254 rct = min(rct,1.0)
255
256! ----------------------------------------------------------------------
257! CONTRIBUTION DUE TO VAPOR PRESSURE DEFICIT AT FIRST MODEL LEVEL.
258! ----------------------------------------------------------------------
259
260! P = SFCPRS
261! Insert QSAT computation used in ETA2P
262 tblo=sfctmp
263 q2sat=pq0/sfcprs*exp(a2*(tblo-a3)/(tblo-a4))
264 qs = q2sat
265! RCQ EXPRESSION FROM SSIB
266 rcq = 1.0/(1.0+hs(iveg)*(qs-q2))
267
268! RCQ = MAX(RCQ,0.01)
269 rcq = max(rcq,0.0001)
270 rcq = min(rcq,1.0)
271
272! ----------------------------------------------------------------------
273! CONTRIBUTION DUE TO SOIL MOISTURE AVAILABILITY.
274! DETERMINE CONTRIBUTION FROM EACH SOIL LAYER, THEN ADD THEM UP.
275! ----------------------------------------------------------------------
276
277 gx = (smc(1)-smcwlt)/(smcref-smcwlt)
278 IF (gx > 1.) gx = 1.
279 IF (gx < 0.) gx = 0.
280
281!#### USING SOIL DEPTH AS WEIGHTING FACTOR
282 part(1) = (zsoil(1)/zsoil(nroots)) * gx
283
284!#### USING ROOT DISTRIBUTION AS WEIGHTING FACTOR
285!C PART(1) = RTDIS(1) * GX
286
287 IF (nroots > 1) THEN
288 DO k = 2, nroots
289 gx = (smc(k)-smcwlt)/(smcref-smcwlt)
290 IF (gx > 1.) gx = 1.
291 IF (gx < 0.) gx = 0.
292!#### USING SOIL DEPTH AS WEIGHTING FACTOR
293 part(k) = ((zsoil(k)-zsoil(k-1))/zsoil(nroots)) * gx
294
295!#### USING ROOT DISTRIBUTION AS WEIGHTING FACTOR
296!C PART(K) = RTDIS(K) * GX
297
298 END DO
299 ENDIF
300 DO k = 1, nroots
301 rcsoil = rcsoil+part(k)
302 END DO
303
304 rcsoil = max(rcsoil,0.0001)
305 rcsoil = min(rcsoil,1.0)
306
307! ----------------------------------------------------------------------
308! DETERMINE CANOPY RESISTANCE DUE TO ALL FACTORS.
309! CONVERT CANOPY RESISTANCE (RC) TO PLANT COEFFICIENT (PC).
310! ----------------------------------------------------------------------
311
312!C/98/01/05/........RC = RCMIN/(RCS*RCT*RCQ*RCSOIL)
313! RC = RCMIN(IVEG)/(XLAI*RCS*RCT*RCQ*RCSOIL)
314
315 rcmin = rsmin/xlai
316 rcmax = rsmax/xlai
317 rc = rcmin/(rcs*rct*rcq*rcsoil)
318
319 rc = max(rcmin,min(rc,rcmax))
320
321 gc = 1./rc
322
323 deallocate(iroot,rsmn,rgl,hs)
324 RETURN
325 END