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