32 |
#include "SIZE.h" |
#include "SIZE.h" |
33 |
#include "PARAMS.h" |
#include "PARAMS.h" |
34 |
#include "GRID.h" |
#include "GRID.h" |
35 |
#include "DYNVARS.h" |
CML#include "DYNVARS.h" |
36 |
#ifdef ALLOW_OBCS |
#ifdef ALLOW_OBCS |
37 |
# include "OBCS.h" |
# include "OBCS.h" |
38 |
#endif |
#endif |
60 |
integer jmin,jmax |
integer jmin,jmax |
61 |
integer imin,imax |
integer imin,imax |
62 |
integer irec |
integer irec |
|
integer il |
|
63 |
integer iobcs |
integer iobcs |
|
integer ip1 |
|
|
integer jp1 |
|
64 |
integer nrec |
integer nrec |
65 |
integer ilfld |
integer ilfld |
66 |
integer igg |
integer igg |
67 |
|
|
68 |
_RL fctile |
_RL fctile |
69 |
_RL sumvol |
_RL sumvol |
|
_RL dummy |
|
70 |
_RL gg |
_RL gg |
71 |
_RL tmpx |
_RL tmpx |
72 |
_RL tmpy |
_RL tmpy |
76 |
character*(80) fnamefldw |
character*(80) fnamefldw |
77 |
character*(80) fnameflde |
character*(80) fnameflde |
78 |
|
|
79 |
|
#if (defined ALLOW_OBCSN_CONTROL || defined ALLOW_OBCSS_CONTROL) |
80 |
|
_RL tmpfldxz (1-olx:snx+olx,nr,nsx,nsy) |
81 |
|
#endif |
82 |
|
#if (defined ALLOW_OBCSE_CONTROL || defined ALLOW_OBCSW_CONTROL) |
83 |
|
_RL tmpfldyz (1-oly:sny+oly,nr,nsx,nsy) |
84 |
|
#endif |
85 |
|
|
86 |
logical doglobalread |
logical doglobalread |
87 |
logical ladinit |
logical ladinit |
88 |
|
|
182 |
#ifdef ALLOW_OBCSN_CONTROL |
#ifdef ALLOW_OBCSN_CONTROL |
183 |
cgg Assume that nobcs=4, and V velocity is the 4th record. I cannot |
cgg Assume that nobcs=4, and V velocity is the 4th record. I cannot |
184 |
cgg think of a more general way to do this. |
cgg think of a more general way to do this. |
|
jp1 = 0 |
|
|
|
|
185 |
if (iobcs.eq.4) then |
if (iobcs.eq.4) then |
186 |
call active_read_xz( fnamefldn, tmpfldxz, irec, doglobalread, |
call active_read_xz( fnamefldn, tmpfldxz, irec, doglobalread, |
187 |
& ladinit, optimcycle, mythid |
& ladinit, optimcycle, mythid |
207 |
j = OB_Jn(I,bi,bj) |
j = OB_Jn(I,bi,bj) |
208 |
cgg Barotropic velocity is stored in level 1. |
cgg Barotropic velocity is stored in level 1. |
209 |
tmpx = tmpfldxz(i,1,bi,bj) |
tmpx = tmpfldxz(i,1,bi,bj) |
210 |
if (maskS(i,j+jp1,k,bi,bj) .ne. 0.) then |
if (maskS(i,j,k,bi,bj) .ne. 0.) then |
211 |
cgg -- Positive is flux in. |
cgg -- Positive is flux in. |
212 |
fctile = fctile - tmpx* delZ(k) *dxg(i,j+jp1,bi,bj) |
fctile = fctile - tmpx* drF(k) *dxg(i,j,bi,bj) |
213 |
|
& * _hFacS(i,j,k,bi,bj) |
214 |
endif |
endif |
215 |
enddo |
enddo |
216 |
enddo |
enddo |
224 |
#ifdef ALLOW_OBCSS_CONTROL |
#ifdef ALLOW_OBCSS_CONTROL |
225 |
cgg Assume that nobcs=4, and V velocity is the 4th record. I cannot |
cgg Assume that nobcs=4, and V velocity is the 4th record. I cannot |
226 |
cgg think of a more general way to do this. |
cgg think of a more general way to do this. |
|
jp1 = 1 |
|
|
|
|
227 |
if (iobcs.eq.4) then |
if (iobcs.eq.4) then |
228 |
call active_read_xz( fnameflds, tmpfldxz, irec, doglobalread, |
call active_read_xz( fnameflds, tmpfldxz, irec, doglobalread, |
229 |
& ladinit, optimcycle, mythid |
& ladinit, optimcycle, mythid |
248 |
j = OB_Js(I,bi,bj) |
j = OB_Js(I,bi,bj) |
249 |
cgg Barotropic velocity is stored in level 1. |
cgg Barotropic velocity is stored in level 1. |
250 |
tmpx = tmpfldxz(i,1,bi,bj) |
tmpx = tmpfldxz(i,1,bi,bj) |
251 |
if (maskS(i,j+jp1,k,bi,bj) .ne. 0.) then |
if (maskS(i,j+1,k,bi,bj) .ne. 0.) then |
252 |
cgg -- Positive is flux in. |
cgg -- Positive is flux in. |
253 |
fctile = fctile + tmpx* delZ(k) *dxg(i,j+jp1,bi,bj) |
fctile = fctile + tmpx* drF(k) *dxg(i,j+1,bi,bj) |
254 |
|
& * _hFacS(i,j+1,k,bi,bj) |
255 |
endif |
endif |
256 |
enddo |
enddo |
257 |
enddo |
enddo |
266 |
#ifdef ALLOW_OBCSW_CONTROL |
#ifdef ALLOW_OBCSW_CONTROL |
267 |
cgg Assume that nobcs=4, and V velocity is the 4th record. I cannot |
cgg Assume that nobcs=4, and V velocity is the 4th record. I cannot |
268 |
cgg think of a more general way to do this. |
cgg think of a more general way to do this. |
|
ip1 = 1 |
|
|
|
|
269 |
if (iobcs.eq.3) then |
if (iobcs.eq.3) then |
270 |
call active_read_yz( fnamefldw, tmpfldyz, irec, doglobalread, |
call active_read_yz( fnamefldw, tmpfldyz, irec, doglobalread, |
271 |
& ladinit, optimcycle, mythid |
& ladinit, optimcycle, mythid |
290 |
i = OB_Iw(j,bi,bj) |
i = OB_Iw(j,bi,bj) |
291 |
cgg Barotropic velocity is stored in the level 1. |
cgg Barotropic velocity is stored in the level 1. |
292 |
tmpy = tmpfldyz(j,1,bi,bj) |
tmpy = tmpfldyz(j,1,bi,bj) |
293 |
if (maskW(i+ip1,j,k,bi,bj) .ne. 0.) then |
if (maskW(i+1,j,k,bi,bj) .ne. 0.) then |
294 |
cgg -- Positive is flux in. |
cgg -- Positive is flux in. |
295 |
fctile = fctile + tmpy* delZ(k) *dyg(i+ip1,j,bi,bj) |
fctile = fctile + tmpy* drF(k) *dyg(i+1,j,bi,bj) |
296 |
|
& * _hFacW(i+1,j,k,bi,bj) |
297 |
endif |
endif |
298 |
enddo |
enddo |
299 |
enddo |
enddo |
308 |
#ifdef ALLOW_OBCSE_CONTROL |
#ifdef ALLOW_OBCSE_CONTROL |
309 |
cgg Assume that nobcs=4, and V velocity is the 4th record. I cannot |
cgg Assume that nobcs=4, and V velocity is the 4th record. I cannot |
310 |
cgg think of a more general way to do this. |
cgg think of a more general way to do this. |
|
ip1 = 0 |
|
|
|
|
311 |
if (iobcs.eq.3) then |
if (iobcs.eq.3) then |
312 |
call active_read_yz( fnameflde, tmpfldyz, irec, doglobalread, |
call active_read_yz( fnameflde, tmpfldyz, irec, doglobalread, |
313 |
& ladinit, optimcycle, mythid |
& ladinit, optimcycle, mythid |
332 |
i = OB_Ie(j,bi,bj) |
i = OB_Ie(j,bi,bj) |
333 |
cgg Barotropic velocity stored in level 1. |
cgg Barotropic velocity stored in level 1. |
334 |
tmpy = tmpfldyz(j,1,bi,bj) |
tmpy = tmpfldyz(j,1,bi,bj) |
335 |
if (maskW(i+ip1,j,k,bi,bj) .ne. 0.) then |
if (maskW(i,j,k,bi,bj) .ne. 0.) then |
336 |
cgg -- Positive is flux in. |
cgg -- Positive is flux in. |
337 |
fctile = fctile - tmpy* delZ(k) *dyg(i+ip1,j,bi,bj) |
fctile = fctile - tmpy* drF(k) *dyg(i,j,bi,bj) |
338 |
|
& * _hFacW(i,j,k,bi,bj) |
339 |
endif |
endif |
340 |
enddo |
enddo |
341 |
enddo |
enddo |