1 |
C $Header$ |
C $Header$ |
2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
#include "CPP_OPTIONS.h" |
#include "FIZHI_OPTIONS.h" |
5 |
subroutine fizhi_wrapper (myTime, myIter, myThid) |
subroutine fizhi_wrapper (myTime, myIter, myThid) |
6 |
c----------------------------------------------------------------------- |
c----------------------------------------------------------------------- |
7 |
c Subroutine fizhi_wrapper - 'Wrapper' routine to interface |
c Subroutine fizhi_wrapper - 'Wrapper' routine to interface |
41 |
|
|
42 |
integer i, j, L, Lbotij, bi, bj |
integer i, j, L, Lbotij, bi, bj |
43 |
integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2 |
integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2 |
44 |
|
_RL tempij(sNx,sNy) |
45 |
|
|
46 |
idim1 = 1-OLx |
idim1 = 1-OLx |
47 |
idim2 = sNx+OLx |
idim2 = sNx+OLx |
109 |
. surftype,tilefrac,fracland) |
. surftype,tilefrac,fracland) |
110 |
c |
c |
111 |
c Compute physics increments |
c Compute physics increments |
112 |
call do_fizhi(myThid,uphy,vphy,thphy,sphy,pephy4fiz,xC,yC, |
|
113 |
|
call do_fizhi(myThid, |
114 |
|
. idim1,idim2,jdim1,jdim2,Nrphys,Nsx,Nsy,im1,im2,jm1,jm2,bi,bj, |
115 |
|
. nchp,nchptot,nchpland, |
116 |
|
. uphy,vphy,thphy,sphy,pephy4fiz,xC,yC, |
117 |
. ctmt,xxmt,yymt,zetamt,xlmt,khmt,tke, |
. ctmt,xxmt,yymt,zetamt,xlmt,khmt,tke, |
118 |
. tgz,sst,sice,phis_var,landtype,fracland,emiss,albnirdr,albnirdf, |
. tgz,sst,sice,phis_var,landtype,fracland,emiss,albnirdr,albnirdf, |
119 |
. albvisdr,albvisdf,ityp,chfr,alai,agrn,igrd,chlt,chlon, |
. albvisdr,albvisdf,ityp,chfr,alai,agrn,igrd,chlt,chlon, |
120 |
. tcanopy,tdeep,ecanopy,swetshal,swetroot,swetdeep,snodep,capac, |
. tcanopy,tdeep,ecanopy,swetshal,swetroot,swetdeep,snodep,capac, |
121 |
. o3,qstr,co2,cfc11,cfc12,cfc22,n2o,methane, |
. o3,qstr,co2,cfc11,cfc12,cfc22,n2o,methane, |
|
. idim1,idim2,jdim1,jdim2,Nrphys,Nsx,Nsy,im1,im2,jm1,jm2,bi,bj, |
|
|
. nchp,nchpland, |
|
122 |
. duphy,dvphy,dthphy,dsphy) |
. duphy,dvphy,dthphy,dsphy) |
123 |
enddo |
enddo |
124 |
enddo |
enddo |
125 |
|
|
126 |
CALL TIMER_STOP ('DO_FIZHI [FIZHI_WRAPPER]',mythid) |
CALL TIMER_STOP ('DO_FIZHI [FIZHI_WRAPPER]',mythid) |
127 |
|
|
128 |
CALL TIMER_START ('PHYS2DYN [FIZHI_WRAPPER]',mythid) |
CALL TIMER_START ('PHYS2DYN [FIZHI_WRAPPER]',mythid) |
168 |
call phys2dyn(tempphy,pephy,idim1,idim2,jdim1,jdim2,Nrphys, |
call phys2dyn(tempphy,pephy,idim1,idim2,jdim1,jdim2,Nrphys, |
169 |
. Nsx,Nsy,im1,im2,jm1,jm2,bi,bj,pedyn,ksurfC,Nr,nlperdyn,gsphy) |
. Nsx,Nsy,im1,im2,jm1,jm2,bi,bj,pedyn,ksurfC,Nr,nlperdyn,gsphy) |
170 |
|
|
171 |
|
|
172 |
|
if( (1.eq.1) ) then |
173 |
|
print *,' In fizhi wrapper after phys2dyn before exchange ',bi |
174 |
|
do L = 1,Nr |
175 |
|
do j = 1,sNy |
176 |
|
do i = 1,sNx |
177 |
|
tempij(i,j) = guphy(i,j,L,bi,bj) |
178 |
|
enddo |
179 |
|
enddo |
180 |
|
c print *,' guphy at level ',l,' ',tempij |
181 |
|
enddo |
182 |
|
do L = 1,Nr |
183 |
|
do j = 1,sNy |
184 |
|
do i = 1,sNx |
185 |
|
tempij(i,j) = gvphy(i,j,L,bi,bj) |
186 |
|
enddo |
187 |
|
enddo |
188 |
|
c print *,' gvphy at level ',l,' ',tempij |
189 |
|
enddo |
190 |
|
do L = 1,Nr |
191 |
|
do j = 1,sNy |
192 |
|
do i = 1,sNx |
193 |
|
tempij(i,j) = gthphy(i,j,L,bi,bj) |
194 |
|
enddo |
195 |
|
enddo |
196 |
|
print *,' gthphy at level ',l,' ',tempij |
197 |
|
enddo |
198 |
|
do L = 1,Nr |
199 |
|
do j = 1,sNy |
200 |
|
do i = 1,sNx |
201 |
|
tempij(i,j) = gsphy(i,j,L,bi,bj) |
202 |
|
enddo |
203 |
|
enddo |
204 |
|
c print *,' gsphy at level ',l,' ',tempij |
205 |
|
enddo |
206 |
|
endif |
207 |
enddo |
enddo |
208 |
enddo |
enddo |
209 |
|
|
210 |
CALL TIMER_STOP ('PHYS2DYN [FIZHI_WRAPPER]',mythid) |
CALL TIMER_STOP ('PHYS2DYN [FIZHI_WRAPPER]',mythid) |
211 |
|
|
212 |
c Convert guphy and gvphy from A-grid to C-grid for use by dynamics |
c Convert guphy and gvphy from A-grid to C-grid for use by dynamics |
225 |
. FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) |
. FORWARD_SIMULATION, EXCH_UPDATE_CORNERS, myThid ) |
226 |
CALL TIMER_STOP ('EXCHANGES [FIZHI_WRAPPER]',mythid) |
CALL TIMER_STOP ('EXCHANGES [FIZHI_WRAPPER]',mythid) |
227 |
|
|
228 |
|
do bj = myByLo(myThid), myByHi(myThid) |
229 |
|
do bi = myBxLo(myThid), myBxHi(myThid) |
230 |
|
if( (2.eq.1) ) then |
231 |
|
print *,' In fizhi wrapper after exchange ',bi |
232 |
|
do L = 1,Nr |
233 |
|
do j = 1,sNy |
234 |
|
do i = 1,sNx |
235 |
|
tempij(i,j) = guphy(i,j,L,bi,bj) |
236 |
|
enddo |
237 |
|
enddo |
238 |
|
print *,' guphy at level ',l,' ',tempij |
239 |
|
enddo |
240 |
|
do L = 1,Nr |
241 |
|
do j = 1,sNy |
242 |
|
do i = 1,sNx |
243 |
|
tempij(i,j) = gvphy(i,j,L,bi,bj) |
244 |
|
enddo |
245 |
|
enddo |
246 |
|
print *,' gvphy at level ',l,' ',tempij |
247 |
|
enddo |
248 |
|
do L = 1,Nr |
249 |
|
do j = 1,sNy |
250 |
|
do i = 1,sNx |
251 |
|
tempij(i,j) = gthphy(i,j,L,bi,bj) |
252 |
|
enddo |
253 |
|
enddo |
254 |
|
print *,' gthphy at level ',l,' ',tempij |
255 |
|
enddo |
256 |
|
do L = 1,Nr |
257 |
|
do j = 1,sNy |
258 |
|
do i = 1,sNx |
259 |
|
tempij(i,j) = gsphy(i,j,L,bi,bj) |
260 |
|
enddo |
261 |
|
enddo |
262 |
|
print *,' gsphy at level ',l,' ',tempij |
263 |
|
enddo |
264 |
|
endif |
265 |
|
enddo |
266 |
|
enddo |
267 |
|
|
268 |
return |
return |
269 |
end |
end |