/[MITgcm]/MITgcm/pkg/fizhi/update_earth_exports.F
ViewVC logotype

Contents of /MITgcm/pkg/fizhi/update_earth_exports.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.31 - (show annotations) (download)
Wed Mar 21 21:08:12 2012 UTC (12 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.30: +3 -2 lines
fix 2 calls to S/R GRD2MSC (wrong argument igrd if multi-tile per proc)

1 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/update_earth_exports.F,v 1.29 2010/03/16 00:19:33 jmc Exp $
2 C $Name: $
3 #include "FIZHI_OPTIONS.h"
4
5 C-- File update_earth_exports.F:
6 C-- Contents
7 C-- o UPDATE_EARTH_EXPORTS
8 C-- o SIBALB
9 C-- o GETLGR
10 C-- o GETALB
11 C-- o GETEMISS
12 C-- o EMISSIVITY
13 C-- o GET_LANDFRAC
14
15 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
16
17 SUBROUTINE UPDATE_EARTH_EXPORTS (myTime, myIter, myThid)
18 C----------------------------------------------------------------------
19 C Subroutine update_earth_exports - 'Wrapper' routine to update
20 C the fields related to the earth surface that are needed
21 C by fizhi.
22 C
23 C Call: getlgr (Set the leaf area index and surface greenness,
24 C based on veg type and month)
25 C getalb (Set the 4 albedos based on veg type, snow and time)
26 C getemiss (Set the surface emissivity based on the veg type
27 C and the snow depth)
28 C-----------------------------------------------------------------------
29 IMPLICIT NONE
30 #include "SIZE.h"
31 #include "GRID.h"
32 #include "fizhi_land_SIZE.h"
33 #include "fizhi_SIZE.h"
34 #include "fizhi_coms.h"
35 #include "chronos.h"
36 #include "gridalt_mapping.h"
37 #include "fizhi_land_coms.h"
38 #include "fizhi_earth_coms.h"
39 #include "fizhi_ocean_coms.h"
40 #include "EEPARAMS.h"
41
42 INTEGER myIter, myThid
43 _RL myTime
44
45 LOGICAL alarm
46 EXTERNAL alarm
47 _RL lats(sNx,sNy), lons(sNx,sNy), cosz(sNx,sNy)
48 _RL fraci(sNx,sNy), fracl(sNx,sNy)
49 _RL ficetile(nchp)
50 _RL radius
51 _RL tmpij(sNx,sNy)
52 _RL tmpchp(nchp)
53 INTEGER i, j, n, bi, bj
54 INTEGER im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2
55 INTEGER sec, day, month
56 INTEGER nmonf,ndayf,nsecf
57 nsecf(n) = n/10000*3600 + mod(n,10000)/100* 60 + mod(n,100)
58 nmonf(n) = mod(n,10000)/100
59 ndayf(n) = mod(n,100)
60
61 idim1 = 1-OLx
62 idim2 = sNx+OLx
63 jdim1 = 1-OLy
64 jdim2 = sNy+OLy
65 im1 = 1
66 im2 = sNx
67 jm1 = 1
68 jm2 = sNy
69 month = nmonf(nymd)
70 day = ndayf(nymd)
71 sec = nsecf(nhms)
72
73 do bj = myByLo(myThid), myByHi(myThid)
74 do bi = myBxLo(myThid), myBxHi(myThid)
75 do j = jm1,jm2
76 do i = im1,im2
77 lons(i,j) = xC(i,j,bi,bj)
78 lats(i,j) = yC(i,j,bi,bj)
79 enddo
80 enddo
81
82 call get_landfrac(im2,jm2,nSx,nSy,bi,bj,maxtyp,surftype,tilefrac,
83 & fracl)
84
85 do j = jm1,jm2
86 do i = im1,im2
87 if(sice(i,j,bi,bj).gt.0.) then
88 fraci(i,j) = 1.
89 else
90 fraci(i,j) = 0.
91 endif
92 enddo
93 enddo
94
95 C***********************************************************************
96 C* Get Leaf-Area-Index and Greenness Index *
97 C***********************************************************************
98
99 if( alarm('turb') .or. alarm('radsw') ) then
100 call getlgr (sec,month,day,chlt,ityp,nchpland(bi,bj),
101 & nchp,nSx,nSy,bi,bj,alai,agrn )
102 endif
103
104 C **********************************************************************
105 C Compute Surface Albedo
106 C **********************************************************************
107
108 if( alarm('radsw') ) then
109 #ifdef FIZHI_USE_FIXED_DAY
110 call astro(20040321,nhms,lats,lons,im2*jm2,cosz,radius)
111 #else
112 call astro(nymd,nhms,lats,lons,im2*jm2,cosz,radius)
113 #endif
114 call getalb(sec,month,day,cosz,snodep,fraci,fracl,im2,jm2,nchp,
115 & nchptot(bi,bj),nchpland(bi,bj),nSx,nSy,bi,bj,igrd,ityp,
116 & chfr,chlt,alai,agrn,
117 & albvisdr,albvisdf,albnirdr,albnirdf )
118 endif
119
120 C **********************************************************************
121 C Compute Surface Emissivity
122 C **********************************************************************
123
124 if( alarm('radlw') ) then
125 call grd2msc(fraci,im2,jm2,igrd(1,bi,bj),ficetile,
126 & nchp,nchptot(bi,bj))
127 call getemiss(fracl,im2,jm2,nchp,nchptot(bi,bj),nSx,nSy,bi,bj,
128 & igrd,ityp,chfr,snodep,ficetile,emiss)
129 endif
130
131 C*********************************************************************
132 C Ground Temperature Over Ocean is from SST array,
133 C Over land is from tcanopy
134 C*********************************************************************
135
136 do j = jm1,jm2
137 do i = im1,im2
138 tmpij(i,j) = 0.
139 enddo
140 enddo
141 do i = 1,nchptot(bi,bj)
142 tmpchp(i) = tcanopy(i,bi,bj)
143 enddo
144 call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),tmpchp,
145 & nchp,nchptot(bi,bj),fracl,tmpij,im2,jm2)
146 do j = jm1,jm2
147 do i = im1,im2
148 tgz(i,j,bi,bj) = tmpij(i,j)
149 if(fracl(i,j).lt.0.3.and.sice(i,j,bi,bj).eq.0.0)
150 & tgz(i,j,bi,bj) = sst(i,j,bi,bj)
151 enddo
152 enddo
153
154 enddo
155 enddo
156
157 return
158 end
159
160 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
161
162 SUBROUTINE SIBALB ( AVISDR, ANIRDR, AVISDF, ANIRDF,
163 & VLAI, VGRN, ZTH, SNW, ITYP, IRUN )
164
165 C*********************************************************************
166 C The input list is as follows:
167 C VLAI: the leaf area index.
168 C VGRN: the greenness index.
169 C ZTH: The cosine of the solar zenith angle.
170 C SNW: Snow cover in meters water equivalent.
171 C ITYP: The surface type (grass, bare soil, etc.)
172 C IRUN: Number of tiles (same as used for SUBROUTINE TILE).
173 C
174 C The output list is as follows:
175 C
176 C AVISDR: visible, direct albedo.
177 C ANIRDR: near infra-red, direct albedo.
178 C AVISDF: visible, diffuse albedo.
179 C ANIRDF: near infra-red, diffuse albedo.
180 C*******************************************************************
181
182 IMPLICIT NONE
183
184 INTEGER IRUN
185 _RL AVISDR (IRUN), ANIRDR (IRUN), AVISDF (IRUN), ANIRDF (IRUN)
186 _RL VLAI(IRUN),VGRN (IRUN), SNW(IRUN)
187 _RL ZTH(IRUN)
188 INTEGER ITYP (IRUN)
189
190 _RL ALVDRS, ALIDRS
191 _RL ALVDRDL, ALIDRDL
192 _RL ALVDRDD, ALIDRDD
193 _RL ALVDRI, ALIDRI
194 _RL minval
195 EXTERNAL minval
196
197 C Albedo of soil for visible direct solar radiation.
198 PARAMETER ( ALVDRS = 0.100 )
199 C Albedo of soil for infra-red direct solar radiation.
200 PARAMETER ( ALIDRS = 0.200 )
201 C Albedo of light desert for visible direct solar radiation.
202 PARAMETER ( ALVDRDL = 0.300 )
203 C Albedo of light desert for infra-red direct solar radiation.
204 PARAMETER ( ALIDRDL = 0.350 )
205 C Albedo of dark desert for visible direct solar radiation.
206 PARAMETER ( ALVDRDD = 0.250 )
207 C Albedo of dark desert for infra-red direct solar radiation.
208 PARAMETER ( ALIDRDD = 0.300 )
209 C Albedo of ice for visible direct solar radiation.
210 PARAMETER ( ALVDRI = 0.800 )
211 C Albedo of ice for infra-red direct solar radiation.
212 PARAMETER ( ALIDRI = 0.800 )
213
214 * ----------------------------------------------------------------------
215
216 INTEGER NTYPS
217 INTEGER NLAI
218 _RL ZERO, ONE
219 _RL EPSLN, BLAI, DLAI
220 _RL ALATRM
221 PARAMETER (NLAI = 14 )
222 PARAMETER (EPSLN = 1.E-6)
223 PARAMETER (BLAI = 0.5)
224 PARAMETER (DLAI = 0.5)
225 PARAMETER (ZERO=0., ONE=1.0)
226 PARAMETER (ALATRM = BLAI + (NLAI - 1) * DLAI - EPSLN)
227 PARAMETER (NTYPS=10)
228
229 C ITYP: Vegetation type as follows:
230 C 1: BROADLEAF EVERGREEN TREES
231 C 2: BROADLEAF DECIDUOUS TREES
232 C 3: NEEDLELEAF TREES
233 C 4: GROUND COVER
234 C 5: BROADLEAF SHRUBS
235 C 6: DWARF TREES (TUNDRA)
236 C 7: BARE SOIL
237 C 8: LIGHT DESERT
238 C 9: GLACIER
239 C 10: DARK DESERT
240 C
241
242 INTEGER I, LAI
243 _RL FAC,GAMMA,BETA,ALPHA,DX,DY,ALA,GRN (2),SNWALB(4,NTYPS)
244 _RL COEFF
245
246 _RL ALVDR (NLAI, 2, NTYPS)
247 _RL BTVDR (NLAI, 2, NTYPS)
248 _RL GMVDR (NLAI, 2, NTYPS)
249 _RL ALIDR (NLAI, 2, NTYPS)
250 _RL BTIDR (NLAI, 2, NTYPS)
251 _RL GMIDR (NLAI, 2, NTYPS)
252
253 C (Data statements for ALVDR described in full; data statements for
254 C other constants follow same framework.)
255
256 C BROADLEAF EVERGREEN (ITYP=4); GREEN=0.33; LAI: .5-7
257 DATA (ALVDR (I, 1, 1), I = 1, 14)
258 & /0.0808, 0.0796, 0.0792, 0.0790, 10*0.0789/
259
260 C BROADLEAF EVERGREEN (ITYP=4); GREEN=0.67; LAI: .5-7
261 DATA (ALVDR (I, 2, 1), I = 1, 14)
262 & /0.0788, 0.0775, 0.0771, 0.0769, 10*0.0768/
263
264 C BROADLEAF DECIDUOUS (ITYP=1); GREEN=0.33; LAI: .5-7
265 DATA (ALVDR (I, 1, 2), I = 1, 14)
266 & /0.0803, 0.0790, 0.0785, 0.0784, 3*0.0783, 7*0.0782/
267
268 C BROADLEAF DECIDUOUS (ITYP=1); GREEN=0.67; LAI: .5-7
269 DATA (ALVDR (I, 2, 2), I = 1, 14)
270 & /0.0782, 0.0770, 0.0765, 0.0763, 10*0.0762/
271
272 C NEEDLELEAF (ITYP=3); GREEN=0.33; LAI=.5-7
273 DATA (ALVDR (I, 1, 3), I = 1, 14)
274 & /0.0758, 0.0746, 0.0742, 0.0740, 10*0.0739/
275
276 C NEEDLELEAF (ITYP=3); GREEN=0.67; LAI=.5-7
277 DATA (ALVDR (I, 2, 3), I = 1, 14)
278 & /0.0683, 0.0672, 0.0667, 2*0.0665, 9*0.0664/
279
280 C GROUNDCOVER (ITYP=2); GREEN=0.33; LAI=.5-7
281 DATA (ALVDR (I, 1, 4), I = 1, 14)
282 & /0.2436, 0.2470, 0.2486, 0.2494, 0.2498, 0.2500, 2*0.2501,
283 & 6*0.2502
284 & /
285 C GROUNDCOVER (ITYP=2); GREEN=0.67; LAI=.5-7
286 DATA (ALVDR (I, 2, 4), I = 1, 14) /14*0.1637/
287
288 C BROADLEAF SHRUBS (ITYP=5); GREEN=0.33,LAI=.5-7
289 DATA (ALVDR (I, 1, 5), I = 1, 14)
290 & /0.0807, 0.0798, 0.0794, 0.0792, 0.0792, 9*0.0791/
291
292 C BROADLEAF SHRUBS (ITYP=5); GREEN=0.67,LAI=.5-7
293 DATA (ALVDR (I, 2, 5), I = 1, 14)
294 & /0.0787, 0.0777, 0.0772, 0.0771, 10*0.0770/
295
296 C DWARF TREES, OR TUNDRA (ITYP=6); GREEN=0.33,LAI=.5-7
297 DATA (ALVDR (I, 1, 6), I = 1, 14)
298 & /0.0802, 0.0791, 0.0787, 0.0786, 10*0.0785/
299
300 C DWARF TREES, OR TUNDRA (ITYP=6); GREEN=0.67,LAI=.5-7
301 DATA (ALVDR (I, 2, 6), I = 1, 14)
302 & /0.0781, 0.0771, 0.0767, 0.0765, 0.0765, 9*0.0764/
303
304 C BARE SOIL
305 DATA (ALVDR (I, 1, 7), I = 1, 14) /14*ALVDRS/
306 DATA (ALVDR (I, 2, 7), I = 1, 14) /14*ALVDRS/
307
308 C LIGHT DESERT (SAHARA, EG)
309 DATA (ALVDR (I, 1, 8), I = 1, 14) /14*ALVDRDL/
310 DATA (ALVDR (I, 2, 8), I = 1, 14) /14*ALVDRDL/
311
312 C ICE
313 DATA (ALVDR (I, 1, 9), I = 1, 14) /14*ALVDRI/
314 DATA (ALVDR (I, 2, 9), I = 1, 14) /14*ALVDRI/
315
316 C DARK DESERT (AUSTRALIA, EG)
317 DATA (ALVDR (I, 1, 10), I = 1, 14) /14*ALVDRDD/
318 DATA (ALVDR (I, 2, 10), I = 1, 14) /14*ALVDRDD/
319 C**** -------------------------------------------------
320 DATA (BTVDR (I, 1, 1), I = 1, 14)
321 & /0.0153, 0.0372, 0.0506, 0.0587, 0.0630, 0.0652, 0.0663,
322 & 0.0668, 0.0671, 0.0672, 4*0.0673
323 & /
324 DATA (BTVDR (I, 2, 1), I = 1, 14)
325 & /0.0135, 0.0354, 0.0487, 0.0568, 0.0611, 0.0633, 0.0644,
326 & 0.0650, 0.0652, 0.0654, 0.0654, 3*0.0655
327 & /
328 DATA (BTVDR (I, 1, 2), I = 1, 14)
329 & /0.0148, 0.0357, 0.0462, 0.0524, 0.0554, 0.0569, 0.0576,
330 & 0.0579, 0.0580, 0.0581, 0.0581, 3*0.0582
331 & /
332 DATA (BTVDR (I, 2, 2), I = 1, 14)
333 & /0.0131, 0.0342, 0.0446, 0.0508, 0.0539, 0.0554, 0.0560,
334 & 0.0564, 0.0565, 5*0.0566
335 & /
336 DATA (BTVDR (I, 1, 3), I = 1, 14)
337 & /0.0108, 0.0334, 0.0478, 0.0571, 0.0624, 0.0652, 0.0666,
338 & 0.0673, 0.0677, 0.0679, 4*0.0680
339 & /
340 DATA (BTVDR (I, 2, 3), I = 1, 14)
341 & /0.0034, 0.0272, 0.0408, 0.0501, 0.0554, 0.0582, 0.0597,
342 & 0.0604, 0.0608, 0.0610, 4*0.0611
343 & /
344 DATA (BTVDR (I, 1, 4), I = 1, 14)
345 & /0.2050, 0.2524, 0.2799, 0.2947, 0.3022, 0.3059, 0.3076,
346 & 0.3085, 0.3088, 0.3090, 4*0.3091
347 & /
348 DATA (BTVDR (I, 2, 4), I = 1, 14)
349 & /0.1084, 0.1404, 0.1617, 0.1754, 0.1837, 0.1887, 0.1915,
350 & 0.1931, 0.1940, 0.1946, 0.1948, 0.1950, 2*0.1951
351 & /
352 DATA (BTVDR (I, 1, 5), I = 1, 14)
353 & /0.0203, 0.0406, 0.0548, 0.0632, 0.0679, 0.0703, 0.0716,
354 & 0.0722, 0.0726, 0.0727, 0.0728, 0.0728, 0.0728, 0.0729
355 & /
356
357 DATA (BTVDR (I, 2, 5), I = 1, 14)
358 & /0.0184, 0.0385, 0.0526, 0.0611, 0.0658, 0.0683, 0.0696,
359 & 0.0702, 0.0705, 0.0707, 4*0.0708
360 & /
361
362 DATA (BTVDR (I, 1, 6), I = 1, 14)
363 & /0.0199, 0.0388, 0.0494, 0.0554, 0.0584, 0.0599, 0.0606,
364 & 0.0609, 0.0611, 5*0.0612
365 & /
366
367 DATA (BTVDR (I, 2, 6), I = 1, 14)
368 & /0.0181, 0.0371, 0.0476, 0.0537, 0.0568, 0.0583, 0.0590,
369 & 0.0593, 0.0595, 0.0595, 4*0.0596
370 & /
371
372 DATA (BTVDR (I, 1, 7), I = 1, 14) /14*0./
373 DATA (BTVDR (I, 2, 7), I = 1, 14) /14*0./
374
375 DATA (BTVDR (I, 1, 8), I = 1, 14) /14*0./
376 DATA (BTVDR (I, 2, 8), I = 1, 14) /14*0./
377
378 DATA (BTVDR (I, 1, 9), I = 1, 14) /14*0./
379 DATA (BTVDR (I, 2, 9), I = 1, 14) /14*0./
380
381 DATA (BTVDR (I, 1, 10), I = 1, 14) /14*0./
382 DATA (BTVDR (I, 2, 10), I = 1, 14) /14*0./
383
384 C**** -----------------------------------------------------------
385 DATA (GMVDR (I, 1, 1), I = 1, 14)
386 & /0.0814, 0.1361, 0.2078, 0.2650, 0.2986, 0.3169, 0.3265,
387 & 0.3313, 0.3337, 0.3348, 0.3354, 0.3357, 2*0.3358
388 & /
389 DATA (GMVDR (I, 2, 1), I = 1, 14)
390 & /0.0760, 0.1336, 0.2034, 0.2622, 0.2969, 0.3159, 0.3259,
391 & 0.3309, 0.3333, 0.3346, 0.3352, 0.3354, 2*0.3356
392 & /
393 DATA (GMVDR (I, 1, 2), I = 1, 14)
394 & /0.0834, 0.1252, 0.1558, 0.1927, 0.2131, 0.2237, 0.2290,
395 & 0.2315, 0.2327, 0.2332, 0.2335, 2*0.2336, 0.2337
396 & /
397 DATA (GMVDR (I, 2, 2), I = 1, 14)
398 & /0.0789, 0.1235, 0.1531, 0.1912, 0.2122, 0.2232, 0.2286,
399 & 0.2312, 0.2324, 0.2330, 0.2333, 0.2334, 2*0.2335
400 & /
401 DATA (GMVDR (I, 1, 3), I = 1, 14)
402 & /0.0647, 0.1342, 0.2215, 0.2968, 0.3432, 0.3696, 0.3838,
403 & 0.3912, 0.3950, 0.3968, 0.3978, 0.3982, 0.3984, 0.3985
404 & /
405 DATA (GMVDR (I, 2, 3), I = 1, 14)
406 & /0.0258, 0.1227, 0.1999, 0.2825, 0.3339, 0.3634, 0.3794,
407 & 0.3877, 0.3919, 0.3940, 0.3950, 0.3956, 0.3958, 0.3959
408 & /
409 DATA (GMVDR (I, 1, 4), I = 1, 14)
410 & /0.3371, 0.5762, 0.7159, 0.7927, 0.8324, 0.8526, 0.8624,
411 & 0.8671, 0.8693, 0.8704, 0.8709, 0.8710, 2*0.8712
412 & /
413 DATA (GMVDR (I, 2, 4), I = 1, 14)
414 & /0.2634, 0.4375, 0.5532, 0.6291, 0.6763, 0.7048, 0.7213,
415 & 0.7310, 0.7363, 0.7395, 0.7411, 0.7420, 0.7426, 0.7428
416 & /
417 DATA (GMVDR (I, 1, 5), I = 1, 14)
418 & /0.0971, 0.1544, 0.2511, 0.3157, 0.3548, 0.3768, 0.3886,
419 & 0.3948, 0.3978, 0.3994, 0.4001, 0.4006, 0.4007, 0.4008
420 & /
421
422 DATA (GMVDR (I, 2, 5), I = 1, 14)
423 & /0.0924, 0.1470, 0.2458, 0.3123, 0.3527, 0.3756, 0.3877,
424 & 0.3942, 0.3974, 0.3990, 0.3998, 0.4002, 0.4004, 0.4005
425 & /
426
427 DATA (GMVDR (I, 1, 6), I = 1, 14)
428 & /0.0970, 0.1355, 0.1841, 0.2230, 0.2447, 0.2561, 0.2617,
429 & 0.2645, 0.2658, 0.2664, 0.2667, 3*0.2669
430 & /
431
432 DATA (GMVDR (I, 2, 6), I = 1, 14)
433 & /0.0934, 0.1337, 0.1812, 0.2213, 0.2437, 0.2554, 0.2613,
434 & 0.2642, 0.2656, 0.2662, 0.2665, 0.2667, 0.2667, 0.2668
435 & /
436
437 DATA (GMVDR (I, 1, 7), I = 1, 14) /14*1./
438 DATA (GMVDR (I, 2, 7), I = 1, 14) /14*1./
439
440 DATA (GMVDR (I, 1, 8), I = 1, 14) /14*1./
441 DATA (GMVDR (I, 2, 8), I = 1, 14) /14*1./
442
443 DATA (GMVDR (I, 1, 9), I = 1, 14) /14*1./
444 DATA (GMVDR (I, 2, 9), I = 1, 14) /14*1./
445
446 DATA (GMVDR (I, 1, 10), I = 1, 14) /14*1./
447 DATA (GMVDR (I, 2, 10), I = 1, 14) /14*1./
448
449 C**** -----------------------------------------------------------
450
451 DATA (ALIDR (I, 1, 1), I = 1, 14)
452 & /0.2867, 0.2840, 0.2828, 0.2822, 0.2819, 0.2818, 2*0.2817,
453 & 6*0.2816
454 & /
455 DATA (ALIDR (I, 2, 1), I = 1, 14)
456 & /0.3564, 0.3573, 0.3577, 0.3580, 2*0.3581, 8*0.3582/
457 DATA (ALIDR (I, 1, 2), I = 1, 14)
458 & /0.2848, 0.2819, 0.2804, 0.2798, 0.2795, 2*0.2793, 7*0.2792/
459 DATA (ALIDR (I, 2, 2), I = 1, 14)
460 & /0.3544, 0.3550, 0.3553, 2*0.3555, 9*0.3556/
461 DATA (ALIDR (I, 1, 3), I = 1, 14)
462 & /0.2350, 0.2311, 0.2293, 0.2285, 0.2281, 0.2280, 8*0.2279/
463 DATA (ALIDR (I, 2, 3), I = 1, 14)
464 & /0.2474, 0.2436, 0.2418, 0.2410, 0.2406, 0.2405, 3*0.2404,
465 & 5*0.2403
466 & /
467 DATA (ALIDR (I, 1, 4), I = 1, 14)
468 & /0.5816, 0.6157, 0.6391, 0.6556, 0.6673, 0.6758, 0.6820,
469 & 0.6866, 0.6899, 0.6924, 0.6943, 0.6956, 0.6966, 0.6974
470 & /
471 DATA (ALIDR (I, 2, 4), I = 1, 14)
472 & /0.5489, 0.5770, 0.5955, 0.6079, 0.6163, 0.6221, 0.6261,
473 & 0.6288, 0.6308, 0.6321, 0.6330, 0.6337, 0.6341, 0.6344
474 & /
475 DATA (ALIDR (I, 1, 5), I = 1, 14)
476 & /0.2845, 0.2837, 0.2832, 0.2831, 0.2830, 9*0.2829/
477 DATA (ALIDR (I, 2, 5), I = 1, 14)
478 & /0.3532, 0.3562, 0.3578, 0.3586, 0.3590, 0.3592, 0.3594,
479 & 0.3594, 0.3594, 5*0.3595
480 & /
481 DATA (ALIDR (I, 1, 6), I = 1, 14)
482 & /0.2825, 0.2812, 0.2806, 0.2803, 0.2802, 9*0.2801/
483 DATA (ALIDR (I, 2, 6), I = 1, 14)
484 & /0.3512, 0.3538, 0.3552, 0.3559, 0.3562, 0.3564, 0.3565,
485 & 0.3565, 6*0.3566
486 & /
487
488 DATA (ALIDR (I, 1, 7), I = 1, 14) /14*ALIDRS/
489 DATA (ALIDR (I, 2, 7), I = 1, 14) /14*ALIDRS/
490
491 DATA (ALIDR (I, 1, 8), I = 1, 14) /14*ALIDRDL/
492 DATA (ALIDR (I, 2, 8), I = 1, 14) /14*ALIDRDL/
493
494 DATA (ALIDR (I, 1, 9), I = 1, 14) /14*ALIDRI/
495 DATA (ALIDR (I, 2, 9), I = 1, 14) /14*ALIDRI/
496
497 DATA (ALIDR (I, 1, 10), I = 1, 14) /14*ALIDRDD/
498 DATA (ALIDR (I, 2, 10), I = 1, 14) /14*ALIDRDD/
499
500 C**** -----------------------------------------------------------
501 DATA (BTIDR (I, 1, 1), I = 1, 14)
502 & /0.1291, 0.1707, 0.1969, 0.2125, 0.2216, 0.2267, 0.2295,
503 & 0.2311, 0.2319, 0.2323, 0.2326, 2*0.2327, 0.2328
504 & /
505 DATA (BTIDR (I, 2, 1), I = 1, 14)
506 & /0.1939, 0.2357, 0.2598, 0.2735, 0.2810, 0.2851, 0.2874,
507 & 0.2885, 0.2892, 0.2895, 0.2897, 3*0.2898
508 & /
509 DATA (BTIDR (I, 1, 2), I = 1, 14)
510 & /0.1217, 0.1522, 0.1713, 0.1820, 0.1879, 0.1910, 0.1926,
511 & 0.1935, 0.1939, 0.1942, 2*0.1943, 2*0.1944
512 & /
513 DATA (BTIDR (I, 2, 2), I = 1, 14)
514 & /0.1781, 0.2067, 0.2221, 0.2301, 0.2342, 0.2363, 0.2374,
515 & 0.2379, 0.2382, 0.2383, 2*0.2384, 2*0.2385
516 & /
517 DATA (BTIDR (I, 1, 3), I = 1, 14)
518 & /0.0846, 0.1299, 0.1614, 0.1814, 0.1935, 0.2004, 0.2043,
519 & 0.2064, 0.2076, 0.2082, 0.2085, 2*0.2087, 0.2088
520 & /
521 DATA (BTIDR (I, 2, 3), I = 1, 14)
522 & /0.0950, 0.1410, 0.1722, 0.1921, 0.2042, 0.2111, 0.2151,
523 & 0.2172, 0.2184, 0.2191, 0.2194, 0.2196, 2*0.2197
524 & /
525 DATA (BTIDR (I, 1, 4), I = 1, 14)
526 & /0.5256, 0.7444, 0.9908, 1.2700, 1.5680, 1.8505, 2.0767,
527 & 2.2211, 2.2808, 2.2774, 2.2362, 2.1779, 2.1160, 2.0564
528 & /
529 DATA (BTIDR (I, 2, 4), I = 1, 14)
530 & /0.4843, 0.6714, 0.8577, 1.0335, 1.1812, 1.2858, 1.3458,
531 & 1.3688, 1.3685, 1.3546, 1.3360, 1.3168, 1.2989, 1.2838
532 & /
533 DATA (BTIDR (I, 1, 5), I = 1, 14)
534 & /0.1498, 0.1930, 0.2201, 0.2364, 0.2460, 0.2514, 0.2544,
535 & 0.2560, 0.2569, 0.2574, 0.2577, 0.2578, 0.2579, 0.2579
536 & /
537
538 DATA (BTIDR (I, 2, 5), I = 1, 14)
539 & /0.2184, 0.2656, 0.2927, 0.3078, 0.3159, 0.3202, 0.3224,
540 & 0.3235, 0.3241, 0.3244, 0.3245, 3*0.3246
541 & /
542
543 DATA (BTIDR (I, 1, 6), I = 1, 14)
544 & /0.1369, 0.1681, 0.1860, 0.1958, 0.2010, 0.2038, 0.2053,
545 & 0.2060, 0.2064, 0.2066, 0.2067, 3*0.2068
546 & /
547
548 DATA (BTIDR (I, 2, 6), I = 1, 14)
549 & /0.1969, 0.2268, 0.2416, 0.2488, 0.2521, 0.2537, 0.2544,
550 & 0.2547, 0.2548, 5*0.2549
551 & /
552
553
554 DATA (BTIDR (I, 1, 7), I = 1, 14) /14*0./
555 DATA (BTIDR (I, 2, 7), I = 1, 14) /14*0./
556
557 DATA (BTIDR (I, 1, 8), I = 1, 14) /14*0./
558 DATA (BTIDR (I, 2, 8), I = 1, 14) /14*0./
559
560 DATA (BTIDR (I, 1, 9), I = 1, 14) /14*0./
561 DATA (BTIDR (I, 2, 9), I = 1, 14) /14*0./
562
563 DATA (BTIDR (I, 1, 10), I = 1, 14) /14*0./
564 DATA (BTIDR (I, 2, 10), I = 1, 14) /14*0./
565
566 C**** --------------------------------------------------------------
567 DATA (GMIDR (I, 1, 1), I = 1, 14)
568 & /0.1582, 0.2581, 0.3227, 0.3635, 0.3882, 0.4026, 0.4108,
569 & 0.4154, 0.4179, 0.4193, 0.4200, 0.4204, 0.4206, 0.4207
570 & /
571 DATA (GMIDR (I, 2, 1), I = 1, 14)
572 & /0.1934, 0.3141, 0.3818, 0.4200, 0.4415, 0.4533, 0.4598,
573 & 0.4633, 0.4651, 0.4662, 0.4667, 0.4671, 2*0.4672
574 & /
575 DATA (GMIDR (I, 1, 2), I = 1, 14)
576 & /0.1347, 0.1871, 0.2277, 0.2515, 0.2651, 0.2727, 0.2768,
577 & 0.2790, 0.2801, 0.2808, 0.2811, 0.2812, 0.2813, 0.2814
578 & /
579 DATA (GMIDR (I, 2, 2), I = 1, 14)
580 & /0.1440, 0.2217, 0.2629, 0.2839, 0.2947, 0.3003, 0.3031,
581 & 0.3046, 0.3054, 0.3058, 0.3060, 2*0.3061, 0.3062
582 & /
583 DATA (GMIDR (I, 1, 3), I = 1, 14)
584 & /0.1372, 0.2368, 0.3235, 0.3839, 0.4229, 0.4465, 0.4602,
585 & 0.4679, 0.4722, 0.4745, 0.4758, 0.4764, 0.4768, 0.4770
586 & /
587 DATA (GMIDR (I, 2, 3), I = 1, 14)
588 & /0.1435, 0.2524, 0.3370, 0.3955, 0.4332, 0.4563, 0.4697,
589 & 0.4773, 0.4815, 0.4839, 0.4851, 0.4858, 0.4861, 0.4863
590 & /
591 DATA (GMIDR (I, 1, 4), I = 1, 14)
592 & /0.4298, 0.9651, 1.6189, 2.4084, 3.2992, 4.1928, 4.9611,
593 & 5.5095, 5.8085, 5.9069, 5.8726, 5.7674, 5.6346, 5.4944
594 & /
595 DATA (GMIDR (I, 2, 4), I = 1, 14)
596 & /0.4167, 0.8974, 1.4160, 1.9414, 2.4147, 2.7803, 3.0202,
597 & 3.1468, 3.1954, 3.1932, 3.1676, 3.1328, 3.0958, 3.0625
598 & /
599 DATA (GMIDR (I, 1, 5), I = 1, 14)
600 & /0.1959, 0.3203, 0.3985, 0.4472, 0.4766, 0.4937, 0.5034,
601 & 0.5088, 0.5117, 0.5134, 0.5143, 0.5147, 0.5150, 0.5152
602 & /
603
604 DATA (GMIDR (I, 2, 5), I = 1, 14)
605 & /0.2328, 0.3859, 0.4734, 0.5227, 0.5498, 0.5644, 0.5720,
606 & 0.5761, 0.5781, 0.5792, 0.5797, 0.5800, 0.5802, 0.5802
607 & /
608
609 DATA (GMIDR (I, 1, 6), I = 1, 14)
610 & /0.1447, 0.2244, 0.2698, 0.2953, 0.3094, 0.3170, 0.3211,
611 & 0.3233, 0.3244, 0.3250, 0.3253, 0.3255, 0.3256, 0.3256
612 & /
613
614 DATA (GMIDR (I, 2, 6), I = 1, 14)
615 & /0.1643, 0.2624, 0.3110, 0.3347, 0.3461, 0.3517, 0.3543,
616 & 0.3556, 0.3562, 0.3564, 0.3565, 0.3566, 0.3566, 0.3566
617 & /
618
619 DATA (GMIDR (I, 1, 7), I = 1, 14) /14*1./
620 DATA (GMIDR (I, 2, 7), I = 1, 14) /14*1./
621
622 DATA (GMIDR (I, 1, 8), I = 1, 14) /14*1./
623 DATA (GMIDR (I, 2, 8), I = 1, 14) /14*1./
624
625 DATA (GMIDR (I, 1, 9), I = 1, 14) /14*1./
626 DATA (GMIDR (I, 2, 9), I = 1, 14) /14*1./
627
628 DATA (GMIDR (I, 1, 10), I = 1, 14) /14*1./
629 DATA (GMIDR (I, 2, 10), I = 1, 14) /14*1./
630
631 C**** -----------------------------------------------------------
632
633 DATA GRN /0.33, 0.67/
634
635 #include "snwmid.h"
636 DATA SNWALB /.65, .38, .65, .38,
637 & .65, .38, .65, .38,
638 & .65, .38, .65, .38,
639 & .65, .38, .65, .38,
640 & .65, .38, .65, .38,
641 & .65, .38, .65, .38,
642 & .65, .38, .65, .38,
643 & .65, .38, .65, .38,
644 & .80, .60, .80, .60,
645 & .65, .38, .65, .38
646 & /
647
648 #ifdef CRAY
649 #ifdef f77
650 cfpp$ expand (coeff)
651 #endif
652 #endif
653
654 DO 100 I=1,IRUN
655 ALA = MIN (MAX (ZERO, VLAI(I)), ALATRM)
656 LAI = 1 + MAX(0, INT((ALA-BLAI)/DLAI) )
657 DX = (ALA - (BLAI+(LAI-1)*DLAI)) * (ONE/DLAI)
658 DY = (VGRN(I)- GRN(1)) * (ONE/(GRN(2) - GRN(1)))
659
660 ALPHA = COEFF (ALVDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY)
661 BETA = COEFF (BTVDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY)
662 GAMMA = COEFF (GMVDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY)
663
664 AVISDR(I) = ALPHA - ZTH(I)*BETA / (GAMMA+ZTH(I))
665 AVISDF(I) = ALPHA-BETA
666 & + 2.*BETA*GAMMA*(1.-GAMMA*LOG((1.+GAMMA)/GAMMA))
667
668 ALPHA = COEFF (ALIDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY)
669 BETA = COEFF (BTIDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY)
670 GAMMA = COEFF (GMIDR (1, 1, ITYP (I)), NLAI, LAI ,DX, DY)
671
672 ANIRDR(I) = ALPHA - ZTH(I)*BETA / (GAMMA+ZTH(I))
673 ANIRDF(I) = ALPHA-BETA
674 & + 2.*BETA*GAMMA*(1.-GAMMA*LOG((1.+GAMMA)/GAMMA))
675
676 IF (SNW (I) .GT. ZERO) THEN
677 FAC = SNW(I) / (SNW(I) + SNWMID(ITYP(I)))
678
679 AVISDR(I) = AVISDR(I) + (SNWALB(1,ITYP(I)) - AVISDR(I)) * FAC
680 ANIRDR(I) = ANIRDR(I) + (SNWALB(2,ITYP(I)) - ANIRDR(I)) * FAC
681 AVISDF(I) = AVISDF(I) + (SNWALB(3,ITYP(I)) - AVISDF(I)) * FAC
682 ANIRDF(I) = ANIRDF(I) + (SNWALB(4,ITYP(I)) - ANIRDF(I)) * FAC
683 ENDIF
684
685 100 CONTINUE
686
687 RETURN
688 END
689 FUNCTION COEFF(TABLE, NTABL, LAI ,DX, DY)
690
691 INTEGER NTABL, LAI
692 _RL coeff
693 _RL TABLE (NTABL, 2), DX, DY
694
695 COEFF = (TABLE(LAI, 1)
696 & + (TABLE(LAI ,2) - TABLE(LAI ,1)) * DY ) * (1.0-DX)
697 & + (TABLE(LAI+1,1)
698 & + (TABLE(LAI+1,2) - TABLE(LAI+1,1)) * DY ) * DX
699
700 RETURN
701 END
702
703 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
704
705 SUBROUTINE GETLGR(sec,IMON,IDAY,ALAT,ITYP,NCHPS,nchpdim,
706 & nSx,nSy,bi,bj,ALAI,AGRN)
707 C*********************************************************************
708 IMPLICIT NONE
709
710 INTEGER ntyps
711 _RL one,daylen
712 PARAMETER (NTYPS=10)
713 PARAMETER (one = 1.)
714 PARAMETER (daylen = 86400.)
715
716 INTEGER sec, imon, iday, nchps, nchpdim, nSx, nSy, bi, bj
717 _RL ALAI(nchpdim,nSx,nSy), AGRN(nchpdim,nSx,nSy)
718 _RL ALAT(nchpdim,nSx,nSy)
719 INTEGER ITYP(nchpdim,nSx,nSy)
720
721 INTEGER i,midmon,midm,midp,id,k1,k2,kk1,kk2
722 _RL fac
723
724 INTEGER DAYS(12)
725 DATA DAYS/31,28,31,30,31,30,31,31,30,31,30,31/
726
727 _RL VGLA(12,NTYPS), VGGR(12,NTYPS)
728
729 DATA VGLA /
730 1 5.117, 5.117, 5.117, 5.117, 5.117, 5.117, 5.117, 5.117,
731 1 5.117, 5.117, 5.117, 5.117,
732 2 0.520, 0.520, 0.867, 2.107, 4.507, 6.773, 7.173, 6.507,
733 2 5.040, 2.173, 0.867, 0.520,
734 3 8.760, 9.160, 9.827,10.093,10.360,10.760,10.493,10.227,
735 3 10.093, 9.827, 9.160, 8.760,
736 4 0.782, 0.893, 1.004, 1.116, 1.782, 3.671, 4.782, 4.227,
737 4 2.004, 1.227, 1.004, 0.893,
738 5 3.760, 3.760, 2.760, 1.760, 1.760, 1.760, 1.760, 5.760,
739 5 10.760, 7.760, 4.760, 3.760,
740 6 0.739, 0.739, 0.739, 0.739, 0.739, 1.072, 5.072, 5.739,
741 6 4.405, 0.739, 0.739, 0.739,
742 7 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
743 7 0.001, 0.001, 0.001, 0.001,
744 8 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
745 8 0.001, 0.001, 0.001, 0.001,
746 9 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
747 9 0.001, 0.001, 0.001, 0.001,
748 1 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
749 1 0.001, 0.001, 0.001, 0.001
750 & /
751
752 DATA VGGR
753 1 /0.905, 0.905, 0.905, 0.905, 0.905, 0.905, 0.905, 0.905,
754 1 0.905, 0.905, 0.905, 0.905,
755 2 0.026, 0.026, 0.415, 0.759, 0.888, 0.925, 0.836, 0.697,
756 2 0.331, 0.166, 0.015, 0.026,
757 3 0.913, 0.917, 0.923, 0.925, 0.927, 0.905, 0.902, 0.913,
758 3 0.898, 0.855, 0.873, 0.913,
759 4 0.568, 0.622, 0.664, 0.697, 0.810, 0.908, 0.813, 0.394,
760 4 0.443, 0.543, 0.553, 0.498,
761 5 0.798, 0.532, 0.362, 0.568, 0.568, 0.568, 0.568, 0.868,
762 5 0.651, 0.515, 0.630, 0.798,
763 6 0.451, 0.451, 0.451, 0.451, 0.451, 0.622, 0.920, 0.697,
764 6 0.076, 0.451, 0.451, 0.451,
765 7 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
766 7 0.001, 0.001, 0.001, 0.001,
767 8 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
768 8 0.001, 0.001, 0.001, 0.001,
769 9 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
770 9 0.001, 0.001, 0.001, 0.001,
771 1 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
772 1 0.001, 0.001, 0.001, 0.001
773 & /
774
775 MIDMON = DAYS(IMON)/2 + 1
776
777 IF (IDAY .LT. MIDMON) THEN
778 K2 = IMON
779 K1 = MOD(IMON+10,12) + 1
780 ELSE
781 K1 = IMON
782 K2 = MOD(IMON,12) + 1
783 ENDIF
784
785 IF (IDAY .LT. MIDMON) THEN
786 MIDM = DAYS(K1)/2 + 1
787 MIDP = DAYS(K1) + MIDMON
788 ID = IDAY + DAYS(K1)
789 ELSE
790 MIDM = MIDMON
791 MIDP = DAYS(K2)/2 + 1 + DAYS(K1)
792 ID = IDAY
793 ENDIF
794
795 FAC = (float(ID -MIDM)*DAYLEN + SEC) /
796 & (float(MIDP-MIDM)*DAYLEN )
797
798 DO 220 I=1,NCHPS
799
800 IF(ALAT(I,bi,bj).GT.0.) THEN
801 KK1 = K1
802 KK2 = K2
803 ELSE
804 KK1 = MOD(K1+5,12) + 1
805 KK2 = MOD(K2+5,12) + 1
806 ENDIF
807
808 ALAI(I,bi,bj) = VGLA(KK2,ITYP(I,bi,bj))*FAC+
809 & VGLA(KK1,ITYP(I,bi,bj))*(ONE-FAC)
810 AGRN(I,bi,bj) = VGGR(KK2,ITYP(I,bi,bj))*FAC+
811 & VGGR(KK1,ITYP(I,bi,bj))*(ONE-FAC)
812
813 220 CONTINUE
814
815 RETURN
816 END
817
818 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
819
820 SUBROUTINE GETALB(sec,month,day,cosz,snodep,fraci,fracg,im,jm,
821 & nchp,nchptot,nchpland,nSx,nSy,bi,bj,igrd,ityp,chfr,chlt,
822 & alai,agrn,albvr,albvf,albnr,albnf)
823 C***********************************************************************
824 C PURPOSE
825 C To act as an interface to routine sibalb, which calculates
826 C the four albedos for use by the shortwave radiation routine
827 C
828 C INPUT:
829 C sec - number of seconds into the day of current time
830 C month - month of the year of current time
831 C day - day of the month of current time
832 C cosz - local cosine of the zenith angle [im,jm]
833 C snodep - snow cover in meters [nchp,nSx,nSy]
834 C fraci - real array in grid space of total sea ice fraction [im,jm]
835 C fracg - real array in grid space of total land fraction [im,jm]
836 C im - model grid longitude dimension
837 C jm - model grid latitude dimension (number of lat. points)
838 C nchp - integer actual number of tiles in tile space
839 C nchpland - integer number of land tiles
840 C nSx - number of processors in x-direction
841 C nSy - number of processors in y-direction
842 C bi - processors index in x-direction
843 C bj - processors index in y-direction
844 C igrd - integer array in tile space of grid point number for each
845 C tile [nchp,nSx,nSy]
846 C ityp - integer array in tile space of land surface type for each
847 C tile [nchp,nSx,nSy]
848 C chfr - real array in tile space of land surface type fraction for
849 C each tile [nchp,nSx,nSy]
850 C chlt - real array in tile space of latitude value for each tile
851 C [nchp,nSx,nSy]
852 C
853 C OUTPUT:
854 C albvr - real array [im,jm] of visible direct beam albedo
855 C albvf - real array [im,jm] of visible diffuse beam albedo
856 C albnr - real array [im,jm] of near-ir direct beam albedo
857 C albnf - real array [im,jm] of near-ir diffuse beam albedo
858 C
859 C***********************************************************************
860 IMPLICIT NONE
861
862 INTEGER sec,month,day,im,jm,nchp,nchptot,nchpland,nSx,nSy,bi,bj
863 _RL cosz(im,jm),fraci(im,jm),fracg(im,jm)
864 _RL snodep(nchp,nSx,nSy),chfr(nchp,nSx,nSy),chlt(nchp,nSx,nSy)
865 INTEGER igrd(nchp,nSx,nSy),ityp(nchp,nSx,nSy)
866 _RL alai(nchp,nSx,nSy),agrn(nchp,nSx,nSy)
867 _RL albvr(im,jm,nSx,nSy),albvf(im,jm,nSx,nSy)
868 _RL albnr(im,jm,nSx,nSy),albnf(im,jm,nSx,nSy)
869
870 C- local variables:
871 _RL one,a0,a1,a2,a3,ocnalb,albsi
872 PARAMETER (one = 1.)
873 PARAMETER (A0= 0.40670980)
874 PARAMETER (A1=-1.2523634 )
875 PARAMETER (A2= 1.4224051 )
876 PARAMETER (A3=-0.55573341)
877 PARAMETER (OCNALB=0.08)
878 PARAMETER (ALBSI=0.7)
879
880 _RL alboc(im,jm)
881 _RL avisdr(nchp),anirdr(nchp),avisdf(nchp)
882 _RL anirdf(nchp)
883 _RL zenith(nchp)
884 _RL tmpij(im,jm)
885 INTEGER i,j
886
887 DO I=1,IM
888 DO J=1,JM
889 ALBOC(I,J) = A0 + (A1 + (A2 + A3*cosz(I,J))*cosz(I,J))*cosz(I,J)
890 ALBVR(I,J,bi,bj) = ALBSI*FRACI(I,J) + ALBOC(I,J)*(ONE-FRACI(I,J))
891 ALBNR(I,J,bi,bj) = ALBVR(I,J,bi,bj)
892 ALBVF(I,J,bi,bj) = ALBSI * FRACI(I,J) + OCNALB * (ONE-FRACI(I,J))
893 ALBNF(I,J,bi,bj) = ALBVF(I,J,bi,bj)
894 ENDDO
895 ENDDO
896
897 C and now some conversions from grid space to tile space before sibalb
898
899 call grd2msc(cosz,im,jm,igrd(1,bi,bj),zenith,nchp,nchpland)
900
901 C and now call sibalb
902
903 call sibalb(avisdr,anirdr,avisdf,anirdf,alai(1,bi,bj),
904 & agrn(1,bi,bj),zenith,snodep(1,bi,bj),ityp(1,bi,bj),nchpland)
905
906 C finally some transformations back to grid space for albedos
907
908 DO I=1,IM
909 DO J=1,JM
910 tmpij(i,j) = albvr(i,j,bi,bj)
911 ENDDO
912 ENDDO
913 call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),avisdr,nchp,nchpland,
914 & fracg,tmpij,im,jm)
915
916 DO I=1,IM
917 DO J=1,JM
918 albvr(i,j,bi,bj) = tmpij(i,j)
919 ENDDO
920 ENDDO
921 DO I=1,IM
922 DO J=1,JM
923 tmpij(i,j) = albvf(i,j,bi,bj)
924 ENDDO
925 ENDDO
926 call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),avisdf,nchp,nchpland,
927 & fracg,tmpij,im,jm)
928 DO I=1,IM
929 DO J=1,JM
930 albvf(i,j,bi,bj) = tmpij(i,j)
931 ENDDO
932 ENDDO
933 DO I=1,IM
934 DO J=1,JM
935 tmpij(i,j) = albnr(i,j,bi,bj)
936 ENDDO
937 ENDDO
938 call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),anirdr,nchp,nchpland,
939 & fracg,tmpij,im,jm)
940 DO I=1,IM
941 DO J=1,JM
942 albnr(i,j,bi,bj) = tmpij(i,j)
943 ENDDO
944 ENDDO
945 DO I=1,IM
946 DO J=1,JM
947 tmpij(i,j) = albnf(i,j,bi,bj)
948 ENDDO
949 ENDDO
950 call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),anirdf,nchp,nchpland,
951 & fracg,tmpij,im,jm)
952 DO I=1,IM
953 DO J=1,JM
954 albnf(i,j,bi,bj) = tmpij(i,j)
955 ENDDO
956 ENDDO
957
958 return
959 end
960
961 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
962
963 SUBROUTINE GETEMISS(fracg,im,jm,nchp,nchptot,nSx,nSy,bi,bj,
964 & igrd,ityp,chfr,snowdep,fraci,emiss)
965 C***********************************************************************
966 C PURPOSE
967 C To act as an interface to routine to emissivity, which calculates
968 C ten bands of surface emissivities for use by the longwave radiation
969 C
970 C INPUT:
971 C fracg - real array in grid space of total land fraction [im,jm]
972 C im - model grid longitude dimension
973 C jm - model grid latitude dimension (number of lat. points)
974 C nchp - integer actual number of tiles in tile space
975 C nSx - number of processors in x-direction
976 C nSy - number of processors in y-direction
977 C bi - processors index in x-direction
978 C bj - processors index in y-direction
979 C igrd - integer array in tile space of grid point number for each
980 C tile [nchp]
981 C ityp - integer array in tile space of land surface type for each
982 C tile [nchp]
983 C chfr - real array in tile space of land surface type fraction for
984 C each tile [nchp]
985 C snowdep - real array in tile space of snow depth (liquid water equiv)
986 C in mm [nchp]
987 C fraci - real array in tile space of sea ice fraction [nchp]
988 C
989 C OUTPUT:
990 C emiss - real array [im,jm,10,nSx,nSy] - surface emissivity (frac)
991 C
992 C***********************************************************************
993 IMPLICIT NONE
994 INTEGER im,jm,nchp,nchptot,nSx,nSy,bi,bj
995 _RL fracg(im,jm)
996 _RL chfr(nchp,nSx,nSy)
997 INTEGER igrd(nchp,nSx,nSy), ityp(nchp,nSx,nSy)
998 _RL snowdep(nchp,nSx,nSy)
999 _RL fraci(nchp)
1000 _RL emiss(im,jm,10,nSx,nSy)
1001
1002 _RL emisstile(nchp,10)
1003 _RL tmpij(im,jm)
1004 INTEGER i,j,k,n
1005
1006 do i = 1,10
1007 do n = 1,nchptot
1008 emisstile(n,i) = 1.
1009 enddo
1010 enddo
1011
1012 C call emissivity to get values in tile space
1013 C -------------------------------------------
1014 call emissivity(snowdep(1,bi,bj),fraci,nchp,nchptot,ityp(1,bi,bj),
1015 & emisstile)
1016
1017 C transform back to grid space for emissivities
1018 C ---------------------------------------------
1019 do k = 1,10
1020 do j = 1,jm
1021 do i = 1,im
1022 tmpij(i,j) = 0.0
1023 enddo
1024 enddo
1025 call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),emisstile(1,k),nchp,
1026 & nchptot,fracg,tmpij,im,jm)
1027 do j = 1,jm
1028 do i = 1,im
1029 emiss(i,j,k,bi,bj) = tmpij(i,j)
1030 enddo
1031 enddo
1032 enddo
1033
1034 return
1035 end
1036
1037 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
1038
1039 SUBROUTINE EMISSIVITY (snowdepth,fraci,nchp,numpts,ityp,newemis)
1040 IMPLICIT NONE
1041 INTEGER nchp,numpts
1042 INTEGER ityp(nchp)
1043 _RL snowdepth(nchp)
1044 _RL fraci(nchp)
1045 _RL newemis(nchp,10)
1046
1047 _RL emis(12,11)
1048 _RL fac
1049 INTEGER i,j
1050
1051 C-----------------------------------------------------------------------
1052 C NOTE: Emissivities were obtained for the following surface types:
1053 C ( 1) evergreen needleleaf = conifer
1054 C ( 2) evergreen broadleaf = conifer
1055 C ( 3) deciduous needleleaf = deciduous
1056 C ( 4) deciduous broadleaf = deciduous
1057 C ( 5) mixed forests = 1/2 conifer + 1/2 deciduous = tree
1058 C ( 6) closed shrublands = 3/4 tree + 1/4 quartz
1059 C ( 7) open shrubland = 1/4 tree + 3/4 quartz
1060 C ( 8) woody savannas = grass
1061 C ( 9) savannas = grass
1062 C (10) grasslands = grass
1063 C (11) permanent wetlands = 1/2 grass + 1/2 water
1064 C (12) croplands = grass
1065 C (13) urban = black body
1066 C (14) mosaic = 1/2 grass + 1/2 mixed forest
1067 C (15) snow/ice
1068 C (16) barren/sparsely vegetated = desert(quartz)
1069 C (17) water
1070 C (18) tundra = frost
1071 C
1072 C NOTE: Translation to Koster-Suarez surface types was as follows:
1073 C ( 1) broadleaf evergreen FROM above type 1 (conifer)
1074 C ( 2) broadleaf deciduous FROM above type 2 (deciduous)
1075 C ( 3) needleleaf evergreen FROM above type 1 (conifer)
1076 C ( 4) groundcover FROM above type 10 (grass)
1077 C ( 5) broadleaf shrubs FROM above type 6 (closed shrublands)
1078 C ( 6) dwarf trees (tundra) FROM above type 18 (tundra)
1079 C ( 7) bare soil FROM above type 16 (desert)
1080 C ( 8) light desert FROM above type 16 (desert)
1081 C ( 9) glacier FROM above type 15 (snow/ice)
1082 C ( 10) dark desert FROM above type 16 (desert)
1083 C (100) ocean FROM above type 17 (water)
1084 C
1085 C NOTE: snow-covered ground uses interpolated emissivities based on snow depth
1086 C =============================================================================
1087 C -----------------------------------------------------------------------------
1088 C Emmissivities for 12 bands in Fu/Liou
1089 C band 1: 4.5 - 5.3 um
1090 C band 2: 5.3 - 5.9 um
1091 C band 3: 5.9 - 7.1 um
1092 C band 4: 7.1 - 8.0 um
1093 C band 5: 8.0 - 9.1 um
1094 C band 6: 9.1 - 10.2 um
1095 C band 7: 10.2 - 12.5 um
1096 C band 8: 12.5 - 14.9 um
1097 C band 9: 14.9 - 18.5 um
1098 C band 10: 18.5 - 25.0 um
1099 C band 11: 25.0 - 35.7 um
1100 C band 12: 35.7 - oo um
1101 C
1102 C-------------------------------------------------------------------------
1103 DATA ((emis(i,j),i=1,12),j=1,11) /
1104 C evergreen needleleaf
1105 & 0.9891, 0.9892, 0.9900, 0.9914, 0.9908, 0.9903,
1106 & 0.9898, 0.9948, 1.0000, 1.0000, 1.0000, 1.0000,
1107 C deciduous needleleaf
1108 & 0.9849, 0.9856, 0.9841, 0.9831, 0.9789, 0.9805,
1109 & 0.9733, 0.9869, 1.0000, 1.0000, 1.0000, 1.0000,
1110 C evergreen needleleaf
1111 & 0.9891, 0.9892, 0.9900, 0.9914, 0.9908, 0.9903,
1112 & 0.9898, 0.9948, 1.0000, 1.0000, 1.0000, 1.0000,
1113 C grasslands
1114 & 0.9867, 0.9897, 0.9920, 0.9933, 0.9830, 0.9752,
1115 & 0.9853, 0.9928, 1.0000, 1.0000, 1.0000, 1.0000,
1116 C closed shrublands
1117 & 0.9490, 0.9697, 0.9738, 0.9712, 0.9474, 0.9582,
1118 & 0.9663, 0.9747, 0.9836, 0.9836, 0.9836, 0.9836,
1119 C tundra
1120 & 0.9469, 0.9670, 0.9883, 0.9795, 0.9751, 0.9767,
1121 & 0.9920, 0.9888, 0.9888, 0.9888, 0.9888, 0.9888,
1122 C barren
1123 & 0.8353, 0.9163, 0.9342, 0.9229, 0.8354, 0.8766,
1124 & 0.9210, 0.9262, 0.9345, 0.9345, 0.9345, 0.9345,
1125 C barren
1126 & 0.8353, 0.9163, 0.9342, 0.9229, 0.8354, 0.8766,
1127 & 0.9210, 0.9262, 0.9345, 0.9345, 0.9345, 0.9345,
1128 C snow/ice
1129 & 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9999,
1130 & 0.9997, 0.9994, 0.9995, 0.9995, 0.9995, 0.9995,
1131 C barren
1132 & 0.8353, 0.9163, 0.9342, 0.9229, 0.8354, 0.8766,
1133 & 0.9210, 0.9262, 0.9345, 0.9345, 0.9345, 0.9345,
1134 C water
1135 & 0.9788, 0.9833, 0.9819, 0.9820, 0.9835, 0.9865,
1136 & 0.9886, 0.9719, 0.9719, 0.9719, 0.9719, 0.9719/
1137
1138 #include "snwmid.h"
1139
1140 C Convert to the 10 bands needed by Chou Radiation
1141 C ------------------------------------------------
1142 do i=1,numpts
1143
1144 C land points
1145 C------------
1146 if(ityp(i).le.10)then
1147 newemis(i, 1) = (emis( 1,ityp(i))+emis(2,ityp(i)))/2.
1148 newemis(i, 2) = (emis( 2,ityp(i))+emis(3,ityp(i)))/2.
1149 newemis(i, 3) = (emis( 4,ityp(i))+emis(5,ityp(i)))/2.
1150 newemis(i, 4) = emis( 6,ityp(i))
1151 newemis(i, 5) = emis( 7,ityp(i))
1152 newemis(i, 6) = emis( 8,ityp(i))
1153 newemis(i, 7) = emis( 9,ityp(i))
1154 newemis(i, 8) = (emis(10,ityp(i))+emis(11,ityp(i)))/2.
1155 newemis(i, 9) = emis(12,ityp(i))
1156 newemis(i,10) = emis( 4,ityp(i))
1157
1158 C modify emissivity for snow based on snow depth (like albedo)
1159 C-------------------------------------------------------------
1160 if(snowdepth (i).gt.0.) then
1161 fac = snowdepth(i) / (snowdepth(i) + snwmid(ityp(i)))
1162 newemis(i, 1) = newemis(i, 1) + (((emis( 1,9)+emis( 2,9))/2.)
1163 & - newemis(i, 1)) * fac
1164 newemis(i, 2) = newemis(i, 2) + (((emis( 2,9)+emis( 3,9))/2.)
1165 & - newemis(i, 2)) * fac
1166 newemis(i, 3) = newemis(i, 3) + (((emis( 4,9)+emis( 5,9))/2.)
1167 & - newemis(i, 3)) * fac
1168 newemis(i, 4) = newemis(i, 4) + (emis( 6,9)
1169 & - newemis(i, 4)) * fac
1170 newemis(i, 5) = newemis(i, 5) + (emis( 7,9)
1171 & - newemis(i, 5)) * fac
1172 newemis(i, 6) = newemis(i, 6) + (emis( 8,9)
1173 & - newemis(i, 6)) * fac
1174 newemis(i, 7) = newemis(i, 7) + (emis( 9,9)
1175 & - newemis(i, 7)) * fac
1176 newemis(i, 8) = newemis(i, 8) + (((emis(10,9)+emis(11,9))/2.)
1177 & - newemis(i, 8)) * fac
1178 newemis(i, 9) = newemis(i, 9) + (emis(12,9)
1179 & - newemis(i, 9)) * fac
1180 newemis(i,10) = newemis(i,10) + (emis( 4,9)
1181 & - newemis(i,10)) * fac
1182 endif
1183
1184 C open water
1185 C-----------
1186 else
1187 if(fraci(i).eq.0.)then
1188 newemis(i, 1) = (emis( 1,11)+emis(2,11))/2.
1189 newemis(i, 2) = (emis( 2,11)+emis(3,11))/2.
1190 newemis(i, 3) = (emis( 4,11)+emis(5,11))/2.
1191 newemis(i, 4) = emis( 6,11)
1192 newemis(i, 5) = emis( 7,11)
1193 newemis(i, 6) = emis( 8,11)
1194 newemis(i, 7) = emis( 9,11)
1195 newemis(i, 8) = (emis(10,11)+emis(11,11))/2.
1196 newemis(i, 9) = emis(12,11)
1197 newemis(i,10) = emis( 4,11)
1198
1199 C sea ice (like glacier and snow)
1200 C--------------------------------
1201 else
1202 newemis(i, 1) = (emis( 1,9)+emis(2,9))/2.
1203 newemis(i, 2) = (emis( 2,9)+emis(3,9))/2.
1204 newemis(i, 3) = (emis( 4,9)+emis(5,9))/2.
1205 newemis(i, 4) = emis( 6,9)
1206 newemis(i, 5) = emis( 7,9)
1207 newemis(i, 6) = emis( 8,9)
1208 newemis(i, 7) = emis( 9,9)
1209 newemis(i, 8) = (emis(10,9)+emis(11,9))/2.
1210 newemis(i, 9) = emis(12,9)
1211 newemis(i,10) = emis( 4,9)
1212 endif
1213 endif
1214 enddo
1215
1216 return
1217 end
1218
1219 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
1220
1221 SUBROUTINE GET_LANDFRAC(im,jm,nSx,nSy,bi,bj,maxtyp,surftype,
1222 & tilefrac,frac)
1223 C***********************************************************************
1224 C Purpose
1225 C To compute the total fraction of land within a model grid-box
1226 C
1227 C***********************************************************************
1228 IMPLICIT NONE
1229
1230 INTEGER im,jm,nSx,nSy,bi,bj,maxtyp
1231 INTEGER surftype(im,jm,maxtyp,nSx,nSy)
1232 _RL tilefrac(im,jm,maxtyp,nSx,nSy)
1233 _RL frac(im,jm)
1234
1235 INTEGER i,j,k
1236
1237 do j=1,jm
1238 do i=1,im
1239 frac(i,j) = 0.0
1240 enddo
1241 enddo
1242
1243 do k=1,maxtyp
1244 do j=1,jm
1245 do i=1,im
1246 if( (surftype(i,j,k,bi,bj).lt.100.).and.
1247 & (tilefrac(i,j,k,bi,bj).gt.0.0))then
1248 frac(i,j) = frac(i,j) + tilefrac(i,j,k,bi,bj)
1249 endif
1250 enddo
1251 enddo
1252 enddo
1253
1254 return
1255 end

  ViewVC Help
Powered by ViewVC 1.1.22