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

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

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

revision 1.4 by jmc, Fri May 11 23:29:13 2012 UTC revision 1.5 by jmc, Tue Jul 17 21:31:52 2012 UTC
# Line 2  C $Header$ Line 2  C $Header$
2  C $Name$  C $Name$
3    
4  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
 #ifdef ALLOW_USE_MPI  
 C HACK to avoid global_max  
 # define ALLOW_CONST_RHSMAX  
 #endif  
5    
6  CML THIS DOES NOT WORK +++++  CML THIS DOES NOT WORK +++++
7  #undef ALLOW_LOOP_DIRECTIVE  #undef ALLOW_LOOP_DIRECTIVE
# Line 91  C     eta_qrNM1     denote current and p Line 87  C     eta_qrNM1     denote current and p
87  C     recip_eta_qrNM1 :: reciprocal of eta_qrNM1  C     recip_eta_qrNM1 :: reciprocal of eta_qrNM1
88  C     cgBeta     :: coeff used to update conjugate direction vector "s".  C     cgBeta     :: coeff used to update conjugate direction vector "s".
89  C     alpha      :: coeff used to update solution & residual  C     alpha      :: coeff used to update solution & residual
90  C     alpha_aux  :: to avoid the statement: alpha = 1./alpha (for TAMC/TAF)  C     alphaSum   :: to avoid the statement: alpha = 1./alpha (for TAMC/TAF)
91  C     sumRHS     :: Sum of right-hand-side. Sometimes this is a useful  C     sumRHS     :: Sum of right-hand-side. Sometimes this is a useful
92  C                   debugging/trouble shooting diagnostic. For neumann problems  C                   debugging/trouble shooting diagnostic. For neumann problems
93  C                   sumRHS needs to be ~0 or it converge at a non-zero residual.  C                   sumRHS needs to be ~0 or it converge at a non-zero residual.
# Line 101  C     msgBuf     :: Informational/error Line 97  C     msgBuf     :: Informational/error
97        INTEGER i, j, it2d        INTEGER i, j, it2d
98        INTEGER actualIts        INTEGER actualIts
99        _RL    cg2dTolerance_sq        _RL    cg2dTolerance_sq
100        _RL    err_sq        _RL    err_sq,  errTile(nSx,nSy)
101        _RL    eta_qrN        _RL    eta_qrN, eta_qrNtile(nSx,nSy)
102        _RL    eta_qrNM1        _RL    eta_qrNM1, recip_eta_qrNM1
103        _RL    recip_eta_qrNM1        _RL    cgBeta,  alpha
104        _RL    cgBeta        _RL    alphaSum,alphaTile(nSx,nSy)
105        _RL    alpha        _RL    sumRHS,  sumRHStile(nSx,nSy)
106        _RL    alpha_aux        _RL    rhsMax,  rhsNorm
       _RL    sumRHS  
       _RL    rhsMax, rhsMaxGlobal  
       _RL    rhsNorm  
107        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
108        LOGICAL printResidual        LOGICAL printResidual
109  CEOP  CEOP
110    
111  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
112        IF ( numIters .GT. numItersMax ) THEN        IF ( numIters .GT. numItersMax ) THEN
113           WRITE(standardMessageUnit,'(A,I10)')          WRITE(msgBuf,'(A,I10)')
114       &        'CG2D_NSA: numIters > numItersMax = ', numItersMax       &    'CG2D_NSA: numIters > numItersMax =', numItersMax
115           STOP 'NON-NORMAL in CG2D_NSA'          CALL PRINT_ERROR( msgBuf, myThid )
116            STOP 'ABNORMAL END: S/R CG2D_NSA'
117          ENDIF
118          IF ( cg2dNormaliseRHS ) THEN
119            WRITE(msgBuf,'(A)') 'CG2D_NSA: cg2dNormaliseRHS is disabled'
120            CALL PRINT_ERROR( msgBuf, myThid )
121            WRITE(msgBuf,'(A)')
122         &    'set cg2dTargetResWunit (instead of cg2dTargetResidual)'
123            CALL PRINT_ERROR( msgBuf, myThid )
124            STOP 'ABNORMAL END: S/R CG2D_NSA'
125        ENDIF        ENDIF
126  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
127    
# Line 137  C--   Initialise auxiliary constant, som Line 139  C--   Initialise auxiliary constant, som
139        recip_eta_qrNM1= 1. _d 0        recip_eta_qrNM1= 1. _d 0
140    
141  C--   Normalise RHS  C--   Normalise RHS
 #ifdef ALLOW_AUTODIFF_TAMC  
 CADJ STORE cg2d_b = comlev1_cg2d, key = ikey, byte = isbyte  
 #endif /* ALLOW_AUTODIFF_TAMC */  
