2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
#include "ECCO_OPTIONS.h" |
#include "ECCO_OPTIONS.h" |
5 |
|
#ifdef ALLOW_CTRL |
6 |
|
# include "CTRL_OPTIONS.h" |
7 |
|
#endif |
8 |
|
|
9 |
subroutine cost_obcsvol( |
subroutine cost_obcsvol( |
10 |
I myiter, |
I myiter, |
32 |
#include "SIZE.h" |
#include "SIZE.h" |
33 |
#include "PARAMS.h" |
#include "PARAMS.h" |
34 |
#include "GRID.h" |
#include "GRID.h" |
|
CML#include "DYNVARS.h" |
|
35 |
#ifdef ALLOW_OBCS |
#ifdef ALLOW_OBCS |
|
c# include "OBCS_PARAMS.h" |
|
36 |
# include "OBCS_GRID.h" |
# include "OBCS_GRID.h" |
37 |
#endif |
#endif |
38 |
|
|
39 |
#include "cal.h" |
#ifdef ALLOW_CAL |
40 |
#include "ecco_cost.h" |
# include "cal.h" |
41 |
#include "CTRL_SIZE.h" |
#endif |
42 |
#include "ctrl.h" |
#ifdef ALLOW_ECCO |
43 |
#include "ctrl_dummy.h" |
# include "ecco_cost.h" |
44 |
#include "optim.h" |
#endif |
45 |
|
#ifdef ALLOW_CTRL |
46 |
|
# include "CTRL_SIZE.h" |
47 |
|
# include "ctrl.h" |
48 |
|
# include "ctrl_dummy.h" |
49 |
|
# include "optim.h" |
50 |
|
#endif |
51 |
|
|
52 |
c == routine arguments == |
c == routine arguments == |
53 |
|
|
57 |
integer startrec |
integer startrec |
58 |
integer endrec |
integer endrec |
59 |
|
|
60 |
|
#if (defined (ALLOW_CTRL) && defined (ALLOW_OBCS)) |
61 |
|
|
62 |
c == local variables == |
c == local variables == |
63 |
|
|
64 |
integer bi,bj |
integer bi,bj |
215 |
do k = 1, Nr |
do k = 1, Nr |
216 |
do i = imin,imax |
do i = imin,imax |
217 |
j = OB_Jn(I,bi,bj) |
j = OB_Jn(I,bi,bj) |
218 |
|
IF ( j.EQ.OB_indexNone ) j = 1 |
219 |
cgg Barotropic velocity is stored in level 1. |
cgg Barotropic velocity is stored in level 1. |
220 |
tmpx = tmpfldxz(i,1,bi,bj) |
tmpx = tmpfldxz(i,1,bi,bj) |
221 |
if (maskS(i,j,k,bi,bj) .ne. 0.) then |
if (maskS(i,j,k,bi,bj) .ne. 0.) then |
257 |
do k = 1, Nr |
do k = 1, Nr |
258 |
do i = imin,imax |
do i = imin,imax |
259 |
j = OB_Js(I,bi,bj) |
j = OB_Js(I,bi,bj) |
260 |
|
IF ( j.EQ.OB_indexNone ) j = 1 |
261 |
cgg Barotropic velocity is stored in level 1. |
cgg Barotropic velocity is stored in level 1. |
262 |
tmpx = tmpfldxz(i,1,bi,bj) |
tmpx = tmpfldxz(i,1,bi,bj) |
263 |
if (maskS(i,j+1,k,bi,bj) .ne. 0.) then |
if (maskS(i,j+1,k,bi,bj) .ne. 0.) then |
300 |
do k = 1, Nr |
do k = 1, Nr |
301 |
do j = jmin,jmax |
do j = jmin,jmax |
302 |
i = OB_Iw(j,bi,bj) |
i = OB_Iw(j,bi,bj) |
303 |
|
IF ( i.EQ.OB_indexNone ) i = 1 |
304 |
cgg Barotropic velocity is stored in the level 1. |
cgg Barotropic velocity is stored in the level 1. |
305 |
tmpy = tmpfldyz(j,1,bi,bj) |
tmpy = tmpfldyz(j,1,bi,bj) |
306 |
if (maskW(i+1,j,k,bi,bj) .ne. 0.) then |
if (maskW(i+1,j,k,bi,bj) .ne. 0.) then |
343 |
do k = 1, Nr |
do k = 1, Nr |
344 |
do j = jmin,jmax |
do j = jmin,jmax |
345 |
i = OB_Ie(j,bi,bj) |
i = OB_Ie(j,bi,bj) |
346 |
|
IF ( i.EQ.OB_indexNone ) i = 1 |
347 |
cgg Barotropic velocity stored in level 1. |
cgg Barotropic velocity stored in level 1. |
348 |
tmpy = tmpfldyz(j,1,bi,bj) |
tmpy = tmpfldyz(j,1,bi,bj) |
349 |
if (maskW(i,j,k,bi,bj) .ne. 0.) then |
if (maskW(i,j,k,bi,bj) .ne. 0.) then |
371 |
#endif |
#endif |
372 |
#endif |
#endif |
373 |
|
|
374 |
|
#endif /* ALLOW_CTRL and ALLOW_OBCS */ |
375 |
|
|
376 |
return |
return |
377 |
end |
end |