1 |
C $Header$ |
C $Header$ |
2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
#include "CTRL_CPPOPTIONS.h" |
#include "CTRL_OPTIONS.h" |
5 |
#ifdef ALLOW_OBCS |
#ifdef ALLOW_OBCS |
6 |
# include "OBCS_OPTIONS.h" |
# include "OBCS_OPTIONS.h" |
7 |
#endif |
#endif |
8 |
|
|
|
|
|
9 |
subroutine ctrl_getobcsw( |
subroutine ctrl_getobcsw( |
10 |
I mytime, |
I mytime, |
11 |
I myiter, |
I myiter, |
28 |
|
|
29 |
implicit none |
implicit none |
30 |
|
|
|
#ifdef ALLOW_OBCSW_CONTROL |
|
|
|
|
31 |
c == global variables == |
c == global variables == |
32 |
|
#ifdef ALLOW_OBCSW_CONTROL |
33 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
34 |
#include "SIZE.h" |
#include "SIZE.h" |
35 |
#include "PARAMS.h" |
#include "PARAMS.h" |
36 |
#include "GRID.h" |
#include "GRID.h" |
37 |
#include "OBCS.h" |
c#include "OBCS_PARAMS.h" |
38 |
|
#include "OBCS_GRID.h" |
39 |
|
#include "OBCS_FIELDS.h" |
40 |
|
#include "CTRL_SIZE.h" |
41 |
#include "ctrl.h" |
#include "ctrl.h" |
42 |
#include "ctrl_dummy.h" |
#include "ctrl_dummy.h" |
43 |
|
#include "CTRL_OBCS.h" |
44 |
#include "optim.h" |
#include "optim.h" |
45 |
|
#endif /* ALLOW_OBCSW_CONTROL */ |
46 |
|
|
47 |
c == routine arguments == |
c == routine arguments == |
|
|
|
48 |
_RL mytime |
_RL mytime |
49 |
integer myiter |
integer myiter |
50 |
integer mythid |
integer mythid |
51 |
|
|
52 |
|
#ifdef ALLOW_OBCSW_CONTROL |
53 |
c == local variables == |
c == local variables == |
54 |
|
|
55 |
integer bi,bj |
integer bi,bj |
131 |
if (iobcs .gt. 2) then |
if (iobcs .gt. 2) then |
132 |
do j = jmin,jmax |
do j = jmin,jmax |
133 |
i = OB_Iw(j,bi,bj) |
i = OB_Iw(j,bi,bj) |
134 |
|
IF ( i.EQ.OB_indexNone ) i = 1 |
135 |
cih Determine number of open vertical layers. |
cih Determine number of open vertical layers. |
136 |
nz = 0 |
nz = 0 |
137 |
do k = 1,Nr |
do k = 1,Nr |
200 |
if (iobcs .gt. 2) then |
if (iobcs .gt. 2) then |
201 |
do j = jmin,jmax |
do j = jmin,jmax |
202 |
i = OB_Iw(j,bi,bj) |
i = OB_Iw(j,bi,bj) |
203 |
|
IF ( i.EQ.OB_indexNone ) i = 1 |
204 |
cih Determine number of open vertical layers. |
cih Determine number of open vertical layers. |
205 |
nz = 0 |
nz = 0 |
206 |
do k = 1,Nr |
do k = 1,Nr |
252 |
do k = 1,nr |
do k = 1,nr |
253 |
do j = 1,sny |
do j = 1,sny |
254 |
i = OB_Iw(j,bi,bj) |
i = OB_Iw(j,bi,bj) |
255 |
|
IF ( i.EQ.OB_indexNone ) i = 1 |
256 |
if (iobcs .EQ. 1) then |
if (iobcs .EQ. 1) then |
257 |
OBWt(j,k,bi,bj) = OBWt (j,k,bi,bj) |
OBWt(j,k,bi,bj) = OBWt (j,k,bi,bj) |
258 |
& + obcswfac *xx_obcsw0(j,k,bi,bj,iobcs) |
& + obcswfac *xx_obcsw0(j,k,bi,bj,iobcs) |
282 |
enddo |
enddo |
283 |
enddo |
enddo |
284 |
enddo |
enddo |
285 |
|
|
286 |
C-- End over iobcs loop |
C-- End over iobcs loop |
287 |
enddo |
enddo |
288 |
|
|
|
#else /* ALLOW_OBCSW_CONTROL undefined */ |
|
|
|
|
|
c == routine arguments == |
|
|
|
|
|
_RL mytime |
|
|
integer myiter |
|
|
integer mythid |
|
|
|
|
|
c-- CPP flag ALLOW_OBCSW_CONTROL undefined. |
|
|
|
|
289 |
#endif /* ALLOW_OBCSW_CONTROL */ |
#endif /* ALLOW_OBCSW_CONTROL */ |
290 |
|
|
291 |
|
return |
292 |
end |
end |
|
|
|