/[MITgcm]/MITgcm/model/src/dynamics.F
ViewVC logotype

Diff of /MITgcm/model/src/dynamics.F

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

revision 1.5 by adcroft, Mon May 4 16:32:10 1998 UTC revision 1.178 by jmc, Mon Nov 28 23:05:05 2016 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2    C $Name$
3    
4  #include "CPP_EEOPTIONS.h"  #include "PACKAGES_CONFIG.h"
5    #include "CPP_OPTIONS.h"
6        SUBROUTINE DYNAMICS(myThid)  #ifdef ALLOW_AUTODIFF
7  C     /==========================================================\  # include "AUTODIFF_OPTIONS.h"
8  C     | SUBROUTINE DYNAMICS                                      |  #endif
9  C     | o Controlling routine for the explicit part of the model |  #ifdef ALLOW_MOM_COMMON
10  C     |   dynamics.                                              |  # include "MOM_COMMON_OPTIONS.h"
11  C     |==========================================================|  #endif
12  C     | This routine evaluates the "dynamics" terms for each     |  #ifdef ALLOW_OBCS
13  C     | block of ocean in turn. Because the blocks of ocean have |  # include "OBCS_OPTIONS.h"
14  C     | overlap regions they are independent of one another.     |  #endif
15  C     | If terms involving lateral integrals are needed in this  |  
16  C     | routine care will be needed. Similarly finite-difference |  #undef DYNAMICS_GUGV_EXCH_CHECK
17  C     | operations with stencils wider than the overlap region   |  
18  C     | require special consideration.                           |  CBOP
19  C     | Notes                                                    |  C     !ROUTINE: DYNAMICS
20  C     | =====                                                    |  C     !INTERFACE:
21  C     | C*P* comments indicating place holders for which code is |        SUBROUTINE DYNAMICS(myTime, myIter, myThid)
22  C     |      presently being developed.                          |  C     !DESCRIPTION: \bv
23  C     \==========================================================/  C     *==========================================================*
24    C     | SUBROUTINE DYNAMICS
25    C     | o Controlling routine for the explicit part of the model
26    C     |   dynamics.
27    C     *==========================================================*
28    C     \ev
29    C     !USES:
30          IMPLICIT NONE
31  C     == Global variables ===  C     == Global variables ===
32  #include "SIZE.h"  #include "SIZE.h"
33  #include "EEPARAMS.h"  #include "EEPARAMS.h"
34  #include "CG2D.h"  #include "PARAMS.h"
35    #include "GRID.h"
36  #include "DYNVARS.h"  #include "DYNVARS.h"
37    #ifdef ALLOW_MOM_COMMON
38    # include "MOM_VISC.h"
39    #endif
40    #ifdef ALLOW_CD_CODE
41    # include "CD_CODE_VARS.h"
42    #endif
43    #ifdef ALLOW_AUTODIFF
44    # include "tamc.h"
45    # include "tamc_keys.h"
46    # include "FFIELDS.h"
47    # include "EOS.h"
48    # ifdef ALLOW_KPP
49    #  include "KPP.h"
50    # endif
51    # ifdef ALLOW_PTRACERS
52    #  include "PTRACERS_SIZE.h"
53    #  include "PTRACERS_FIELDS.h"
54    # endif
55    # ifdef ALLOW_OBCS
56    #  include "OBCS_PARAMS.h"
57    #  include "OBCS_FIELDS.h"
58    #  ifdef ALLOW_PTRACERS
59    #   include "OBCS_PTRACERS.h"
60    #  endif
61    # endif
62    # ifdef ALLOW_MOM_FLUXFORM
63    #  include "MOM_FLUXFORM.h"
64    # endif
65    #endif /* ALLOW_AUTODIFF */
66    
67    C     !CALLING SEQUENCE:
68    C     DYNAMICS()
69    C      |
70    C      |-- CALC_EP_FORCING
71    C      |
72    C      |-- CALC_GRAD_PHI_SURF
73    C      |
74    C      |-- CALC_VISCOSITY
75    C      |
76    C      |-- MOM_CALC_3D_STRAIN
77    C      |
78    C      |-- CALC_EDDY_STRESS
79    C      |
80    C      |-- CALC_PHI_HYD
81    C      |
82    C      |-- MOM_FLUXFORM
83    C      |
84    C      |-- MOM_VECINV
85    C      |
86    C      |-- MOM_CALC_SMAG_3D
87    C      |-- MOM_UV_SMAG_3D
88    C      |
89    C      |-- TIMESTEP
90    C      |
91    C      |-- MOM_U_IMPLICIT_R
92    C      |-- MOM_V_IMPLICIT_R
93    C      |
94    C      |-- IMPLDIFF
95    C      |
96    C      |-- OBCS_APPLY_UV
97    C      |
98    C      |-- CALC_GW
99    C      |
100    C      |-- DIAGNOSTICS_FILL
101    C      |-- DEBUG_STATS_RL
102    
103    C     !INPUT/OUTPUT PARAMETERS:
104  C     == Routine arguments ==  C     == Routine arguments ==
105  C     myThid - Thread number for this instance of the routine.  C     myTime :: Current time in simulation
106    C     myIter :: Current iteration number in simulation
107    C     myThid :: Thread number for this instance of the routine.
108          _RL myTime
109          INTEGER myIter
110        INTEGER myThid        INTEGER myThid
111    
112    C     !FUNCTIONS:
113    #ifdef ALLOW_DIAGNOSTICS
114          LOGICAL  DIAGNOSTICS_IS_ON
115          EXTERNAL DIAGNOSTICS_IS_ON
116    #endif
117    
118    C     !LOCAL VARIABLES:
119  C     == Local variables  C     == Local variables
120  C     xA, yA                 - Per block temporaries holding face areas  C     fVer[UV]               o fVer: Vertical flux term - note fVer
121  C     uTrans, vTrans, wTrans - Per block temporaries holding flow transport  C                                    is "pipelined" in the vertical
122  C                              o uTrans: Zonal transport  C                                    so we need an fVer for each
123  C                              o vTrans: Meridional transport  C                                    variable.
124  C                              o wTrans: Vertical transport  C     phiHydC    :: hydrostatic potential anomaly at cell center
125  C     maskC,maskUp             o maskC: land/water mask for tracer cells  C                   In z coords phiHyd is the hydrostatic potential
126  C                              o maskUp: land/water mask for W points  C                      (=pressure/rho0) anomaly
127  C     aTerm, xTerm, cTerm    - Work arrays for holding separate terms in  C                   In p coords phiHyd is the geopotential height anomaly.
128  C     mTerm, pTerm,            tendency equations.  C     phiHydF    :: hydrostatic potential anomaly at middle between 2 centers
129  C     fZon, fMer, fVer[STUV]   o aTerm: Advection term  C     dPhiHydX,Y :: Gradient (X & Y directions) of hydrostatic potential anom.
130  C                              o xTerm: Mixing term  C     phiSurfX,  ::  gradient of Surface potential (Pressure/rho, ocean)
131  C                              o cTerm: Coriolis term  C     phiSurfY             or geopotential (atmos) in X and Y direction
132  C                              o mTerm: Metric term  C     guDissip   :: dissipation tendency (all explicit terms), u component
133  C                              o pTerm: Pressure term  C     gvDissip   :: dissipation tendency (all explicit terms), v component
134  C                              o fZon: Zonal flux term  C     kappaRU    :: vertical viscosity for velocity U-component
135  C                              o fMer: Meridional flux term  C     kappaRV    :: vertical viscosity for velocity V-component
136  C                              o fVer: Vertical flux term - note fVer  C     iMin, iMax :: Ranges and sub-block indices on which calculations
137  C                                      is "pipelined" in the vertical  C     jMin, jMax    are applied.
138  C                                      so we need an fVer for each  C     bi, bj     :: tile indices
139  C                                      variable.  C     k          :: current level index
140  C     iMin, iMax - Ranges and sub-block indices on which calculations  C     km1, kp1   :: index of level above (k-1) and below (k+1)
141  C     jMin, jMax   are applied.  C     kUp, kDown :: Index for interface above and below. kUp and kDown are
142  C     bi, bj  C                   are switched with k to be the appropriate index into fVerU,V
143  C     k, kUp, kDown, kM1 - Index for layer above and below. kUp and kDown        _RL fVerU   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)
144  C                          are switched with layer to be the appropriate index        _RL fVerV   (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)
145  C                          into fVerTerm        _RL phiHydF (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
146        _RS xA    (1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL phiHydC (1-OLx:sNx+OLx,1-OLy:sNy+OLy)
147        _RS yA    (1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL dPhiHydX(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
148        _RL uTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL dPhiHydY(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
149        _RL vTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL phiSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
150        _RL wTrans(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL phiSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
151        _RS maskC (1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL guDissip(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
152        _RS maskUp(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL gvDissip(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
153        _RL aTerm (1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL kappaRU (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
154        _RL xTerm (1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL kappaRV (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
155        _RL cTerm (1-OLx:sNx+OLx,1-OLy:sNy+OLy)  #ifdef ALLOW_SMAG_3D
156        _RL mTerm (1-OLx:sNx+OLx,1-OLy:sNy+OLy)  C     str11       :: strain component Vxx @ grid-cell center
157        _RL pTerm (1-OLx:sNx+OLx,1-OLy:sNy+OLy)  C     str22       :: strain component Vyy @ grid-cell center
158        _RL fZon  (1-OLx:sNx+OLx,1-OLy:sNy+OLy)  C     str33       :: strain component Vzz @ grid-cell center
159        _RL fMer  (1-OLx:sNx+OLx,1-OLy:sNy+OLy)  C     str12       :: strain component Vxy @ grid-cell corner
160        _RL fVerT (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)  C     str13       :: strain component Vxz @ above uVel
161        _RL fVerS (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)  C     str23       :: strain component Vyz @ above vVel
162        _RL fVerU (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)  C     viscAh3d_00 :: Smagorinsky viscosity @ grid-cell center
163        _RL fVerV (1-OLx:sNx+OLx,1-OLy:sNy+OLy,2)  C     viscAh3d_12 :: Smagorinsky viscosity @ grid-cell corner
164        _RL pH    (1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nz)  C     viscAh3d_13 :: Smagorinsky viscosity @ above uVel
165        _RL rhokm1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)  C     viscAh3d_23 :: Smagorinsky viscosity @ above vVel
166        _RL rhokp1(1-OLx:sNx+OLx,1-OLy:sNy+OLy)  C     addDissU    :: zonal momentum tendency from 3-D Smag. viscosity
167        _RL pSurfX(1-OLx:sNx+OLx,1-OLy:sNy+OLy)  C     addDissV    :: merid momentum tendency from 3-D Smag. viscosity
168        _RL pSurfY(1-OLx:sNx+OLx,1-OLy:sNy+OLy)        _RL str11(1-OLx:sNx+OLx,1-OLy:sNy+OLy, Nr )
169        INTEGER iMin, iMax        _RL str22(1-OLx:sNx+OLx,1-OLy:sNy+OLy, Nr )
170        INTEGER jMin, jMax        _RL str33(1-OLx:sNx+OLx,1-OLy:sNy+OLy, Nr )
171          _RL str12(1-OLx:sNx+OLx,1-OLy:sNy+OLy, Nr )
172          _RL str13(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
173          _RL str23(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
174          _RL viscAh3d_00(1-OLx:sNx+OLx,1-OLy:sNy+OLy, Nr )
175          _RL viscAh3d_12(1-OLx:sNx+OLx,1-OLy:sNy+OLy, Nr )
176          _RL viscAh3d_13(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
177          _RL viscAh3d_23(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nr+1)
178          _RL addDissU(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
179          _RL addDissV(1-OLx:sNx+OLx,1-OLy:sNy+OLy)
180    #elif ( defined ALLOW_NONHYDROSTATIC )
181          _RL str13(1), str23(1), str33(1)
182          _RL viscAh3d_00(1), viscAh3d_13(1), viscAh3d_23(1)
183    #endif
184    
185        INTEGER bi, bj        INTEGER bi, bj
186        INTEGER i, j        INTEGER i, j
187        INTEGER k, kM1, kUp, kDown        INTEGER k, km1, kp1, kUp, kDown
188          INTEGER iMin, iMax
189          INTEGER jMin, jMax
190          PARAMETER( iMin = 0 , iMax = sNx+1 )
191          PARAMETER( jMin = 0 , jMax = sNy+1 )
192    
193    #ifdef ALLOW_DIAGNOSTICS
194          LOGICAL dPhiHydDiagIsOn
195          _RL tmpFac
196    #endif /* ALLOW_DIAGNOSTICS */
197    
198    C---    The algorithm...
199    C
200    C       "Correction Step"
201    C       =================
202    C       Here we update the horizontal velocities with the surface
203    C       pressure such that the resulting flow is either consistent
204    C       with the free-surface evolution or the rigid-lid:
205    C         U[n] = U* + dt x d/dx P
206    C         V[n] = V* + dt x d/dy P
207    C
208    C       "Calculation of Gs"
209    C       ===================
210    C       This is where all the accelerations and tendencies (ie.
211    C       physics, parameterizations etc...) are calculated
212    C         rho = rho ( theta[n], salt[n] )
213    C         b   = b(rho, theta)
214    C         K31 = K31 ( rho )
215    C         Gu[n] = Gu( u[n], v[n], wVel, b, ... )
216    C         Gv[n] = Gv( u[n], v[n], wVel, b, ... )
217    C         Gt[n] = Gt( theta[n], u[n], v[n], wVel, K31, ... )
218    C         Gs[n] = Gs( salt[n], u[n], v[n], wVel, K31, ... )
219    C
220    C       "Time-stepping" or "Prediction"
221    C       ================================
222    C       The models variables are stepped forward with the appropriate
223    C       time-stepping scheme (currently we use Adams-Bashforth II)
224    C       - For momentum, the result is always *only* a "prediction"
225    C       in that the flow may be divergent and will be "corrected"
226    C       later with a surface pressure gradient.
227    C       - Normally for tracers the result is the new field at time
228    C       level [n+1} *BUT* in the case of implicit diffusion the result
229    C       is also *only* a prediction.
230    C       - We denote "predictors" with an asterisk (*).
231    C         U* = U[n] + dt x ( 3/2 Gu[n] - 1/2 Gu[n-1] )
232    C         V* = V[n] + dt x ( 3/2 Gv[n] - 1/2 Gv[n-1] )
233    C         theta[n+1] = theta[n] + dt x ( 3/2 Gt[n] - 1/2 atG[n-1] )
234    C         salt[n+1] = salt[n] + dt x ( 3/2 Gt[n] - 1/2 atG[n-1] )
235    C       With implicit diffusion:
236    C         theta* = theta[n] + dt x ( 3/2 Gt[n] - 1/2 atG[n-1] )
237    C         salt* = salt[n] + dt x ( 3/2 Gt[n] - 1/2 atG[n-1] )
238    C         (1 + dt * K * d_zz) theta[n] = theta*
239    C         (1 + dt * K * d_zz) salt[n] = salt*
240    C---
241    CEOP
242    
243    #ifdef ALLOW_DEBUG
244          IF (debugMode) CALL DEBUG_ENTER( 'DYNAMICS', myThid )
245    #endif
246    
247    #ifdef ALLOW_DIAGNOSTICS
248          dPhiHydDiagIsOn = .FALSE.
249          IF ( useDiagnostics )
250         &  dPhiHydDiagIsOn = DIAGNOSTICS_IS_ON( 'Um_dPHdx', myThid )
251         &               .OR. DIAGNOSTICS_IS_ON( 'Vm_dPHdy', myThid )
252    #endif
253    
254    C-- Call to routine for calculation of Eliassen-Palm-flux-forced
255    C    U-tendency, if desired:
256    #ifdef INCLUDE_EP_FORCING_CODE
257          CALL CALC_EP_FORCING(myThid)
258    #endif
259    
260    #ifdef ALLOW_AUTODIFF_MONITOR_DIAG
261          CALL DUMMY_IN_DYNAMICS( myTime, myIter, myThid )
262    #endif
263    
264    #ifdef ALLOW_AUTODIFF_TAMC
265    C--   HPF directive to help TAMC
266    CHPF$ INDEPENDENT
267    #endif /* ALLOW_AUTODIFF_TAMC */
268    
269          DO bj=myByLo(myThid),myByHi(myThid)
270    
271    #ifdef ALLOW_AUTODIFF_TAMC
272    C--    HPF directive to help TAMC
273    CHPF$  INDEPENDENT, NEW (fVerU,fVerV
274    CHPF$&                  ,phiHydF
275    CHPF$&                  ,kappaRU,kappaRV
276    CHPF$&                  )
277    #endif /* ALLOW_AUTODIFF_TAMC */
278    
279           DO bi=myBxLo(myThid),myBxHi(myThid)
280    
281    #ifdef ALLOW_AUTODIFF_TAMC
282              act1 = bi - myBxLo(myThid)
283              max1 = myBxHi(myThid) - myBxLo(myThid) + 1
284              act2 = bj - myByLo(myThid)
285              max2 = myByHi(myThid) - myByLo(myThid) + 1
286              act3 = myThid - 1
287              max3 = nTx*nTy
288              act4 = ikey_dynamics - 1
289              idynkey = (act1 + 1) + act2*max1
290         &                      + act3*max1*max2
291         &                      + act4*max1*max2*max3
292    #endif /* ALLOW_AUTODIFF_TAMC */
293    
294  C--   Set up work arrays with valid (i.e. not NaN) values  C--   Set up work arrays with valid (i.e. not NaN) values
295  C     These inital values do not alter the numerical results. They  C     These initial values do not alter the numerical results. They
296  C     just ensure that all memory references are to valid floating  C     just ensure that all memory references are to valid floating
297  C     point numbers. This prevents spurious hardware signals due to  C     point numbers. This prevents spurious hardware signals due to
298  C     uninitialised but inert locations.  C     uninitialised but inert locations.
       DO j=1-OLy,sNy+OLy  
        DO i=1-OLx,sNx+OLx  
         xA(i,j)      = 0. _d 0  
         yA(i,j)      = 0. _d 0  
         uTrans(i,j)  = 0. _d 0  
         vTrans(i,j)  = 0. _d 0  
         aTerm(i,j)   = 0. _d 0  
         xTerm(i,j)   = 0. _d 0  
         cTerm(i,j)   = 0. _d 0  
         mTerm(i,j)   = 0. _d 0  
         pTerm(i,j)   = 0. _d 0  
         fZon(i,j)    = 0. _d 0  
         fMer(i,j)    = 0. _d 0  
         DO K=1,nZ  
          pH (i,j,k)  = 0. _d 0  
         ENDDO  
         rhokm1(i,j)  = 0. _d 0  
         rhokp1(i,j)  = 0. _d 0  
        ENDDO  
       ENDDO  
 C--   Set up work arrays that need valid initial values  
       DO j=1-OLy,sNy+OLy  
        DO i=1-OLx,sNx+OLx  
         wTrans(i,j)  = 0. _d 0  
         fVerT(i,j,1) = 0. _d 0  
         fVerT(i,j,2) = 0. _d 0  
         fVerS(i,j,1) = 0. _d 0  
         fVerS(i,j,2) = 0. _d 0  
         fVerU(i,j,1) = 0. _d 0  
         fVerU(i,j,2) = 0. _d 0  
         fVerV(i,j,1) = 0. _d 0  
         fVerV(i,j,2) = 0. _d 0  
        ENDDO  
       ENDDO  
299    
300        DO bj=myByLo(myThid),myByHi(myThid)  #ifdef ALLOW_AUTODIFF
301         DO bi=myBxLo(myThid),myBxHi(myThid)          DO k=1,Nr
302             DO j=1-OLy,sNy+OLy
303  C--   Boundary condition on hydrostatic pressure is pH(z=0)=0            DO i=1-OLx,sNx+OLx
304    c--   need some re-initialisation here to break dependencies
305               gU(i,j,k,bi,bj) = 0. _d 0
306               gV(i,j,k,bi,bj) = 0. _d 0
307              ENDDO
308             ENDDO
309            ENDDO
310    #endif /* ALLOW_AUTODIFF */
311          DO j=1-OLy,sNy+OLy          DO j=1-OLy,sNy+OLy
312           DO i=1-OLx,sNx+OLx           DO i=1-OLx,sNx+OLx
313            pH(i,j,1) = 0. _d 0            fVerU  (i,j,1) = 0. _d 0
314              fVerU  (i,j,2) = 0. _d 0
315              fVerV  (i,j,1) = 0. _d 0
316              fVerV  (i,j,2) = 0. _d 0
317              phiHydF (i,j)  = 0. _d 0
318              phiHydC (i,j)  = 0. _d 0
319    #ifndef INCLUDE_PHIHYD_CALCULATION_CODE
320              dPhiHydX(i,j)  = 0. _d 0
321              dPhiHydY(i,j)  = 0. _d 0
322    #endif
323              phiSurfX(i,j)  = 0. _d 0
324              phiSurfY(i,j)  = 0. _d 0
325              guDissip(i,j)  = 0. _d 0
326              gvDissip(i,j)  = 0. _d 0
327    #ifdef ALLOW_AUTODIFF
328              phiHydLow(i,j,bi,bj) = 0. _d 0
329    # if (defined NONLIN_FRSURF) && (defined ALLOW_MOM_FLUXFORM)
330    #  ifndef DISABLE_RSTAR_CODE
331              dWtransC(i,j,bi,bj) = 0. _d 0
332              dWtransU(i,j,bi,bj) = 0. _d 0
333              dWtransV(i,j,bi,bj) = 0. _d 0
334    #  endif
335    # endif
336    #endif /* ALLOW_AUTODIFF */
337           ENDDO           ENDDO
338          ENDDO          ENDDO
339    
340          iMin = 1-OLx+1  C--     Start computation of dynamics
341          iMax = sNx+OLx  
342          jMin = 1-OLy+1  #ifdef ALLOW_AUTODIFF_TAMC
343          jMax = sNy+OLy  CADJ STORE wVel (:,:,:,bi,bj) =
344    CADJ &     comlev1_bibj, key=idynkey, byte=isbyte
345  C--     Calculate gradient of surface pressure  #endif /* ALLOW_AUTODIFF_TAMC */
346          CALL GRAD_PSURF(  
347       I       bi,bj,iMin,iMax,jMin,jMax,  C--     Explicit part of the Surface Potential Gradient (add in TIMESTEP)
348       O       pSurfX,pSurfY,  C       (note: this loop will be replaced by CALL CALC_GRAD_ETA)
349       I       myThid)          IF (implicSurfPress.NE.1.) THEN
350              CALL CALC_GRAD_PHI_SURF(
351  C--     Update fields in top level according to tendency terms       I         bi,bj,iMin,iMax,jMin,jMax,
352          CALL TIMESTEP(       I         etaN,
353       I       bi,bj,iMin,iMax,jMin,jMax,1,pSurfX,pSurfY,myThid)       O         phiSurfX,phiSurfY,
354         I         myThid )
355  C Density of 1st level (below W(1)) reference to level 1          ENDIF
356           CALL FIND_RHO(  
357       I      bi, bj, iMin, iMax, jMin, jMax, 1, 1, 'LINEAR',  #ifdef ALLOW_AUTODIFF_TAMC
358       O      rhoKm1,  CADJ STORE uVel (:,:,:,bi,bj) = comlev1_bibj, key=idynkey, byte=isbyte
359       I      myThid )  CADJ STORE vVel (:,:,:,bi,bj) = comlev1_bibj, key=idynkey, byte=isbyte
360  C--     Integrate hydrostatic balance for pH with BC of pH(z=0)=0  #ifdef ALLOW_KPP
361           CALL CALC_PH(  CADJ STORE KPPviscAz (:,:,:,bi,bj)
362       I       bi,bj,iMin,iMax,jMin,jMax,1,rhoKm1,rhoKm1,  CADJ &                 = comlev1_bibj, key=idynkey, byte=isbyte
363       U       pH,  #endif /* ALLOW_KPP */
364       I       myThid )  #endif /* ALLOW_AUTODIFF_TAMC */
365    
366          DO K=2,Nz  #ifndef ALLOW_AUTODIFF
367  C--     Update fields in Kth level according to tendency terms          IF ( .NOT.momViscosity ) THEN
368          CALL TIMESTEP(  #endif
369       I       bi,bj,iMin,iMax,jMin,jMax,K,pSurfX,pSurfY,myThid)            DO k=1,Nr+1
370  C Density of K-1 level (above W(K)) reference to K level             DO j=1-OLy,sNy+OLy
371           CALL FIND_RHO(              DO i=1-OLx,sNx+OLx
372       I      bi, bj, iMin, iMax, jMin, jMax,  K-1, K, 'LINEAR',               kappaRU(i,j,k) = 0. _d 0
373       O      rhoKm1,               kappaRV(i,j,k) = 0. _d 0
374       I      myThid )              ENDDO
375  C Density of K level (below W(K)) reference to K level             ENDDO
376           CALL FIND_RHO(            ENDDO
377       I      bi, bj, iMin, iMax, jMin, jMax,  K, K, 'LINEAR',  #ifndef ALLOW_AUTODIFF
378       O      rhoKp1,          ENDIF
379       I      myThid )  #endif
380  C--     Calculate static stability and mix where convectively unstable  #ifdef INCLUDE_CALC_DIFFUSIVITY_CALL
381           CALL CONVECT(  C--     Calculate the total vertical viscosity
382       I       bi,bj,iMin,iMax,jMin,jMax,K,rhoKm1,rhoKp1,myThid)          IF ( momViscosity ) THEN
383  C Density of K-1 level (above W(K)) reference to K-1 level            CALL CALC_VISCOSITY(
384           CALL FIND_RHO(       I            bi,bj, iMin,iMax,jMin,jMax,
385       I      bi, bj, iMin, iMax, jMin, jMax,  K-1, K-1, 'LINEAR',       O            kappaRU, kappaRV,
386       O      rhoKm1,       I            myThid )
387       I      myThid )          ENDIF
388  C Density of K level (below W(K)) referenced to K level  #endif /* INCLUDE_CALC_DIFFUSIVITY_CALL */
389           CALL FIND_RHO(  
390       I      bi, bj, iMin, iMax, jMin, jMax,  K, K, 'LINEAR',  #ifdef ALLOW_SMAG_3D
391       O      rhoKp1,          IF ( useSmag3D ) THEN
392       I      myThid )            CALL MOM_CALC_3D_STRAIN(
393  C--     Integrate hydrostatic balance for pH with BC of pH(z=0)=0       O         str11, str22, str33, str12, str13, str23,
394           CALL CALC_PH(       I         bi, bj, myThid )
395       I       bi,bj,iMin,iMax,jMin,jMax,K,rhoKm1,rhoKp1,          ENDIF
396       U       pH,  #endif /* ALLOW_SMAG_3D */
397       I       myThid )  
398    #ifdef ALLOW_AUTODIFF_TAMC
399          ENDDO ! K  CADJ STORE kappaRU(:,:,:)
400    CADJ &     = comlev1_bibj, key=idynkey, byte=isbyte
401          DO K = Nz, 1, -1  CADJ STORE kappaRV(:,:,:)
402           kM1  =max(1,k-1)   ! Points to level above k (=k-1)  CADJ &     = comlev1_bibj, key=idynkey, byte=isbyte
403           kUp  =1+MOD(k+1,2) ! Cycles through 1,2 to point to layer above  #endif /* ALLOW_AUTODIFF_TAMC */
404           kDown=1+MOD(k,2)   ! Cycles through 2,1 to point to current layer  
405           iMin = 1-OLx+2  #ifdef ALLOW_OBCS
406           iMax = sNx+OLx-1  C--   For Stevens boundary conditions velocities need to be extrapolated
407           jMin = 1-OLy+2  C     (copied) to a narrow strip outside the domain
408           jMax = sNy+OLy-1          IF ( useOBCS ) THEN
409              CALL OBCS_COPY_UV_N(
410  C--      Get temporary terms used by tendency routines       U         uVel(1-OLx,1-OLy,1,bi,bj),
411           CALL CALC_COMMON_FACTORS (       U         vVel(1-OLx,1-OLy,1,bi,bj),
412       I        bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,       I         Nr, bi, bj, myThid )
413       O        xA,yA,uTrans,vTrans,wTrans,maskC,maskUp,          ENDIF
414       I        myThid)  #endif /* ALLOW_OBCS */
415    
416  C--      Calculate accelerations in the momentum equations  #ifdef ALLOW_EDDYPSI
417           CALL CALC_MOM_RHS(          CALL CALC_EDDY_STRESS(bi,bj,myThid)
418       I        bi,bj,iMin,iMax,jMin,jMax,k,kM1,kUp,kDown,  #endif
419       I        xA,yA,uTrans,vTrans,wTrans,maskC,  
420       I        pH,  C--     Start of dynamics loop
421       U        aTerm,xTerm,cTerm,mTerm,pTerm,          DO k=1,Nr
422       U        fZon, fMer, fVerU, fVerV,  
423       I        myThid)  C--       km1    Points to level above k (=k-1)
424    C--       kup    Cycles through 1,2 to point to layer above
425  C--      Calculate active tracer tendencies  C--       kDown  Cycles through 2,1 to point to current layer
426           CALL CALC_GT(  
427       I        bi,bj,iMin,iMax,jMin,jMax, k,kM1,kUp,kDown,            km1  = MAX(1,k-1)
428       I        xA,yA,uTrans,vTrans,wTrans,maskUp,            kp1  = MIN(k+1,Nr)
429       U        aTerm,xTerm,fZon,fMer,fVerT,            kup  = 1+MOD(k+1,2)
430       I        myThid)            kDown= 1+MOD(k,2)
431  Cdbg     CALL CALC_GS(  
432  Cdbg I        bi,bj,iMin,iMax,jMin,jMax, k,kM1,kUp,kDown,  #ifdef ALLOW_AUTODIFF_TAMC
433  Cdbg I        xA,yA,uTrans,vTrans,wTrans,maskUp,           kkey = (idynkey-1)*Nr + k
434  Cdbg U        aTerm,xTerm,fZon,fMer,fVerS,  CADJ STORE totPhiHyd (:,:,k,bi,bj)
435  Cdbg I        myThid)  CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
436    CADJ STORE phiHydLow (:,:,bi,bj)
437    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
438    CADJ STORE theta (:,:,k,bi,bj)
439    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
440    CADJ STORE salt  (:,:,k,bi,bj)
441    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
442    # ifdef NONLIN_FRSURF
443    cph-test
444    CADJ STORE  phiHydC (:,:)
445    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
446    CADJ STORE  phiHydF (:,:)
447    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
448    CADJ STORE gU(:,:,k,bi,bj)
449    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
450    CADJ STORE gV(:,:,k,bi,bj)
451    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
452    #  ifndef ALLOW_ADAMSBASHFORTH_3
453    CADJ STORE guNm1(:,:,k,bi,bj)
454    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
455    CADJ STORE gvNm1(:,:,k,bi,bj)
456    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
457    #  else
458    CADJ STORE guNm(:,:,k,bi,bj,1)
459    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
460    CADJ STORE guNm(:,:,k,bi,bj,2)
461    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
462    CADJ STORE gvNm(:,:,k,bi,bj,1)
463    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
464    CADJ STORE gvNm(:,:,k,bi,bj,2)
465    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
466    #  endif
467    #  ifdef ALLOW_CD_CODE
468    CADJ STORE uNM1(:,:,k,bi,bj)
469    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
470    CADJ STORE vNM1(:,:,k,bi,bj)
471    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
472    CADJ STORE uVelD(:,:,k,bi,bj)
473    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
474    CADJ STORE vVelD(:,:,k,bi,bj)
475    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
476    #  endif
477    # endif /* NONLIN_FRSURF */
478    #endif /* ALLOW_AUTODIFF_TAMC */
479    
480    C--      Integrate hydrostatic balance for phiHyd with BC of phiHyd(z=0)=0
481             CALL CALC_PHI_HYD(
482         I        bi,bj,iMin,iMax,jMin,jMax,k,
483         I        theta, salt,
484         U        phiHydF,
485         O        phiHydC, dPhiHydX, dPhiHydY,
486         I        myTime, myIter, myThid )
487    #ifdef ALLOW_DIAGNOSTICS
488             IF ( dPhiHydDiagIsOn ) THEN
489               tmpFac = -1. _d 0
490               CALL DIAGNOSTICS_SCALE_FILL( dPhiHydX, tmpFac, 1,
491         &                           'Um_dPHdx', k, 1, 2, bi, bj, myThid )
492               CALL DIAGNOSTICS_SCALE_FILL( dPhiHydY, tmpFac, 1,
493         &                           'Vm_dPHdy', k, 1, 2, bi, bj, myThid )
494             ENDIF
495    #endif /* ALLOW_DIAGNOSTICS */
496    
497    C--      Calculate accelerations in the momentum equations (gU, gV, ...)
498    C        and step forward storing the result in gU, gV, etc...
499             IF ( momStepping ) THEN
500    #ifdef ALLOW_AUTODIFF
501               DO j=1-OLy,sNy+OLy
502                DO i=1-OLx,sNx+OLx
503                  guDissip(i,j)  = 0. _d 0
504                  gvDissip(i,j)  = 0. _d 0
505                ENDDO
506               ENDDO
507    #endif /* ALLOW_AUTODIFF */
508    #ifdef ALLOW_AUTODIFF_TAMC
509    # if (defined NONLIN_FRSURF) && (defined ALLOW_MOM_FLUXFORM)
510    #  ifndef DISABLE_RSTAR_CODE
511    CADJ STORE dWtransC(:,:,bi,bj)
512    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
513    CADJ STORE dWtransU(:,:,bi,bj)
514    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
515    CADJ STORE dWtransV(:,:,bi,bj)
516    CADJ &     = comlev1_bibj_k, key=kkey, byte=isbyte
517    #  endif
518    # endif /* NONLIN_FRSURF and ALLOW_MOM_FLUXFORM */
519    # if (defined NONLIN_FRSURF) || (defined ALLOW_DEPTH_CONTROL)
520    CADJ STORE fVerU(:,:,:) = comlev1_bibj_k, key=kkey, byte=isbyte
521    CADJ STORE fVerV(:,:,:) = comlev1_bibj_k, key=kkey, byte=isbyte
522    # endif
523    #endif /* ALLOW_AUTODIFF_TAMC */
524               IF (.NOT. vectorInvariantMomentum) THEN
525    #ifdef ALLOW_MOM_FLUXFORM
526                  CALL MOM_FLUXFORM(
527         I         bi,bj,k,iMin,iMax,jMin,jMax,
528         I         kappaRU, kappaRV,
529         U         fVerU(1-OLx,1-OLy,kUp),   fVerV(1-OLx,1-OLy,kUp),
530         O         fVerU(1-OLx,1-OLy,kDown), fVerV(1-OLx,1-OLy,kDown),
531         O         guDissip, gvDissip,
532         I         myTime, myIter, myThid)
533    #endif
534               ELSE
535    #ifdef ALLOW_MOM_VECINV
536                 CALL MOM_VECINV(
537         I         bi,bj,k,iMin,iMax,jMin,jMax,
538         I         kappaRU, kappaRV,
539         I         fVerU(1-OLx,1-OLy,kUp),   fVerV(1-OLx,1-OLy,kUp),
540         O         fVerU(1-OLx,1-OLy,kDown), fVerV(1-OLx,1-OLy,kDown),
541         O         guDissip, gvDissip,
542         I         myTime, myIter, myThid)
543    #endif
544               ENDIF
545    
546    #ifdef ALLOW_SMAG_3D
547               IF ( useSmag3D ) THEN
548                 CALL MOM_CALC_SMAG_3D(
549         I         str11, str22, str33, str12, str13, str23,
550         O         viscAh3d_00, viscAh3d_12, viscAh3d_13, viscAh3d_23,
551         I         smag3D_hLsC, smag3D_hLsW, smag3D_hLsS, smag3D_hLsZ,
552         I         k, bi, bj, myThid )
553                 CALL MOM_UV_SMAG_3D(
554         I         str11, str22, str12, str13, str23,
555         I         viscAh3d_00, viscAh3d_12, viscAh3d_13, viscAh3d_23,
556         O         addDissU, addDissV,
557         I         iMin,iMax,jMin,jMax, k, bi, bj, myThid )
558                 DO j= jMin,jMax
559                  DO i= iMin,iMax
560                   guDissip(i,j) = guDissip(i,j) + addDissU(i,j)
561                   gvDissip(i,j) = gvDissip(i,j) + addDissV(i,j)
562                  ENDDO
563                 ENDDO
564               ENDIF
565    #endif /* ALLOW_SMAG_3D */
566    
567               CALL TIMESTEP(
568         I         bi,bj,iMin,iMax,jMin,jMax,k,
569         I         dPhiHydX,dPhiHydY, phiSurfX, phiSurfY,
570         I         guDissip, gvDissip,
571         I         myTime, myIter, myThid)
572    
573             ENDIF
574    
575    C--     end of dynamics k loop (1:Nr)
576            ENDDO
577    
578    C--     Implicit Vertical advection & viscosity
579    #if (defined (INCLUDE_IMPLVERTADV_CODE) && \
580         defined (ALLOW_MOM_COMMON) && !(defined ALLOW_AUTODIFF))
581            IF ( momImplVertAdv .OR. implicitViscosity
582         &                      .OR. selectImplicitDrag.GE.1 ) THEN
583    C      to recover older (prior to 2016-10-05) results:
584    c       IF ( momImplVertAdv ) THEN
585              CALL MOM_U_IMPLICIT_R( kappaRU,
586         I                           bi, bj, myTime, myIter, myThid )
587              CALL MOM_V_IMPLICIT_R( kappaRV,
588         I                           bi, bj, myTime, myIter, myThid )
589            ELSEIF ( implicitViscosity ) THEN
590    #else /* INCLUDE_IMPLVERTADV_CODE */
591            IF     ( implicitViscosity ) THEN
592    #endif /* INCLUDE_IMPLVERTADV_CODE */
593    #ifdef    ALLOW_AUTODIFF_TAMC
594    CADJ STORE gU(:,:,:,bi,bj) = comlev1_bibj , key=idynkey, byte=isbyte
595    #endif    /* ALLOW_AUTODIFF_TAMC */
596              CALL IMPLDIFF(
597         I         bi, bj, iMin, iMax, jMin, jMax,
598         I         -1, kappaRU, recip_hFacW(1-OLx,1-OLy,1,bi,bj),
599         U         gU(1-OLx,1-OLy,1,bi,bj),
600         I         myThid )
601    #ifdef    ALLOW_AUTODIFF_TAMC
602    CADJ STORE gV(:,:,:,bi,bj) = comlev1_bibj , key=idynkey, byte=isbyte
603    #endif    /* ALLOW_AUTODIFF_TAMC */
604              CALL IMPLDIFF(
605         I         bi, bj, iMin, iMax, jMin, jMax,
606         I         -2, kappaRV, recip_hFacS(1-OLx,1-OLy,1,bi,bj),
607         U         gV(1-OLx,1-OLy,1,bi,bj),
608         I         myThid )
609            ENDIF
610    
611    #ifdef ALLOW_OBCS
612    C--      Apply open boundary conditions
613            IF ( useOBCS ) THEN
614    C--      but first save intermediate velocities to be used in the
615    C        next time step for the Stevens boundary conditions
616              CALL OBCS_SAVE_UV_N(
617         I        bi, bj, iMin, iMax, jMin, jMax, 0,
618         I        gU, gV, myThid )
619              CALL OBCS_APPLY_UV( bi, bj, 0, gU, gV, myThid )
620            ENDIF
621    #endif /* ALLOW_OBCS */
622    
623    #ifdef    ALLOW_CD_CODE
624            IF (implicitViscosity.AND.useCDscheme) THEN
625    #ifdef    ALLOW_AUTODIFF_TAMC
626    CADJ STORE vVelD(:,:,:,bi,bj) = comlev1_bibj , key=idynkey, byte=isbyte
627    #endif    /* ALLOW_AUTODIFF_TAMC */
628              CALL IMPLDIFF(
629         I         bi, bj, iMin, iMax, jMin, jMax,
630         I         0, kappaRU, recip_hFacW(1-OLx,1-OLy,1,bi,bj),
631         U         vVelD(1-OLx,1-OLy,1,bi,bj),
632         I         myThid )
633    #ifdef    ALLOW_AUTODIFF_TAMC
634    CADJ STORE uVelD(:,:,:,bi,bj) = comlev1_bibj , key=idynkey, byte=isbyte
635    #endif    /* ALLOW_AUTODIFF_TAMC */
636              CALL IMPLDIFF(
637         I         bi, bj, iMin, iMax, jMin, jMax,
638         I         0, kappaRV, recip_hFacS(1-OLx,1-OLy,1,bi,bj),
639         U         uVelD(1-OLx,1-OLy,1,bi,bj),
640         I         myThid )
641            ENDIF
642    #endif    /* ALLOW_CD_CODE */
643    C--     End implicit Vertical advection & viscosity
644    
645    C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
646    
647    #ifdef ALLOW_NONHYDROSTATIC
648    C--   Step forward W field in N-H algorithm
649            IF ( nonHydrostatic ) THEN
650    #ifdef ALLOW_DEBUG
651             IF (debugMode) CALL DEBUG_CALL('CALC_GW', myThid )
652    #endif
653             CALL TIMER_START('CALC_GW          [DYNAMICS]',myThid)
654             CALL CALC_GW(
655         I                 bi,bj, kappaRU, kappaRV,
656         I                 str13, str23, str33,
657         I                 viscAh3d_00, viscAh3d_13, viscAh3d_23,
658         I                 myTime, myIter, myThid )
659            ENDIF
660            IF ( nonHydrostatic.OR.implicitIntGravWave )
661         &   CALL TIMESTEP_WVEL( bi,bj, myTime, myIter, myThid )
662            IF ( nonHydrostatic )
663         &   CALL TIMER_STOP ('CALC_GW          [DYNAMICS]',myThid)
664    #endif
665    
666          ENDDO ! K  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
667    
668    C-    end of bi,bj loops
669         ENDDO         ENDDO
670        ENDDO        ENDDO
671    
672    #ifdef ALLOW_OBCS
673          IF (useOBCS) THEN
674            CALL OBCS_EXCHANGES( myThid )
675          ENDIF
676    #endif
677    
678    Cml(
679    C     In order to compare the variance of phiHydLow of a p/z-coordinate
680    C     run with etaH of a z/p-coordinate run the drift of phiHydLow
681    C     has to be removed by something like the following subroutine:
682    C      CALL REMOVE_MEAN_RL( 1, phiHydLow, maskInC, maskInC, rA, drF,
683    C     &                     'phiHydLow', myTime, myThid )
684    Cml)
685    
686    #ifdef ALLOW_DIAGNOSTICS
687          IF ( useDiagnostics ) THEN
688    
689           CALL DIAGNOSTICS_FILL(totPhihyd,'PHIHYD  ',0,Nr,0,1,1,myThid)
690           CALL DIAGNOSTICS_FILL(phiHydLow,'PHIBOT  ',0, 1,0,1,1,myThid)
691    
692           tmpFac = 1. _d 0
693           CALL DIAGNOSTICS_SCALE_FILL(totPhihyd,tmpFac,2,
694         &                                 'PHIHYDSQ',0,Nr,0,1,1,myThid)
695    
696           CALL DIAGNOSTICS_SCALE_FILL(phiHydLow,tmpFac,2,
697         &                                 'PHIBOTSQ',0, 1,0,1,1,myThid)
698    
699          ENDIF
700    #endif /* ALLOW_DIAGNOSTICS */
701    
702    #ifdef ALLOW_DEBUG
703          IF ( debugLevel .GE. debLevD ) THEN
704           CALL DEBUG_STATS_RL(1,EtaN,'EtaN (DYNAMICS)',myThid)
705           CALL DEBUG_STATS_RL(Nr,uVel,'Uvel (DYNAMICS)',myThid)
706           CALL DEBUG_STATS_RL(Nr,vVel,'Vvel (DYNAMICS)',myThid)
707           CALL DEBUG_STATS_RL(Nr,wVel,'Wvel (DYNAMICS)',myThid)
708           CALL DEBUG_STATS_RL(Nr,theta,'Theta (DYNAMICS)',myThid)
709           CALL DEBUG_STATS_RL(Nr,salt,'Salt (DYNAMICS)',myThid)
710           CALL DEBUG_STATS_RL(Nr,gU,'Gu (DYNAMICS)',myThid)
711           CALL DEBUG_STATS_RL(Nr,gV,'Gv (DYNAMICS)',myThid)
712    #ifndef ALLOW_ADAMSBASHFORTH_3
713           CALL DEBUG_STATS_RL(Nr,guNm1,'GuNm1 (DYNAMICS)',myThid)
714           CALL DEBUG_STATS_RL(Nr,gvNm1,'GvNm1 (DYNAMICS)',myThid)
715           CALL DEBUG_STATS_RL(Nr,gtNm1,'GtNm1 (DYNAMICS)',myThid)
716           CALL DEBUG_STATS_RL(Nr,gsNm1,'GsNm1 (DYNAMICS)',myThid)
717    #endif
718          ENDIF
719    #endif
720    
721    #ifdef DYNAMICS_GUGV_EXCH_CHECK
722    C- jmc: For safety checking only: This Exchange here should not change
723    C       the solution. If solution changes, it means something is wrong,
724    C       but it does not mean that it is less wrong with this exchange.
725          IF ( debugLevel .GE. debLevE ) THEN
726           CALL EXCH_UV_XYZ_RL(gU,gV,.TRUE.,myThid)
727          ENDIF
728    #endif
729    
730    #ifdef ALLOW_DEBUG
731          IF (debugMode) CALL DEBUG_LEAVE( 'DYNAMICS', myThid )
732    #endif
733    
734        RETURN        RETURN
735        END        END

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.178

  ViewVC Help
Powered by ViewVC 1.1.22