/[MITgcm]/MITgcm/pkg/streamice/streamice_vel_solve.F
ViewVC logotype

Diff of /MITgcm/pkg/streamice/streamice_vel_solve.F

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

revision 1.8 by dgoldberg, Fri Sep 5 14:25:11 2014 UTC revision 1.9 by jmc, Tue Sep 9 23:09:21 2014 UTC
# Line 2  C $Header$ Line 2  C $Header$
2  C $Name$  C $Name$
3    
4  #include "STREAMICE_OPTIONS.h"  #include "STREAMICE_OPTIONS.h"
5    #ifdef ALLOW_AUTODIFF
6    # include "AUTODIFF_OPTIONS.h"
7    #endif
8    
9  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
10    
# Line 82  C     LOCAL VARIABLES Line 85  C     LOCAL VARIABLES
85  #endif  #endif
86    
87        CALL TIMER_START ('STREAMICE_VEL_SOLVE',myThid)        CALL TIMER_START ('STREAMICE_VEL_SOLVE',myThid)
   
88    
89        cgtol = streamice_cg_tol        cgtol = streamice_cg_tol
90        CONVERGED = .false.        CONVERGED = .false.
91        err_max = 0.        err_max = 0.
92        err_max_fp = 0.        err_max_fp = 0.
93    
   
94        _EXCH_XY_RL( taudx_SI , myThid )        _EXCH_XY_RL( taudx_SI , myThid )
95        _EXCH_XY_RL( taudy_SI , myThid )        _EXCH_XY_RL( taudy_SI , myThid )
96    
   
97        DO bj = myByLo(myThid), myByHi(myThid)        DO bj = myByLo(myThid), myByHi(myThid)
98         DO bi = myBxLo(myThid), myBxHi(myThid)         DO bi = myBxLo(myThid), myBxHi(myThid)
99          DO j=1-OLy,sNy+OLy          DO j=1-OLy,sNy+OLy
# Line 128  C     LOCAL VARIABLES Line 128  C     LOCAL VARIABLES
128        _EXCH_XY_RL( tau_beta_eff_streamice , myThid )        _EXCH_XY_RL( tau_beta_eff_streamice , myThid )
129        _EXCH_XY_RL( visc_streamice , myThid )        _EXCH_XY_RL( visc_streamice , myThid )
130    
   
131        if (STREAMICE_chkresidconvergence .or.        if (STREAMICE_chkresidconvergence .or.
132       &    (streamice_maxnliter_cpl.eq.0 .and. myIter.eq.0)) then       &    (streamice_maxnliter_cpl.eq.0 .and. myIter.eq.0)) then
133    
# Line 145  C     LOCAL VARIABLES Line 144  C     LOCAL VARIABLES
144    
145        endif !STREAMICE_chkresidconvergence        endif !STREAMICE_chkresidconvergence
146    
   
147        iter_numconv = 0        iter_numconv = 0
148        err_max = err_init        err_max = err_init
149        err_max_fp = streamice_nonlin_tol_fp * 10.        err_max_fp = streamice_nonlin_tol_fp * 10.
# Line 191  C       but after convergence loop does Line 189  C       but after convergence loop does
189  #ifdef ALLOW_AUTODIFF_TAMC  #ifdef ALLOW_AUTODIFF_TAMC
190  !$TAF STORE CONVERGED = comlev1_stream_nl, key=ikey_nl  !$TAF STORE CONVERGED = comlev1_stream_nl, key=ikey_nl
191  #endif  #endif
         
        IF (.not.CONVERGED) THEN  
192    
193           IF (.not.CONVERGED) THEN
194    
195         iter_numconv = iter_numconv + 1         iter_numconv = iter_numconv + 1
196    
# Line 217  C       but after convergence loop does Line 214  C       but after convergence loop does
214  !$TAF STORE zv_old_si = comlev1_stream_nl, key=ikey_nl  !$TAF STORE zv_old_si = comlev1_stream_nl, key=ikey_nl
215  #endif  #endif
216    
   
217         CALL STREAMICE_CG_WRAPPER(         CALL STREAMICE_CG_WRAPPER(
218       &       U_streamice,       &       U_streamice,
219       &       V_streamice,       &       V_streamice,
# Line 264  C       but after convergence loop does Line 260  C       but after convergence loop does
260         CALL STREAMICE_VISC_BETA ( myThid )         CALL STREAMICE_VISC_BETA ( myThid )
261  #endif  #endif
262    
   
263        _EXCH_XY_RL( tau_beta_eff_streamice , myThid )        _EXCH_XY_RL( tau_beta_eff_streamice , myThid )
264        _EXCH_XY_RL( visc_streamice , myThid )        _EXCH_XY_RL( visc_streamice , myThid )
265    
# Line 284  C       but after convergence loop does Line 279  C       but after convergence loop does
279          CONVERGED = .true.          CONVERGED = .true.
280         ENDIF         ENDIF
281    
282          endif
       endif  
   
   
283    
284        if (STREAMICE_chkfixedptconvergence .or.        if (STREAMICE_chkfixedptconvergence .or.
285       &    (streamice_maxnliter_cpl.eq.0 .and. myIter.eq.0)) then       &    (streamice_maxnliter_cpl.eq.0 .and. myIter.eq.0)) then
# Line 314  C       but after convergence loop does Line 306  C       but after convergence loop does
306          CONVERGED = .true.          CONVERGED = .true.
307         ENDIF         ENDIF
308    
309        endif        endif
   
   
   
310    
311  !----------------------END CONVERGENCE TESTS-------------------------------  !----------------------END CONVERGENCE TESTS-------------------------------
312    
   
   
   
313         IF (err_max<err_lastchange*1.e-2 .and.         IF (err_max<err_lastchange*1.e-2 .and.
314       &   STREAMICE_lower_cg_tol) THEN       &   STREAMICE_lower_cg_tol) THEN
315           cgtol = cgtol * 5.e-2           cgtol = cgtol * 5.e-2
# Line 334  C       but after convergence loop does Line 320  C       but after convergence loop does
320       &                    SQUEEZE_RIGHT , 1)       &                    SQUEEZE_RIGHT , 1)
321         ENDIF         ENDIF
322    
   
323         ENDIF ! (err_max .GT. streamice_nonlin_tol * err_init)         ENDIF ! (err_max .GT. streamice_nonlin_tol * err_init)
324        ENDDO        ENDDO
325    
# Line 361  C--------------------------------------- Line 346  C---------------------------------------
346        _EXCH_XY_RL(U_streamice, myThid)        _EXCH_XY_RL(U_streamice, myThid)
347        _EXCH_XY_RL(V_streamice, myThid)        _EXCH_XY_RL(V_streamice, myThid)
348    
   
349        CALL TIMER_STOP ('STREAMICE_VEL_SOLVE',myThid)        CALL TIMER_STOP ('STREAMICE_VEL_SOLVE',myThid)
350    
351  #endif  #endif
352        RETURN        RETURN
353        END        END
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.22