1 |
C |
2 |
C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_init_obcs_variables.F,v 1.4 2003/10/30 19:09:05 heimbach Exp $ |
3 |
C $Name: $ |
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 |
#ifdef ALLOW_ECCO_OPTIMIZATION |
36 |
# include "optim.h" |
37 |
#endif |
38 |
|
39 |
c == routine arguments == |
40 |
|
41 |
integer mythid |
42 |
|
43 |
c == local variables == |
44 |
|
45 |
integer bi,bj |
46 |
integer i,j,k |
47 |
integer itlo,ithi |
48 |
integer jtlo,jthi |
49 |
integer jmin,jmax |
50 |
integer imin,imax |
51 |
integer ntmp |
52 |
integer ivarindex |
53 |
integer iobcs |
54 |
|
55 |
c == end of interface == |
56 |
|
57 |
jtlo = mybylo(mythid) |
58 |
jthi = mybyhi(mythid) |
59 |
itlo = mybxlo(mythid) |
60 |
ithi = mybxhi(mythid) |
61 |
jmin = 1-oly |
62 |
jmax = sny+oly |
63 |
imin = 1-olx |
64 |
imax = snx+olx |
65 |
|
66 |
#ifdef ALLOW_OBCSN_CONTROL |
67 |
do iobcs = 1, nobcs |
68 |
do bj = jtlo,jthi |
69 |
do bi = itlo,ithi |
70 |
do k = 1,nr |
71 |
do i = imin,imax |
72 |
xx_obcsn0(i,k,bi,bj,iobcs) = 0. _d 0 |
73 |
xx_obcsn1(i,k,bi,bj,iobcs) = 0. _d 0 |
74 |
enddo |
75 |
enddo |
76 |
enddo |
77 |
enddo |
78 |
enddo |
79 |
#endif |
80 |
|
81 |
#ifdef ALLOW_OBCSS_CONTROL |
82 |
do iobcs = 1, nobcs |
83 |
do bj = jtlo,jthi |
84 |
do bi = itlo,ithi |
85 |
do k = 1,nr |
86 |
do i = imin,imax |
87 |
xx_obcss0(i,k,bi,bj,iobcs) = 0. _d 0 |
88 |
xx_obcss1(i,k,bi,bj,iobcs) = 0. _d 0 |
89 |
enddo |
90 |
enddo |
91 |
enddo |
92 |
enddo |
93 |
enddo |
94 |
#endif |
95 |
|
96 |
#ifdef ALLOW_OBCSW_CONTROL |
97 |
do iobcs = 1, nobcs |
98 |
do bj = jtlo,jthi |
99 |
do bi = itlo,ithi |
100 |
do k = 1,nr |
101 |
do j = jmin,jmax |
102 |
xx_obcsw0(j,k,bi,bj,iobcs) = 0. _d 0 |
103 |
xx_obcsw1(j,k,bi,bj,iobcs) = 0. _d 0 |
104 |
enddo |
105 |
enddo |
106 |
enddo |
107 |
enddo |
108 |
enddo |
109 |
#endif |
110 |
|
111 |
#ifdef ALLOW_OBCSE_CONTROL |
112 |
do iobcs = 1, nobcs |
113 |
do bj = jtlo,jthi |
114 |
do bi = itlo,ithi |
115 |
do k = 1,nr |
116 |
do j = jmin,jmax |
117 |
xx_obcse0(j,k,bi,bj,iobcs) = 0. _d 0 |
118 |
xx_obcse1(j,k,bi,bj,iobcs) = 0. _d 0 |
119 |
enddo |
120 |
enddo |
121 |
enddo |
122 |
enddo |
123 |
enddo |
124 |
#endif |
125 |
|
126 |
#ifdef ALLOW_OBCS_CONTROL |
127 |
shiftvel(1) = 0. d0 |
128 |
shiftvel(2) = 0. d0 |
129 |
#endif |
130 |
|
131 |
return |
132 |
end |
133 |
|
134 |
|
135 |
|