142        rhsMax = 0. _d 0        rhsMax = 0. _d 0
143        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
144         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
# Line 152  CADJ STORE cg2d_b = comlev1_cg2d, key = Line 151  CADJ STORE cg2d_b = comlev1_cg2d, key =
151         ENDDO         ENDDO
152        ENDDO        ENDDO
153    
154    #ifndef ALLOW_AUTODIFF_TAMC
155        IF (cg2dNormaliseRHS) THEN        IF (cg2dNormaliseRHS) THEN
156  C     -  Normalise RHS :  C-    Normalise RHS :
157  #ifdef ALLOW_CONST_RHSMAX         _GLOBAL_MAX_RL( rhsMax, myThid )
       rhsMaxGlobal=1.  
 #else  
       rhsMaxGlobal=rhsMax  
       _GLOBAL_MAX_RL( rhsMaxGlobal, myThid )  
 #endif /* ALLOW_CONST_RHSMAX */  
 #ifdef ALLOW_AUTODIFF_TAMC  
 CADJ STORE rhsNorm = comlev1_cg2d, key = ikey, byte = isbyte  
 #endif /* ALLOW_AUTODIFF_TAMC */  
       IF ( rhsMaxGlobal .NE. 0. ) THEN  
        rhsNorm = 1. _d 0 / rhsMaxGlobal  
       ELSE  
158         rhsNorm = 1. _d 0         rhsNorm = 1. _d 0
159        ENDIF         IF ( rhsMax .NE. 0. ) rhsNorm = 1. _d 0 / rhsMax
160           DO bj=myByLo(myThid),myByHi(myThid)
161  #ifdef ALLOW_AUTODIFF_TAMC          DO bi=myBxLo(myThid),myBxHi(myThid)
162  CADJ STORE cg2d_b = comlev1_cg2d, key = ikey, byte = isbyte           DO j=1,sNy
163  CADJ STORE cg2d_x = comlev1_cg2d, key = ikey, byte = isbyte            DO i=1,sNx
164  #endif /* ALLOW_AUTODIFF_TAMC */             cg2d_b(i,j,bi,bj) = cg2d_b(i,j,bi,bj)*rhsNorm
165        DO bj=myByLo(myThid),myByHi(myThid)             cg2d_x(i,j,bi,bj) = cg2d_x(i,j,bi,bj)*rhsNorm
166         DO bi=myBxLo(myThid),myBxHi(myThid)            ENDDO
         DO j=1,sNy  
          DO i=1,sNx  
           cg2d_b(i,j,bi,bj) = cg2d_b(i,j,bi,bj)*rhsNorm  
           cg2d_x(i,j,bi,bj) = cg2d_x(i,j,bi,bj)*rhsNorm  
167           ENDDO           ENDDO
168          ENDDO          ENDDO
169         ENDDO         ENDDO
170        ENDDO  C-    end Normalise RHS
 C- end Normalise RHS  
171        ENDIF        ENDIF
172    #endif /* ndef ALLOW_AUTODIFF_TAMC */
173    
174  C--   Update overlaps  C--   Update overlaps
175        CALL EXCH_XY_RL( cg2d_x, myThid )        CALL EXCH_XY_RL( cg2d_x, myThid )
176    
177  C--   Initial residual calculation  C--   Initial residual calculation
       err_sq = 0. _d 0  
       sumRHS = 0. _d 0  
