/[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.24 by mlosch, Tue Feb 4 18:30:31 2014 UTC revision 1.28 by mlosch, Mon Dec 1 12:31:36 2014 UTC
# Line 2  C $Header$ Line 2  C $Header$
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
# Line 96  C     du/vIce   :: ice velocity incremen Line 99  C     du/vIce   :: ice velocity incremen
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)
# Line 150  C     cycle ice velocities Line 154  C     cycle ice velocities
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*(abA*u/vIceNm1+abB*(u/vIceNm1-u/vIceNm2))/deltaT  C     FORCEX/Y0 - mass*(1.5*u/vIceNm1+0.5*(u/vIceNm1-u/vIceNm2))/deltaT
162          DO J=1-OLy,sNy+OLy          DO J=1-OLy,sNy+OLy
163           DO I=1-OLx,sNx+OLx           DO I=1-OLx,sNx+OLx
164            FORCEX(I,J,bi,bj) = FORCEX0(I,J,bi,bj)            FORCEX(I,J,bi,bj) = FORCEX0(I,J,bi,bj)
# Line 162  C     FORCEX/Y0 - mass*(abA*u/vIceNm1+ab Line 167  C     FORCEX/Y0 - mass*(abA*u/vIceNm1+ab
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
# Line 183  C     constant for the preconditioner Line 188  C     constant for the preconditioner
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)
# Line 239  C     Call preconditioner Line 245  C     Call preconditioner
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

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.22