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