/[MITgcm]/MITgcm_contrib/dgoldberg/streamice/streamice_vel_solve.F
ViewVC logotype

Diff of /MITgcm_contrib/dgoldberg/streamice/streamice_vel_solve.F

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

revision 1.2 by heimbach, Wed May 2 02:36:01 2012 UTC revision 1.4 by dgoldberg, Thu Jul 26 02:14:25 2012 UTC
# Line 94  C     LOCAL VARIABLES Line 94  C     LOCAL VARIABLES
94         ENDDO         ENDDO
95        ENDDO        ENDDO
96    
97    
98        CALL STREAMICE_CG_BOUND_VALS( myThid,            CALL STREAMICE_CG_BOUND_VALS( myThid,    
99       O    ubd_SI,       O    ubd_SI,
100       O    vbd_SI)       O    vbd_SI)
# Line 142  C     LOCAL VARIABLES Line 143  C     LOCAL VARIABLES
143    
144        CALL GLOBAL_MAX_R8 (err_init, myThid)        CALL GLOBAL_MAX_R8 (err_init, myThid)
145    
146          WRITE(msgBuf,'(A,E15.7)') 'initial nonlinear resid (error): ',
147         &                       err_init
148          CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
149         &                    SQUEEZE_RIGHT , 1)
150    
151    
152        iter_numconv = 0        iter_numconv = 0
153        err_max = err_init        err_max = err_init
154        err_lastchange = err_init        err_lastchange = err_init
# Line 201  C       but after convergence loop does Line 208  C       but after convergence loop does
208  !$TAF STORE zv_old_si = comlev1_stream_nl, key=ikey_nl  !$TAF STORE zv_old_si = comlev1_stream_nl, key=ikey_nl
209  #endif  #endif
210    
211         CALL STREAMICE_CG_SOLVE(  #ifdef ALLOW_AUTODIFF_TAMC
212       &  U_streamice,  !       DO bj = myByLo(myThid), myByHi(myThid)
213       &  V_streamice,  !        DO bi = myBxLo(myThid), myBxHi(myThid)
214       &  taudx_SI,  !         DO j=1-OLy,sNy+OLy
215       &  taudy_SI,  !          DO i=1-OLx,sNx+OLx
216       &  cgtol,  !           U_streamice (i,j,bi,bj) = 0. _d 0
217       &  cg_iters,  !           V_streamice (i,j,bi,bj) = 0. _d 0
218       &  myThid )  !          ENDDO
219    !         ENDDO
220    !        ENDDO
221    !       ENDDO
222    #endif
223    
224           CALL STREAMICE_CG_WRAPPER(
225         &       U_streamice,
226         &       V_streamice,
227         &       taudx_SI,
228         &       taudy_SI,
229         &       cgtol,
230         &       cg_iters,
231         &       myThid )
232    
233                
234    
# Line 225  C       but after convergence loop does Line 245  C       but after convergence loop does
245  #endif  #endif
246    
247         CALL STREAMICE_VISC_BETA ( myThid )         CALL STREAMICE_VISC_BETA ( myThid )
248    
249    
250  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
251  !$TAF STORE U_streamice = comlev1_stream_nl, key=ikey_nl  !$TAF STORE U_streamice = comlev1_stream_nl, key=ikey_nl
# Line 309  C       but after convergence loop does Line 330  C       but after convergence loop does
330       &   STREAMICE_lower_cg_tol) THEN       &   STREAMICE_lower_cg_tol) THEN
331           cgtol = cgtol * 5.e-2           cgtol = cgtol * 5.e-2
332           err_lastchange = err_max           err_lastchange = err_max
333           WRITE(msgBuf,'(A,F11.7)') 'new cg tol: ',           WRITE(msgBuf,'(A,E15.7)') 'new cg tol: ',
334       &                       cgtol       &                       cgtol
335           CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,           CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
336       &                    SQUEEZE_RIGHT , 1)       &                    SQUEEZE_RIGHT , 1)
337         ENDIF         ENDIF
338    
339    
340         ENDIF ! (err_max .GT. streamice_nonlin_tol * err_init)         ENDIF ! (err_max .GT. streamice_nonlin_tol * err_init)
341        ENDDO        ENDDO
342    
# Line 329  C--------------------------------------- Line 351  C---------------------------------------
351       & iter, " iterations"       & iter, " iterations"
352        endif        endif
353    
354    !        DO bj = myByLo(myThid), myByHi(myThid)
355    !         DO bi = myBxLo(myThid), myBxHi(myThid)
356    !          DO j=1,sNy
357    !           DO i=1,sNx
358    !            U_streamice (i,j,bi,bj) = 0. _d 0
359    !            V_streamice (i,j,bi,bj) = 0. _d 0
360    !           ENDDO
361    !          ENDDO
362    !         ENDDO
363    !        ENDDO
364    !
365    !        CALL STREAMICE_CG_WRAPPER(
366    !      &       U_streamice,
367    !      &       V_streamice,
368    !      &       taudx_SI,
369    !      &       taudy_SI,
370    !      &       cgtol,
371    !      &       cg_iters,
372    !      &       myThid )
373    
374    
375        _EXCH_XY_RL (U_streamice, myThid)        _EXCH_XY_RL (U_streamice, myThid)
376        _EXCH_XY_RL (V_streamice, myThid)        _EXCH_XY_RL (V_streamice, myThid)
377    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22