178  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
179  CADJ STORE cg2d_b = comlev1_cg2d, key = ikey, byte = isbyte  CADJ STORE cg2d_b = comlev1_cg2d, key = ikey, byte = isbyte
180  CADJ STORE cg2d_x = comlev1_cg2d, key = ikey, byte = isbyte  CADJ STORE cg2d_x = comlev1_cg2d, key = ikey, byte = isbyte
181  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
182        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
183         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
184            errTile(bi,bj)    = 0. _d 0
185            sumRHStile(bi,bj) = 0. _d 0
186          DO j=0,sNy+1          DO j=0,sNy+1
187           DO i=0,sNx+1           DO i=0,sNx+1
188            cg2d_s(i,j,bi,bj) = 0.            cg2d_s(i,j,bi,bj) = 0.
# Line 212  CADJ STORE cg2d_x = comlev1_cg2d, key = Line 197  CADJ STORE cg2d_x = comlev1_cg2d, key =
197       &    +aS2d(i  ,j+1,bi,bj)*cg2d_x(i  ,j+1,bi,bj)       &    +aS2d(i  ,j+1,bi,bj)*cg2d_x(i  ,j+1,bi,bj)
198       &    +aC2d(i  ,j  ,bi,bj)*cg2d_x(i  ,j  ,bi,bj)       &    +aC2d(i  ,j  ,bi,bj)*cg2d_x(i  ,j  ,bi,bj)
199       &    )       &    )
200            err_sq         = err_sq         +            errTile(bi,bj)    = errTile(bi,bj)
201       &     cg2d_r(i,j,bi,bj)*cg2d_r(i,j,bi,bj)       &                      + cg2d_r(i,j,bi,bj)*cg2d_r(i,j,bi,bj)
202            sumRHS            = sumRHS            +            sumRHStile(bi,bj) = sumRHStile(bi,bj) + cg2d_b(i,j,bi,bj)
      &     cg2d_b(i,j,bi,bj)  
203           ENDDO           ENDDO
204          ENDDO          ENDDO
205         ENDDO         ENDDO
# Line 223  CADJ STORE cg2d_x = comlev1_cg2d, key = Line 207  CADJ STORE cg2d_x = comlev1_cg2d, key =
207    
208  c     CALL EXCH_S3D_RL( cg2d_r, 1, myThid )  c     CALL EXCH_S3D_RL( cg2d_r, 1, myThid )
209        CALL EXCH_XY_RL ( cg2d_r, myThid )        CALL EXCH_XY_RL ( cg2d_r, myThid )
210        _GLOBAL_SUM_RL( sumRHS, myThid )        CALL GLOBAL_SUM_TILE_RL( errTile,    err_sq, myThid )
211        _GLOBAL_SUM_RL( err_sq, myThid )        CALL GLOBAL_SUM_TILE_RL( sumRHStile, sumRHS, myThid )
212        actualIts = 0        actualIts = 0
213        IF ( err_sq .NE. 0. ) THEN        IF ( err_sq .NE. 0. ) THEN
214          firstResidual = SQRT(err_sq)          firstResidual = SQRT(err_sq)
# Line 237  c     CALL EXCH_S3D_RL( cg2d_r, 1, myThi Line 221  c     CALL EXCH_S3D_RL( cg2d_r, 1, myThi
221          _BEGIN_MASTER( myThid )          _BEGIN_MASTER( myThid )
222          printResidual = printResidualFreq.GE.1          printResidual = printResidualFreq.GE.1
223          WRITE(standardmessageunit,'(A,1P2E22.14)')          WRITE(standardmessageunit,'(A,1P2E22.14)')
224       &  ' cg2d: Sum(rhs),rhsMax = ', sumRHS,rhsMaxGlobal       &  ' cg2d: Sum(rhs),rhsMax = ', sumRHS,rhsMax
225          _END_MASTER( myThid )          _END_MASTER( myThid )
226        ENDIF        ENDIF
227    
# Line 261  CADJ STORE err_sq = comlev1_cg2d_iter, k Line 245  CADJ STORE err_sq = comlev1_cg2d_iter, k
245    
246  C--    Solve preconditioning equation and update  C--    Solve preconditioning equation and update
247  C--    conjugate direction vector "s".  C--    conjugate direction vector "s".
        eta_qrN = 0. _d 0  
