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

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

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

revision 1.9 by cnh, Sun Sep 6 14:45:11 1998 UTC revision 1.10 by cnh, Sun Sep 6 17:35:19 1998 UTC
# Line 72  C--   Initialise inverter Line 72  C--   Initialise inverter
72        sumRHSBuf(1,myThid) = 0. D0        sumRHSBuf(1,myThid) = 0. D0
73        etaNM1              = 1. D0        etaNM1              = 1. D0
74    
75    CcnhDebugStarts
76          _EXCH_XY_R8( cg2d_b, myThid )
77          CALL PLOT_FIELD_XYRL( cg2d_b, 'CG2D.0 CG2D_B' , 1, myThid )
78    CcnhDebugEnds
79    
80  C--   Normalise RHS  C--   Normalise RHS
81        rhsMax = 0. _d 0        rhsMax = 0. _d 0
82        DO bj=myByLo(myThid),myByHi(myThid)        DO bj=myByLo(myThid),myByHi(myThid)
# Line 104  C--   Update overlaps Line 109  C--   Update overlaps
109        _EXCH_XY_R8( cg2d_b, myThid )        _EXCH_XY_R8( cg2d_b, myThid )
110        _EXCH_XY_R8( cg2d_x, myThid )        _EXCH_XY_R8( cg2d_x, myThid )
111  CcnhDebugStarts  CcnhDebugStarts
112  C     CALL PLOT_FIELD_XYRL( cg2d_b, 'CG2D.1 CG2D_B' , 1, myThid )        CALL PLOT_FIELD_XYRL( cg2d_b, 'CG2D.1 CG2D_B' , 1, myThid )
113  CcnhDebugEnds  CcnhDebugEnds
114    
115  C--   Initial residual calculation  C--   Initial residual calculation
# Line 124  C--   Initial residual calculation Line 129  C--   Initial residual calculation
129       &    -aW2d(I+1,J  ,bi,bj)*cg2d_x(I  ,J  ,bi,bj)       &    -aW2d(I+1,J  ,bi,bj)*cg2d_x(I  ,J  ,bi,bj)
130       &    -aS2d(I  ,J  ,bi,bj)*cg2d_x(I  ,J  ,bi,bj)       &    -aS2d(I  ,J  ,bi,bj)*cg2d_x(I  ,J  ,bi,bj)
131       &    -aS2d(I  ,J+1,bi,bj)*cg2d_x(I  ,J  ,bi,bj)       &    -aS2d(I  ,J+1,bi,bj)*cg2d_x(I  ,J  ,bi,bj)
132       &    -freeSurfFac*_rA(i,j,bi,bj)* Gravity*rhoConst*       &    -freeSurfFac*_rA(i,j,bi,bj)* horiVertRatio*
133       &     cg2d_x(I  ,J  ,bi,bj)/deltaTMom/deltaTMom*cg2dNorm       &     cg2d_x(I  ,J  ,bi,bj)/deltaTMom/deltaTMom*cg2dNorm
134       &    )       &    )
135            err            = err            +            err            = err            +
# Line 157  C     >>>>>>>>>>>>>>> BEGIN SOLVER <<<<< Line 162  C     >>>>>>>>>>>>>>> BEGIN SOLVER <<<<<
162        DO 10 it2d=1, cg2dMaxIters        DO 10 it2d=1, cg2dMaxIters
163    
164  CcnhDebugStarts  CcnhDebugStarts
165         WRITE(0,*) ' CG2D: Iteration ',it2d-1,' residual = ',actualResidual  C      WRITE(0,*) ' CG2D: Iteration ',it2d-1,' residual = ',actualResidual
166  CcnhDebugEnds  CcnhDebugEnds
167         IF ( err .LT. cg2dTargetResidual ) GOTO 11         IF ( err .LT. cg2dTargetResidual ) GOTO 11
168  C--    Solve preconditioning equation and update  C--    Solve preconditioning equation and update
# Line 225  C==    q = A.s Line 230  C==    q = A.s
230       &    -aW2d(I+1,J  ,bi,bj)*cg2d_s(I  ,J  ,bi,bj)       &    -aW2d(I+1,J  ,bi,bj)*cg2d_s(I  ,J  ,bi,bj)
231       &    -aS2d(I  ,J  ,bi,bj)*cg2d_s(I  ,J  ,bi,bj)       &    -aS2d(I  ,J  ,bi,bj)*cg2d_s(I  ,J  ,bi,bj)
232       &    -aS2d(I  ,J+1,bi,bj)*cg2d_s(I  ,J  ,bi,bj)       &    -aS2d(I  ,J+1,bi,bj)*cg2d_s(I  ,J  ,bi,bj)
233       &    -freeSurfFac*_rA(i,j,bi,bj)* Gravity*rhoConst*       &    -freeSurfFac*_rA(i,j,bi,bj)* horiVertRatio*
234       &     cg2d_s(I  ,J  ,bi,bj)/deltaTMom/deltaTMom*cg2dNorm       &     cg2d_s(I  ,J  ,bi,bj)/deltaTMom/deltaTMom*cg2dNorm
235            alpha = alpha+cg2d_s(I,J,bi,bj)*cg2d_q(I,J,bi,bj)            alpha = alpha+cg2d_s(I,J,bi,bj)*cg2d_q(I,J,bi,bj)
236            ENDDO            ENDDO

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

  ViewVC Help
Powered by ViewVC 1.1.22