/[MITgcm]/MITgcm/pkg/ecco/cost_obcsvol.F
ViewVC logotype

Diff of /MITgcm/pkg/ecco/cost_obcsvol.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.10 by jmc, Fri Aug 10 19:45:26 2012 UTC revision 1.13 by gforget, Mon Oct 20 03:16:12 2014 UTC
# Line 2  C $Header$ Line 2  C $Header$
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,
# Line 29  c     == global variables == Line 32  c     == global variables ==
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    
# Line 50  c     == routine arguments == Line 57  c     == routine arguments ==
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
# Line 206  c--         Determine the weights to be Line 215  c--         Determine the weights to be
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
# Line 247  c--         Determine the weights to be Line 257  c--         Determine the weights to be
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
# Line 289  c--         Determine the weights to be Line 300  c--         Determine the weights to be
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
# Line 331  c--         Determine the weights to be Line 343  c--         Determine the weights to be
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
# Line 358  c--   Do the global summation. Line 371  c--   Do the global summation.
371  #endif  #endif
372  #endif  #endif
373    
374    #endif /* ALLOW_CTRL and ALLOW_OBCS */
375    
376        return        return
377        end        end

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.22