248  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
249  CADJ STORE cg2d_r = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte  CADJ STORE cg2d_r = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte
250  CADJ STORE cg2d_s = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte  CADJ STORE cg2d_s = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte
251  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
252         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
253          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
254             eta_qrNtile(bi,bj) = 0. _d 0
255           DO j=1,sNy           DO j=1,sNy
256            DO i=1,sNx            DO i=1,sNx
257             cg2d_z(i,j,bi,bj) =             cg2d_z(i,j,bi,bj) =
# Line 276  CADJ STORE cg2d_s = comlev1_cg2d_iter, k Line 260  CADJ STORE cg2d_s = comlev1_cg2d_iter, k
260       &     +pW(i+1,j  ,bi,bj)*cg2d_r(i+1,j  ,bi,bj)       &     +pW(i+1,j  ,bi,bj)*cg2d_r(i+1,j  ,bi,bj)
261       &     +pS(i  ,j  ,bi,bj)*cg2d_r(i  ,j-1,bi,bj)       &     +pS(i  ,j  ,bi,bj)*cg2d_r(i  ,j-1,bi,bj)
262       &     +pS(i  ,j+1,bi,bj)*cg2d_r(i  ,j+1,bi,bj)       &     +pS(i  ,j+1,bi,bj)*cg2d_r(i  ,j+1,bi,bj)
263             eta_qrN = eta_qrN             eta_qrNtile(bi,bj) = eta_qrNtile(bi,bj)
264       &     +cg2d_z(i,j,bi,bj)*cg2d_r(i,j,bi,bj)       &     +cg2d_z(i,j,bi,bj)*cg2d_r(i,j,bi,bj)
265            ENDDO            ENDDO
266           ENDDO           ENDDO
267          ENDDO          ENDDO
268         ENDDO         ENDDO
269    
270         _GLOBAL_SUM_RL(eta_qrN, myThid)         CALL GLOBAL_SUM_TILE_RL( eta_qrNtile,eta_qrN,myThid )
271  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
272  CMLCADJ STORE eta_qrNM1 = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte  CMLCADJ STORE eta_qrNM1 = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte
273  CADJ STORE recip_eta_qrNM1 = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte  CADJ STORE recip_eta_qrNM1 = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte
274  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
275  CML       cgBeta   = eta_qrN/eta_qrNM1  CML       cgBeta   = eta_qrN/eta_qrNM1
276         cgBeta   = eta_qrN*recip_eta_qrNM1         cgBeta   = eta_qrN*recip_eta_qrNM1
277  Cml    store normalisation factor for the next interation  Cml    store normalisation factor for the next interation (in case there is one).
 Cml    (in case there is one).  
278  CML    store the inverse of the normalization factor for higher precision  CML    store the inverse of the normalization factor for higher precision
279  CML       eta_qrNM1 = eta_qrN  CML       eta_qrNM1 = eta_qrN
280         recip_eta_qrNM1 = 1./eta_qrN         recip_eta_qrNM1 = 1. _d 0/eta_qrN
281    
282         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
283          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
# Line 314  c      CALL EXCH_S3D_RL( cg2d_s, 1, myTh Line 297  c      CALL EXCH_S3D_RL( cg2d_s, 1, myTh
297    
298  C==    Evaluate laplace operator on conjugate gradient vector  C==    Evaluate laplace operator on conjugate gradient vector
299  C==    q = A.s  C==    q = A.s
        alpha     = 0. _d 0  
        alpha_aux = 0. _d 0  
