44 |
integer jmin,jmax |
integer jmin,jmax |
45 |
integer imin,imax |
integer imin,imax |
46 |
|
|
47 |
integer itest |
integer itest,iobcs |
48 |
integer icomptest |
integer icomptest |
49 |
|
|
50 |
c == end of interface == |
c == end of interface == |
60 |
|
|
61 |
_BEGIN_MASTER( mythid ) |
_BEGIN_MASTER( mythid ) |
62 |
|
|
63 |
|
c-- initialise |
64 |
|
do bj = jtlo,jthi |
65 |
|
do bi = itlo,ithi |
66 |
|
do k = 1,ncvarnrmax(grdchkvarindex) |
67 |
|
do iobcs = 1, nobcs |
68 |
|
nwettile(bi,bj,k,iobcs) = 0 |
69 |
|
enddo |
70 |
|
enddo |
71 |
|
enddo |
72 |
|
enddo |
73 |
|
|
74 |
c-- Determine the number of components of the given |
c-- Determine the number of components of the given |
75 |
c-- control variable on the current tile. |
c-- control variable on the current tile. |
76 |
if ( ncvargrd(grdchkvarindex) .eq. 'c' ) then |
if ( ncvargrd(grdchkvarindex) .eq. 'c' ) then |
77 |
do bj = jtlo,jthi |
do bj = jtlo,jthi |
78 |
do bi = itlo,ithi |
do bi = itlo,ithi |
79 |
do k = 1,ncvarnrmax(grdchkvarindex) |
do k = 1,ncvarnrmax(grdchkvarindex) |
80 |
nwettile(bi,bj,k) = nwetctile(bi,bj,k) |
nwettile(bi,bj,k,1) = nwetctile(bi,bj,k) |
81 |
enddo |
enddo |
82 |
enddo |
enddo |
83 |
enddo |
enddo |
85 |
do bj = jtlo,jthi |
do bj = jtlo,jthi |
86 |
do bi = itlo,ithi |
do bi = itlo,ithi |
87 |
do k = 1,ncvarnrmax(grdchkvarindex) |
do k = 1,ncvarnrmax(grdchkvarindex) |
88 |
nwettile(bi,bj,k) = nwetstile(bi,bj,k) |
nwettile(bi,bj,k,1) = nwetstile(bi,bj,k) |
89 |
enddo |
enddo |
90 |
enddo |
enddo |
91 |
enddo |
enddo |
93 |
do bj = jtlo,jthi |
do bj = jtlo,jthi |
94 |
do bi = itlo,ithi |
do bi = itlo,ithi |
95 |
do k = 1,ncvarnrmax(grdchkvarindex) |
do k = 1,ncvarnrmax(grdchkvarindex) |
96 |
nwettile(bi,bj,k) = nwetwtile(bi,bj,k) |
nwettile(bi,bj,k,1) = nwetwtile(bi,bj,k) |
97 |
enddo |
enddo |
98 |
enddo |
enddo |
99 |
enddo |
enddo |
101 |
do bj = jtlo,jthi |
do bj = jtlo,jthi |
102 |
do bi = itlo,ithi |
do bi = itlo,ithi |
103 |
do k = 1,ncvarnrmax(grdchkvarindex) |
do k = 1,ncvarnrmax(grdchkvarindex) |
104 |
nwettile(bi,bj,k) = nwetvtile(bi,bj,k) |
nwettile(bi,bj,k,1) = nwetvtile(bi,bj,k) |
105 |
|
enddo |
106 |
|
enddo |
107 |
|
enddo |
108 |
|
else if ( ncvargrd(grdchkvarindex) .eq. 'm' ) then |
109 |
|
do bj = jtlo,jthi |
110 |
|
do bi = itlo,ithi |
111 |
|
do k = 1,ncvarnrmax(grdchkvarindex) |
112 |
|
do iobcs = 1, nobcs |
113 |
|
if ( grdchkvarindex .eq. 11 ) then |
114 |
|
#ifdef ALLOW_OBCSN_CONTROL |
115 |
|
nwettile(bi,bj,k,iobcs) = |
116 |
|
& nwetobcsn(bi,bj,k,iobcs) |
117 |
|
#endif |
118 |
|
else if ( grdchkvarindex .eq. 12 ) then |
119 |
|
#ifdef ALLOW_OBCSS_CONTROL |
120 |
|
nwettile(bi,bj,k,iobcs) = |
121 |
|
& nwetobcss(bi,bj,k,iobcs) |
122 |
|
#endif |
123 |
|
else if ( grdchkvarindex .eq. 13 ) then |
124 |
|
#ifdef ALLOW_OBCSW_CONTROL |
125 |
|
nwettile(bi,bj,k,iobcs) = |
126 |
|
& nwetobcsw(bi,bj,k,iobcs) |
127 |
|
#endif |
128 |
|
else if ( grdchkvarindex .eq. 14 ) then |
129 |
|
#ifdef ALLOW_OBCSE_CONTROL |
130 |
|
nwettile(bi,bj,k,iobcs) = |
131 |
|
& nwetobcse(bi,bj,k,iobcs) |
132 |
|
#endif |
133 |
|
endif |
134 |
|
enddo |
135 |
enddo |
enddo |
136 |
enddo |
enddo |
137 |
enddo |
enddo |
139 |
ce --> wrong grid specification for the control variable. |
ce --> wrong grid specification for the control variable. |
140 |
endif |
endif |
141 |
|
|
142 |
|
c-- get mask file for obcs |
143 |
|
#ifdef ALLOW_OBCS_CONTROL |
144 |
|
call grdchk_get_obcs_mask ( mythid ) |
145 |
|
#endif |
146 |
|
|
147 |
c ---------------------------------------------------------------- |
c ---------------------------------------------------------------- |
148 |
|
|
149 |
c-- Determine the actual and the maximum possible number of |
c-- Determine the actual and the maximum possible number of |
153 |
do bj = jtlo,jthi |
do bj = jtlo,jthi |
154 |
do bi = itlo,ithi |
do bi = itlo,ithi |
155 |
do k = 1,ncvarnrmax(grdchkvarindex) |
do k = 1,ncvarnrmax(grdchkvarindex) |
156 |
ncvarcomp = ncvarcomp + nwettile(bi,bj,k) |
do iobcs = 1, nobcs |
157 |
maxncvarcomps = maxncvarcomps + snx*sny |
ncvarcomp = ncvarcomp + nwettile(bi,bj,k,iobcs) |
158 |
|
maxncvarcomps = maxncvarcomps + |
159 |
|
& ncvarxmax(grdchkvarindex)* |
160 |
|
& ncvarymax(grdchkvarindex) |
161 |
|
enddo |
162 |
enddo |
enddo |
163 |
enddo |
enddo |
164 |
enddo |
enddo |