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

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

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


Revision 1.37 - (show annotations) (download)
Thu Aug 19 23:45:54 2004 UTC (19 years, 9 months ago) by molod
Branch: MAIN
CVS Tags: checkpoint55c_post, checkpoint54e_post, checkpoint55b_post, checkpoint55, checkpoint54f_post, checkpoint55a_post
Changes since 1.36: +3 -2 lines
Rearrange common block to avoid padding

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

  ViewVC Help
Powered by ViewVC 1.1.22