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 |
|
|
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 |
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 |
|
|
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. |
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 |
|
|
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, |
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 |
|
|
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 |
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 |
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 |
|
|
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 |
|
|
|