/[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.16 by jmc, Tue Sep 18 20:21:23 2012 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 "optim.h"  #include "optim.h"
44    #endif /* ALLOW_OBCSW_CONTROL */
45    
46  c     == routine arguments ==  c     == routine arguments ==
   
47        _RL     mytime        _RL     mytime
48        integer myiter        integer myiter
49        integer mythid        integer mythid
50    
51    #ifdef ALLOW_OBCSW_CONTROL
52  c     == local variables ==  c     == local variables ==
53    
54        integer bi,bj        integer bi,bj
# Line 130  c--   Get the counters, flags, and the i Line 130  c--   Get the counters, flags, and the i
130            if (iobcs .gt. 2) then            if (iobcs .gt. 2) then
131             do j = jmin,jmax             do j = jmin,jmax
132              i = OB_Iw(j,bi,bj)              i = OB_Iw(j,bi,bj)
133                IF ( i.EQ.OB_indexNone ) i = 1
134  cih    Determine number of open vertical layers.  cih    Determine number of open vertical layers.
135              nz = 0              nz = 0
136              do k = 1,Nr              do k = 1,Nr
# Line 198  cgg   & Line 199  cgg   &
199            if (iobcs .gt. 2) then            if (iobcs .gt. 2) then
200             do j = jmin,jmax             do j = jmin,jmax
201              i = OB_Iw(j,bi,bj)              i = OB_Iw(j,bi,bj)
202                IF ( i.EQ.OB_indexNone ) i = 1
203  cih    Determine number of open vertical layers.  cih    Determine number of open vertical layers.
204              nz = 0              nz = 0
205              do k = 1,Nr              do k = 1,Nr
# Line 249  c--   Calculate mask for tracer cells (0 Line 251  c--   Calculate mask for tracer cells (0
251           do k = 1,nr           do k = 1,nr
252            do j = 1,sny            do j = 1,sny
253             i = OB_Iw(j,bi,bj)             i = OB_Iw(j,bi,bj)
254               IF ( i.EQ.OB_indexNone ) i = 1
255             if (iobcs .EQ. 1) then             if (iobcs .EQ. 1) then
256              OBWt(j,k,bi,bj) = OBWt (j,k,bi,bj)              OBWt(j,k,bi,bj) = OBWt (j,k,bi,bj)
257       &           + 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 281  c--   Calculate mask for tracer cells (0
281           enddo           enddo
282          enddo          enddo
283         enddo         enddo
284          
285  C--   End over iobcs loop  C--   End over iobcs loop
286        enddo        enddo
287    
 #else /* ALLOW_OBCSW_CONTROL undefined */  
   
 c     == routine arguments ==  
   
       _RL     mytime  
       integer myiter  
       integer mythid  
   
 c--   CPP flag ALLOW_OBCSW_CONTROL undefined.  
   
288  #endif /* ALLOW_OBCSW_CONTROL */  #endif /* ALLOW_OBCSW_CONTROL */
289    
290          return
291        end        end
   

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

  ViewVC Help
Powered by ViewVC 1.1.22