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