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

Contents of /MITgcm_contrib/dgoldberg/streamice/streamice_get_vel_fp_err.F

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


Revision 1.1 - (show annotations) (download)
Wed Aug 27 19:29:14 2014 UTC (10 years, 11 months ago) by dgoldberg
Branch: MAIN
CVS Tags: HEAD
updating contrib streamice repo with latest files, and separated out convergence checks; and parameterised maximum iteration counts and interface w shelfice for coupling

1 C $Header: /u/gcmpack/MITgcm/pkg/streamice/streamice_vel_solve.F,v 1.7 2014/04/24 12:01:50 dgoldberg Exp $
2 C $Name: $
3
4 #include "STREAMICE_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7
8 CBOP
9 SUBROUTINE STREAMICE_GET_VEL_FP_ERR ( err_max, myThid )
10 C /============================================================\
11 C | SUBROUTINE |
12 C | o |
13 C |============================================================|
14 C | |
15 C \============================================================/
16 IMPLICIT NONE
17
18 C === Global variables ===
19 #include "SIZE.h"
20 #include "EEPARAMS.h"
21 #include "PARAMS.h"
22 #include "STREAMICE.h"
23 #include "STREAMICE_CG.h"
24 !#ifdef ALLOW_PETSC
25 !#include "finclude/petsc.h"
26 !#endif
27
28 #ifdef ALLOW_AUTODIFF_TAMC
29 # include "tamc.h"
30 #endif
31
32 C !INPUT/OUTPUT ARGUMENTS
33 _RL err_max
34 INTEGER myThid
35
36 #ifdef ALLOW_STREAMICE
37
38 INTEGER conv_flag, i, j, bi, bj
39
40 INTEGER ikey_nl
41 _RL err_tempu, err_tempv
42 _RL max_vel, tempu, tempv, err_lastchange, cgtol
43 CHARACTER*(MAX_LEN_MBUF) msgBuf
44
45
46 err_max = 0. _d 0
47
48 DO bj = myByLo(myThid), myByHi(myThid)
49 DO bi = myBxLo(myThid), myBxHi(myThid)
50 DO j=1,sNy
51 DO i=1,sNx
52 err_tempu = 0. _d 0
53 err_tempv = 0. _d 0
54 IF (STREAMICE_umask(i,j,bi,bj).eq.1) THEN
55 err_tempu =
56 & ABS (U_streamice(i,j,bi,bj)-u_old_SI(i,j,bi,bj))
57 ENDIF
58 IF (STREAMICE_vmask(i,j,bi,bj).eq.1) THEN
59 err_tempv = MAX( err_tempu,
60 & ABS (V_streamice(i,j,bi,bj)-v_old_SI(i,j,bi,bj)))
61 ENDIF
62 IF (err_tempv .ge. err_max) err_max = err_tempv
63 ENDDO
64 ENDDO
65 ENDDO
66 ENDDO
67
68
69
70
71
72
73 #endif
74 RETURN
75 END
76

  ViewVC Help
Powered by ViewVC 1.1.22