300  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
301  #ifndef ALLOW_LOOP_DIRECTIVE  #ifndef ALLOW_LOOP_DIRECTIVE
302  CADJ STORE cg2d_s = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte  CADJ STORE cg2d_s = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte
# Line 323  CADJ STORE cg2d_s = comlev1_cg2d_iter, k Line 304  CADJ STORE cg2d_s = comlev1_cg2d_iter, k
304  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
305         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
306          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
307             alphaTile(bi,bj) = 0. _d 0
308           DO j=1,sNy           DO j=1,sNy
309            DO i=1,sNx            DO i=1,sNx
310             cg2d_q(i,j,bi,bj) =             cg2d_q(i,j,bi,bj) =
# Line 331  CADJ STORE cg2d_s = comlev1_cg2d_iter, k Line 313  CADJ STORE cg2d_s = comlev1_cg2d_iter, k
313       &    +aS2d(i  ,j  ,bi,bj)*cg2d_s(i  ,j-1,bi,bj)       &    +aS2d(i  ,j  ,bi,bj)*cg2d_s(i  ,j-1,bi,bj)
314       &    +aS2d(i  ,j+1,bi,bj)*cg2d_s(i  ,j+1,bi,bj)       &    +aS2d(i  ,j+1,bi,bj)*cg2d_s(i  ,j+1,bi,bj)
315       &    +aC2d(i  ,j  ,bi,bj)*cg2d_s(i  ,j  ,bi,bj)       &    +aC2d(i  ,j  ,bi,bj)*cg2d_s(i  ,j  ,bi,bj)
316             alpha_aux = alpha_aux+cg2d_s(i,j,bi,bj)*cg2d_q(i,j,bi,bj)             alphaTile(bi,bj) = alphaTile(bi,bj)
317         &                      + cg2d_s(i,j,bi,bj)*cg2d_q(i,j,bi,bj)
318            ENDDO            ENDDO
319           ENDDO           ENDDO
320          ENDDO          ENDDO
321         ENDDO         ENDDO
322         _GLOBAL_SUM_RL(alpha_aux,myThid)         CALL GLOBAL_SUM_TILE_RL( alphaTile, alphaSum, myThid )
323         alpha = eta_qrN/alpha_aux         alpha = eta_qrN/alphaSum
324    
325  C==    Update simultaneously solution and residual vectors (and Iter number)  C==    Update simultaneously solution and residual vectors (and Iter number)
326  C      Now compute "interior" points.  C      Now compute "interior" points.
        err_sq = 0. _d 0  
