/[MITgcm]/MITgcm/pkg/seaice/seaice_jfnk.F
ViewVC logotype

Diff of /MITgcm/pkg/seaice/seaice_jfnk.F

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

revision 1.1 by mlosch, Tue Oct 16 07:00:21 2012 UTC revision 1.3 by mlosch, Tue Nov 6 12:53:14 2012 UTC
# Line 78  C     du/vIce   :: ice velocity incremen Line 78  C     du/vIce   :: ice velocity incremen
78        _RL duIce  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL duIce  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
79        _RL dvIce  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL dvIce  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
80  C     precomputed (= constant per Newton iteration) versions of  C     precomputed (= constant per Newton iteration) versions of
81  C     zeta, eta, and DWATN  C     zeta, eta, and DWATN, press
82        _RL zetaPre(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL zetaPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
83        _RL etaPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL etaPre  (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
84        _RL dwatPre(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RL dwatPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
85          _RL pressPre(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
86  CEOP  CEOP
87    
88  C     Initialise  C     Initialise
# Line 131  C     variables DWATN, zeta, and eta) Line 132  C     variables DWATN, zeta, and eta)
132       I      uIce, vIce,       I      uIce, vIce,
133       O      uIceRes, vIceRes,       O      uIceRes, vIceRes,
134       I      newtonIter, 0, myTime, myIter, myThid )       I      newtonIter, 0, myTime, myIter, myThid )
135           CALL EXCH_UV_XY_RL( uIceRes, vIceRes,.TRUE.,myThid)
136  C     local copies of precomputed coefficients that are to stay  C     local copies of precomputed coefficients that are to stay
137  C     constant for the preconditioner  C     constant for the preconditioner
138         DO bj=myByLo(myThid),myByHi(myThid)         DO bj=myByLo(myThid),myByHi(myThid)
139          DO bi=myBxLo(myThid),myBxHi(myThid)          DO bi=myBxLo(myThid),myBxHi(myThid)
140           DO j=1-Oly,sNy+Oly           DO j=1-Oly,sNy+Oly
141            DO i=1-Olx,sNx+Olx            DO i=1-Olx,sNx+Olx
142             zetaPre(I,J,bi,bj) =  zeta(I,J,bi,bj)              zetaPre(I,J,bi,bj) =  zeta(I,J,bi,bj)
143              etaPre(I,J,bi,bj) =   eta(I,J,bi,bj)               etaPre(I,J,bi,bj) =   eta(I,J,bi,bj)
144             dwatPre(I,J,bi,bj) = DWATN(I,J,bi,bj)              dwatPre(I,J,bi,bj) = DWATN(I,J,bi,bj)
145               pressPre(I,J,bi,bj) = press(I,J,bi,bj)
146            ENDDO            ENDDO
147           ENDDO           ENDDO
148          ENDDO          ENDDO
# Line 194  C     in that routine Line 197  C     in that routine
197          WRITE(msgBuf,'(2A,2(1XI6),2E12.5)')          WRITE(msgBuf,'(2A,2(1XI6),2E12.5)')
198       &       ' S/R SEAICE_JFNK: newtonIter,',       &       ' S/R SEAICE_JFNK: newtonIter,',
199       &       ' total newtonIter, JFNKgamma_lin, initial norm = ',       &       ' total newtonIter, JFNKgamma_lin, initial norm = ',
200       &       newtonIter, SEAICEnewtonIterMax*myIter+newtonIter,       &       newtonIter,SEAICEnewtonIterMax*(myIter-nIter0)+newtonIter,
201       &       JFNKgamma_lin, JFNKresidual       &       JFNKgamma_lin, JFNKresidual
202          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
203       &       SQUEEZE_RIGHT, myThid )       &       SQUEEZE_RIGHT, myThid )
# Line 215  C     solution vector sol = du/vIce Line 218  C     solution vector sol = du/vIce
218  C     residual vector (rhs) Fu = u/vIceRes  C     residual vector (rhs) Fu = u/vIceRes
219  C     output work vectors wk1, -> input work vector wk2  C     output work vectors wk1, -> input work vector wk2
220  C      C    
          CALL EXCH_UV_XY_RL( uIceRes, vIceRes,.TRUE.,myThid)  
          CALL EXCH_UV_XY_RL( duIce, dvIce,.TRUE.,myThid)  
221           CALL SEAICE_FGMRES_DRIVER(           CALL SEAICE_FGMRES_DRIVER(
222       I        uIceRes, vIceRes,       I        uIceRes, vIceRes,
223       U        duIce, dvIce, iCode,       U        duIce, dvIce, iCode,
# Line 229  C     iteration Line 230  C     iteration
230  C     Call preconditioner  C     Call preconditioner
231            CALL SEAICE_PRECONDITIONER(            CALL SEAICE_PRECONDITIONER(
232       U         duIce, dvIce,       U         duIce, dvIce,
233       I         zetaPre, etaPre, dwatPre,       I         zetaPre, etaPre, dwatPre, pressPre,
234       I         newtonIter, krylovIter, myTime, myIter, myThid )       I         newtonIter, krylovIter, myTime, myIter, myThid )
235           ELSEIF (iCode.GE.2) THEN           ELSEIF (iCode.GE.2) THEN
236  C     Compute Jacobian times vector  C     Compute Jacobian times vector
# Line 246  C     some output diagnostics Line 247  C     some output diagnostics
247          IF ( debugLevel.GE.debLevA ) THEN          IF ( debugLevel.GE.debLevA ) THEN
248           WRITE(msgBuf,'(3(A,I6))')           WRITE(msgBuf,'(3(A,I6))')
249       &        ' S/R SEAICE_JFNK: Newton iterate / total = ', newtonIter,       &        ' S/R SEAICE_JFNK: Newton iterate / total = ', newtonIter,
250       &        ' / ', SEAICEnewtonIterMax*myIter+newtonIter,       &        ' / ', SEAICEnewtonIterMax*(myIter-nIter0)+newtonIter,
251       &        ', Nb. of FGMRES iterations = ', krylovIter       &        ', Nb. of FGMRES iterations = ', krylovIter
252           CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,           CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
253       &        SQUEEZE_RIGHT, myThid )       &        SQUEEZE_RIGHT, myThid )

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22