/[MITgcm]/MITgcm/pkg/ctrl/ctrl_getobcsw.F
ViewVC logotype

Diff of /MITgcm/pkg/ctrl/ctrl_getobcsw.F

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

revision 1.12 by mmazloff, Wed Apr 20 19:14:07 2011 UTC revision 1.17 by gforget, Thu Oct 9 00:49:26 2014 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3    
4  #include "CTRL_CPPOPTIONS.h"  #include "CTRL_OPTIONS.h"
5  #ifdef ALLOW_OBCS  #ifdef ALLOW_OBCS
6  # include "OBCS_OPTIONS.h"  # include "OBCS_OPTIONS.h"
7  #endif  #endif
8    
   
9        subroutine ctrl_getobcsw(        subroutine ctrl_getobcsw(
10       I                             mytime,       I                             mytime,
11       I                             myiter,       I                             myiter,
# Line 29  c     ================================== Line 28  c     ==================================
28    
29        implicit none        implicit none
30    
 #ifdef ALLOW_OBCSW_CONTROL  
   
31  c     == global variables ==  c     == global variables ==
32    #ifdef ALLOW_OBCSW_CONTROL
33  #include "EEPARAMS.h"  #include "EEPARAMS.h"
34  #include "SIZE.h"  #include "SIZE.h"
35  #include "PARAMS.h"  #include "PARAMS.h"
36  #include "GRID.h"  #include "GRID.h"
37  #include "OBCS.h"  c#include "OBCS_PARAMS.h"
38    #include "OBCS_GRID.h"
39    #include "OBCS_FIELDS.h"
40    #include "CTRL_SIZE.h"
41  #include "ctrl.h"  #include "ctrl.h"
42  #include "ctrl_dummy.h"  #include "ctrl_dummy.h"
43    #include "CTRL_OBCS.h"
44  #include "optim.h"  #include "optim.h"
45    #endif /* ALLOW_OBCSW_CONTROL */
46    
47  c     == routine arguments ==  c     == routine arguments ==
   
48        _RL     mytime        _RL     mytime
49        integer myiter        integer myiter
50        integer mythid        integer mythid
51    
52    #ifdef ALLOW_OBCSW_CONTROL
53  c     == local variables ==  c     == local variables ==
54    
55        integer bi,bj        integer bi,bj
# Line 130  c--   Get the counters, flags, and the i Line 131  c--   Get the counters, flags, and the i
131            if (iobcs .gt. 2) then            if (iobcs .gt. 2) then
132             do j = jmin,jmax             do j = jmin,jmax
133              i = OB_Iw(j,bi,bj)              i = OB_Iw(j,bi,bj)
134                IF ( i.EQ.OB_indexNone ) i = 1
135  cih    Determine number of open vertical layers.  cih    Determine number of open vertical layers.
136              nz = 0              nz = 0
137              do k = 1,Nr              do k = 1,Nr
# Line 198  cgg   & Line 200  cgg   &
200            if (iobcs .gt. 2) then            if (iobcs .gt. 2) then
201             do j = jmin,jmax             do j = jmin,jmax
202              i = OB_Iw(j,bi,bj)              i = OB_Iw(j,bi,bj)
203                IF ( i.EQ.OB_indexNone ) i = 1
204  cih    Determine number of open vertical layers.  cih    Determine number of open vertical layers.
205              nz = 0              nz = 0
206              do k = 1,Nr              do k = 1,Nr
# Line 249  c--   Calculate mask for tracer cells (0 Line 252  c--   Calculate mask for tracer cells (0
252           do k = 1,nr           do k = 1,nr
253            do j = 1,sny            do j = 1,sny
254             i = OB_Iw(j,bi,bj)             i = OB_Iw(j,bi,bj)
255               IF ( i.EQ.OB_indexNone ) i = 1
256             if (iobcs .EQ. 1) then             if (iobcs .EQ. 1) then
257              OBWt(j,k,bi,bj) = OBWt (j,k,bi,bj)              OBWt(j,k,bi,bj) = OBWt (j,k,bi,bj)
258       &           + obcswfac            *xx_obcsw0(j,k,bi,bj,iobcs)       &           + obcswfac            *xx_obcsw0(j,k,bi,bj,iobcs)
# Line 278  c--   Calculate mask for tracer cells (0 Line 282  c--   Calculate mask for tracer cells (0
282           enddo           enddo
283          enddo          enddo
284         enddo         enddo
285          
286  C--   End over iobcs loop  C--   End over iobcs loop
287        enddo        enddo
288    
 #else /* ALLOW_OBCSW_CONTROL undefined */  
   
 c     == routine arguments ==  
   
       _RL     mytime  
       integer myiter  
       integer mythid  
   
 c--   CPP flag ALLOW_OBCSW_CONTROL undefined.  
   
289  #endif /* ALLOW_OBCSW_CONTROL */  #endif /* ALLOW_OBCSW_CONTROL */
290    
291          return
292        end        end
   

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.22