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

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

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


Revision 1.9 - (hide annotations) (download)
Thu Jun 10 21:50:33 2004 UTC (20 years ago) by molod
Branch: MAIN
CVS Tags: checkpoint53d_post
Changes since 1.8: +59 -33 lines
Developing

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

  ViewVC Help
Powered by ViewVC 1.1.22