--- MITgcm/pkg/seaice/seaice_jfnk.F 2012/10/16 07:00:21 1.1 +++ MITgcm/pkg/seaice/seaice_jfnk.F 2012/11/06 12:53:14 1.3 @@ -1,4 +1,4 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/seaice/seaice_jfnk.F,v 1.1 2012/10/16 07:00:21 mlosch Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/seaice/seaice_jfnk.F,v 1.3 2012/11/06 12:53:14 mlosch Exp $ C $Name: $ #include "SEAICE_OPTIONS.h" @@ -78,10 +78,11 @@ _RL duIce (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) _RL dvIce (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) C precomputed (= constant per Newton iteration) versions of -C zeta, eta, and DWATN - _RL zetaPre(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) - _RL etaPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) - _RL dwatPre(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) +C zeta, eta, and DWATN, press + _RL zetaPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL etaPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL dwatPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) + _RL pressPre(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) CEOP C Initialise @@ -131,15 +132,17 @@ I uIce, vIce, O uIceRes, vIceRes, I newtonIter, 0, myTime, myIter, myThid ) + CALL EXCH_UV_XY_RL( uIceRes, vIceRes,.TRUE.,myThid) C local copies of precomputed coefficients that are to stay C constant for the preconditioner DO bj=myByLo(myThid),myByHi(myThid) DO bi=myBxLo(myThid),myBxHi(myThid) DO j=1-Oly,sNy+Oly DO i=1-Olx,sNx+Olx - zetaPre(I,J,bi,bj) = zeta(I,J,bi,bj) - etaPre(I,J,bi,bj) = eta(I,J,bi,bj) - dwatPre(I,J,bi,bj) = DWATN(I,J,bi,bj) + zetaPre(I,J,bi,bj) = zeta(I,J,bi,bj) + etaPre(I,J,bi,bj) = eta(I,J,bi,bj) + dwatPre(I,J,bi,bj) = DWATN(I,J,bi,bj) + pressPre(I,J,bi,bj) = press(I,J,bi,bj) ENDDO ENDDO ENDDO @@ -194,7 +197,7 @@ WRITE(msgBuf,'(2A,2(1XI6),2E12.5)') & ' S/R SEAICE_JFNK: newtonIter,', & ' total newtonIter, JFNKgamma_lin, initial norm = ', - & newtonIter, SEAICEnewtonIterMax*myIter+newtonIter, + & newtonIter,SEAICEnewtonIterMax*(myIter-nIter0)+newtonIter, & JFNKgamma_lin, JFNKresidual CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, & SQUEEZE_RIGHT, myThid ) @@ -215,8 +218,6 @@ C residual vector (rhs) Fu = u/vIceRes C output work vectors wk1, -> input work vector wk2 C - CALL EXCH_UV_XY_RL( uIceRes, vIceRes,.TRUE.,myThid) - CALL EXCH_UV_XY_RL( duIce, dvIce,.TRUE.,myThid) CALL SEAICE_FGMRES_DRIVER( I uIceRes, vIceRes, U duIce, dvIce, iCode, @@ -229,7 +230,7 @@ C Call preconditioner CALL SEAICE_PRECONDITIONER( U duIce, dvIce, - I zetaPre, etaPre, dwatPre, + I zetaPre, etaPre, dwatPre, pressPre, I newtonIter, krylovIter, myTime, myIter, myThid ) ELSEIF (iCode.GE.2) THEN C Compute Jacobian times vector @@ -246,7 +247,7 @@ IF ( debugLevel.GE.debLevA ) THEN WRITE(msgBuf,'(3(A,I6))') & ' S/R SEAICE_JFNK: Newton iterate / total = ', newtonIter, - & ' / ', SEAICEnewtonIterMax*myIter+newtonIter, + & ' / ', SEAICEnewtonIterMax*(myIter-nIter0)+newtonIter, & ', Nb. of FGMRES iterations = ', krylovIter CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, & SQUEEZE_RIGHT, myThid )