327  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
328  #ifndef ALLOW_LOOP_DIRECTIVE  #ifndef ALLOW_LOOP_DIRECTIVE
329  CADJ STORE cg2d_r = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte  CADJ STORE cg2d_r = comlev1_cg2d_iter, key = icg2dkey, byte = isbyte
# Line 349  CADJ STORE cg2d_r = comlev1_cg2d_iter, k Line 331  CADJ STORE cg2d_r = comlev1_cg2d_iter, k
331  #endif /* ALLOW_AUTODIFF_TAMC */  #endif /* ALLOW_AUTODIFF_TAMC */
332         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
333          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
334             errTile(bi,bj) = 0. _d 0
335           DO j=1,sNy           DO j=1,sNy
336            DO i=1,sNx            DO i=1,sNx
337             cg2d_x(i,j,bi,bj)=cg2d_x(i,j,bi,bj)+alpha*cg2d_s(i,j,bi,bj)             cg2d_x(i,j,bi,bj)=cg2d_x(i,j,bi,bj)+alpha*cg2d_s(i,j,bi,bj)
338             cg2d_r(i,j,bi,bj)=cg2d_r(i,j,bi,bj)-alpha*cg2d_q(i,j,bi,bj)             cg2d_r(i,j,bi,bj)=cg2d_r(i,j,bi,bj)-alpha*cg2d_q(i,j,bi,bj)
339             err_sq = err_sq+cg2d_r(i,j,bi,bj)*cg2d_r(i,j,bi,bj)             errTile(bi,bj) = errTile(bi,bj)
340         &                    + cg2d_r(i,j,bi,bj)*cg2d_r(i,j,bi,bj)
341            ENDDO            ENDDO
342           ENDDO           ENDDO
343          ENDDO          ENDDO
344         ENDDO         ENDDO
345         actualIts = it2d         actualIts = it2d
346    
347         _GLOBAL_SUM_RL( err_sq   , myThid )         CALL GLOBAL_SUM_TILE_RL( errTile,    err_sq,    myThid )
348         IF ( printResidual ) THEN         IF ( printResidual ) THEN
349          IF ( MOD( it2d-1, printResidualFreq ).EQ.0 ) THEN          IF ( MOD( it2d-1, printResidualFreq ).EQ.0 ) THEN
350           WRITE(msgBuf,'(A,I6,A,1PE21.14)')           WRITE(msgBuf,'(A,I6,A,1PE21.14)')
# Line 377  Cml   end of if "err >= cg2dTolerance" b Line 361  Cml   end of if "err >= cg2dTolerance" b
361        ENDIF        ENDIF
362        ENDDO        ENDDO
363    
364    #ifndef ALLOW_AUTODIFF_TAMC
365        IF (cg2dNormaliseRHS) THEN        IF (cg2dNormaliseRHS) THEN
 #ifdef ALLOW_AUTODIFF_TAMC  
 CADJ STORE rhsNorm = comlev1_cg2d, key = ikey, byte = isbyte  
 CADJ STORE cg2d_x = comlev1_cg2d, key = ikey, byte = isbyte  
 #endif /* ALLOW_AUTODIFF_TAMC */  
366  C--   Un-normalise the answer  C--   Un-normalise the answer
367          DO bj=myByLo(myThid),myByHi(myThid)          DO bj=myByLo(myThid),myByHi(myThid)
368           DO bi=myBxLo(myThid),myBxHi(myThid)           DO bi=myBxLo(myThid),myBxHi(myThid)
# Line 393  C--   Un-normalise the answer Line 374  C--   Un-normalise the answer
374           ENDDO           ENDDO
375          ENDDO          ENDDO
376        ENDIF        ENDIF
377    #endif /* ndef ALLOW_AUTODIFF_TAMC */
378    
379  C--   Return parameters to caller  C--   Return parameters to caller
380        IF ( err_sq .NE. 0. ) THEN        IF ( err_sq .NE. 0. ) THEN
# Line 407  C--   Return parameters to caller Line 389  C--   Return parameters to caller
389        END        END
390    
391  #if ((defined ALLOW_AUTODIFF_TAMC) && (defined ALLOW_LOOP_DIRECTIVE))  #if ((defined ALLOW_AUTODIFF_TAMC) && (defined ALLOW_LOOP_DIRECTIVE))
392  C  
393  C     These routines are routinely part of the TAMC/TAF library that is  C     These routines are routinely part of the TAMC/TAF library that is
394  C     not included in the MITcgm, therefore they are mimicked here.  C     not included in the MITcgm, therefore they are mimicked here.
395  C  
396        subroutine adstore(chardum,int1,idow,int2,int3,icount)        subroutine adstore(chardum,int1,idow,int2,int3,icount)
397    
398        implicit none        implicit none
# Line 454  C     twice the number of timesteps Line 436  C     twice the number of timesteps
436        character*(*) chardum        character*(*) chardum
437        integer int1, int2, int3, idow, icount        integer int1, int2, int3, idow, icount
438    
   
439  C     the length of this vector must be greater or equal  C     the length of this vector must be greater or equal
440  C     twice the number of timesteps  C     twice the number of timesteps
441        integer nidow        integer nidow

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

  ViewVC Help
Powered by ViewVC 1.1.22