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

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

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


Revision 1.36 - (hide annotations) (download)
Thu Aug 12 15:21:22 2004 UTC (19 years, 9 months ago) by molod
Branch: MAIN
Changes since 1.35: +7 -6 lines
Debugging - Code for work-around for input vegetation dataset

1 molod 1.36 C $Header: /u/gcmpack/MITgcm/pkg/fizhi/do_fizhi.F,v 1.35 2004/08/05 17:06:40 molod Exp $
2 edhill 1.2 C $Name: $
3 molod 1.24 #include "FIZHI_OPTIONS.h"
4 molod 1.26 subroutine do_fizhi(myid,
5     . idim1,idim2,jdim1,jdim2,Nrphin,Nsxin,Nsyin,im1,im2,jm1,jm2,bi,bj,
6     . nchp,nchptot,nchpland,
7     . uphy,vphy,thphy,sphy,pephy,lons,lats,
8 molod 1.22 . ctmt,xxmt,yymt,zetamt,xlmt,khmt,tke,
9 molod 1.26 . tgz,sst,sice,phis_var,landtype,fracland,emiss,albnirdr,albnirdf,
10 molod 1.22 . albvisdr,albvisdf,ityp,chfr,alai,agrn,igrd,chlat,chlon,
11     . tcanopy,tdeep,ecanopy,swetshal,swetroot,swetdeep,snodep,capac,
12     . o3,qstr,co2,cfc11,cfc12,cfc22,n2o,methane,
13     . duphy,dvphy,dthphy,dsphy)
14 molod 1.1 c-----------------------------------------------------------------------
15 molod 1.9 c Interface routine to calculate physics increments - calls fizhi_driver.
16     c Purpose of this routine is to set up arrays local to fizhi and 'save'
17     c them from one iteration to the next, and act as interface between the
18     c model common blocks (held in fizhi_wrapper) and fizhi_driver.
19     c Copies of variables that are 'shadowed' are made here without shadows
20     c for passing to fizhi_driver.
21     c Note: routine is called from inside a bi-bj loop
22 molod 1.1 c
23     c-----------------------------------------------------------------------
24 molod 1.5 implicit none
25 molod 1.22 #include "SIZE.h"
26     #include "fizhi_SIZE.h"
27 molod 1.19 #include "chronos.h"
28 molod 1.1
29 molod 1.10 C Argument list declarations
30     integer myid,im1,im2,jm1,jm2,idim1,idim2,jdim1,jdim2
31 molod 1.36 integer Nrphin,Nsxin,Nsyin,bi,bj,nchp
32     integer nchptot(Nsxin,Nsyin),nchpland(Nsxin,Nsyin)
33 molod 1.22 _RL uphy(idim1:idim2,jdim1:jdim2,Nrphin,Nsxin,Nsyin)
34     _RL vphy(idim1:idim2,jdim1:jdim2,Nrphin,Nsxin,Nsyin)
35     _RL thphy(idim1:idim2,jdim1:jdim2,Nrphin,Nsxin,Nsyin)
36     _RL sphy(idim1:idim2,jdim1:jdim2,Nrphin,Nsxin,Nsyin)
37     _RL pephy(idim1:idim2,jdim1:jdim2,Nrphin+1,Nsxin,Nsyin)
38 molod 1.26 _RS lons(idim1:idim2,jdim1:jdim2,Nsxin,Nsyin)
39     _RS lats(idim1:idim2,jdim1:jdim2,Nsxin,Nsyin)
40 molod 1.22 _RL ctmt(nchp,Nsxin,Nsyin),xxmt(nchp,Nsxin,Nsyin)
41     _RL yymt(nchp,Nsxin,Nsyin)
42     _RL zetamt(nchp,Nsxin,Nsyin)
43     _RL xlmt(nchp,Nrphin,Nsxin,Nsyin),khmt(nchp,Nrphin,Nsxin,Nsyin)
44     _RL tke(nchp,Nrphin,Nsxin,Nsyin)
45     _RL tgz(im2,jm2,Nsxin,Nsyin)
46 molod 1.26 _RL sst(idim1:idim2,jdim1:jdim2,Nsxin,Nsyin)
47 molod 1.22 _RL sice(idim1:idim2,jdim1:jdim2,Nsxin,Nsyin)
48 molod 1.26 _RL phis_var(im2,jm2,Nsxin,Nsyin)
49     integer landtype(im2,jm2,Nsxin,Nsyin)
50 molod 1.22 _RL fracland(im2,jm2,Nsxin,Nsyin),emiss(im2,jm2,10,Nsxin,Nsyin)
51     _RL albvisdr(im2,jm2,Nsxin,Nsyin),albvisdf(im2,jm2,Nsxin,Nsyin)
52     _RL albnirdr(im2,jm2,Nsxin,Nsyin),albnirdf(im2,jm2,Nsxin,Nsyin)
53     _RL chfr(nchp,Nsxin,Nsyin),alai(nchp,Nsxin,Nsyin)
54     _RL agrn(nchp,Nsxin,Nsyin)
55     integer ityp(nchp,Nsxin,Nsyin),igrd(nchp,Nsxin,Nsyin)
56     _RL chlat(nchp,Nsxin,Nsyin),chlon(nchp,Nsxin,Nsyin)
57     _RL tcanopy(nchp,Nsxin,Nsyin),tdeep(nchp,Nsxin,Nsyin)
58     _RL ecanopy(nchp,Nsxin,Nsyin),swetshal(nchp,Nsxin,Nsyin)
59     _RL swetroot(nchp,Nsxin,Nsyin),swetdeep(nchp,Nsxin,Nsyin)
60     _RL snodep(nchp,Nsxin,Nsyin),capac(nchp,Nsxin,Nsyin)
61 molod 1.26 _RL o3(im2,jm2,Nrphin,Nsxin,Nsyin)
62     _RL qstr(im2,jm2,Nrphin,Nsxin,Nsyin)
63 molod 1.22 _RL co2,cfc11,cfc12,cfc22,n2o(Nrphin),methane(Nrphin)
64     _RL duphy(idim1:idim2,jdim1:jdim2,Nrphin,Nsxin,Nsyin)
65     _RL dvphy(idim1:idim2,jdim1:jdim2,Nrphin,Nsxin,Nsyin)
66     _RL dthphy(idim1:idim2,jdim1:jdim2,Nrphin,Nsxin,Nsyin)
67     _RL dsphy(idim1:idim2,jdim1:jdim2,Nrphin,Nsxin,Nsyin)
68    
69     c Local Variables
70 molod 1.10 integer ptracer,ntracer
71 molod 1.19 parameter (ptracer = 1)
72     parameter (ntracer = 1)
73 molod 1.10 integer iras,nlwcld,nlwlz,nswcld,nswlz
74     integer imstturbsw,imstturblw
75    
76 molod 1.24 _RL xlats(sNx,sNy),xlons(sNx,sNy),sea_ice(sNx,sNy)
77     _RL p(sNx,sNy,Nsx,Nsy)
78     _RL u(sNx,sNy,Nrphys),v(sNx,sNy,Nrphys),t(sNx,sNy,Nrphys)
79     _RL q(sNx,sNy,Nrphys,ntracer)
80     _RL pl(sNx,sNy,Nrphys,Nsx,Nsy),pkl(sNx,sNy,Nrphys,Nsx,Nsy)
81     _RL ple(sNx,sNy,Nrphys+1,Nsx,Nsy)
82     _RL pkle(sNx,sNy,Nrphys+1,Nsx,Nsy)
83     _RL dpres(sNx,sNy,Nrphys,Nsx,Nsy)
84     _RL lwdt(sNx,sNy,Nrphys,Nsx,Nsy)
85     _RL lwdtclr(sNx,sNy,Nrphys,Nsx,Nsy)
86     _RL swdt(sNx,sNy,Nrphys,Nsx,Nsy)
87     _RL swdtclr(sNx,sNy,Nrphys,Nsx,Nsy)
88     _RL turbu(sNx,sNy,Nrphys,Nsx,Nsy)
89     _RL turbv(sNx,sNy,Nrphys,Nsx,Nsy)
90     _RL turbt(sNx,sNy,Nrphys,Nsx,Nsy)
91     _RL turbq(sNx,sNy,Nrphys,ntracer,Nsx,Nsy)
92     _RL moistu(sNx,sNy,Nrphys,Nsx,Nsy)
93     _RL moistv(sNx,sNy,Nrphys,Nsx,Nsy)
94     _RL moistt(sNx,sNy,Nrphys,Nsx,Nsy)
95     _RL moistq(sNx,sNy,Nrphys,ntracer,Nsx,Nsy)
96     _RL radswt(sNx,sNy,Nsx,Nsy),radswg(sNx,sNy,Nsx,Nsy)
97     _RL swgclr(sNx,sNy,Nsx,Nsy)
98     _RL fdirpar(sNx,sNy,Nsx,Nsy),fdifpar(sNx,sNy,Nsx,Nsy)
99     _RL osr(sNx,sNy,Nsx,Nsy),osrclr(sNx,sNy,Nsx,Nsy)
100     _RL tg0(sNx,sNy,Nsx,Nsy),radlwg(sNx,sNy,Nsx,Nsy)
101     _RL lwgclr(sNx,sNy,Nsx,Nsy),st4(sNx,sNy,Nsx,Nsy)
102     _RL dst4(sNx,sNy,Nsx,Nsy),dlwdtg(sNx,sNy,Nrphys,Nsx,Nsy)
103     _RL rainlsp(sNx,sNy,Nsx,Nsy),raincon(sNx,sNy,Nsx,Nsy)
104     _RL snowfall(sNx,sNy,Nsx,Nsy)
105     _RL cldtot_lw(sNx,sNy,Nrphys,Nsx,Nsy)
106 molod 1.27 _RL cldras_lw(sNx,sNy,Nrphys,Nsx,Nsy)
107 molod 1.24 _RL cldlsp_lw(sNx,sNy,Nrphys,Nsx,Nsy)
108     _RL lwlz(sNx,sNy,Nrphys,Nsx,Nsy)
109     _RL cldtot_sw(sNx,sNy,Nrphys,Nsx,Nsy)
110 molod 1.27 _RL cldras_sw(sNx,sNy,Nrphys,Nsx,Nsy)
111 molod 1.24 _RL cldlsp_sw(sNx,sNy,Nrphys,Nsx,Nsy)
112     _RL swlz(sNx,sNy,Nrphys,Nsx,Nsy)
113     _RL qliqavesw(sNx,sNy,Nrphys,Nsx,Nsy)
114     _RL qliqavelw(sNx,sNy,Nrphys,Nsx,Nsy)
115     _RL fccavesw(sNx,sNy,Nrphys,Nsx,Nsy)
116     _RL fccavelw(sNx,sNy,Nrphys,Nsx,Nsy)
117     _RL qq(sNx,sNy,Nrphys,Nsx,Nsy)
118 molod 1.10
119 molod 1.5 integer i,j,L
120 molod 1.24 _RL getcon, kappa, p0kappa, s0, ra
121     _RL cosz(sNx,sNy)
122 molod 1.11
123 molod 1.29 _RL tempij(sNx,sNy)
124    
125 molod 1.13 logical alarm
126     external alarm
127    
128 molod 1.31 c save lwdt,lwdtclr,swdt,swdtclr,turbu,turbv,turbt,turbq
129     c save moistu,moistv,moistt,moistq
130     c save radswg,swgclr,fdirpar,fdifpar,osr,osrclr,tg0,radlwg
131     c save st4,dst4,dlwdtg,rainlsp,raincon,snowfall,iras
132     c save nlwcld,cldtot_lw,cldras_lw,cldlsp_lw,nlwlz,lwlz
133     c save nswcld,cldtot_sw,cldras_sw,cldlsp_sw,nswlz,swlz
134     c save imstturbsw,imstturblw,qliqavesw,qliqavelw,fccavesw,fccavelw
135     c save qq
136     c save pl,ple,dpres,pkle,pkl
137    
138     common /saver/ lwdt,lwdtclr,swdt,swdtclr,turbu,turbv,turbt,turbq
139     common /saver/ moistu,moistv,moistt,moistq
140     common /saver/ radswg,swgclr,fdirpar,fdifpar,osr,osrclr,tg0,radlwg
141     common /saver/ st4,dst4,dlwdtg,rainlsp,raincon,snowfall,iras
142 molod 1.34 common /saver/ cldtot_lw,cldras_lw,cldlsp_lw,lwlz
143     common /saver/ cldtot_sw,cldras_sw,cldlsp_sw,swlz
144 molod 1.31 common /saver/ imstturbsw,imstturblw,qliqavesw,qliqavelw,fccavesw
145     common /saver/ fccavelw
146     common /saver/ qq
147     common /saver/ pl,ple,dpres,pkle,pkl
148 molod 1.34 common /saver/ nlwcld,nlwlz
149     common /saver/ nswcld,nswlz
150 molod 1.31
151 molod 1.11 C***********************************************************************
152     C Unshadow input arrays (and make 'fizhi theta' from true theta)
153     C***********************************************************************
154    
155 molod 1.25 if( (nhms.eq.nhms0) .and. (nymd.eq.nymd0) ) then
156 molod 1.30 _BEGIN_MASTER(myid)
157 molod 1.28 if(myid.eq.1) print *,' Initializing fizhi arrays '
158 molod 1.30 _END_MASTER(myid)
159 molod 1.25 imstturblw = 0
160     imstturbsw = 0
161     iras = 0
162     nlwcld = 0
163     nlwlz = 0
164     nswcld = 0
165     nswlz = 0
166 molod 1.27 do L = 1,Nrphys
167     do j = jm1,jm2
168     do i = im1,im2
169     swlz(i,j,L,bi,bj) = 0.
170     lwlz(i,j,L,bi,bj) = 0.
171     qliqavesw(i,j,L,bi,bj) = 0.
172     qliqavelw(i,j,L,bi,bj) = 0.
173     fccavesw(i,j,L,bi,bj) = 0.
174     fccavelw(i,j,L,bi,bj) = 0.
175     cldtot_sw(i,j,L,bi,bj) = 0.
176     cldras_sw(i,j,L,bi,bj) = 0.
177     cldlsp_sw(i,j,L,bi,bj) = 0.
178     cldtot_lw(i,j,L,bi,bj) = 0.
179     cldras_lw(i,j,L,bi,bj) = 0.
180     cldlsp_lw(i,j,L,bi,bj) = 0.
181 molod 1.28 lwdt(i,j,L,bi,bj) = 0.
182     swdt(i,j,L,bi,bj) = 0.
183     turbt(i,j,L,bi,bj) = 0.
184     moistt(i,j,L,bi,bj) = 0.
185     turbq(i,j,L,1,bi,bj) = 0.
186     moistq(i,j,L,1,bi,bj) = 0.
187     turbu(i,j,L,bi,bj) = 0.
188     moistu(i,j,L,bi,bj) = 0.
189     turbv(i,j,L,bi,bj) = 0.
190     moistv(i,j,L,bi,bj) = 0.
191 molod 1.27 enddo
192 molod 1.28 enddo
193     enddo
194     do j = jm1,jm2
195     do i = im1,im2
196     rainlsp(i,j,bi,bj) = 0.
197     raincon(i,j,bi,bj) = 0.
198     snowfall(i,j,bi,bj) = 0.
199 molod 1.27 enddo
200     enddo
201 molod 1.25 endif
202    
203 molod 1.11 kappa = getcon('KAPPA')
204     p0kappa = 1000.0 ** kappa
205 molod 1.12 S0 = getcon('S0')
206 molod 1.11
207 molod 1.26 do j = jm1,jm2
208     do i = im1,im2
209     xlats(i,j) = lats(i,j,bi,bj)
210     xlons(i,j) = lons(i,j,bi,bj)
211     enddo
212     enddo
213    
214 molod 1.13 call astro ( nymd,nhms, xlats,xlons, im2*jm2, cosz,ra )
215     do j=jm1,jm2
216     do i=im1,im2
217 molod 1.19 radswt(i,j,bi,bj) = S0*(1.0/ra**2)*cosz(i,j)
218 molod 1.11 enddo
219     enddo
220 molod 1.13
221     if( alarm('moist') .or. alarm('turb') .or.
222     . alarm('radsw') .or. alarm('radlw') ) then
223    
224 molod 1.18 C compute pressures - all pressure are converted here to hPa
225 molod 1.11 do j = jm1,jm2
226     do i = im1,im2
227 molod 1.18 ple(i,j,Nrphys+1,bi,bj) = pephy(i,j,Nrphys+1,bi,bj)/100.
228     pkle(i,j,Nrphys+1,bi,bj)=(pephy(i,j,Nrphys+1,bi,bj)/100.) **kappa
229     p(i,j,bi,bj) = pephy(i,j,Nrphys+1,bi,bj)/100.
230 molod 1.11 sea_ice(i,j) = sice(i,j,bi,bj)
231     enddo
232     enddo
233 molod 1.13 do L = 1,Nrphys
234     do j = jm1,jm2
235     do i = im1,im2
236     u(i,j,L) = uphy(i,j,L,bi,bj)
237     v(i,j,L) = vphy(i,j,L,bi,bj)
238     t(i,j,L) = thphy(i,j,L,bi,bj)/p0kappa
239     q(i,j,L,1) = sphy(i,j,L,bi,bj)
240 molod 1.19 pl(i,j,L,bi,bj) = (pephy(i,j,L,bi,bj)+pephy(i,j,L+1,bi,bj))/200.
241     dpres(i,j,L,bi,bj)=(pephy(i,j,L+1,bi,bj)-pephy(i,j,L,bi,bj))/100.
242 molod 1.18 ple(i,j,L,bi,bj) = pephy(i,j,L,bi,bj)/100.
243 molod 1.30 if (ple(i,j,L,bi,bj).gt.0.) then
244     pkle(i,j,L,bi,bj) = ple(i,j,L,bi,bj) **kappa
245     else
246     pkle(i,j,L,bi,bj) = 0.
247     endif
248 molod 1.13 enddo
249 molod 1.12 enddo
250     enddo
251    
252 molod 1.27 call pkappa (im2,jm2,Nrphys,ple(1,1,1,bi,bj),pkle(1,1,1,bi,bj),
253 molod 1.16 . pkl(1,1,1,bi,bj))
254 molod 1.1
255 molod 1.35 if(2.eq.1 )then
256 molod 1.30 print *,' In do fizhi, before fizhi driver - bi = ',bi
257     do L = 1,Nrphys+1
258     do j = jm1,jm2
259     do i = im1,im2
260     tempij(i,j) = pephy(i,j,L,bi,bj)
261     enddo
262     enddo
263 molod 1.33 c print *,' pephy at level ',l,' ',tempij
264 molod 1.30 enddo
265     do L = 1,Nrphys
266     do j = jm1,jm2
267     do i = im1,im2
268     tempij(i,j) = u(i,j,L)
269     enddo
270     enddo
271 molod 1.33 c print *,' u at level ',l,' ',tempij
272 molod 1.30 enddo
273     do L = 1,Nrphys
274     do j = jm1,jm2
275     do i = im1,im2
276     tempij(i,j) = v(i,j,L)
277     enddo
278     enddo
279 molod 1.33 c print *,' v at level ',l,' ',tempij
280 molod 1.30 enddo
281     do L = 1,Nrphys
282     do j = jm1,jm2
283     do i = im1,im2
284     tempij(i,j) = t(i,j,L)
285     enddo
286     enddo
287     print *,' t at level ',l,' ',tempij
288     enddo
289     do L = 1,Nrphys
290     do j = jm1,jm2
291     do i = im1,im2
292     tempij(i,j) = q(i,j,L,1)
293     enddo
294     enddo
295 molod 1.35 print *,' q at level ',l,' ',tempij
296     enddo
297     do L = 1,Nrphys
298     do j = jm1,jm2
299     do i = im1,im2
300     tempij(i,j) = qstr(i,j,L,bi,bj)
301     enddo
302     enddo
303     print *,' radiation q at level ',l,' ',tempij
304 molod 1.30 enddo
305     do L = 1,Nrphys
306     do j = jm1,jm2
307     do i = im1,im2
308     tempij(i,j) = pl(i,j,L,bi,bj)
309     enddo
310     enddo
311 molod 1.33 c print *,' pl at level ',l,' ',tempij
312 molod 1.30 enddo
313     do L = 1,Nrphys+1
314     do j = jm1,jm2
315     do i = im1,im2
316     tempij(i,j) = ple(i,j,L,bi,bj)
317     enddo
318     enddo
319 molod 1.33 c print *,' ple at level ',l,' ',tempij
320 molod 1.30 enddo
321     do L = 1,Nrphys
322     do j = jm1,jm2
323     do i = im1,im2
324     tempij(i,j) = pkl(i,j,L,bi,bj)
325     enddo
326     enddo
327 molod 1.33 c print *,' pkl at level ',l,' ',tempij
328 molod 1.30 enddo
329     do L = 1,Nrphys+1
330     do j = jm1,jm2
331     do i = im1,im2
332     tempij(i,j) = pkle(i,j,L,bi,bj)
333     enddo
334     enddo
335 molod 1.33 c print *,' pkle at level ',l,' ',tempij
336 molod 1.30 enddo
337     do L = 1,Nrphys
338     do j = jm1,jm2
339     do i = im1,im2
340     tempij(i,j) = dpres(i,j,L,bi,bj)
341     enddo
342     enddo
343 molod 1.33 c print *,' dpres at level ',l,' ',tempij
344 molod 1.30 enddo
345     do j = jm1,jm2
346     do i = im1,im2
347     tempij(i,j) = tgz(i,j,bi,bj)
348     enddo
349     enddo
350 molod 1.33 c print *,' tgz ',tempij
351 molod 1.30
352     print *,' Just before fizhi driver call '
353    
354     endif
355    
356    
357    
358 molod 1.17 call fizhi_driver(myid,im2,jm2,Nrphys,bi,bj,ptracer,ntracer,xlats,
359     . xlons,p(1,1,bi,bj),u,v,t,q,pl(1,1,1,bi,bj),ple(1,1,1,bi,bj),
360 molod 1.16 . dpres(1,1,1,bi,bj),pkle(1,1,1,bi,bj),pkl(1,1,1,bi,bj),
361 molod 1.19 . fracland(1,1,bi,bj),landtype(1,1,bi,bj),radswt(1,1,bi,bj),
362     . phis_var(1,1,bi,bj),tgz(1,1,bi,bj),sea_ice,nchp,chlat(1,bi,bj),
363 molod 1.36 . chlon(1,bi,bj),igrd(1,bi,bj),nchptot(bi,bj),nchpland(bi,bj),
364     . chfr(1,bi,bj),ityp(1,bi,bj),tcanopy(1,bi,bj),tdeep(1,bi,bj),
365     . ecanopy(1,bi,bj),swetshal(1,bi,bj),swetroot(1,bi,bj),
366     . swetdeep(1,bi,bj),capac(1,bi,bj),snodep(1,bi,bj),
367 molod 1.12 . ctmt(1,bi,bj),xxmt(1,bi,bj),yymt(1,bi,bj),zetamt(1,bi,bj),
368     . xlmt(1,1,bi,bj),khmt(1,1,bi,bj),tke(1,1,bi,bj),
369 molod 1.19 . albvisdr(1,1,bi,bj),albvisdf(1,1,bi,bj),albnirdr(1,1,bi,bj),
370     . albnirdf(1,1,bi,bj),emiss(1,1,1,bi,bj),alai(1,bi,bj),
371     . agrn(1,bi,bj),
372 molod 1.26 . qstr(1,1,1,bi,bj),o3(1,1,1,bi,bj),
373     . co2,cfc11,cfc12,cfc22,methane,n2o,
374 molod 1.14 . lwdt(1,1,1,bi,bj),lwdtclr(1,1,1,bi,bj),swdt(1,1,1,bi,bj),
375     . swdtclr(1,1,1,bi,bj),turbu(1,1,1,bi,bj),turbv(1,1,1,bi,bj),
376 molod 1.19 . turbt(1,1,1,bi,bj),turbq(1,1,1,1,bi,bj),moistu(1,1,1,bi,bj),
377     . moistv(1,1,1,bi,bj),moistt(1,1,1,bi,bj),moistq(1,1,1,1,bi,bj),
378 molod 1.14 . radswg(1,1,bi,bj),swgclr(1,1,bi,bj),fdirpar(1,1,bi,bj),
379     . fdifpar(1,1,bi,bj),osr(1,1,bi,bj),osrclr(1,1,bi,bj),
380 molod 1.19 . tg0(1,1,bi,bj),radlwg(1,1,bi,bj),lwgclr(1,1,bi,bj),
381 molod 1.14 . st4(1,1,bi,bj),dst4(1,1,bi,bj),dlwdtg(1,1,1,bi,bj),
382     . rainlsp(1,1,bi,bj),raincon(1,1,bi,bj),snowfall(1,1,bi,bj),iras,
383 molod 1.27 . nlwcld,cldtot_lw(1,1,1,bi,bj),cldras_lw(1,1,1,bi,bj),
384 molod 1.14 . cldlsp_lw(1,1,1,bi,bj),nlwlz,lwlz(1,1,1,bi,bj),
385 molod 1.27 . nswcld,cldtot_sw(1,1,1,bi,bj),cldras_sw(1,1,1,bi,bj),
386 molod 1.14 . cldlsp_sw(1,1,1,bi,bj),nswlz,swlz(1,1,1,bi,bj),
387     . imstturbsw,imstturblw,qliqavesw(1,1,1,bi,bj),
388     . qliqavelw(1,1,1,bi,bj),fccavesw(1,1,1,bi,bj),
389     . fccavelw(1,1,1,bi,bj),qq(1,1,1,bi,bj))
390 molod 1.13
391 molod 1.35 if(2.eq.1)then
392 molod 1.30 print *,' In do fizhi, after fizhi driver - bi = ',bi
393 molod 1.29 do L = 1,Nrphys
394     do j = jm1,jm2
395     do i = im1,im2
396     tempij(i,j) = turbu(i,j,L,bi,bj)
397     enddo
398     enddo
399 molod 1.33 c print *,' turbu at level ',l,' ',tempij
400 molod 1.29 enddo
401     do L = 1,Nrphys
402     do j = jm1,jm2
403     do i = im1,im2
404     tempij(i,j) = turbv(i,j,L,bi,bj)
405     enddo
406     enddo
407 molod 1.33 c print *,' turbv at level ',l,' ',tempij
408 molod 1.29 enddo
409     do L = 1,Nrphys
410     do j = jm1,jm2
411     do i = im1,im2
412     tempij(i,j) = turbt(i,j,L,bi,bj)*p0kappa/p(i,j,bi,bj)
413     enddo
414     enddo
415     print *,' turbt at level ',l,' ',tempij
416     enddo
417     do L = 1,Nrphys
418     do j = jm1,jm2
419     do i = im1,im2
420     tempij(i,j) = turbq(i,j,L,1,bi,bj)/p(i,j,bi,bj)
421     enddo
422     enddo
423 molod 1.33 c print *,' turbq at level ',l,' ',tempij
424 molod 1.29 enddo
425     do L = 1,Nrphys
426     do j = jm1,jm2
427     do i = im1,im2
428     tempij(i,j) = moistu(i,j,L,bi,bj)
429     enddo
430     enddo
431 molod 1.33 c print *,' moistu at level ',l,' ',tempij
432 molod 1.29 enddo
433     do L = 1,Nrphys
434     do j = jm1,jm2
435     do i = im1,im2
436     tempij(i,j) = moistv(i,j,L,bi,bj)
437     enddo
438     enddo
439 molod 1.33 c print *,' moistv at level ',l,' ',tempij
440 molod 1.29 enddo
441     do L = 1,Nrphys
442     do j = jm1,jm2
443     do i = im1,im2
444     tempij(i,j) = moistt(i,j,L,bi,bj)*p0kappa/p(i,j,bi,bj)
445     enddo
446     enddo
447     print *,' moistt at level ',l,' ',tempij
448     enddo
449     do L = 1,Nrphys
450     do j = jm1,jm2
451     do i = im1,im2
452     tempij(i,j) = moistq(i,j,L,1,bi,bj)/p(i,j,bi,bj)
453     enddo
454     enddo
455 molod 1.33 c print *,' moistq at level ',l,' ',tempij
456 molod 1.29 enddo
457     do L = 1,Nrphys
458     do j = jm1,jm2
459     do i = im1,im2
460     tempij(i,j) = swdt(i,j,L,bi,bj)*radswt(i,j,bi,bj) *p0kappa /
461     . p(i,j,bi,bj)
462     enddo
463     enddo
464     print *,' swdt at level ',l,' ',tempij
465 molod 1.34 enddo
466     do L = 1,Nrphys
467     do j = jm1,jm2
468     do i = im1,im2
469     tempij(i,j) = lwdt(i,j,L,bi,bj)
470     enddo
471     enddo
472     print *,' lwdt alone at level ',l,' ',tempij
473 molod 1.29 enddo
474     do L = 1,Nrphys
475     do j = jm1,jm2
476     do i = im1,im2
477     tempij(i,j) = (lwdt(i,j,L,bi,bj)+
478     . dlwdtg(i,j,L,bi,bj)*(tgz(i,j,bi,bj)-tg0(i,j,bi,bj)))
479     . *p0kappa/p(i,j,bi,bj)
480     enddo
481     enddo
482 molod 1.30 print *,' net lwdt at level ',l,' ',tempij
483 molod 1.29 enddo
484 molod 1.30 endif
485 molod 1.12
486     do L = 1,Nrphys
487     do j = jm1,jm2
488     do i = im1,im2
489 molod 1.14 duphy(i,j,L,bi,bj) = moistu(i,j,L,bi,bj) + turbu(i,j,L,bi,bj)
490     dvphy(i,j,L,bi,bj) = moistv(i,j,L,bi,bj) + turbv(i,j,L,bi,bj)
491     dthphy(i,j,L,bi,bj) = ((moistt(i,j,L,bi,bj)+turbt(i,j,L,bi,bj)+
492     . lwdt(i,j,L,bi,bj) +
493     . dlwdtg(i,j,L,bi,bj) * (tgz(i,j,bi,bj)-tg0(i,j,bi,bj)) +
494 molod 1.16 . swdt(i,j,L,bi,bj)*radswt(i,j,bi,bj) )*p0kappa ) / p(i,j,bi,bj)
495 molod 1.14 dsphy(i,j,L,bi,bj) = (moistq(i,j,L,1,bi,bj)+turbq(i,j,L,1,bi,bj))
496 molod 1.16 . /p(i,j,bi,bj)
497 molod 1.12 enddo
498     enddo
499     enddo
500 molod 1.32
501 molod 1.35 if(2.eq.1 )then
502 molod 1.32 print *,' In do fizhi, computed fizhi tendencies ',bi
503     do L = 1,Nrphys
504     do j = jm1,jm2
505     do i = im1,im2
506     tempij(i,j) = duphy(i,j,L,bi,bj)
507     enddo
508     enddo
509 molod 1.33 c print *,' duphy at level ',l,' ',tempij
510 molod 1.32 enddo
511     do L = 1,Nrphys
512     do j = jm1,jm2
513     do i = im1,im2
514     tempij(i,j) = dvphy(i,j,L,bi,bj)
515     enddo
516     enddo
517 molod 1.33 c print *,' dvphy at level ',l,' ',tempij
518 molod 1.32 enddo
519     do L = 1,Nrphys
520     do j = jm1,jm2
521     do i = im1,im2
522     tempij(i,j) = dthphy(i,j,L,bi,bj)
523     enddo
524     enddo
525     print *,' dthphy at level ',l,' ',tempij
526     enddo
527     do L = 1,Nrphys
528     do j = jm1,jm2
529     do i = im1,im2
530     tempij(i,j) = dsphy(i,j,L,bi,bj)
531     enddo
532     enddo
533 molod 1.35 print *,' dsphy at level ',l,' ',tempij
534 molod 1.32 enddo
535     endif
536 molod 1.31
537     endif
538 molod 1.5
539 molod 1.19 call fizhi_step_diag(myid,p,uphy,vphy,thphy,sphy,qq,pkl,dpres,
540 molod 1.15 . radswt,radswg,swgclr,osr,osrclr,st4,dst4,tgz,tg0,radlwg,lwgclr,
541     . turbu,turbv,turbt,turbq,moistu,moistv,moistt,moistq,
542 molod 1.20 . lwdt,swdt,lwdtclr,swdtclr,dlwdtg,
543     . im1,im2,jm1,jm2,Nrphys,Nsx,Nsy,bi,bj,ntracer)
544 molod 1.15
545 molod 1.5 return
546     end

  ViewVC Help
Powered by ViewVC 1.1.22