| 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 |
| 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 |
| 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 ) |
| 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, |
| 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 |
| 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 ) |
| 262 |
DO I=1-Olx,sNx+Olx |
DO I=1-Olx,sNx+Olx |
| 263 |
uIce(I,J,bi,bj) = uIce(I,J,bi,bj)+duIce(I,J,bi,bj) |
uIce(I,J,bi,bj) = uIce(I,J,bi,bj)+duIce(I,J,bi,bj) |
| 264 |
vIce(I,J,bi,bj) = vIce(I,J,bi,bj)+dvIce(I,J,bi,bj) |
vIce(I,J,bi,bj) = vIce(I,J,bi,bj)+dvIce(I,J,bi,bj) |
| 265 |
|
C reset du/vIce here instead of setting sol = 0 in seaice_fgmres_driver |
| 266 |
|
duIce(I,J,bi,bj)= 0. _d 0 |
| 267 |
|
dvIce(I,J,bi,bj)= 0. _d 0 |
| 268 |
ENDDO |
ENDDO |
| 269 |
ENDDO |
ENDDO |
| 270 |
ENDDO |
ENDDO |