2 |
C $Name$ |
C $Name$ |
3 |
|
|
4 |
#include "SEAICE_OPTIONS.h" |
#include "SEAICE_OPTIONS.h" |
5 |
|
#ifdef ALLOW_AUTODIFF |
6 |
|
# include "AUTODIFF_OPTIONS.h" |
7 |
|
#endif |
8 |
|
|
9 |
C-- File seaice_jfnk.F: seaice jfnk dynamical solver S/R: |
C-- File seaice_jfnk.F: seaice jfnk dynamical solver S/R: |
10 |
C-- Contents |
C-- Contents |
99 |
C precomputed (= constant per Newton iteration) versions of |
C precomputed (= constant per Newton iteration) versions of |
100 |
C zeta, eta, and DWATN, press |
C zeta, eta, and DWATN, press |
101 |
_RL zetaPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL zetaPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
102 |
|
_RL zetaZPre(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
103 |
_RL etaPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL etaPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
104 |
_RL etaZPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL etaZPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
105 |
_RL dwatPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
_RL dwatPre (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
154 |
vIceNm1(I,J,bi,bj) = vIce(I,J,bi,bj) |
vIceNm1(I,J,bi,bj) = vIce(I,J,bi,bj) |
155 |
ENDDO |
ENDDO |
156 |
ENDDO |
ENDDO |
157 |
IF ( .NOT.SEAICEuseIMEX ) THEN |
C As long as IMEX is not properly implemented leave this commented out |
158 |
|
CML IF ( .NOT.SEAICEuseIMEX ) THEN |
159 |
C Compute things that do no change during the Newton iteration: |
C Compute things that do no change during the Newton iteration: |
160 |
C sea-surface tilt and wind stress: |
C sea-surface tilt and wind stress: |
161 |
C FORCEX/Y0 - mass*(1.5*u/vIceNm1+0.5*(u/vIceNm1-u/vIceNm2))/deltaT |
C FORCEX/Y0 - mass*(1.5*u/vIceNm1+0.5*(u/vIceNm1-u/vIceNm2))/deltaT |
167 |
& + seaiceMassV(I,J,bi,bj)*dvIcNm1(I,J,bi,bj)*recip_deltaT |
& + seaiceMassV(I,J,bi,bj)*dvIcNm1(I,J,bi,bj)*recip_deltaT |
168 |
ENDDO |
ENDDO |
169 |
ENDDO |
ENDDO |
170 |
ENDIF |
CML ENDIF |
171 |
ENDDO |
ENDDO |
172 |
ENDDO |
ENDDO |
173 |
C Start nonlinear Newton iteration: outer loop iteration |
C Start nonlinear Newton iteration: outer loop iteration |
188 |
DO j=1-OLy,sNy+OLy |
DO j=1-OLy,sNy+OLy |
189 |
DO i=1-OLx,sNx+OLx |
DO i=1-OLx,sNx+OLx |
190 |
zetaPre(I,J,bi,bj) = zeta(I,J,bi,bj) |
zetaPre(I,J,bi,bj) = zeta(I,J,bi,bj) |
191 |
|
zetaZPre(I,J,bi,bj)= zetaZ(I,J,bi,bj) |
192 |
etaPre(I,J,bi,bj) = eta(I,J,bi,bj) |
etaPre(I,J,bi,bj) = eta(I,J,bi,bj) |
193 |
etaZPre(I,J,bi,bj) = etaZ(I,J,bi,bj) |
etaZPre(I,J,bi,bj) = etaZ(I,J,bi,bj) |
194 |
dwatPre(I,J,bi,bj) = DWATN(I,J,bi,bj) |
dwatPre(I,J,bi,bj) = DWATN(I,J,bi,bj) |
245 |
IF ( SOLV_MAX_ITERS .GT. 0 ) |
IF ( SOLV_MAX_ITERS .GT. 0 ) |
246 |
& CALL SEAICE_PRECONDITIONER( |
& CALL SEAICE_PRECONDITIONER( |
247 |
U duIce, dvIce, |
U duIce, dvIce, |
248 |
I zetaPre, etaPre, etaZpre, dwatPre, |
I zetaPre, etaPre, etaZpre, zetaZpre, dwatPre, |
249 |
I newtonIter, krylovIter, myTime, myIter, myThid ) |
I newtonIter, krylovIter, myTime, myIter, myThid ) |
250 |
ELSEIF (iCode.GE.2) THEN |
ELSEIF (iCode.GE.2) THEN |
251 |
C Compute Jacobian times vector |
C Compute Jacobian times vector |