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