1 |
C |
2 |
C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_init_obcs_variables.F,v 1.5 2003/11/06 22:05:08 heimbach Exp $ |
3 |
C $Name: checkpoint56 $ |
4 |
|
5 |
#include "CTRL_CPPOPTIONS.h" |
6 |
|
7 |
subroutine ctrl_init_obcs_variables( mythid ) |
8 |
|
9 |
c ================================================================== |
10 |
c SUBROUTINE ctrl_init_obcs_variables |
11 |
c ================================================================== |
12 |
c |
13 |
c o Set parts of the vector of control variables and initialize the |
14 |
c rest to zero. |
15 |
c |
16 |
c started: heimbach@mit.edu 25-Mar-2002 |
17 |
c |
18 |
c ================================================================== |
19 |
c SUBROUTINE ctrl_init_obcs_variables |
20 |
c ================================================================== |
21 |
|
22 |
implicit none |
23 |
|
24 |
c == global variables == |
25 |
|
26 |
#include "EEPARAMS.h" |
27 |
#include "SIZE.h" |
28 |
#include "PARAMS.h" |
29 |
#include "GRID.h" |
30 |
|
31 |
#include "ctrl.h" |
32 |
#ifdef ALLOW_OBCS_CONTROL |
33 |
# include "OBCS.h" |
34 |
#endif |
35 |
|
36 |
c == routine arguments == |
37 |
|
38 |
integer mythid |
39 |
|
40 |
c == local variables == |
41 |
|
42 |
integer bi,bj |
43 |
integer i,j,k |
44 |
integer itlo,ithi |
45 |
integer jtlo,jthi |
46 |
integer jmin,jmax |
47 |
integer imin,imax |
48 |
integer ntmp |
49 |
integer ivarindex |
50 |
integer iobcs |
51 |
|
52 |
c == end of interface == |
53 |
|
54 |
jtlo = mybylo(mythid) |
55 |
jthi = mybyhi(mythid) |
56 |
itlo = mybxlo(mythid) |
57 |
ithi = mybxhi(mythid) |
58 |
jmin = 1-oly |
59 |
jmax = sny+oly |
60 |
imin = 1-olx |
61 |
imax = snx+olx |
62 |
|
63 |
#ifdef ALLOW_OBCSN_CONTROL |
64 |
do iobcs = 1, nobcs |
65 |
do bj = jtlo,jthi |
66 |
do bi = itlo,ithi |
67 |
do k = 1,nr |
68 |
do i = imin,imax |
69 |
xx_obcsn0(i,k,bi,bj,iobcs) = 0. _d 0 |
70 |
xx_obcsn1(i,k,bi,bj,iobcs) = 0. _d 0 |
71 |
enddo |
72 |
enddo |
73 |
enddo |
74 |
enddo |
75 |
enddo |
76 |
#endif |
77 |
|
78 |
#ifdef ALLOW_OBCSS_CONTROL |
79 |
do iobcs = 1, nobcs |
80 |
do bj = jtlo,jthi |
81 |
do bi = itlo,ithi |
82 |
do k = 1,nr |
83 |
do i = imin,imax |
84 |
xx_obcss0(i,k,bi,bj,iobcs) = 0. _d 0 |
85 |
xx_obcss1(i,k,bi,bj,iobcs) = 0. _d 0 |
86 |
enddo |
87 |
enddo |
88 |
enddo |
89 |
enddo |
90 |
enddo |
91 |
#endif |
92 |
|
93 |
#ifdef ALLOW_OBCSW_CONTROL |
94 |
do iobcs = 1, nobcs |
95 |
do bj = jtlo,jthi |
96 |
do bi = itlo,ithi |
97 |
do k = 1,nr |
98 |
do j = jmin,jmax |
99 |
xx_obcsw0(j,k,bi,bj,iobcs) = 0. _d 0 |
100 |
xx_obcsw1(j,k,bi,bj,iobcs) = 0. _d 0 |
101 |
enddo |
102 |
enddo |
103 |
enddo |
104 |
enddo |
105 |
enddo |
106 |
#endif |
107 |
|
108 |
#ifdef ALLOW_OBCSE_CONTROL |
109 |
do iobcs = 1, nobcs |
110 |
do bj = jtlo,jthi |
111 |
do bi = itlo,ithi |
112 |
do k = 1,nr |
113 |
do j = jmin,jmax |
114 |
xx_obcse0(j,k,bi,bj,iobcs) = 0. _d 0 |
115 |
xx_obcse1(j,k,bi,bj,iobcs) = 0. _d 0 |
116 |
enddo |
117 |
enddo |
118 |
enddo |
119 |
enddo |
120 |
enddo |
121 |
#endif |
122 |
|
123 |
#ifdef ALLOW_OBCS_CONTROL |
124 |
shiftvel(1) = 0. d0 |
125 |
shiftvel(2) = 0. d0 |
126 |
#endif |
127 |
|
128 |
return |
129 |
end |
130 |
|
131 |
|
132 |
|